From 83c67014034bbf9072d7e4555b0e51e815a95756 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 18 May 2019 00:00:18 -0700 Subject: switch to new syntax for segment headers in C++ --- subx/examples/ex4.subx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'subx/examples/ex4.subx') 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 -- cgit 1.4.1-2-gfad0