From 104e521c04d1a0cad9c68fb11e250e12ad8917ef Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Wed, 17 Oct 2018 07:08:47 -0700 Subject: 4709 --- html/subx/examples/ex6.subx.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'html/subx/examples/ex6.subx.html') diff --git a/html/subx/examples/ex6.subx.html b/html/subx/examples/ex6.subx.html index ef41ba15..5df92a48 100644 --- a/html/subx/examples/ex6.subx.html +++ b/html/subx/examples/ex6.subx.html @@ -66,19 +66,19 @@ if ('onhashchange' in window) { 10 # op subop mod rm32 base index scale r32 11 # 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 12 -13 # write(stdout, x, size) +13 # syscall(write, stdout, x, size) 14 # fd = 1 (stdout) -15 bb/copy . . . . . . . 1/imm32 # copy to EBX +15 bb/copy-to-EBX 1/imm32 16 # initialize x (location to write result to) -17 b9/copy . . . . . . . x/imm32 # copy to ECX +17 b9/copy-to-ECX x/imm32 18 # initialize size 19 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 2/r32/EDX size/disp32 . # copy *size to EDX -20 # write(fd, x, size) -21 b8/copy . . . . . . . 4/imm32/write # copy to EAX +20 # syscall +21 b8/copy-to-EAX 4/imm32/write 22 cd/syscall 0x80/imm8 23 -24 # exit(EBX) -25 b8/copy . . . . . . . 1/imm32/exit # copy to EAX +24 # syscall(exit, EBX) +25 b8/copy-to-EAX 1/imm32/exit 26 cd/syscall 0x80/imm8 27 28 == data @@ -88,7 +88,7 @@ if ('onhashchange' in window) { 32 48 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21 0a 00 33 # H e l l o , ␣ w o r l d ! newline null 34 -35 # vim:ft=subx:nowrap +35 # vim:nowrap:textwidth=0 -- cgit 1.4.1-2-gfad0 76' href='#n76'>76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117