1 # Add 1 and 1, and return the result in the exit code. 2 # 3 # To run: 4 # $ ./subx translate init.linux examples/ex2.subx -o examples/ex2 5 # $ ./subx run examples/ex2 6 # Expected result: 7 # $ echo $? 8 # 2 9 10 == code 11 12 Entry: 13 # ebx = 1 14 bb/copy-to-ebx 1/imm32 15 # increment ebx 16 43/increment-ebx 17 # exit(ebx) 18 e8/call syscall_exit/disp32 19 20 # . . vim:nowrap:textwidth=0