1 # First program: same as https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
 2 # Just return 42.
 3 #
 4 # To run (from the subx directory):
 5 #   $ subx translate examples/ex1.2.subx -o examples/ex1
 6 #   $ subx run examples/ex1
 7 # Expected result:
 8 #   $ echo $?
 9 #   42
10 
11 == code
12 
13 # syscall(exit, 42)
14 bb/copy-to-EBX  2a/imm32  # 42 in hex
15 b8/copy-to-EAX  1/imm32/exit
16 cd/syscall  0x80/imm8
17 
18 # . . vim:nowrap:textwidth=0