https://github.com/akkartik/mu/blob/main/linux/ex1.subx

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