diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-09-05 06:12:23 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-09-05 06:12:23 +0900 |
| commit | 6cccdc1f1f56fdd69c2d69888bc5e09cbf37e99b (patch) | |
| tree | 375c6e3564c3ac2059f63dc0333165bb96186f11 /problems | |
| parent | e7572238a416ca6966905c74ef6178c0ed45e6b5 (diff) | |
| download | mncore-challenge-6cccdc1f1f56fdd69c2d69888bc5e09cbf37e99b.tar.gz mncore-challenge-6cccdc1f1f56fdd69c2d69888bc5e09cbf37e99b.tar.zst mncore-challenge-6cccdc1f1f56fdd69c2d69888bc5e09cbf37e99b.zip | |
12-Convert-Endian
Diffstat (limited to 'problems')
| -rw-r--r-- | problems/12-Convert-Endian/04.vsm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/problems/12-Convert-Endian/04.vsm b/problems/12-Convert-Endian/04.vsm new file mode 100644 index 0000000..b28e515 --- /dev/null +++ b/problems/12-Convert-Endian/04.vsm @@ -0,0 +1,15 @@ +# n = 6909045637428952499 +# bin = n.to_s(2).rjust(64, '0') +# ds = bin.each_char.each_slice(8).map(&:join) +# +# puts n +# 8.times { |i| puts "[#{i}] = #{ds[i]}" } +# puts +# 8.times { |i| puts "[#{i}] = #{ds[8-i-1]}" } +# puts +# puts + +imm s"8" $nowrite +sbsl $lm0v $aluf $lr0v +imm i"16" $nowrite +ibsl $r0v $aluf $n[1,0,2,3] |
