diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-05-18 00:00:18 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-05-18 00:45:12 -0700 |
commit | 83c67014034bbf9072d7e4555b0e51e815a95756 (patch) | |
tree | cf52127783efc20bbe8d903d96e73bc51a1f752d /subx/examples/ex4.subx | |
parent | 4b506b630ce28b3574a9f903904588f92dd3a1c1 (diff) | |
download | mu-83c67014034bbf9072d7e4555b0e51e815a95756.tar.gz |
switch to new syntax for segment headers in C++
Diffstat (limited to 'subx/examples/ex4.subx')
-rw-r--r-- | subx/examples/ex4.subx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/subx/examples/ex4.subx b/subx/examples/ex4.subx index b18a5da0..a1f042ed 100644 --- a/subx/examples/ex4.subx +++ b/subx/examples/ex4.subx @@ -4,7 +4,13 @@ # $ ./subx translate examples/ex4.subx -o examples/ex4 # $ ./subx run examples/ex4 -== code +== data 0x0a000000 + +# the global variable we save to +X: + 0/imm32 # space for read() to write to + +== code 0x09000000 # syscall(read, stdin, X, 1) # . fd = 0 (stdin) @@ -32,9 +38,4 @@ cd/syscall 0x80/imm8 b8/copy-to-EAX 1/imm32/exit cd/syscall 0x80/imm8 -== data - -X: - 0/imm32 # space for read() to write to - # . . vim:nowrap:textwidth=0 |