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