1 # First example: return the answer to the Ultimate Question of Life, the 2 # Universe, and Everything. 3 # 4 # Same as https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html 5 # 6 # To run: 7 # $ bootstrap/bootstrap translate apps/ex1.subx -o ex1 8 # $ bootstrap/bootstrap run ex1 9 # Expected result: 10 # $ echo $? 11 # 42 12 13 == code 14 15 Entry: 16 # exit(42) 17 bb/copy-to-ebx 0x2a/imm32 # 42 in hex 18 e8/call syscall_exit/disp32 19 20 # . . vim:nowrap:textwidth=0