diff options
Diffstat (limited to 'tests/fixtures/byte-swap.s')
| -rw-r--r-- | tests/fixtures/byte-swap.s | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/fixtures/byte-swap.s b/tests/fixtures/byte-swap.s new file mode 100644 index 0000000..7f666d0 --- /dev/null +++ b/tests/fixtures/byte-swap.s @@ -0,0 +1,15 @@ +; Byte-swap example. +; +; Build/run from examples/: +; ../utils/mcpu-as -o byte-swap.o byte-swap.s +; ../utils/mcpu-ld --stack-size=512 -o byte-swap byte-swap.o +; ../utils/mcpu-run --int-reg=r64@0x00010 byte-swap +; +; Expected output: 42 +; +.text +_start_life: + LDI r64@0x00000, 42 + BSWAP r64@0x00008, r64@0x00000 + BSWAP r64@0x00010, r64@0x00008 + HALT |
