1 # First program: same as https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html 2 # Just return 42. 3 # 4 # To run: 5 # $ ./subx translate init.linux examples/ex1.2.subx -o examples/ex1 6 # $ ./subx run examples/ex1 7 # Expected result: 8 # $ echo $? 9 # 42 10 11 == code 12 13 Entry: 14 # exit(42) 15 bb/copy-to-ebx 2a/imm32 # 42 in hex 16 e8/call syscall_exit/disp32 17 18 # . . vim:nowrap:textwidth=0