From 8aeb85f04ee68b960a6d326aca1a17dec2f6d019 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 9 Dec 2019 01:26:58 -0800 Subject: 5806 --- html/079emit.subx.html | 66 +++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'html/079emit.subx.html') diff --git a/html/079emit.subx.html b/html/079emit.subx.html index b52186a4..60f0070f 100644 --- a/html/079emit.subx.html +++ b/html/079emit.subx.html @@ -78,7 +78,7 @@ if ('onhashchange' in window) { 17 57/push-edi 18 # esi = word 19 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 0xc/disp8 . # copy *(ebp+12) to esi - 20 # var name/edi : (address slice) = {0, 0} + 20 # var datum/edi : (ref slice) 21 68/push 0/imm32/end 22 68/push 0/imm32/start 23 89/copy 3/mod/direct 7/rm32/edi . . . 4/r32/esp . . # copy esp to edi @@ -97,11 +97,11 @@ if ('onhashchange' in window) { 36 # . . push args 37 57/push-edi 38 # . . call - 39 e8/call is-valid-name?/disp32 + 39 e8/call is-valid-name?/disp32 40 # . . discard args 41 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - 42 # . if (eax != 0) - 43 3d/compare-eax-and 0/imm32 + 42 # . if (eax != false) + 43 3d/compare-eax-and 0/imm32/false 44 74/jump-if-equal $emit:hex-int/disp8 45 $emit:name: 46 # . write-slice-buffered(out, word) @@ -109,7 +109,7 @@ if ('onhashchange' in window) { 48 56/push-esi 49 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8) 50 # . . call - 51 e8/call write-slice-buffered/disp32 + 51 e8/call write-slice-buffered/disp32 52 # . . discard args 53 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 54 # . write-buffered(out, " ") @@ -124,11 +124,11 @@ if ('onhashchange' in window) { 63 eb/jump $emit:end/disp8 64 # otherwise emit-hex(out, parse-hex-int(datum), width) 65 # (Weird shit can happen here if the datum of 'word' isn't either a valid - 66 # name or a hex number, but we're only going to be passing in real legal - 67 # programs. We just want to make sure that valid names aren't treated as - 68 # (valid) hex numbers.) + 66 # name or a hex number. `emit` is mostly used by ntranslate, which is + 67 # currently designed to only receive legal SubX programs. We just want to + 68 # make sure that valid names aren't treated as (valid) hex numbers.) 69 $emit:hex-int: - 70 # . value/eax = parse-hex-int(datum) + 70 # . var value/eax : int = parse-hex-int(datum) 71 # . . push args 72 57/push-edi 73 # . . call @@ -168,9 +168,9 @@ if ('onhashchange' in window) { 107 e8/call clear-stream/disp32 108 # . . discard args 109 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -110 # . clear-stream(_test-output-buffered-file->buffer) +110 # . clear-stream($_test-output-buffered-file->buffer) 111 # . . push args -112 68/push _test-output-buffered-file->buffer/imm32 +112 68/push $_test-output-buffered-file->buffer/imm32 113 # . . call 114 e8/call clear-stream/disp32 115 # . . discard args @@ -180,7 +180,7 @@ if ('onhashchange' in window) { 119 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 120 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 121 05/add-to-eax 4/imm32 -122 # var slice/ecx = {eax, ecx} +122 # var slice/ecx : (ref slice) = {eax, ecx} 123 51/push-ecx 124 50/push-eax 125 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx @@ -206,7 +206,7 @@ if ('onhashchange' in window) { 145 68/push "30 "/imm32 146 68/push _test-output-stream/imm32 147 # . . call -148 e8/call check-stream-equal/disp32 +148 e8/call check-stream-equal/disp32 149 # . . discard args 150 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 151 # . epilogue @@ -227,9 +227,9 @@ if ('onhashchange' in window) { 166 e8/call clear-stream/disp32 167 # . . discard args 168 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -169 # . clear-stream(_test-output-buffered-file->buffer) +169 # . clear-stream($_test-output-buffered-file->buffer) 170 # . . push args -171 68/push _test-output-buffered-file->buffer/imm32 +171 68/push $_test-output-buffered-file->buffer/imm32 172 # . . call 173 e8/call clear-stream/disp32 174 # . . discard args @@ -239,7 +239,7 @@ if ('onhashchange' in window) { 178 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 179 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 180 05/add-to-eax 4/imm32 -181 # var slice/ecx = {eax, ecx} +181 # var slice/ecx : (ref slice) = {eax, ecx} 182 51/push-ecx 183 50/push-eax 184 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx @@ -265,7 +265,7 @@ if ('onhashchange' in window) { 204 68/push "fe ff "/imm32 205 68/push _test-output-stream/imm32 206 # . . call -207 e8/call check-stream-equal/disp32 +207 e8/call check-stream-equal/disp32 208 # . . discard args 209 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 210 # . epilogue @@ -285,9 +285,9 @@ if ('onhashchange' in window) { 224 e8/call clear-stream/disp32 225 # . . discard args 226 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -227 # . clear-stream(_test-output-buffered-file->buffer) +227 # . clear-stream($_test-output-buffered-file->buffer) 228 # . . push args -229 68/push _test-output-buffered-file->buffer/imm32 +229 68/push $_test-output-buffered-file->buffer/imm32 230 # . . call 231 e8/call clear-stream/disp32 232 # . . discard args @@ -297,7 +297,7 @@ if ('onhashchange' in window) { 236 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 237 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 238 05/add-to-eax 4/imm32 -239 # var slice/ecx = {eax, ecx} +239 # var slice/ecx : (ref slice) = {eax, ecx} 240 51/push-ecx 241 50/push-eax 242 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx @@ -324,7 +324,7 @@ if ('onhashchange' in window) { 263 68/push "fe ff "/imm32 264 68/push _test-output-stream/imm32 265 # . . call -266 e8/call check-stream-equal/disp32 +266 e8/call check-stream-equal/disp32 267 # . . discard args 268 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 269 # . epilogue @@ -344,9 +344,9 @@ if ('onhashchange' in window) { 283 e8/call clear-stream/disp32 284 # . . discard args 285 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -286 # . clear-stream(_test-output-buffered-file->buffer) +286 # . clear-stream($_test-output-buffered-file->buffer) 287 # . . push args -288 68/push _test-output-buffered-file->buffer/imm32 +288 68/push $_test-output-buffered-file->buffer/imm32 289 # . . call 290 e8/call clear-stream/disp32 291 # . . discard args @@ -356,7 +356,7 @@ if ('onhashchange' in window) { 295 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 296 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 297 05/add-to-eax 4/imm32 -298 # var slice/ecx = {eax, ecx} +298 # var slice/ecx : (ref slice) = {eax, ecx} 299 51/push-ecx 300 50/push-eax 301 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx @@ -382,7 +382,7 @@ if ('onhashchange' in window) { 321 68/push "xyz "/imm32 322 68/push _test-output-stream/imm32 323 # . . call -324 e8/call check-stream-equal/disp32 +324 e8/call check-stream-equal/disp32 325 # . . discard args 326 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 327 # . epilogue @@ -402,9 +402,9 @@ if ('onhashchange' in window) { 341 e8/call clear-stream/disp32 342 # . . discard args 343 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -344 # . clear-stream(_test-output-buffered-file->buffer) +344 # . clear-stream($_test-output-buffered-file->buffer) 345 # . . push args -346 68/push _test-output-buffered-file->buffer/imm32 +346 68/push $_test-output-buffered-file->buffer/imm32 347 # . . call 348 e8/call clear-stream/disp32 349 # . . discard args @@ -414,7 +414,7 @@ if ('onhashchange' in window) { 353 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 354 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 355 05/add-to-eax 4/imm32 -356 # var slice/ecx = {eax, ecx} +356 # var slice/ecx : (ref slice) = {eax, ecx} 357 51/push-ecx 358 50/push-eax 359 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx @@ -440,7 +440,7 @@ if ('onhashchange' in window) { 379 68/push "xyz/ "/imm32 380 68/push _test-output-stream/imm32 381 # . . call -382 e8/call check-stream-equal/disp32 +382 e8/call check-stream-equal/disp32 383 # . . discard args 384 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 385 # . epilogue @@ -460,9 +460,9 @@ if ('onhashchange' in window) { 399 e8/call clear-stream/disp32 400 # . . discard args 401 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -402 # . clear-stream(_test-output-buffered-file->buffer) +402 # . clear-stream($_test-output-buffered-file->buffer) 403 # . . push args -404 68/push _test-output-buffered-file->buffer/imm32 +404 68/push $_test-output-buffered-file->buffer/imm32 405 # . . call 406 e8/call clear-stream/disp32 407 # . . discard args @@ -472,7 +472,7 @@ if ('onhashchange' in window) { 411 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 412 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 413 05/add-to-eax 4/imm32 -414 # var slice/ecx = {eax, ecx} +414 # var slice/ecx : (ref slice) = {eax, ecx} 415 51/push-ecx 416 50/push-eax 417 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx @@ -499,7 +499,7 @@ if ('onhashchange' in window) { 463 68/push "abcd/xyz "/imm32 464 68/push _test-output-stream/imm32 465 # . . call -466 e8/call check-stream-equal/disp32 +466 e8/call check-stream-equal/disp32 467 # . . discard args 468 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 469 # . epilogue -- cgit 1.4.1-2-gfad0