From 365f762f8ffe2596b538aa9da711b36806126899 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Thu, 26 Jul 2018 22:32:57 -0700 Subject: 4431 - operate exclusively in hex Was confusing having numbers without an explicit base sometimes be hex and sometimes not, based on their metadata. By convention I don't bother with the '0x' for instructions, or for single-digit numbers that are equal to their decimal representation. But I could and it would still work. --- subx/ex4.subx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'subx/ex4.subx') diff --git a/subx/ex4.subx b/subx/ex4.subx index 81c65dae..b8d5ca10 100644 --- a/subx/ex4.subx +++ b/subx/ex4.subx @@ -19,7 +19,7 @@ # syscall = read b8 3/imm32 # copy 3 to EAX # call - cd 128/imm8 # int 80h + cd 0x80/imm8 # int 80h ## write(stdout, x, 1) # fd = 1 (stdout) @@ -31,11 +31,11 @@ # syscall = write b8 4/imm32 # copy 4 to EAX # call - cd 128/imm8 # int 80h + cd 0x80/imm8 # int 80h ## exit(EBX) b8 1/imm32 # copy 1 to EAX - cd 128/imm8 # int 80h + cd 0x80/imm8 # int 80h == 0x080490a7 00 00 00 00 # space for read() to write to -- cgit 1.4.1-2-gfad0