5897 - rename comparison instructions

Signed and unsigned don't quite capture the essence of what the different
combinations of x86 flags are doing for SubX. The crucial distinction is
that one set of comparison operators is for integers and the second is
for addresses.
This commit is contained in:
Kartik Agaram 2020-01-16 18:31:12 -08:00
parent 5a6601aba9
commit 6070c23e5e
114 changed files with 1124 additions and 1140 deletions

View File

@ -34,7 +34,7 @@ _write: # fd : int, s : (addr array byte)
cd/syscall 0x80/imm8
# if (eax < 0) abort
3d/compare-eax-with 0/imm32
0f 8c/jump-if-lesser $_write:abort/disp32
0f 8c/jump-if-< $_write:abort/disp32
$_write:end:
# . restore registers
5b/pop-to-ebx

View File

@ -78,17 +78,17 @@ kernel-string-equal?: # s : (addr kernel-string), benchmark : (addr array byte)
$kernel-string-equal?:loop:
# if (i >= n) break
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
7d/jump-if-greater-or-equal $kernel-string-equal?:break/disp8
7d/jump-if->= $kernel-string-equal?:break/disp8
# c1 = *s1
8a/copy-byte 0/mod/indirect 7/rm32/edi . . . 0/r32/AL . . # copy byte at *edi to AL
# c2 = *s2
8a/copy-byte 0/mod/indirect 6/rm32/esi . . . 3/r32/BL . . # copy byte at *esi to BL
# if (c1 == 0) return false
3d/compare-eax-and 0/imm32
74/jump-if-equal $kernel-string-equal?:false/disp8
74/jump-if-= $kernel-string-equal?:false/disp8
# if (c1 != c2) return false
39/compare 3/mod/direct 0/rm32/eax . . . 3/r32/ebx . . # compare eax and ebx
75/jump-if-not-equal $kernel-string-equal?:false/disp8
75/jump-if-!= $kernel-string-equal?:false/disp8
# ++i
41/increment-ecx
# ++s1
@ -100,7 +100,7 @@ $kernel-string-equal?:break:
# return *s1 == 0
8a/copy-byte 0/mod/indirect 7/rm32/edi . . . 0/r32/AL . . # copy byte at *edi to AL
3d/compare-eax-and 0/imm32
75/jump-if-not-equal $kernel-string-equal?:false/disp8
75/jump-if-!= $kernel-string-equal?:false/disp8
$kernel-string-equal?:true:
b8/copy-to-eax 1/imm32
eb/jump $kernel-string-equal?:end/disp8

View File

@ -50,7 +50,7 @@ string-equal?: # s : (addr array byte), benchmark : (addr array byte) -> eax :
$string-equal?:lengths:
# if (ecx != benchmark->length) return false
39/compare 0/mod/indirect 7/rm32/edi . . . 1/r32/ecx . . # compare *edi and ecx
75/jump-if-not-equal $string-equal?:false/disp8
75/jump-if-!= $string-equal?:false/disp8
# var currs/esi : (addr byte) = s->data
81 0/subop/add 3/mod/direct 6/rm32/esi . . . . . 4/imm32 # add to esi
# var maxs/ecx : (addr byte) = &s->data[s->length]
@ -64,14 +64,14 @@ $string-equal?:lengths:
$string-equal?:loop:
# if (currs >= maxs) return true
39/compare 3/mod/direct 6/rm32/esi . . . 1/r32/ecx . . # compare esi with ecx
73/jump-if-greater-or-equal-unsigned $string-equal?:true/disp8
73/jump-if-addr>= $string-equal?:true/disp8
# c1 = *currs
8a/copy-byte 0/mod/indirect 6/rm32/esi . . . 0/r32/AL . . # copy byte at *esi to AL
# c2 = *currb
8a/copy-byte 0/mod/indirect 7/rm32/edi . . . 2/r32/DL . . # copy byte at *edi to DL
# if (c1 != c2) return false
39/compare 3/mod/direct 0/rm32/eax . . . 2/r32/edx . . # compare eax and edx
75/jump-if-not-equal $string-equal?:false/disp8
75/jump-if-!= $string-equal?:false/disp8
# ++currs
46/increment-esi
# ++currb

View File

@ -36,7 +36,7 @@ clear-stream: # f : (addr stream byte)
$clear-stream:loop:
# if (curr >= max) break
39/compare 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . . # compare eax with ecx
73/jump-if-greater-or-equal-unsigned $clear-stream:end/disp8
73/jump-if-addr>= $clear-stream:end/disp8
# *curr = 0
c6 0/subop/copy-byte 0/mod/direct 0/rm32/eax . . . . . 0/imm8 # copy byte to *eax
# ++curr

View File

@ -117,7 +117,7 @@ trace: # line : (addr array byte)
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp
# if (eax == 0) return
3d/compare-eax-and 0/imm32
74/jump-if-equal $trace:end/disp8
74/jump-if-= $trace:end/disp8
# t->write += eax
01/add 0/mod/indirect 7/rm32/edi . . . 0/r32/eax . . # add eax to *edi
# refresh ecx = t->write
@ -335,7 +335,7 @@ trace-scan: # line : (addr array byte) -> result/eax : boolean
$trace-scan:loop:
# if (Trace-stream->read >= Trace-stream->write) return false
39/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 . # compare ecx with *(esi+4)
7d/jump-if-greater-or-equal $trace-scan:false/disp8
7d/jump-if->= $trace-scan:false/disp8
# eax = next-line-matches?(Trace-stream, line)
# . . push args
ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8)
@ -346,7 +346,7 @@ $trace-scan:loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# if (eax == false) continue
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $trace-scan:continue/disp8
74/jump-if-= $trace-scan:continue/disp8
$trace-scan:true:
# skip-next-line(Trace-stream)
# . . push args
@ -604,12 +604,12 @@ next-line-matches?: # t : (addr stream byte), line : (addr array byte) -> resul
$next-line-matches?:loop:
# if (currl >= maxl) break
39/compare 3/mod/direct 6/rm32/esi . . . 1/r32/ecx . . # compare esi and ecx
73/jump-if-greater-or-equal-unsigned $next-line-matches?:break/disp8
73/jump-if-addr>= $next-line-matches?:break/disp8
# if (currt >= maxt) return false
# . eax = false
b8/copy-to-eax 0/imm32/false
39/compare 3/mod/direct 7/rm32/edi . . . 2/r32/edx . . # compare edi and edx
73/jump-if-greater-or-equal-unsigned $next-line-matches?:end/disp8
73/jump-if-addr>= $next-line-matches?:end/disp8
# if (*currt != *currl) return false
31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax
31/xor 3/mod/direct 3/rm32/eax . . . 3/r32/eax . . # clear ebx
@ -621,7 +621,7 @@ $next-line-matches?:loop:
39/compare 3/mod/direct 0/rm32/eax . . . 3/r32/ebx . . # compare eax and ebx
# . eax = false
b8/copy-to-eax 0/imm32/false
75/jump-if-not-equal $next-line-matches?:end/disp8
75/jump-if-!= $next-line-matches?:end/disp8
# ++currt
47/increment-edi
# ++currl
@ -635,7 +635,7 @@ $next-line-matches?:break:
3d/compare-eax-and 0xa/imm32/newline
# . eax = false
b8/copy-to-eax 1/imm32/true
74/jump-if-equal $next-line-matches?:end/disp8
74/jump-if-= $next-line-matches?:end/disp8
b8/copy-to-eax 0/imm32/true
$next-line-matches?:end:
# . restore registers
@ -771,14 +771,14 @@ skip-next-line: # t : (addr stream byte)
$skip-next-line:loop:
# if (curr >= max) break
39/compare 3/mod/direct 1/rm32/ecx . . . 3/r32/ebx . . # compare ecx and ebx
73/jump-if-greater-or-equal-unsigned $skip-next-line:end/disp8
73/jump-if-addr>= $skip-next-line:end/disp8
# ++i
42/increment-edx
# if (*curr == '\n') break
31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . . # copy *ecx to eax
3d/compare-eax-and 0a/imm32/newline
74/jump-if-equal $skip-next-line:end/disp8
74/jump-if-= $skip-next-line:end/disp8
# ++curr
41/increment-ecx
# loop
@ -917,10 +917,10 @@ _append-4: # out : (addr byte), outend : (addr byte), in : (addr byte), inend :
$_append-4:loop:
# if (in >= inend) break
39/compare 3/mod/direct 6/rm32/esi . . . 1/r32/ecx . . # compare esi with ecx
73/jump-if-greater-or-equal-unsigned $_append-4:end/disp8
73/jump-if-addr>= $_append-4:end/disp8
# if (out >= outend) abort # just to catch test failures fast
39/compare 3/mod/direct 7/rm32/edi . . . 2/r32/edx . . # compare edi with edx
73/jump-if-greater-or-equal-unsigned $_append-4:abort/disp8
73/jump-if-addr>= $_append-4:abort/disp8
# *out = *in
8a/copy-byte 0/mod/indirect 6/rm32/esi . . . 3/r32/BL . . # copy byte at *esi to BL
88/copy-byte 0/mod/indirect 7/rm32/edi . . . 3/r32/BL . . # copy byte at BL to *edi

View File

@ -27,7 +27,7 @@ write: # f : fd or (addr stream byte), s : (addr array byte)
89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp
# if (f < 0x08000000) _write(f, s) and return # f can't be a user-mode address, so treat it as a kernel file descriptor
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 0x08000000/imm32 # compare *(ebp+8)
73/jump-if-greater-unsigned-or-equal $write:fake/disp8
73/jump-if-addr>= $write:fake/disp8
# . . push args
ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 . # push *(ebp+12)
ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8)

View File

@ -28,7 +28,7 @@ stream-data-equal?: # f : (addr stream byte), s : (addr array byte) -> eax : bo
$stream-data-equal?:compare-lengths:
# if (f->write != s->length) return false
39/compare 0/mod/indirect 7/rm32/edi . . . 0/r32/eax . . # compare *edi and eax
75/jump-if-not-equal $stream-data-equal?:false/disp8
75/jump-if-!= $stream-data-equal?:false/disp8
# var currs/edi : (addr byte) = s->data
81 0/subop/add 3/mod/direct 7/rm32/edi . . . . . 4/imm32 # add to edi
# var eax : byte = 0
@ -38,14 +38,14 @@ $stream-data-equal?:compare-lengths:
$stream-data-equal?:loop:
# if (currf >= maxf) return true
39/compare 3/mod/direct 6/rm32/esi . . . 2/r32/edx . . # compare esi with edx
73/jump-if-greater-or-equal-unsigned $stream-data-equal?:true/disp8
73/jump-if-addr>= $stream-data-equal?:true/disp8
# AL = *currs
8a/copy-byte 0/mod/indirect 6/rm32/esi . . . 0/r32/AL . . # copy byte at *esi to AL
# CL = *curr
8a/copy-byte 0/mod/indirect 7/rm32/edi . . . 1/r32/CL . . # copy byte at *edi to CL
# if (eax != ecx) return false
39/compare 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . . # compare eax and ecx
75/jump-if-not-equal $stream-data-equal?:false/disp8
75/jump-if-!= $stream-data-equal?:false/disp8
# ++f
46/increment-esi
# ++curr
@ -287,20 +287,20 @@ next-stream-line-equal?: # f : (addr stream byte), s : (addr array byte) -> eax
$next-stream-line-equal?:loop:
# if (currf >= f->write) break
3b/compare 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # compare ecx with *esi
7d/jump-if-greater-or-equal $next-stream-line-equal?:break/disp8
7d/jump-if->= $next-stream-line-equal?:break/disp8
# c1 = f->data[f->read]
8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 . # copy byte at *(esi+ecx+12) to AL
# if (c1 == '\n') break
3d/compare-eax-and 0xa/imm32/newline
74/jump-if-equal $next-stream-line-equal?:break/disp8
74/jump-if-= $next-stream-line-equal?:break/disp8
# if (currs >= s->length) return false
3b/compare 0/mod/indirect 7/rm32/edi . . . 2/r32/edx . . # compare edx with *edi
7d/jump-if-greater-or-equal $next-stream-line-equal?:false/disp8
7d/jump-if->= $next-stream-line-equal?:false/disp8
# c2 = s->data[currs]
8a/copy-byte 1/mod/*+disp8 4/rm32/sib 7/base/edi 2/index/edx . 3/r32/BL 4/disp8 . # copy byte at *(edi+edx+4) to BL
# if (c1 != c2) return false
39/compare 3/mod/direct 0/rm32/eax . . . 3/r32/ebx . . # compare eax and ebx
75/jump-if-not-equal $next-stream-line-equal?:false/disp8
75/jump-if-!= $next-stream-line-equal?:false/disp8
# ++currf
41/increment-ecx
# ++currs
@ -311,7 +311,7 @@ $next-stream-line-equal?:break:
41/increment-ecx
# if (currs >= s->length) return true
3b/compare 0/mod/indirect 7/rm32/edi . . . 2/r32/edx . . # compare edx with *edi
7c/jump-if-lesser $next-stream-line-equal?:false/disp8
7c/jump-if-< $next-stream-line-equal?:false/disp8
$next-stream-line-equal?:true:
b8/copy-to-eax 1/imm32
# persist f->read on success

View File

@ -95,7 +95,7 @@ stop: # ed : (addr exit-descriptor), value : int
8b/copy 1/mod/*+disp8 4/rm32/sib 4/base/esp 4/index/none . 0/r32/eax 4/disp8 . # copy *(esp+4) to eax
# if (ed->target == 0) really exit
81 7/subop/compare 0/mod/indirect 0/rm32/eax . . . . . 0/imm32 # compare *eax
75/jump-if-not-equal $stop:fake/disp8
75/jump-if-!= $stop:fake/disp8
# . syscall(exit, value)
8b/copy 1/mod/*+disp8 4/rm32/sib 4/base/esp 4/index/none . 3/r32/ebx 8/disp8 . # copy *(esp+8) to ebx
b8/copy-to-eax 1/imm32/exit

View File

@ -51,7 +51,7 @@ read: # f : fd or (addr stream byte), s : (addr stream byte) -> num-bytes-read/
89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp
# if (f < 0x08000000) return _read(f, s) # f can't be a user-mode address, so treat it as a kernel file descriptor
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 0x08000000/imm32 # compare *(ebp+8)
73/jump-if-greater-unsigned-or-equal $read:fake/disp8
73/jump-if-addr>= $read:fake/disp8
# . . push args
ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 . # push *(ebp+12)
ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8)
@ -165,10 +165,10 @@ _buffer-4: # out : address, outend : address, in : address, inend : address ->
$_buffer-4:loop:
# if (in >= inend) break
39/compare 3/mod/direct 6/rm32/esi . . . 1/r32/ecx . . # compare esi with ecx
73/jump-if-greater-or-equal-unsigned $_buffer-4:end/disp8
73/jump-if-addr>= $_buffer-4:end/disp8
# if (out >= outend) break # for now silently ignore filled up buffer
39/compare 3/mod/direct 7/rm32/edi . . . 2/r32/edx . . # compare edi with edx
73/jump-if-greater-or-equal-unsigned $_buffer-4:end/disp8
73/jump-if-addr>= $_buffer-4:end/disp8
# *out = *in
8a/copy-byte 0/mod/indirect 6/rm32/esi . . . 3/r32/BL . . # copy byte at *esi to BL
88/copy-byte 0/mod/indirect 7/rm32/edi . . . 3/r32/BL . . # copy byte at BL to *edi

View File

@ -48,7 +48,7 @@ read-byte-buffered: # f : (addr buffered-file) -> byte-or-Eof/eax
8b/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 8/disp8 . # copy *(esi+8) to ecx
# if (f->read >= f->write) populate stream from file
3b/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 . # compare ecx with *(esi+4)
7c/jump-if-lesser $read-byte-buffered:from-stream/disp8
7c/jump-if-< $read-byte-buffered:from-stream/disp8
# . clear-stream(stream = f+4)
# . . push args
8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 0/r32/eax 4/disp8 . # copy esi+4 to eax
@ -69,7 +69,7 @@ read-byte-buffered: # f : (addr buffered-file) -> byte-or-Eof/eax
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# if (eax == 0) return 0xffffffff
3d/compare-eax-and 0/imm32
75/jump-if-not-equal $read-byte-buffered:from-stream/disp8
75/jump-if-!= $read-byte-buffered:from-stream/disp8
b8/copy-to-eax 0xffffffff/imm32/Eof
eb/jump $read-byte-buffered:end/disp8
$read-byte-buffered:from-stream:

View File

@ -21,7 +21,7 @@ write-stream: # f : fd or (addr stream byte), s : (addr stream byte)
89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp
# if (f < 0x08000000) _write-stream(f, s), return # f can't be a user-mode address, so treat it as a kernel file descriptor
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 0x08000000/imm32 # compare *(ebp+8)
73/jump-if-greater-unsigned-or-equal $write-stream:fake/disp8
73/jump-if-addr>= $write-stream:fake/disp8
# . . push args
ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 . # push *(ebp+12)
ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8)
@ -104,7 +104,7 @@ _write-stream: # fd : int, s : (addr stream byte)
cd/syscall 0x80/imm8
# if (eax < 0) abort
3d/compare-eax-with 0/imm32
0f 8c/jump-if-lesser $_write-stream:abort/disp32
0f 8c/jump-if-< $_write-stream:abort/disp32
# s->read += eax
01/add 1/mod/*+disp8 6/rm32/esi . . . 0/r32/eax 4/disp8 . # add eax to *(esi+4)
# . restore registers

View File

@ -43,7 +43,7 @@ write-byte-buffered: # f : (addr buffered-file), n : int
8b/copy 1/mod/*+disp8 7/rm32/edi . . . 1/r32/ecx 4/disp8 . # copy *(edi+4) to ecx
# if (f->write >= f->length) flush and clear f's stream
3b/compare 1/mod/*+disp8 7/rm32/edi . . . 1/r32/ecx 0xc/disp8 . # compare ecx with *(edi+12)
7c/jump-if-lesser $write-byte-buffered:to-stream/disp8
7c/jump-if-< $write-byte-buffered:to-stream/disp8
# . flush(f)
# . . push args
57/push-edi
@ -218,7 +218,7 @@ append-byte: # f : (addr stream byte), n : int
8b/copy 0/mod/indirect 7/rm32/edi . . . 1/r32/ecx . . # copy *edi to ecx
# if (f->write >= f->length) abort
3b/compare 1/mod/*+disp8 7/rm32/edi . . . 1/r32/ecx 8/disp8 . # compare ecx with *(edi+8)
7d/jump-if-greater-or-equal $append-byte:abort/disp8
7d/jump-if->= $append-byte:abort/disp8
$append-byte:to-stream:
# write to stream
# f->data[f->write] = LSB(n)

View File

@ -52,10 +52,10 @@ write-buffered: # f : (addr buffered-file), msg : (addr array byte)
$write-buffered:loop:
# if (in >= inend) break
39/compare 3/mod/direct 6/rm32/esi . . . 1/r32/ecx . . # compare esi with ecx
73/jump-if-greater-or-equal-unsigned $write-buffered:loop-end/disp8
73/jump-if-addr>= $write-buffered:loop-end/disp8
# if (f->write >= f->length) flush and clear f's stream
39/compare 3/mod/direct 3/rm32/ebx . . . 2/r32/edx . . # compare ebx with edx
7c/jump-if-lesser $write-buffered:to-stream/disp8
7c/jump-if-< $write-buffered:to-stream/disp8
# . persist f->write
89/copy 1/mod/*+disp8 7/rm32/edi . . . 3/r32/ebx 4/disp8 . # copy ebx to *(edi+4)
# . flush(f)

View File

@ -10,7 +10,7 @@ to-hex-char: # in/eax : int -> out/eax : int
# no error checking; accepts argument in eax
# if (eax <= 9) return eax + '0'
3d/compare-eax-with 0x9/imm32/9
7f/jump-if-greater $to-hex-char:else/disp8
7f/jump-if-> $to-hex-char:else/disp8
05/add-to-eax 0x30/imm32/0
c3/return
$to-hex-char:else:
@ -206,7 +206,7 @@ $print-int32:print-hex-prefix:
$print-int32:loop:
# if (ecx < 0) break
81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0/imm32 # compare ecx
7c/jump-if-lesser $print-int32:end/disp8
7c/jump-if-< $print-int32:end/disp8
# eax = n >> ecx
8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0xc/disp8 . # copy *(ebp+12) to eax
d3/>>ecx 5/subop/pad-zeroes 3/mod/direct 0/rm32/eax . . . . . . # shift eax right by ecx bits, padding zeroes
@ -294,7 +294,7 @@ $print-int32-buffered:print-hex-prefix:
$print-int32-buffered:loop:
# if (ecx < 0) break
81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0/imm32 # compare ecx
7c/jump-if-lesser $print-int32-buffered:end/disp8
7c/jump-if-< $print-int32-buffered:end/disp8
# eax = n >> ecx
8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0xc/disp8 . # copy *(ebp+12) to eax
d3/>>ecx 5/subop/pad-zeroes 3/mod/direct 0/rm32/eax . . . . . . # shift eax right by ecx bits, padding zeroes

View File

@ -23,13 +23,13 @@ is-hex-int?: # in : (addr slice) -> eax : boolean
# if s is empty return false
b8/copy-to-eax 0/imm32/false
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $is-hex-int?:end/disp8
73/jump-if-addr>= $is-hex-int?:end/disp8
# skip past leading '-'
# . if (*curr == '-') ++curr
31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . . # clear ebx
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 3/r32/BL . . # copy byte at *ecx to BL
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x2d/imm32/- # compare ebx
75/jump-if-not-equal $is-hex-int?:initial-0/disp8
75/jump-if-!= $is-hex-int?:initial-0/disp8
# . ++curr
41/increment-ecx
# skip past leading '0x'
@ -38,24 +38,24 @@ $is-hex-int?:initial-0:
31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . . # clear ebx
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 3/r32/BL . . # copy byte at *ecx to BL
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x30/imm32/0 # compare ebx
75/jump-if-not-equal $is-hex-int?:loop/disp8
75/jump-if-!= $is-hex-int?:loop/disp8
# . ++curr
41/increment-ecx
$is-hex-int?:initial-0x:
# . if (curr >= in->end) return true
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $is-hex-int?:true/disp8
73/jump-if-addr>= $is-hex-int?:true/disp8
# . if (*curr != 'x') jump to loop # the previous '0' is still valid so doesn't need to be checked again
31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . . # clear ebx
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 3/r32/BL . . # copy byte at *ecx to BL
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x78/imm32/x # compare ebx
75/jump-if-not-equal $is-hex-int?:loop/disp8
75/jump-if-!= $is-hex-int?:loop/disp8
# . ++curr
41/increment-ecx
$is-hex-int?:loop:
# if (curr >= in->end) return true
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $is-hex-int?:true/disp8
73/jump-if-addr>= $is-hex-int?:true/disp8
# var eax : boolean = is-hex-digit?(*curr)
# . . push args
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
@ -66,7 +66,7 @@ $is-hex-int?:loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# if (eax == false) return false
3d/compare-eax-and 0/imm32
74/jump-if-equal $is-hex-int?:end/disp8
74/jump-if-= $is-hex-int?:end/disp8
# ++curr
41/increment-ecx
# loop
@ -375,7 +375,7 @@ $parse-hex-int:negative:
31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
3d/compare-eax-and 0x2d/imm32/-
75/jump-if-not-equal $parse-hex-int:initial-0/disp8
75/jump-if-!= $parse-hex-int:initial-0/disp8
# . ++curr
41/increment-ecx
# . negate = true
@ -385,24 +385,24 @@ $parse-hex-int:initial-0:
# . if (*curr != '0') jump to loop
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
3d/compare-eax-and 0x30/imm32/0
75/jump-if-not-equal $parse-hex-int:loop/disp8
75/jump-if-!= $parse-hex-int:loop/disp8
# . ++curr
41/increment-ecx
$parse-hex-int:initial-0x:
# . if (curr >= in->end) return result
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $parse-hex-int:end/disp8
73/jump-if-addr>= $parse-hex-int:end/disp8
# . if (*curr != 'x') jump to loop # the previous '0' is still valid so doesn't need to be checked again
31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
3d/compare-eax-and 0x78/imm32/x
75/jump-if-not-equal $parse-hex-int:loop/disp8
75/jump-if-!= $parse-hex-int:loop/disp8
# . ++curr
41/increment-ecx
$parse-hex-int:loop:
# if (curr >= in->end) break
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $parse-hex-int:negate/disp8
73/jump-if-addr>= $parse-hex-int:negate/disp8
# var eax : int = from-hex-char(*curr)
# . . copy arg to eax
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
@ -418,7 +418,7 @@ $parse-hex-int:loop:
$parse-hex-int:negate:
# if (negate?) result = -result
81 7/subop/compare 3/mod/direct 6/rm32/esi . . . . . 0/imm32/false # compare esi
74/jump-if-equal $parse-hex-int:end/disp8
74/jump-if-= $parse-hex-int:end/disp8
f7 3/subop/negate 3/mod/direct 3/rm32/ebx . . . . . . # negate ebx
$parse-hex-int:end:
# return result
@ -647,18 +647,18 @@ is-hex-digit?: # c : byte -> eax : boolean
8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 8/disp8 . # copy *(ebp+8) to ecx
# return false if c < '0'
81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x30/imm32 # compare ecx
7c/jump-if-lesser $is-hex-digit?:false/disp8
7c/jump-if-< $is-hex-digit?:false/disp8
# return true if c <= '9'
81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x39/imm32 # compare ecx
7e/jump-if-lesser-or-equal $is-hex-digit?:true/disp8
7e/jump-if-<= $is-hex-digit?:true/disp8
# drop case
25/and-eax-with 0x5f/imm32
# return false if c > 'f'
81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x66/imm32 # compare ecx
7f/jump-if-greater $is-hex-digit?:false/disp8
7f/jump-if-> $is-hex-digit?:false/disp8
# return true if c >= 'a'
81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x61/imm32 # compare ecx
7d/jump-if-greater-or-equal $is-hex-digit?:true/disp8
7d/jump-if->= $is-hex-digit?:true/disp8
# otherwise return false
$is-hex-digit?:false:
b8/copy-to-eax 0/imm32/false
@ -804,15 +804,15 @@ from-hex-char: # in/eax : byte -> out/eax : nibble
$from-hex-char:check0:
# if (eax < '0') goto abort
3d/compare-eax-with 0x30/imm32/0
7c/jump-if-lesser $from-hex-char:abort/disp8
7c/jump-if-< $from-hex-char:abort/disp8
$from-hex-char:check1:
# if (eax > 'f') goto abort
3d/compare-eax-with 0x66/imm32/f
7f/jump-if-greater $from-hex-char:abort/disp8
7f/jump-if-> $from-hex-char:abort/disp8
$from-hex-char:check2:
# if (eax > '9') goto next check
3d/compare-eax-with 0x39/imm32/9
7f/jump-if-greater $from-hex-char:check3/disp8
7f/jump-if-> $from-hex-char:check3/disp8
$from-hex-char:digit:
# return eax - '0'
2d/subtract-from-eax 0x30/imm32/0
@ -820,7 +820,7 @@ $from-hex-char:digit:
$from-hex-char:check3:
# if (eax < 'a') goto abort
3d/compare-eax-with 0x61/imm32/a
7c/jump-if-lesser $from-hex-char:abort/disp8
7c/jump-if-< $from-hex-char:abort/disp8
$from-hex-char:letter:
# return eax - ('a'-10)
2d/subtract-from-eax 0x57/imm32/a-10

View File

@ -72,7 +72,7 @@ allocate: # ad : (addr allocation-descriptor), n : int -> address-or-null/eax :
89/copy 3/mod/direct 2/rm32/edx . . . 0/r32/eax . . # copy eax to edx
03/add 1/mod/*+disp8 5/rm32/ebp . . . 2/r32/edx 0xc/disp8 . # add *(ebp+12) to edx
3b/compare 1/mod/*+disp8 1/rm32/ecx . . . 2/r32/edx 4/disp8 . # compare edx with *(ecx+4)
73/jump-if-greater-or-equal-signed $allocate:abort/disp8
73/jump-if->=-signed $allocate:abort/disp8
$allocate:commit:
# update ad->curr
89/copy 0/mod/indirect 1/rm32/ecx . . . 2/r32/edx . . # copy edx to *ecx
@ -196,7 +196,7 @@ allocate-region: # ad : (addr allocation-descriptor), n : int -> new-ad : (hand
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# if (eax == 0) abort
3d/compare-eax-and 0/imm32
74/jump-if-equal $allocate-region:abort/disp8
74/jump-if-= $allocate-region:abort/disp8
# earmark 8 bytes at the start for a new allocation descriptor
# . *eax = eax + 8
89/copy 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . . # copy eax to ecx

View File

@ -19,7 +19,7 @@ new-stream: # ad : (addr allocation-descriptor), length : int, elemsize : int -
f7 4/subop/multiply 1/mod/*+disp8 5/rm32/ebp . . 0xc/disp8 . # multiply *(ebp+12) into eax
# . if overflow abort
81 7/subop/compare 3/mod/direct 2/rm32/edx . . . . . 0/imm32 # compare edx
75/jump-if-not-equal $new-stream:abort/disp8
75/jump-if-!= $new-stream:abort/disp8
# . edx = elemsize*length
89/copy 3/mod/direct 2/rm32/edx . . . 0/r32/eax . . # copy eax to edx
# . eax += 12

View File

@ -37,10 +37,10 @@ read-line-buffered: # f : (addr buffered-file), s : (addr stream byte)
$read-line-buffered:loop:
# if (s->write >= s->length) abort
3b/compare 1/mod/*+disp8 7/rm32/edi . . . 2/r32/edx 8/disp8 . # compare edx with *(edi+8)
7d/jump-if-greater-or-equal $read-line-buffered:abort/disp8
7d/jump-if->= $read-line-buffered:abort/disp8
# if (f->read >= f->write) populate stream from file
3b/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 . # compare ecx with *(esi+4)
7c/jump-if-lesser $read-line-buffered:from-stream/disp8
7c/jump-if-< $read-line-buffered:from-stream/disp8
# . clear-stream(stream = f+4)
# . . push args
8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 0/r32/eax 4/disp8 . # copy esi+4 to eax
@ -63,7 +63,7 @@ $read-line-buffered:loop:
# since f->read was initially 0, eax is the same as f->write
# . if (eax == 0) return true
3d/compare-eax-and 0/imm32
74/jump-if-equal $read-line-buffered:end/disp8
74/jump-if-= $read-line-buffered:end/disp8
$read-line-buffered:from-stream:
# AL = f->data[f->read]
31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax
@ -76,7 +76,7 @@ $read-line-buffered:from-stream:
42/increment-edx
# if (AL == '\n') return
3d/compare-eax-and 0xa/imm32
75/jump-if-not-equal $read-line-buffered:loop/disp8
75/jump-if-!= $read-line-buffered:loop/disp8
$read-line-buffered:end:
# save f->read
89/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 8/disp8 . # copy ecx to *(esi+8)
@ -246,10 +246,10 @@ read-line: # f : (addr stream byte), s : (addr stream byte)
$read-line:loop:
# if (s->write >= s->length) abort
3b/compare 1/mod/*+disp8 7/rm32/edi . . . 2/r32/edx 8/disp8 . # compare edx with *(edi+8)
0f 8d/jump-if-greater-or-equal $read-line:abort/disp32
0f 8d/jump-if->= $read-line:abort/disp32
# if (f->read >= f->write) break
3b/compare 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # compare ecx with *esi
7d/jump-if-greater-or-equal $read-line:end/disp8
7d/jump-if->= $read-line:end/disp8
# AL = f->data[f->read]
31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax
8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 . # copy byte at *(esi+ecx+12) to AL
@ -261,7 +261,7 @@ $read-line:loop:
42/increment-edx
# if (AL == '\n') return
3d/compare-eax-and 0xa/imm32
0f 85/jump-if-not-equal $read-line:loop/disp32
0f 85/jump-if-!= $read-line:loop/disp32
$read-line:end:
# save f->read
89/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 . # copy ecx to *(esi+4)

View File

@ -20,7 +20,7 @@ slice-empty?: # s : (addr slice) -> eax : boolean
# . compare eax and s->end
39/compare 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # compare eax and *(ecx+4)
b8/copy-to-eax 1/imm32/true
74/jump-if-equal $slice-empty?:end/disp8
74/jump-if-= $slice-empty?:end/disp8
b8/copy-to-eax 0/imm32/false
$slice-empty?:end:
# . restore registers
@ -129,16 +129,16 @@ slice-equal?: # s : (addr slice), p : (addr array byte) -> eax : boolean
8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 3/r32/ebx 0xc/disp8 . # copy *(ebp+12) to ebx
# if (p != 0) goto next check
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0/imm32 # compare ebx
75/jump-if-not-equal $slice-equal?:nonnull-string/disp8
75/jump-if-!= $slice-equal?:nonnull-string/disp8
$slice-equal?:null-string:
# return s->start == s->end
3d/compare-eax-and 0/imm32
74/jump-if-equal $slice-equal?:true/disp8
74/jump-if-= $slice-equal?:true/disp8
eb/jump $slice-equal?:false/disp8
$slice-equal?:nonnull-string:
# if (slen != p->length) return false
39/compare 0/mod/indirect 3/rm32/ebx . . . 0/r32/eax . . # compare *ebx and eax
75/jump-if-not-equal $slice-equal?:false/disp8
75/jump-if-!= $slice-equal?:false/disp8
# var currp/ebx : (addr byte) = p->data
81 0/subop/add 3/mod/direct 3/rm32/ebx . . . . . 4/imm32 # add to ebx
# var c1/eax : byte = 0
@ -148,14 +148,14 @@ $slice-equal?:nonnull-string:
$slice-equal?:loop:
# if (currs >= maxs) return true
39/compare 3/mod/direct 2/rm32/edx . . . 6/r32/esi . . # compare edx with esi
73/jump-if-greater-or-equal-unsigned $slice-equal?:true/disp8
73/jump-if-addr>= $slice-equal?:true/disp8
# c1 = *currp
8a/copy-byte 0/mod/indirect 3/rm32/ebx . . . 0/r32/AL . . # copy byte at *ebx to AL
# c2 = *currs
8a/copy-byte 0/mod/indirect 2/rm32/edx . . . 1/r32/CL . . # copy byte at *edx to CL
# if (c1 != c2) return false
39/compare 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . . # compare eax and ecx
75/jump-if-not-equal $slice-equal?:false/disp8
75/jump-if-!= $slice-equal?:false/disp8
# ++currp
43/increment-ebx
# ++currs
@ -497,7 +497,7 @@ slice-starts-with?: # s : (addr slice), head : (addr array byte) -> eax : boole
8b/copy 0/mod/indirect 7/rm32/edi . . . 2/r32/edx . . # copy *edi to edx
# if (lenh > lens) return false
39/compare 3/mod/direct 2/rm32/edx . . . 1/r32/ecx . . # compare edx with ecx
7f/jump-if-greater $slice-starts-with?:false/disp8
7f/jump-if-> $slice-starts-with?:false/disp8
# var currs/esi : (addr byte) = s->start
8b/subtract 0/mod/indirect 6/rm32/esi . . . 6/r32/esi . . # copy *esi to esi
# var currh/edi : (addr byte) = head->data
@ -511,14 +511,14 @@ slice-starts-with?: # s : (addr slice), head : (addr array byte) -> eax : boole
$slice-starts-with?:loop:
# if (i >= lenh) return true
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
7d/jump-if-greater-or-equal $slice-starts-with?:true/disp8
7d/jump-if->= $slice-starts-with?:true/disp8
# c1 = *currs
8a/copy-byte 0/mod/indirect 6/rm32/esi . . . 0/r32/AL . . # copy byte at *esi to AL
# c2 = *currh
8a/copy-byte 0/mod/indirect 7/rm32/edi . . . 3/r32/BL . . # copy byte at *edi to BL
# if (c1 != c2) return false
39/compare 3/mod/direct 0/rm32/eax . . . 3/r32/ebx . . # compare eax and ebx
75/jump-if-not-equal $slice-starts-with?:false/disp8
75/jump-if-!= $slice-starts-with?:false/disp8
# ++i
41/increment-ecx
# ++currs
@ -787,10 +787,10 @@ write-slice: # out : (addr stream byte), s : (addr slice)
$write-slice:loop:
# if (curr >= max) break
39/compare 3/mod/direct 1/rm32/ecx . . . 6/r32/esi . . # compare ecx with esi
73/jump-if-greater-or-equal-unsigned $write-slice:loop-end/disp8
73/jump-if-addr>= $write-slice:loop-end/disp8
# if (out->write >= out->length) abort
39/compare 3/mod/direct 3/rm32/ebx . . . 2/r32/edx . . # compare ebx with edx
7d/jump-if-greater-or-equal $write-slice:abort/disp8
7d/jump-if->= $write-slice:abort/disp8
# out->data[out->write] = *in
# . AL = *in
31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax
@ -903,10 +903,10 @@ write-slice-buffered: # out : (addr buffered-file), s : (addr slice)
$write-slice-buffered:loop:
# if (curr >= max) break
39/compare 3/mod/direct 1/rm32/ecx . . . 6/r32/esi . . # compare ecx with esi
73/jump-if-greater-or-equal-unsigned $write-slice-buffered:loop-end/disp8
73/jump-if-addr>= $write-slice-buffered:loop-end/disp8
# if (out->write >= out->length) flush and clear out's stream
39/compare 3/mod/direct 3/rm32/ebx . . . 2/r32/edx . . # compare ebx with edx
7c/jump-if-lesser $write-slice-buffered:to-stream/disp8
7c/jump-if-< $write-slice-buffered:to-stream/disp8
# . persist out->write
89/copy 1/mod/*+disp8 7/rm32/edi . . . 3/r32/ebx 4/disp8 . # copy ebx to *(edi+4)
# . flush(out)
@ -1041,7 +1041,7 @@ slice-to-string: # ad : (addr allocation-descriptor), in : (addr slice) -> out/
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# if (eax == 0) abort
3d/compare-eax-and 0/imm32
74/jump-if-equal $slice-to-string:abort/disp8
74/jump-if-= $slice-to-string:abort/disp8
# out->length = size-4
89/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy ecx to *eax
81 5/subop/subtract 0/mod/indirect 0/rm32/eax . . . . . 4/imm32 # subtract 4 from *eax

View File

@ -359,13 +359,13 @@ skip-chars-matching: # in : (addr stream byte), delimiter : byte
$skip-chars-matching:loop:
# if (in->read >= in->write) break
39/compare 3/mod/direct 1/rm32/ecx . . . 3/r32/ebx . . # compare ecx with ebx
7d/jump-if-greater-or-equal $skip-chars-matching:end/disp8
7d/jump-if->= $skip-chars-matching:end/disp8
# eax = in->data[in->read]
31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax
8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 . # copy byte at *(esi+ecx+12) to AL
# if (eax != delimiter) break
39/compare 3/mod/direct 0/rm32/eax . . . 2/r32/edx . . # compare eax and edx
75/jump-if-not-equal $skip-chars-matching:end/disp8
75/jump-if-!= $skip-chars-matching:end/disp8
# ++in->read
41/increment-ecx
eb/jump $skip-chars-matching:loop/disp8
@ -479,22 +479,22 @@ skip-chars-matching-whitespace: # in : (addr stream byte)
$skip-chars-matching-whitespace:loop:
# if (in->read >= in->write) break
39/compare 3/mod/direct 1/rm32/ecx . . . 3/r32/ebx . . # compare ecx with ebx
7d/jump-if-greater-or-equal $skip-chars-matching-whitespace:end/disp8
7d/jump-if->= $skip-chars-matching-whitespace:end/disp8
# eax = in->data[in->read]
31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax
8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 . # copy byte at *(esi+ecx+12) to AL
# if (eax == ' ') goto body
3d/compare-eax-and 0x20/imm32/space
74/jump-if-equal $skip-chars-matching-whitespace:body/disp8
74/jump-if-= $skip-chars-matching-whitespace:body/disp8
# if (eax == '\n') goto body
3d/compare-eax-and 0x0a/imm32/newline
74/jump-if-equal $skip-chars-matching-whitespace:body/disp8
74/jump-if-= $skip-chars-matching-whitespace:body/disp8
# if (eax == '\t') goto body
3d/compare-eax-and 0x09/imm32/tab
74/jump-if-equal $skip-chars-matching-whitespace:body/disp8
74/jump-if-= $skip-chars-matching-whitespace:body/disp8
# if (eax != '\r') break
3d/compare-eax-and 0x0d/imm32/cr
75/jump-if-not-equal $skip-chars-matching-whitespace:end/disp8
75/jump-if-!= $skip-chars-matching-whitespace:end/disp8
$skip-chars-matching-whitespace:body:
# ++in->read
41/increment-ecx
@ -572,13 +572,13 @@ skip-chars-not-matching: # in : (addr stream byte), delimiter : byte
$skip-chars-not-matching:loop:
# if (in->read >= in->write) break
39/compare 3/mod/direct 1/rm32/ecx . . . 3/r32/ebx . . # compare ecx with ebx
7d/jump-if-greater-or-equal $skip-chars-not-matching:end/disp8
7d/jump-if->= $skip-chars-not-matching:end/disp8
# eax = in->data[in->read]
31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax
8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 . # copy byte at *(esi+ecx+12) to AL
# if (eax == delimiter) break
39/compare 3/mod/direct 0/rm32/eax . . . 2/r32/edx . . # compare eax and edx
74/jump-if-equal $skip-chars-not-matching:end/disp8
74/jump-if-= $skip-chars-not-matching:end/disp8
# ++in->read
41/increment-ecx
eb/jump $skip-chars-not-matching:loop/disp8
@ -731,22 +731,22 @@ skip-chars-not-matching-whitespace: # in : (addr stream byte)
$skip-chars-not-matching-whitespace:loop:
# if (in->read >= in->write) break
39/compare 3/mod/direct 1/rm32/ecx . . . 3/r32/ebx . . # compare ecx with ebx
7d/jump-if-greater-or-equal $skip-chars-not-matching-whitespace:end/disp8
7d/jump-if->= $skip-chars-not-matching-whitespace:end/disp8
# eax = in->data[in->read]
31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax
8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 . # copy byte at *(esi+ecx+12) to AL
# if (eax == ' ') break
3d/compare-eax-and 0x20/imm32/space
74/jump-if-equal $skip-chars-not-matching-whitespace:end/disp8
74/jump-if-= $skip-chars-not-matching-whitespace:end/disp8
# if (eax == '\n') break
3d/compare-eax-and 0x0a/imm32/newline
74/jump-if-equal $skip-chars-not-matching-whitespace:end/disp8
74/jump-if-= $skip-chars-not-matching-whitespace:end/disp8
# if (eax == '\t') break
3d/compare-eax-and 0x09/imm32/tab
74/jump-if-equal $skip-chars-not-matching-whitespace:end/disp8
74/jump-if-= $skip-chars-not-matching-whitespace:end/disp8
# if (eax == '\r') break
3d/compare-eax-and 0x0d/imm32/cr
74/jump-if-equal $skip-chars-not-matching-whitespace:end/disp8
74/jump-if-= $skip-chars-not-matching-whitespace:end/disp8
# ++in->read
41/increment-ecx
eb/jump $skip-chars-not-matching-whitespace:loop/disp8
@ -820,12 +820,12 @@ skip-chars-matching-in-slice: # curr : (addr byte), end : (addr byte), delimite
$skip-chars-matching-in-slice:loop:
# if (curr >= end) break
39/compare 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . . # compare eax with ecx
73/jump-if-greater-or-equal-unsigned $skip-chars-matching-in-slice:end/disp8
73/jump-if-addr>= $skip-chars-matching-in-slice:end/disp8
# c = *curr
8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 3/r32/BL . . # copy byte at *eax to BL
# if (c != delimiter) break
39/compare 3/mod/direct 3/rm32/ebx . . . 2/r32/edx . . # compare ebx and edx
75/jump-if-not-equal $skip-chars-matching-in-slice:end/disp8
75/jump-if-!= $skip-chars-matching-in-slice:end/disp8
# ++curr
40/increment-eax
eb/jump $skip-chars-matching-in-slice:loop/disp8
@ -913,21 +913,21 @@ skip-chars-matching-whitespace-in-slice: # curr : (addr byte), end : (addr byte
$skip-chars-matching-whitespace-in-slice:loop:
# if (curr >= end) break
39/compare 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . . # compare eax with ecx
0f 83/jump-if-greater-or-equal-unsigned $skip-chars-matching-in-slice:end/disp32
0f 83/jump-if-addr>= $skip-chars-matching-in-slice:end/disp32
# c = *curr
8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 3/r32/BL . . # copy byte at *eax to BL
# if (c == ' ') goto body
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x20/imm32/space # compare ebx
74/jump-if-equal $skip-chars-matching-whitespace-in-slice:body/disp8
74/jump-if-= $skip-chars-matching-whitespace-in-slice:body/disp8
# if (c == '\n') goto body
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x0a/imm32/newline # compare ebx
74/jump-if-equal $skip-chars-matching-whitespace-in-slice:body/disp8
74/jump-if-= $skip-chars-matching-whitespace-in-slice:body/disp8
# if (c == '\t') goto body
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x09/imm32/tab # compare ebx
74/jump-if-equal $skip-chars-matching-whitespace-in-slice:body/disp8
74/jump-if-= $skip-chars-matching-whitespace-in-slice:body/disp8
# if (c != '\r') break
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x0d/imm32/cr # compare ebx
75/jump-if-not-equal $skip-chars-matching-whitespace-in-slice:end/disp8
75/jump-if-!= $skip-chars-matching-whitespace-in-slice:end/disp8
$skip-chars-matching-whitespace-in-slice:body:
# ++curr
40/increment-eax
@ -989,12 +989,12 @@ skip-chars-not-matching-in-slice: # curr : (addr byte), end : (addr byte), deli
$skip-chars-not-matching-in-slice:loop:
# if (curr >= end) break
39/compare 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . . # compare eax with ecx
73/jump-if-greater-or-equal-unsigned $skip-chars-not-matching-in-slice:end/disp8
73/jump-if-addr>= $skip-chars-not-matching-in-slice:end/disp8
# c = *curr
8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 3/r32/BL . . # copy byte at *eax to BL
# if (c == delimiter) break
39/compare 3/mod/direct 3/rm32/ebx . . . 2/r32/edx . . # compare ebx and edx
74/jump-if-equal $skip-chars-not-matching-in-slice:end/disp8
74/jump-if-= $skip-chars-not-matching-in-slice:end/disp8
# ++curr
40/increment-eax
eb/jump $skip-chars-not-matching-in-slice:loop/disp8
@ -1111,21 +1111,21 @@ skip-chars-not-matching-whitespace-in-slice: # curr : (addr byte), end : (addr
$skip-chars-not-matching-whitespace-in-slice:loop:
# if (curr >= end) break
39/compare 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . . # compare eax with ecx
0f 83/jump-if-greater-or-equal-unsigned $skip-chars-not-matching-in-slice:end/disp32
0f 83/jump-if-addr>= $skip-chars-not-matching-in-slice:end/disp32
# c = *curr
8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 3/r32/BL . . # copy byte at *eax to BL
# if (c == ' ') break
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x20/imm32/space # compare ebx
74/jump-if-equal $skip-chars-not-matching-whitespace-in-slice:end/disp8
74/jump-if-= $skip-chars-not-matching-whitespace-in-slice:end/disp8
# if (c == '\n') break
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x0a/imm32/newline # compare ebx
74/jump-if-equal $skip-chars-not-matching-whitespace-in-slice:end/disp8
74/jump-if-= $skip-chars-not-matching-whitespace-in-slice:end/disp8
# if (c == '\t') break
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x09/imm32/tab # compare ebx
74/jump-if-equal $skip-chars-not-matching-whitespace-in-slice:end/disp8
74/jump-if-= $skip-chars-not-matching-whitespace-in-slice:end/disp8
# if (c == '\r') break
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x0d/imm32/cr # compare ebx
74/jump-if-equal $skip-chars-not-matching-whitespace-in-slice:end/disp8
74/jump-if-= $skip-chars-not-matching-whitespace-in-slice:end/disp8
# ++curr
40/increment-eax
eb/jump $skip-chars-not-matching-whitespace-in-slice:loop/disp8
@ -1429,17 +1429,17 @@ skip-string-in-slice: # curr : (addr byte), end : (addr byte) -> new_curr/eax
$skip-string-in-slice:loop:
# if (curr >= end) return curr
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-unsigned-or-equal $skip-string-in-slice:return-curr/disp8
73/jump-if-addr>= $skip-string-in-slice:return-curr/disp8
# c = *curr
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
$skip-string-in-slice:dquote:
# if (c == '"') break
3d/compare-eax-and 0x22/imm32/double-quote
74/jump-if-equal $skip-string-in-slice:break/disp8
74/jump-if-= $skip-string-in-slice:break/disp8
$skip-string-in-slice:check-for-escape:
# if (c == '\') escape next char
3d/compare-eax-and 0x5c/imm32/backslash
75/jump-if-not-equal $skip-string-in-slice:continue/disp8
75/jump-if-!= $skip-string-in-slice:continue/disp8
$skip-string-in-slice:escape:
41/increment-ecx
$skip-string-in-slice:continue:
@ -1801,13 +1801,13 @@ skip-until-close-paren-in-slice: # curr : (addr byte), end : (addr byte) -> new
$skip-until-close-paren-in-slice:loop:
# if (curr >= end) break
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-unsigned-or-equal $skip-until-close-paren-in-slice:break/disp8
73/jump-if-addr>= $skip-until-close-paren-in-slice:break/disp8
# c = *curr
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
$skip-until-close-paren-in-slice:check-close:
# if (c == ')') break
3d/compare-eax-and 0x29/imm32/close-paren
74/jump-if-equal $skip-until-close-paren-in-slice:break/disp8
74/jump-if-= $skip-until-close-paren-in-slice:break/disp8
# ++curr
41/increment-ecx
eb/jump $skip-until-close-paren-in-slice:loop/disp8

View File

@ -51,7 +51,7 @@ print-int32-decimal: # out : (addr stream byte), n : int32
# var eax : int = abs(n)
8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0xc/disp8 . # copy *(ebp+12) to eax
3d/compare-eax-with 0/imm32
7d/jump-if-greater-or-equal $print-int32-decimal:read-loop/disp8
7d/jump-if->= $print-int32-decimal:read-loop/disp8
$print-int32-decimal:negative:
f7 3/subop/negate 3/mod/direct 0/rm32/eax . . . . . . # negate eax
$print-int32-decimal:read-loop:
@ -64,11 +64,11 @@ $print-int32-decimal:read-loop:
52/push-edx
# if (eax == 0) break
3d/compare-eax-and 0/imm32
7f/jump-if-greater $print-int32-decimal:read-loop/disp8
7f/jump-if-> $print-int32-decimal:read-loop/disp8
$print-int32-decimal:read-break:
# if (n < 0) push('-')
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 0/imm32 # compare *(ebp+12)
7d/jump-if-greater-or-equal $print-int32-decimal:write/disp8
7d/jump-if->= $print-int32-decimal:write/disp8
$print-int32-decimal:push-negative:
68/push 0x2d/imm32/-
$print-int32-decimal:write:
@ -86,10 +86,10 @@ $print-int32-decimal:write-loop:
58/pop-to-eax
# if (eax == sentinel) break
3d/compare-eax-and 0/imm32/sentinel
74/jump-if-equal $print-int32-decimal:write-break/disp8
74/jump-if-= $print-int32-decimal:write-break/disp8
# if (curr >= max) abort
39/compare 3/mod/direct 1/rm32/ecx . . . 3/r32/ebx . . # compare ecx with ebx
73/jump-if-greater-or-equal-unsigned $print-int32-decimal:abort/disp8
73/jump-if-addr>= $print-int32-decimal:abort/disp8
$print-int32-decimal:write-char:
# *curr = AL
88/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy AL to byte at *ecx
@ -314,10 +314,10 @@ is-decimal-digit?: # c : byte -> eax : boolean
8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 8/disp8 . # copy *(ebp+8) to ecx
# return false if c < '0'
81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x30/imm32 # compare ecx
7c/jump-if-lesser $is-decimal-digit?:false/disp8
7c/jump-if-< $is-decimal-digit?:false/disp8
# return true if c <= '9'
81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x39/imm32 # compare ecx
7e/jump-if-lesser-or-equal $is-decimal-digit?:true/disp8
7e/jump-if-<= $is-decimal-digit?:true/disp8
# otherwise return false
$is-decimal-digit?:false:
b8/copy-to-eax 0/imm32/false

View File

@ -34,7 +34,7 @@ $next-word:check0:
8b/copy 1/mod/*+disp8 6/rm32/esi . . . 0/r32/eax 4/disp8 . # copy *(esi+4) to eax
# . if (eax < line->write) goto next check
3b/compare 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . . # compare eax with *esi
7c/jump-if-lesser $next-word:check-for-comment/disp8
7c/jump-if-< $next-word:check-for-comment/disp8
# . return out
c7 0/subop/copy 0/mod/direct 7/rm32/edi . . . . . 0/imm32 # copy to *edi
c7 0/subop/copy 1/mod/*+disp8 7/rm32/edi . . . . 4/disp8 0/imm32 # copy to *(edi+4)
@ -50,7 +50,7 @@ $next-word:check-for-comment:
8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 . # copy byte at *(esi+ecx+12) to AL
# . compare
3d/compare-eax-and 0x23/imm32/pound
75/jump-if-not-equal $next-word:regular-word/disp8
75/jump-if-!= $next-word:regular-word/disp8
$next-word:comment:
# . out->end = &line->data[line->write]
8b/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . . # copy *esi to eax

View File

@ -62,7 +62,7 @@ $has-metadata?:loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) return false
3d/compare-eax-and 0/imm32/false
75/jump-if-not-equal $has-metadata?:false/disp8
75/jump-if-!= $has-metadata?:false/disp8
# if (slice-equal?(twig, s)) return true
# . eax = slice-equal?(twig, s)
# . . push args
@ -75,7 +75,7 @@ $has-metadata?:loop:
# . if (eax != false) return true
3d/compare-eax-and 0/imm32/false
# eax already contains true
75/jump-if-not-equal $has-metadata?:end/disp8
75/jump-if-!= $has-metadata?:end/disp8
eb/jump $has-metadata?:loop/disp8
$has-metadata?:false:
b8/copy-to-eax 0/imm32/false
@ -289,29 +289,29 @@ is-valid-name?: # in : (addr slice) -> eax : boolean
$is-valid-name?:check0:
# if (start >= in->end) return false
3b/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 . # compare ecx with *(esi+4)
73/jump-if-greater-or-equal-unsigned $is-valid-name?:false/disp8
73/jump-if-addr>= $is-valid-name?:false/disp8
$is-valid-name?:check1:
# var len/eax : int = in->end - start
8b/copy 1/mod/*+disp8 6/rm32/esi . . . 0/r32/eax 4/disp8 . # copy *(esi+4) to eax
29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . . # subtract ecx from eax
# if (eax == 2) return false
3d/compare-eax-and 2/imm32
74/jump-if-equal $is-valid-name?:false/disp8
74/jump-if-= $is-valid-name?:false/disp8
$is-valid-name?:check2:
# var c/eax : (addr byte) = *start
31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
# if (c == "-") return false
3d/compare-eax-and 2d/imm32/-
74/jump-if-equal $is-valid-name?:false/disp8
74/jump-if-= $is-valid-name?:false/disp8
$is-valid-name?:check3a:
# if (c < "0") return true
3d/compare-eax-with 30/imm32/0
7c/jump-if-lesser $is-valid-name?:true/disp8
7c/jump-if-< $is-valid-name?:true/disp8
$is-valid-name?:check3b:
# if (c > "9") return true
3d/compare-eax-with 39/imm32/9
7f/jump-if-greater $is-valid-name?:true/disp8
7f/jump-if-> $is-valid-name?:true/disp8
$is-valid-name?:false:
# return false
b8/copy-to-eax 0/imm32/false
@ -549,7 +549,7 @@ is-label?: # word : (addr slice) -> eax : boolean
# . return (eax == ':')
3d/compare-eax-and 0x3a/imm32/colon
b8/copy-to-eax 1/imm32/true
74/jump-if-equal $is-label?:end/disp8
74/jump-if-= $is-label?:end/disp8
b8/copy-to-eax 0/imm32/false
$is-label?:end:
# . restore registers

View File

@ -25,7 +25,7 @@ emit-hex: # out : (addr buffered-file), n : int, width : int
$emit-hex:loop:
# if (curr >= width) break
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
7d/jump-if-greater-or-equal $emit-hex:end/disp8
7d/jump-if->= $emit-hex:end/disp8
# print-byte-buffered(out, ebx) # only BL used
# . . push args
53/push-ebx

View File

@ -41,7 +41,7 @@ emit: # out : (addr buffered-file), word : (addr slice), width : int
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false)
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $emit:hex-int/disp8
74/jump-if-= $emit:hex-int/disp8
$emit:name:
# . write-slice-buffered(out, word)
# . . push args

View File

@ -32,7 +32,7 @@ zero-out: # start : (addr byte), len : int
$zero-out:loop:
# if (i >= len) break
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
7d/jump-if-greater-or-equal $zero-out:end/disp8
7d/jump-if->= $zero-out:end/disp8
# *curr = 0
c6 0/subop/copy 0/mod/direct 6/rm32/esi . . . . . 0/imm8 # copy byte to *esi
# ++curr

View File

@ -51,7 +51,7 @@ get: # table : (addr stream {string_key, T}), key : string_key, row-size : int,
$get:search-loop:
# if (curr >= max) abort
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $get:abort/disp8
73/jump-if-addr>= $get:abort/disp8
# if (string-equal?(key, *curr)) return curr+4
# . eax = string-equal?(key, *curr)
# . . push args
@ -63,7 +63,7 @@ $get:search-loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) return eax = curr+4
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $get:mismatch/disp8
74/jump-if-= $get:mismatch/disp8
8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy ecx+4 to eax
eb/jump $get:end/disp8
$get:mismatch:
@ -225,7 +225,7 @@ get-slice: # table : (addr stream {string_key, T}), key : (addr slice), row-siz
$get-slice:search-loop:
# if (curr >= max) abort
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $get-slice:abort/disp8
73/jump-if-addr>= $get-slice:abort/disp8
# if (slice-equal?(key, *curr)) return curr+4
# . eax = slice-equal?(key, *curr)
# . . push args
@ -237,7 +237,7 @@ $get-slice:search-loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) return eax = curr+4
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $get-slice:mismatch/disp8
74/jump-if-= $get-slice:mismatch/disp8
8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy ecx+4 to eax
eb/jump $get-slice:end/disp8
$get-slice:mismatch:
@ -433,7 +433,7 @@ get-or-insert: # table : (addr stream {string_key, T}), key : string_key, row-s
$get-or-insert:search-loop:
# if (curr >= max) break
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $get-or-insert:not-found/disp8
73/jump-if-addr>= $get-or-insert:not-found/disp8
# if (string-equal?(key, *curr)) return curr+4
# . eax = string-equal?(key, *curr)
# . . push args
@ -445,7 +445,7 @@ $get-or-insert:search-loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) return eax = curr+4
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $get-or-insert:mismatch/disp8
74/jump-if-= $get-or-insert:mismatch/disp8
8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy ecx+4 to eax
eb/jump $get-or-insert:end/disp8
$get-or-insert:mismatch:
@ -459,7 +459,7 @@ $get-or-insert:not-found:
# if (table->write >= table->length) abort
8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # copy *esi to ecx
3b/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 8/disp8 . # compare ecx with *(esi+8)
73/jump-if-greater-or-equal-unsigned $get-or-insert:abort/disp8
73/jump-if-addr>= $get-or-insert:abort/disp8
# zero-out(max, row-size)
# . . push args
ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x10/disp8 . # push *(ebp+16)
@ -684,7 +684,7 @@ leaky-get-or-insert-slice: # table : (addr stream {string_key, T}), key : (addr
$leaky-get-or-insert-slice:search-loop:
# if (curr >= max) break
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $leaky-get-or-insert-slice:not-found/disp8
73/jump-if-addr>= $leaky-get-or-insert-slice:not-found/disp8
# if (slice-equal?(key, *curr)) return curr+4
# . eax = slice-equal?(key, *curr)
# . . push args
@ -696,7 +696,7 @@ $leaky-get-or-insert-slice:search-loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) return eax = curr+4
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $leaky-get-or-insert-slice:mismatch/disp8
74/jump-if-= $leaky-get-or-insert-slice:mismatch/disp8
8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy ecx+4 to eax
eb/jump $leaky-get-or-insert-slice:end/disp8
$leaky-get-or-insert-slice:mismatch:
@ -710,7 +710,7 @@ $leaky-get-or-insert-slice:not-found:
# if (table->write >= table->length) abort
8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # copy *esi to ecx
3b/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 8/disp8 . # compare ecx with *(esi+8)
7d/jump-if-greater-or-equal $leaky-get-or-insert-slice:abort/disp8
7d/jump-if->= $leaky-get-or-insert-slice:abort/disp8
# zero-out(max, row-size)
# . . push args
ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x10/disp8 . # push *(ebp+16)
@ -954,7 +954,7 @@ get-or-stop: # table : (addr stream {string_key, T}), key : string_key, row-siz
$get-or-stop:search-loop:
# if (curr >= max) stop(ed)
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $get-or-stop:stop/disp8
73/jump-if-addr>= $get-or-stop:stop/disp8
# if (string-equal?(key, *curr)) return curr+4
# . eax = string-equal?(key, *curr)
# . . push args
@ -966,7 +966,7 @@ $get-or-stop:search-loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) return eax = curr+4
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $get-or-stop:mismatch/disp8
74/jump-if-= $get-or-stop:mismatch/disp8
8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy ecx+4 to eax
eb/jump $get-or-stop:end/disp8
$get-or-stop:mismatch:
@ -1170,7 +1170,7 @@ get-slice-or-stop: # table : (addr stream {string_key, _}), key : (addr slice),
$get-slice-or-stop:search-loop:
# if (curr >= max) stop(ed)
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $get-slice-or-stop:stop/disp8
73/jump-if-addr>= $get-slice-or-stop:stop/disp8
# if (slice-equal?(key, *curr)) return curr+4
# . eax = slice-equal?(key, *curr)
# . . push args
@ -1182,7 +1182,7 @@ $get-slice-or-stop:search-loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) return eax = curr+4
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $get-slice-or-stop:mismatch/disp8
74/jump-if-= $get-slice-or-stop:mismatch/disp8
8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy ecx+4 to eax
eb/jump $get-slice-or-stop:end/disp8
$get-slice-or-stop:mismatch:
@ -1406,7 +1406,7 @@ maybe-get: # table : (addr stream {string_key, T}), key : string_key, row-size
$maybe-get:search-loop:
# if (curr >= max) return null
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $maybe-get:null/disp8
73/jump-if-addr>= $maybe-get:null/disp8
# if (string-equal?(key, *curr)) return curr+4
# . eax = string-equal?(key, *curr)
# . . push args
@ -1418,7 +1418,7 @@ $maybe-get:search-loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) return eax = curr+4
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $maybe-get:mismatch/disp8
74/jump-if-= $maybe-get:mismatch/disp8
8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy ecx+4 to eax
eb/jump $maybe-get:end/disp8
$maybe-get:mismatch:
@ -1553,7 +1553,7 @@ maybe-get-slice: # table : (addr stream {string_key, T}), key : (addr slice), r
$maybe-get-slice:search-loop:
# if (curr >= max) return null
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $maybe-get-slice:null/disp8
73/jump-if-addr>= $maybe-get-slice:null/disp8
# if (slice-equal?(key, *curr)) return curr+4
# . eax = slice-equal?(key, *curr)
# . . push args
@ -1565,7 +1565,7 @@ $maybe-get-slice:search-loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) return eax = curr+4
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $maybe-get-slice:mismatch/disp8
74/jump-if-= $maybe-get-slice:mismatch/disp8
8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy ecx+4 to eax
eb/jump $maybe-get-slice:end/disp8
$maybe-get-slice:mismatch:

View File

@ -35,10 +35,10 @@ slurp: # f : (addr buffered-file), s : (addr stream byte)
$slurp:loop:
# if (s->write >= s->length) abort
3b/compare 1/mod/*+disp8 7/rm32/edi . . . 2/r32/edx 8/disp8 . # compare edx with *(edi+8)
7d/jump-if-greater-or-equal $slurp:abort/disp8
7d/jump-if->= $slurp:abort/disp8
# if (f->read >= f->write) populate stream from file
3b/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 . # compare ecx with *(esi+4)
7c/jump-if-lesser $slurp:from-stream/disp8
7c/jump-if-< $slurp:from-stream/disp8
# . clear-stream(stream = f+4)
# . . push args
8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 0/r32/eax 4/disp8 . # copy esi+4 to eax
@ -61,7 +61,7 @@ $slurp:loop:
# since f->read was initially 0, eax is the same as f->write
# . if (eax == 0) return true
3d/compare-eax-and 0/imm32
74/jump-if-equal $slurp:end/disp8
74/jump-if-= $slurp:end/disp8
$slurp:from-stream:
# var c/eax : byte = f->data[f->read]
31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax

View File

@ -62,7 +62,7 @@ compute-width-of-slice: # s : (addr slice) -> eax : int
# . if (eax != false) return 4
3d/compare-eax-and 0/imm32/false
b8/copy-to-eax 4/imm32 # ZF is set, so we can overwrite eax now
75/jump-if-not-equal $compute-width-of-slice:end/disp8
75/jump-if-!= $compute-width-of-slice:end/disp8
# if (has-metadata?(word, "disp32")) return 4
# . eax = has-metadata?(word, "disp32")
# . . push args
@ -75,7 +75,7 @@ compute-width-of-slice: # s : (addr slice) -> eax : int
# . if (eax != false) return 4
3d/compare-eax-and 0/imm32/false
b8/copy-to-eax 4/imm32 # ZF is set, so we can overwrite eax now
75/jump-if-not-equal $compute-width-of-slice:end/disp8
75/jump-if-!= $compute-width-of-slice:end/disp8
# if (has-metadata?(word, "imm16")) return 2
# . eax = has-metadata?(word, "imm16")
# . . push args
@ -88,7 +88,7 @@ compute-width-of-slice: # s : (addr slice) -> eax : int
# . if (eax != false) return 2
3d/compare-eax-and 0/imm32/false
b8/copy-to-eax 2/imm32 # ZF is set, so we can overwrite eax now
75/jump-if-not-equal $compute-width-of-slice:end/disp8
75/jump-if-!= $compute-width-of-slice:end/disp8
# if (has-metadata?(word, "disp16")) return 2
# . eax = has-metadata?(word, "disp16")
# . . push args
@ -101,7 +101,7 @@ compute-width-of-slice: # s : (addr slice) -> eax : int
# . if (eax != false) return 2
3d/compare-eax-and 0/imm32/false
b8/copy-to-eax 2/imm32 # ZF is set, so we can overwrite eax now
75/jump-if-not-equal $compute-width-of-slice:end/disp8
75/jump-if-!= $compute-width-of-slice:end/disp8
# otherwise return 1
b8/copy-to-eax 1/imm32
$compute-width-of-slice:end:

View File

@ -27,7 +27,7 @@ emit-hex-array: # out : (addr buffered-file), arr : (addr array byte)
$emit-hex-array:loop:
# if (curr >= width) break
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $emit-hex-array:end/disp8
73/jump-if-addr>= $emit-hex-array:end/disp8
# emit-hex(out, c = *curr, width=1)
# . . push args
68/push 1/imm32/width

View File

@ -32,7 +32,7 @@ $next-word-or-string:check0:
8b/copy 1/mod/*+disp8 6/rm32/esi . . . 0/r32/eax 4/disp8 . # copy *(esi+4) to eax
# . if (eax < line->write) goto next check
3b/compare 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . . # compare eax with *esi
7c/jump-if-lesser $next-word-or-string:check-for-comment/disp8
7c/jump-if-< $next-word-or-string:check-for-comment/disp8
# . return out
c7 0/subop/copy 0/mod/direct 7/rm32/edi . . . . . 0/imm32 # copy to *edi
c7 0/subop/copy 1/mod/*+disp8 7/rm32/edi . . . . 4/disp8 0/imm32 # copy to *(edi+4)
@ -48,7 +48,7 @@ $next-word-or-string:check-for-comment:
8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 . # copy byte at *(esi+ecx+12) to AL
# . compare
3d/compare-eax-and 0x23/imm32/pound
75/jump-if-not-equal $next-word-or-string:check-for-string-literal/disp8
75/jump-if-!= $next-word-or-string:check-for-string-literal/disp8
$next-word-or-string:comment:
# out->end = &line->data[line->write]
8b/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . . # copy *esi to eax
@ -66,7 +66,7 @@ $next-word-or-string:check-for-string-literal:
8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 . # copy byte at *(esi+ecx+12) to AL
# . compare
3d/compare-eax-and 0x22/imm32/dquote
75/jump-if-not-equal $next-word-or-string:regular-word/disp8
75/jump-if-!= $next-word-or-string:regular-word/disp8
$next-word-or-string:string-literal:
# skip-string(line)
# . . push args

View File

@ -19,7 +19,7 @@ write-int: # out : (addr stream byte), n : int
8b/copy 0/mod/indirect 7/rm32/edi . . . 1/r32/ecx . . # copy *edi to ecx
# if (out->write >= out->length) abort
3b/compare 1/mod/*+disp8 7/rm32/edi . . . 1/r32/ecx 8/disp8 . # compare ecx with *(edi+8)
7d/jump-if-greater-or-equal $write-int:abort/disp8
7d/jump-if->= $write-int:abort/disp8
$write-int:to-stream:
# out->data[out->write] = n
8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0xc/disp8 . # copy *(ebp+12) to eax

View File

@ -26,7 +26,7 @@ clear-stack: # s : (addr stack)
$clear-stack:loop:
# if (curr >= max) break
39/compare 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . . # compare eax with ecx
73/jump-if-greater-or-equal-unsigned $clear-stack:end/disp8
73/jump-if-addr>= $clear-stack:end/disp8
# *curr = 0
c6 0/subop/copy 0/mod/direct 0/rm32/eax . . . . . 0/imm8 # copy byte to *eax
# ++curr
@ -121,7 +121,7 @@ push: # s : (addr stack), n : int
8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # copy *esi to ecx
# if (s->top >= s->length) abort
39/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 . # compare *(esi+4) and ecx
7e/jump-if-lesser-or-equal $push:abort/disp8
7e/jump-if-<= $push:abort/disp8
# s->data[s->top] = n
8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0xc/disp8 . # copy *(ebp+12) to eax
89/copy 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/eax 8/disp8 . # copy eax to *(esi+ecx+8)
@ -238,7 +238,7 @@ pop: # s : (addr stack) -> n/eax : int
8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi
# if (s->top <= 0) abort
81 7/subop/compare 0/mod/indirect 6/rm32/esi . . . . . 0/imm32 # compare *esi
7e/jump-if-lesser-or-equal $pop:abort/disp8
7e/jump-if-<= $pop:abort/disp8
# s->top -= 4
81 5/subop/subtract 0/mod/direct 6/rm32/esi . . . . . 4/imm32 # subtract from *esi
# eax = s->data[s->top]
@ -342,7 +342,7 @@ top: # s : (addr stack) -> n/eax : int
8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi
# if (s->top <= 0) abort
81 7/subop/compare 0/mod/indirect 6/rm32/esi . . . . . 0/imm32 # compare *esi
7e/jump-if-lesser-or-equal $top:abort/disp8
7e/jump-if-<= $top:abort/disp8
# n = s->data[s->top - 4]
8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # copy *esi to ecx
81 5/subop/subtract 3/mod/direct 1/rm32/ecx . . . . . 4/imm32 # subtract from ecx

View File

@ -42,7 +42,7 @@ array-equal?: # a : (addr array int), b : (addr array int) -> eax : boolean
$array-equal?:lengths:
# if (lena != b->length) return false
39/compare *edi 2/r32/edx
75/jump-if-not-equal $array-equal?:false/disp8
75/jump-if-!= $array-equal?:false/disp8
# var curra/esi : (addr byte) = a->data
81 0/subop/add %esi 4/imm32
# var currb/edi : (addr byte) = b->data
@ -54,14 +54,14 @@ $array-equal?:lengths:
$array-equal?:loop:
# if (i >= lena) return true
39/compare %ecx 2/r32/edx
7d/jump-if-greater-or-equal $array-equal?:true/disp8
7d/jump-if->= $array-equal?:true/disp8
# var vala/eax : int = *curra
8b/-> *esi 0/r32/eax
# var valb/ebx : int = *currb
8b/-> *edi 3/r32/ebx
# if (vala != valb) return false
39/compare %eax 3/r32/ebx
75/jump-if-not-equal $array-equal?:false/disp8
75/jump-if-!= $array-equal?:false/disp8
# i += 4
81 0/subop/add %ecx 4/imm32
# currs += 4
@ -275,7 +275,7 @@ parse-array-of-ints: # ad : (addr allocation-descriptor), s : (addr string) ->
$parse-array-of-ints:loop1:
# if (curr >= end) break
39/compare %ecx 2/r32/edx
73/jump-if-greater-or-equal-unsigned $parse-array-of-ints:break1/disp8
73/jump-if-addr>= $parse-array-of-ints:break1/disp8
# curr = skip-chars-matching-in-slice(curr, end, ' ')
# . eax = skip-chars-matching-in-slice(curr, end, ' ')
# . . push args
@ -290,7 +290,7 @@ $parse-array-of-ints:loop1:
89/<- %ecx 0/r32/eax
# if (curr >= end) break
39/compare %ecx 2/r32/edx
73/jump-if-greater-or-equal-unsigned $parse-array-of-ints:break1/disp8
73/jump-if-addr>= $parse-array-of-ints:break1/disp8
# curr = skip-chars-not-matching-in-slice(curr, end, ' ')
# . eax = skip-chars-not-matching-in-slice(curr, end, ' ')
# . . push args
@ -333,7 +333,7 @@ $parse-array-of-ints:pass2:
$parse-array-of-ints:loop2:
# if (slice->start >= end) break
39/compare *ecx 2/r32/edx
73/jump-if-greater-or-equal-unsigned $parse-array-of-ints:end/disp8
73/jump-if-addr>= $parse-array-of-ints:end/disp8
# slice->start = skip-chars-matching-in-slice(slice->start, end, ' ')
# . eax = skip-chars-matching-in-slice(slice->start, end, ' ')
# . . push args
@ -348,7 +348,7 @@ $parse-array-of-ints:loop2:
89/<- *ecx 0/r32/eax
# if (slice->start >= end) break
39/compare *ecx 2/r32/edx
73/jump-if-greater-or-equal-unsigned $parse-array-of-ints:end/disp8
73/jump-if-addr>= $parse-array-of-ints:end/disp8
# slice->end = skip-chars-not-matching-in-slice(slice->start, end, ' ')
# . eax = skip-chars-not-matching-in-slice(curr, end, ' ')
# . . push args

View File

@ -40,7 +40,7 @@ Entry: # run tests if necessary, convert stdin if not
# - if argc > 1 and argv[1] == "test", then return run_tests()
# if (argc <= 1) goto interactive
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0/disp8 1/imm32 # compare *ebp
7e/jump-if-lesser-or-equal $subx-assort-main:interactive/disp8
7e/jump-if-<= $subx-assort-main:interactive/disp8
# if (!kernel-string-equal?(argv[1], "test")) goto interactive
# . eax = kernel-string-equal?(argv[1], "test")
# . . push args
@ -52,7 +52,7 @@ Entry: # run tests if necessary, convert stdin if not
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto interactive
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $subx-assort-main:interactive/disp8
74/jump-if-= $subx-assort-main:interactive/disp8
# run-tests()
e8/call run-tests/disp32
# syscall(exit, *Num-test-failures)
@ -525,7 +525,7 @@ $read-segments:loop:
$read-segments:check0:
# if (line->write == 0) break
81 7/subop/compare 0/mod/indirect 1/rm32/ecx . . . . . 0/imm32 # compare *ecx
0f 84/jump-if-equal $read-segments:break/disp32
0f 84/jump-if-= $read-segments:break/disp32
#? # dump line {{{
#? # . write(2/stderr, "LL: ")
#? # . . push args
@ -587,7 +587,7 @@ $read-segments:check1:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) continue
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $read-segments:loop/disp32
0f 85/jump-if-!= $read-segments:loop/disp32
$read-segments:check-for-comment:
#? # print("check for comment\n") {{{
#? # . . push args
@ -606,7 +606,7 @@ $read-segments:check-for-comment:
8a/copy-byte 0/mod/indirect 6/rm32/esi . . . 0/r32/AL . . # copy byte at *esi to AL
# . if (c == '#') continue
3d/compare-eax-and 0x23/imm32/hash
0f 84/jump-if-equal $read-segments:loop/disp32
0f 84/jump-if-= $read-segments:loop/disp32
$read-segments:check-for-segment-header:
#? # print("check for segment header\n") {{{
#? # . . push args
@ -668,7 +668,7 @@ $read-segments:check-for-segment-header:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto check3
3d/compare-eax-and 0/imm32/false
0f 84/jump-if-equal $read-segments:regular-line/disp32
0f 84/jump-if-= $read-segments:regular-line/disp32
# segment-name = next-word-or-string(line)
# . . push args
52/push-edx
@ -730,7 +730,7 @@ $read-segments:check-for-segment-header:
8b/copy 0/mod/indirect 0/rm32/eax . . . 3/r32/ebx . . # copy *eax to ebx
# if (curr-segment != 0) continue
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0/imm32 # compare ebx
0f 85/jump-if-not-equal $read-segments:loop/disp32
0f 85/jump-if-!= $read-segments:loop/disp32
# curr-segment = new-stream(Heap, Segment-size, 1)
# . save segment-slot
50/push-eax
@ -871,7 +871,7 @@ write-segments: # out : (addr buffered-file), table : (addr stream {string_key,
$write-segments:loop:
# if (curr >= max) break
39/compare 3/mod/direct 6/rm32/esi . . . 2/r32/edx . . # compare esi with edx
73/jump-if-greater-or-equal-unsigned $write-segments:break/disp8
73/jump-if-addr>= $write-segments:break/disp8
# var stream/eax : (addr stream byte) = table[i].stream
8b/copy 1/mod/*+disp8 6/rm32/esi . . . 0/r32/eax 4/disp8 . # copy *(esi+4) to eax
# write-stream-data(out, stream)

View File

@ -57,11 +57,11 @@ Entry: # run tests if necessary, a REPL if not
(new-segment *Heap-size Heap)
# if (argc <= 1) goto interactive
81 7/subop/compare *ebp 1/imm32
7e/jump-if-lesser-or-equal $subx-braces-main:interactive/disp8
7e/jump-if-<= $subx-braces-main:interactive/disp8
# if (argv[1] != "test")) goto interactive
(kernel-string-equal? *(ebp+8) "test") # => eax
3d/compare-eax-and 0/imm32
74/jump-if-equal $subx-braces-main:interactive/disp8
74/jump-if-= $subx-braces-main:interactive/disp8
#
(run-tests)
# syscall(exit, *Num-test-failures)
@ -146,7 +146,7 @@ $subx-braces:line-loop:
$subx-braces:check0:
# if (line->write == 0) break
81 7/subop/compare *ecx 0/imm32
0f 84/jump-if-equal $subx-braces:break/disp32
0f 84/jump-if-= $subx-braces:break/disp32
(skip-chars-matching-whitespace %ecx)
$subx-braces:check-for-curly-open:
# if (line->data[line->read] != '{') goto next check
@ -156,7 +156,7 @@ $subx-braces:check-for-curly-open:
81 4/subop/and %eax 0xff/imm32
# . if (eax != '{') continue
3d/compare-eax-and 0x7b/imm32/open-curly
0f 85/jump-if-not-equal $subx-braces:check-for-curly-closed/disp32
0f 85/jump-if-!= $subx-braces:check-for-curly-closed/disp32
$subx-braces:emit-curly-open:
# print(out, "_loop" next-label-id ":")
(write-buffered *(ebp+0xc) "_loop")
@ -171,7 +171,7 @@ $subx-braces:emit-curly-open:
$subx-braces:check-for-curly-closed:
# if (line->data[line->read] != '}') goto next check
3d/compare-eax-and 0x7d/imm32/close-curly
0f 85/jump-if-equal $subx-braces:word-loop/disp32
0f 85/jump-if-= $subx-braces:word-loop/disp32
$subx-braces:emit-curly-closed:
# eax = pop(label-stack)
(pop %edx)
@ -187,7 +187,7 @@ $subx-braces:check1:
# if (slice-empty?(word-slice)) break
(slice-empty? %edi)
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $subx-braces:next-line/disp32
0f 85/jump-if-!= $subx-braces:next-line/disp32
$subx-braces:check-for-comment:
# if (slice-starts-with?(word-slice, "#")) continue
# . eax = *word-slice->start
@ -196,14 +196,14 @@ $subx-braces:check-for-comment:
81 4/subop/and %eax 0xff/imm32
# . if (eax == '#') continue
3d/compare-eax-and 0x23/imm32/hash
74/jump-if-equal $subx-braces:word-loop/disp8
74/jump-if-= $subx-braces:word-loop/disp8
$subx-braces:check-for-break:
# if (!slice-starts-with?(word-slice, "break/")) goto next check
# . eax = slice-starts-with?(word-slice, "break/")
(slice-starts-with? %edi "break/")
# . if (eax == false) goto next check
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $subx-braces:check-for-loop/disp8
74/jump-if-= $subx-braces:check-for-loop/disp8
$subx-braces:emit-break:
(top %edx)
# print(out, "_break" eax)
@ -219,7 +219,7 @@ $subx-braces:check-for-loop:
(slice-starts-with? %edi "loop/")
# . if (eax == false) goto next check
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $subx-braces:emit-word-slice/disp8
74/jump-if-= $subx-braces:emit-word-slice/disp8
$subx-braces:emit-loop:
(top %edx)
# print(out, "_loop" eax)

View File

@ -41,7 +41,7 @@ Entry: # run tests if necessary, convert stdin if not
# - if argc > 1 and argv[1] == "test", then return run_tests()
# if (argc <= 1) goto run-main
81 7/subop/compare *ebp 1/imm32
7e/jump-if-lesser-or-equal $subx-calls-main:interactive/disp8
7e/jump-if-<= $subx-calls-main:interactive/disp8
# if (!kernel-string-equal?(argv[1], "test")) goto run-main
# . eax = kernel-string-equal?(argv[1], "test")
# . . push args
@ -53,7 +53,7 @@ Entry: # run tests if necessary, convert stdin if not
81 0/subop/add %esp 8/imm32
# . if (eax == false) goto run-main
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $subx-calls-main:interactive/disp8
74/jump-if-= $subx-calls-main:interactive/disp8
# run-tests()
e8/call run-tests/disp32
# syscall(exit, *Num-test-failures)
@ -136,7 +136,7 @@ $subx-calls:loop:
$subx-calls:check0:
# if (line->write == 0) break
81 7/subop/compare *esi 0/imm32
0f 84/jump-if-equal $subx-calls:break/disp32
0f 84/jump-if-= $subx-calls:break/disp32
# skip-chars-matching-whitespace(line)
# . . push args
56/push-esi
@ -152,7 +152,7 @@ $subx-calls:check0:
8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
# . if (eax == '(') goto convert-call
3d/compare-eax-and 0x28/imm32/open-paren
74/jump-if-equal $subx-calls:convert-call/disp8
74/jump-if-= $subx-calls:convert-call/disp8
$subx-calls:pass-through:
# write-stream-data(out, line)
# . . push args
@ -270,7 +270,7 @@ $parse-line:check1:
81 0/subop/add %esp 4/imm32
# . if (eax != false) break
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $parse-line:end/disp32
0f 85/jump-if-!= $parse-line:end/disp32
#? # dump word-slice {{{
#? # . write(2/stderr, "w: ")
#? # . . push args
@ -380,7 +380,7 @@ emit-call: # out : (addr buffered-file), words : (addr stream slice)
# . ecx = words->write - 8
8b/-> *esi 1/r32/ecx
81 5/subop/subtract %ecx 8/imm32
0f 8c/jump-if-lesser $emit-call:error1/disp32
0f 8c/jump-if-< $emit-call:error1/disp32
# var curr/ecx : (addr slice) = &words->data[words->write-8]
8d/copy-address *(esi+ecx+0xc) 1/r32/ecx
# var min/edx : (addr byte) = words->data
@ -389,7 +389,7 @@ emit-call: # out : (addr buffered-file), words : (addr stream slice)
$emit-call:push-loop:
# if (curr <= min) break
39/compare %ecx 2/r32/edx
0f 8e/jump-if-lesser-or-equal $emit-call:call-instruction/disp32
0f 8e/jump-if-<= $emit-call:call-instruction/disp32
# if (*curr->start in '%' '*') goto push-rm32
# . var start/eax : (addr byte) = curr->start
8b/-> *ecx 0/r32/eax
@ -398,10 +398,10 @@ $emit-call:push-loop:
81 4/subop/and %eax 0xff/imm32
# . if (c == '%') goto push-rm32
3d/compare-eax-and 0x25/imm32/percent
74/jump-if-equal $emit-call:push-rm32/disp8
74/jump-if-= $emit-call:push-rm32/disp8
# . if (c == '*') goto push-rm32
3d/compare-eax-and 0x2a/imm32/asterisk
74/jump-if-equal $emit-call:push-rm32/disp8
74/jump-if-= $emit-call:push-rm32/disp8
$emit-call:push-imm32:
# write-buffered(out, "68/push ")
68/push "68/push "/imm32
@ -824,7 +824,7 @@ $next-word-string-or-expression-without-metadata:check0:
8b/-> *(esi+4) 1/r32/ecx
# . if (ecx >= line->write) return out = {0, 0}
3b/compare 1/r32/ecx *esi
0f 8d/jump-if-greater-or-equal $next-word-string-or-expression-without-metadata:return-eol/disp32
0f 8d/jump-if->= $next-word-string-or-expression-without-metadata:return-eol/disp32
$next-word-string-or-expression-without-metadata:check-for-comment:
# out->start = &line->data[line->read]
8d/copy-address *(esi+ecx+0xc) 0/r32/eax
@ -835,7 +835,7 @@ $next-word-string-or-expression-without-metadata:check-for-comment:
8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
# . if (eax != '#') goto next check
3d/compare-eax-and 0x23/imm32/pound
75/jump-if-not-equal $next-word-string-or-expression-without-metadata:check-for-string-literal/disp8
75/jump-if-!= $next-word-string-or-expression-without-metadata:check-for-string-literal/disp8
$next-word-string-or-expression-without-metadata:comment:
# out->end = &line->data[line->write]
8b/-> *esi 0/r32/eax
@ -849,7 +849,7 @@ $next-word-string-or-expression-without-metadata:comment:
$next-word-string-or-expression-without-metadata:check-for-string-literal:
# if (line->data[line->read] != '"') goto next check
3d/compare-eax-and 0x22/imm32/dquote
75/jump-if-not-equal $next-word-string-or-expression-without-metadata:check-for-expression/disp8
75/jump-if-!= $next-word-string-or-expression-without-metadata:check-for-expression/disp8
$next-word-string-or-expression-without-metadata:string-literal:
# skip-string(line)
# . . push args
@ -867,14 +867,14 @@ $next-word-string-or-expression-without-metadata:string-literal:
$next-word-string-or-expression-without-metadata:check-for-expression:
# if (line->data[line->read] != '*') goto next check
3d/compare-eax-and 0x2a/imm32/asterisk
75/jump-if-not-equal $next-word-string-or-expression-without-metadata:check-for-end-of-call/disp8
75/jump-if-!= $next-word-string-or-expression-without-metadata:check-for-end-of-call/disp8
# if (line->data[line->read + 1] == ' ') goto error1
8a/copy-byte *(esi+ecx+0xd) 0/r32/AL
3d/compare-eax-and 0x20/imm32/space
0f 84/jump-if-equal $next-word-string-or-expression-without-metadata:error1/disp32
0f 84/jump-if-= $next-word-string-or-expression-without-metadata:error1/disp32
# if (line->data[line->read + 1] != '(') goto regular-word
3d/compare-eax-and 0x28/imm32/open-paren
0f 85/jump-if-not-equal $next-word-string-or-expression-without-metadata:regular-word-without-metadata/disp32
0f 85/jump-if-!= $next-word-string-or-expression-without-metadata:regular-word-without-metadata/disp32
$next-word-string-or-expression-without-metadata:paren:
# skip-until-close-paren(line)
# . . push args
@ -889,7 +889,7 @@ $next-word-string-or-expression-without-metadata:paren:
8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
# . if (eax != ')') goto error2
3d/compare-eax-and 0x29/imm32/close-paren
0f 85/jump-if-not-equal $next-word-string-or-expression-without-metadata:error2/disp32
0f 85/jump-if-!= $next-word-string-or-expression-without-metadata:error2/disp32
# ++line->read to skip ')'
ff 0/subop/increment *(esi+4)
# out->end = &line->data[line->read]
@ -901,7 +901,7 @@ $next-word-string-or-expression-without-metadata:paren:
$next-word-string-or-expression-without-metadata:check-for-end-of-call:
# if (line->data[line->read] != ')') goto next check
3d/compare-eax-and 0x29/imm32/close-paren
75/jump-if-not-equal $next-word-string-or-expression-without-metadata:regular-word-without-metadata/disp8
75/jump-if-!= $next-word-string-or-expression-without-metadata:regular-word-without-metadata/disp8
# ++line->read to skip ')'
ff 0/subop/increment *(esi+4)
# - error checking: make sure there's nothing else of importance on the line
@ -910,13 +910,13 @@ $next-word-string-or-expression-without-metadata:check-for-end-of-call:
8b/-> *(esi+4) 1/r32/ecx
# . if (ecx >= line->write) return {0, 0}
3b/compare 1/r32/ecx *esi
0f 8d/jump-if-greater-or-equal $next-word-string-or-expression-without-metadata:return-eol/disp32
0f 8d/jump-if->= $next-word-string-or-expression-without-metadata:return-eol/disp32
# if (line->data[line->read] == '/') goto error3
# . eax = line->data[line->read]
8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
# . if (eax == '/') goto error3
3d/compare-eax-and 0x2f/imm32/slash
0f 84/jump-if-equal $next-word-string-or-expression-without-metadata:error3/disp32
0f 84/jump-if-= $next-word-string-or-expression-without-metadata:error3/disp32
# skip-chars-matching-whitespace(line)
# . . push args
56/push-esi
@ -929,14 +929,14 @@ $next-word-string-or-expression-without-metadata:check-for-end-of-call:
8b/-> *(esi+4) 1/r32/ecx
# . if (ecx >= line->write) return {0, 0}
3b/compare 1/r32/ecx *esi
0f 8d/jump-if-greater-or-equal $next-word-string-or-expression-without-metadata:return-eol/disp32
0f 8d/jump-if->= $next-word-string-or-expression-without-metadata:return-eol/disp32
# if (line->data[line->read] == '#') return out = {0, 0}
# . eax = line->data[line->read]
8b/-> *(esi+4) 1/r32/ecx
8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
# . if (eax == '#') return out = {0, 0}
3d/compare-eax-and 0x23/imm32/pound
74/jump-if-equal $next-word-string-or-expression-without-metadata:return-eol/disp8
74/jump-if-= $next-word-string-or-expression-without-metadata:return-eol/disp8
# otherwise goto error4
e9/jump $next-word-string-or-expression-without-metadata:error4/disp32
$next-word-string-or-expression-without-metadata:regular-word-without-metadata:
@ -945,20 +945,20 @@ $next-word-string-or-expression-without-metadata:regular-word-without-metadata:
8b/-> *(esi+4) 1/r32/ecx
# . if (ecx >= line->write) break
3b/compare *esi 1/r32/ecx
7d/jump-if-greater-or-equal $next-word-string-or-expression-without-metadata:regular-word-break/disp8
7d/jump-if->= $next-word-string-or-expression-without-metadata:regular-word-break/disp8
# if (line->data[line->read] == ' ') break
# . eax = line->data[line->read]
8b/-> *(esi+4) 1/r32/ecx
8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
# . if (eax == ' ') break
3d/compare-eax-and 0x20/imm32/space
74/jump-if-equal $next-word-string-or-expression-without-metadata:regular-word-break/disp8
74/jump-if-= $next-word-string-or-expression-without-metadata:regular-word-break/disp8
# if (line->data[line->read] == ')') break
3d/compare-eax-and 0x29/imm32/close-paren
0f 84/jump-if-equal $next-word-string-or-expression-without-metadata:regular-word-break/disp32
0f 84/jump-if-= $next-word-string-or-expression-without-metadata:regular-word-break/disp32
# if (line->data[line->read] == '/') goto error5
3d/compare-eax-and 0x2f/imm32/slash
0f 84/jump-if-equal $next-word-string-or-expression-without-metadata:error5/disp32
0f 84/jump-if-= $next-word-string-or-expression-without-metadata:error5/disp32
# ++line->read
ff 0/subop/increment *(esi+4)
# loop

View File

@ -47,7 +47,7 @@ Entry: # run tests if necessary, call 'compile' if not
# - if argc > 1 and argv[1] == "test", then return run_tests()
# if (argc <= 1) goto run-main
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0/disp8 1/imm32 # compare *ebp
7e/jump-if-lesser-or-equal $run-main/disp8
7e/jump-if-<= $run-main/disp8
# if (!kernel-string-equal?(argv[1], "test")) goto run-main
# . eax = kernel-string-equal?(argv[1], "test")
# . . push args
@ -59,7 +59,7 @@ Entry: # run tests if necessary, call 'compile' if not
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto run-main
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $run-main/disp8
74/jump-if-= $run-main/disp8
# run-tests()
e8/call run-tests/disp32
# syscall(exit, *Num-test-failures)
@ -224,7 +224,7 @@ get-num: # in : (addr buffered-file), out : (addr stream byte), err : fd or (ad
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax == false)
3d/compare-eax-and 0/imm32/false
75/jump-if-not-equal $get-num:main/disp8
75/jump-if-!= $get-num:main/disp8
# . expected(ed, err, "integer")
# . . push args
68/push "integer"/imm32
@ -255,7 +255,7 @@ $get-num:main:
$get-num:loop:
# if (out->write >= out->length) error
39/compare 3/mod/direct 2/rm32/edx . . . 1/r32/ecx . . # compare edx with ecx
7d/jump-if-lesser $get-num:stage2/disp8
7d/jump-if-< $get-num:stage2/disp8
# . error(ed, err, msg) # TODO: show full number
# . . push args
68/push "get-num: too many digits in number"/imm32
@ -543,10 +543,10 @@ is-digit?: # c : int -> eax : boolean
b8/copy-to-eax 0/imm32
# if (c < '0') return false
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 0x30/imm32 # compare *(ebp+8)
7c/jump-if-lesser $is-digit?:end/disp8
7c/jump-if-< $is-digit?:end/disp8
# if (c > '9') return false
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 0x39/imm32 # compare *(ebp+8)
7f/jump-if-greater $is-digit?:end/disp8
7f/jump-if-> $is-digit?:end/disp8
# otherwise return true
b8/copy-to-eax 1/imm32
$is-digit?:end:

View File

@ -47,7 +47,7 @@ Entry: # run tests if necessary, call 'compile' if not
# - if argc > 1 and argv[1] == "test", then return run_tests()
# if (argc <= 1) goto run-main
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0/disp8 1/imm32 # compare *ebp
7e/jump-if-lesser-or-equal $run-main/disp8
7e/jump-if-<= $run-main/disp8
# if (!kernel-string-equal?(argv[1], "test")) goto run-main
# . eax = kernel-string-equal?(argv[1], "test")
# . . push args
@ -59,7 +59,7 @@ Entry: # run tests if necessary, call 'compile' if not
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto run-main
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $run-main/disp8
74/jump-if-= $run-main/disp8
# run-tests()
e8/call run-tests/disp32
# syscall(exit, *Num-test-failures)
@ -229,7 +229,7 @@ get-num: # in : (addr buffered-file), out : (addr stream byte), err : fd or (ad
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax == false)
3d/compare-eax-and 0/imm32/false
75/jump-if-not-equal $get-num:main/disp8
75/jump-if-!= $get-num:main/disp8
# . expected(ed, err, "integer")
# . . push args
68/push "integer"/imm32
@ -260,7 +260,7 @@ $get-num:main:
$get-num:loop:
# if (out->write >= out->length) error
39/compare 3/mod/direct 2/rm32/edx . . . 1/r32/ecx . . # compare edx with ecx
7d/jump-if-lesser $get-num:loop-stage2/disp8
7d/jump-if-< $get-num:loop-stage2/disp8
# . error(ed, err, msg) # TODO: show full number
# . . push args
68/push "get-num: too many digits in number"/imm32
@ -294,7 +294,7 @@ $get-num:loop-stage2:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) loop
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $get-num:loop/disp32
0f 85/jump-if-!= $get-num:loop/disp32
$get-num:loop-end:
# persist necessary variables from registers
89/copy 0/mod/indirect 7/rm32/edi . . . 1/r32/ecx . . # copy ecx to *edi
@ -737,10 +737,10 @@ is-digit?: # c : int -> eax : boolean
b8/copy-to-eax 0/imm32
# if (c < '0') return false
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 0x30/imm32 # compare *(ebp+8)
7c/jump-if-lesser $is-digit?:end/disp8
7c/jump-if-< $is-digit?:end/disp8
# if (c > '9') return false
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 0x39/imm32 # compare *(ebp+8)
7f/jump-if-greater $is-digit?:end/disp8
7f/jump-if-> $is-digit?:end/disp8
# otherwise return true
b8/copy-to-eax 1/imm32
$is-digit?:end:

View File

@ -36,7 +36,7 @@ Entry: # run tests if necessary, convert stdin if not
# - if argc > 1 and argv[1] == "test", then return run-tests()
# if (argc <= 1) goto interactive
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0/disp8 1/imm32 # compare *ebp
7e/jump-if-lesser-or-equal $subx-dquotes-main:interactive/disp8
7e/jump-if-<= $subx-dquotes-main:interactive/disp8
# if (!kernel-string-equal?(argv[1], "test")) goto interactive
# . eax = kernel-string-equal?(argv[1], "test")
# . . push args
@ -48,7 +48,7 @@ Entry: # run tests if necessary, convert stdin if not
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto interactive
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $subx-dquotes-main:interactive/disp8
74/jump-if-= $subx-dquotes-main:interactive/disp8
# run-tests()
e8/call run-tests/disp32
# syscall(exit, *Num-test-failures)
@ -174,7 +174,7 @@ $subx-dquotes:line-loop:
$subx-dquotes:check0:
# if (line->write == 0) break
81 7/subop/compare 0/mod/indirect 1/rm32/ecx . . . . . 0/imm32 # compare *ecx
0f 84/jump-if-equal $subx-dquotes:break/disp32
0f 84/jump-if-= $subx-dquotes:break/disp32
$subx-dquotes:word-loop:
# next-word-or-string(line, word-slice)
# . . push args
@ -195,7 +195,7 @@ $subx-dquotes:check1:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) break
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $subx-dquotes:next-line/disp32
0f 85/jump-if-!= $subx-dquotes:next-line/disp32
$subx-dquotes:check-for-comment:
# if (slice-starts-with?(word-slice, "#")) continue
# . var start/esi : (addr byte) = word-slice->start
@ -205,11 +205,11 @@ $subx-dquotes:check-for-comment:
8a/copy-byte 0/mod/indirect 6/rm32/esi . . . 0/r32/AL . . # copy byte at *esi to AL
# . if (c == '#') continue
3d/compare-eax-and 0x23/imm32/hash
74/jump-if-equal $subx-dquotes:word-loop/disp8
74/jump-if-= $subx-dquotes:word-loop/disp8
$subx-dquotes:check-for-string-literal:
# if (slice-starts-with?(word-slice, '"')) continue
3d/compare-eax-and 0x22/imm32/dquote
75/jump-if-not-equal $subx-dquotes:regular-word/disp8
75/jump-if-!= $subx-dquotes:regular-word/disp8
$subx-dquotes:string-literal:
# process-string-literal(word-slice, out, new-data-segment)
# . . push args
@ -925,25 +925,25 @@ $emit-string-literal-data:loop-init:
$emit-string-literal-data:loop:
# if (curr >= max) break
39/compare 3/mod/direct 2/rm32/edx . . . 6/r32/esi . . # compare edx with esi
0f 83/jump-if-greater-or-equal-unsigned $emit-string-literal-data:end/disp32
0f 83/jump-if-addr>= $emit-string-literal-data:end/disp32
# CL = *curr
8a/copy-byte 0/mod/indirect 2/rm32/edx . . . 1/r32/CL . . # copy byte at *edx to CL
# if (c == '"') break
81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x22/imm32/dquote # compare ecx
0f 84/jump-if-equal $emit-string-literal-data:end/disp32
0f 84/jump-if-= $emit-string-literal-data:end/disp32
# if (c != '\') goto emit
81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x5c/imm32/backslash # compare ecx
75/jump-if-not-equal $emit-string-literal-data:emit/disp8
75/jump-if-!= $emit-string-literal-data:emit/disp8
# ++curr
42/increment-edx
# if (curr >= max) break
39/compare 3/mod/direct 2/rm32/edx . . . 6/r32/esi . . # compare edx with esi
0f 83/jump-if-greater-or-equal-unsigned $emit-string-literal-data:end/disp32
0f 83/jump-if-addr>= $emit-string-literal-data:end/disp32
# c = *curr
8a/copy-byte 0/mod/indirect 2/rm32/edx . . . 1/r32/CL . . # copy byte at *edx to CL
# if (c == 'n') c = newline
81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x6e/imm32/n # compare ecx
75/jump-if-not-equal $emit-string-literal-data:emit/disp8
75/jump-if-!= $emit-string-literal-data:emit/disp8
b9/copy-to-ecx 0x0a/imm32/newline
$emit-string-literal-data:emit:
# append-byte-hex(out, CL)
@ -964,7 +964,7 @@ $emit-string-literal-data:emit:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax == false) goto char-done
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $emit-string-literal-data:char-done/disp8
74/jump-if-= $emit-string-literal-data:char-done/disp8
# . write(out, "/")
# . . push args
68/push Slash/imm32
@ -996,7 +996,7 @@ $emit-string-literal-data:char-done:
43/increment-ebx
# if (idx < 0x40) continue
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x40/imm32 # compare ebx
7c/jump-if-lesser $emit-string-literal-data:next-char/disp8
7c/jump-if-< $emit-string-literal-data:next-char/disp8
# idx = 0
31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . . # clear ebx
# write(out, "\n")
@ -1029,22 +1029,22 @@ is-alphanumeric?: # c : int -> eax : boolean
8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 8/disp8 . # copy *(ebp+8) to eax
# if (c < '0') return false
3d/compare-eax-with 0x30/imm32/0
7c/jump-if-lesser $is-alphanumeric?:false/disp8
7c/jump-if-< $is-alphanumeric?:false/disp8
# if (c <= '9') return true
3d/compare-eax-with 0x39/imm32/9
7e/jump-if-lesser-or-equal $is-alphanumeric?:true/disp8
7e/jump-if-<= $is-alphanumeric?:true/disp8
# if (c < 'A') return false
3d/compare-eax-with 0x41/imm32/A
7c/jump-if-lesser $is-alphanumeric?:false/disp8
7c/jump-if-< $is-alphanumeric?:false/disp8
# if (c <= 'Z') return true
3d/compare-eax-with 0x5a/imm32/Z
7e/jump-if-lesser-or-equal $is-alphanumeric?:true/disp8
7e/jump-if-<= $is-alphanumeric?:true/disp8
# if (c < 'a') return false
3d/compare-eax-with 0x61/imm32/a
7c/jump-if-lesser $is-alphanumeric?:false/disp8
7c/jump-if-< $is-alphanumeric?:false/disp8
# if (c <= 'z') return true
3d/compare-eax-with 0x7a/imm32/z
7e/jump-if-lesser-or-equal $is-alphanumeric?:true/disp8
7e/jump-if-<= $is-alphanumeric?:true/disp8
# return false
$is-alphanumeric?:false:
b8/copy-to-eax 0/imm32/false
@ -1420,7 +1420,7 @@ $emit-metadata:check-for-string-literal:
# - if (*curr == '"') curr = skip-string-in-slice(curr, end)
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
3d/compare-eax-and 0x22/imm32/dquote
75/jump-if-not-equal $emit-metadata:skip-datum-loop/disp8
75/jump-if-!= $emit-metadata:skip-datum-loop/disp8
$emit-metadata:skip-string-literal:
# . eax = skip-string-in-slice(curr, end)
# . . push args
@ -1437,11 +1437,11 @@ $emit-metadata:skip-datum-loop:
# - otherwise scan for '/'
# if (curr == end) return
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx and edx
74/jump-if-equal $emit-metadata:end/disp8
74/jump-if-= $emit-metadata:end/disp8
# if (*curr == '/') break
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
3d/compare-eax-and 0x2f/imm32/slash
74/jump-if-equal $emit-metadata:emit/disp8
74/jump-if-= $emit-metadata:emit/disp8
# ++curr
41/increment-ecx
eb/jump $emit-metadata:skip-datum-loop/disp8
@ -1799,17 +1799,17 @@ string-length-at-start-of-slice: # curr : (addr byte), end : (addr byte) -> len
$string-length-at-start-of-slice:loop:
# if (curr >= end) return length
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-unsigned-or-equal $string-length-at-start-of-slice:end/disp8
73/jump-if-addr>= $string-length-at-start-of-slice:end/disp8
# c = *curr
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 3/r32/BL . . # copy byte at *ecx to BL
$string-length-at-start-of-slice:dquote:
# if (c == '"') break
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x22/imm32/dquote # compare ebx
74/jump-if-equal $string-length-at-start-of-slice:end/disp8
74/jump-if-= $string-length-at-start-of-slice:end/disp8
$string-length-at-start-of-slice:check-for-escape:
# if (c == '\') escape next char
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x5c/imm32/backslash # compare ebx
75/jump-if-not-equal $string-length-at-start-of-slice:continue/disp8
75/jump-if-!= $string-length-at-start-of-slice:continue/disp8
$string-length-at-start-of-slice:escape:
# increment curr but not result
41/increment-ecx

View File

@ -45,10 +45,10 @@ $argv-equal:loop:
8a/copy-byte 0/mod/indirect 2/rm32/edx . . . 3/r32/BL . . # copy byte at *edx to BL
# if (c1 == 0) break
3d/compare-eax-and 0/imm32
74/jump-if-equal $argv-equal:break/disp8
74/jump-if-= $argv-equal:break/disp8
# if (c1 != c2) return false
39/compare 3/mod/direct 0/rm32/eax . . . 3/r32/ebx . . # compare eax and ebx
75/jump-if-not-equal $argv-equal:false/disp8
75/jump-if-!= $argv-equal:false/disp8
# ++s1, ++s2
41/increment-ecx
42/increment-edx
@ -57,7 +57,7 @@ $argv-equal:loop:
$argv-equal:break:
# if (c2 == 0) return true
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0/imm32 # compare ebx
75/jump-if-not-equal $argv-equal:false/disp8
75/jump-if-!= $argv-equal:false/disp8
$argv-equal:success:
b8/copy-to-eax 1/imm32
c3/return

View File

@ -73,17 +73,17 @@ kernel-string-equal?: # s : null-terminated ascii string, benchmark : length-pr
$kernel-string-equal?:loop:
# if (i >= n) break
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
7d/jump-if-greater-or-equal $kernel-string-equal?:break/disp8
7d/jump-if->= $kernel-string-equal?:break/disp8
# c1 = *s1
8a/copy-byte 0/mod/indirect 7/rm32/edi . . . 0/r32/AL . . # copy byte at *edi to AL
# c2 = *s2
8a/copy-byte 0/mod/indirect 6/rm32/esi . . . 3/r32/BL . . # copy byte at *esi to BL
# if (c1 == 0) return false
3d/compare-eax-and 0/imm32
74/jump-if-equal $kernel-string-equal?:false/disp8
74/jump-if-= $kernel-string-equal?:false/disp8
# if (c1 != c2) return false
39/compare 3/mod/direct 0/rm32/eax . . . 3/r32/ebx . . # compare eax and ebx
75/jump-if-not-equal $kernel-string-equal?:false/disp8
75/jump-if-!= $kernel-string-equal?:false/disp8
# ++i
41/increment-ecx
# ++s1
@ -95,7 +95,7 @@ $kernel-string-equal?:break:
# return *s1 == 0
8a/copy-byte 0/mod/indirect 7/rm32/edi . . . 0/r32/AL . . # copy byte at *edi to AL
3d/compare-eax-and 0/imm32
75/jump-if-not-equal $kernel-string-equal?:false/disp8
75/jump-if-!= $kernel-string-equal?:false/disp8
$kernel-string-equal?:true:
b8/copy-to-eax 1/imm32
eb/jump $kernel-string-equal?:end/disp8

View File

@ -21,7 +21,7 @@ Entry:
$loop:
# if (counter > 10) break
81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0xa/imm32 # compare ecx
7f/jump-if-greater $exit/disp8
7f/jump-if-> $exit/disp8
# result += counter
01/add 3/mod/direct 3/rm32/ebx . . . 1/r32/ecx . . # add ecx to ebx
# ++counter

View File

@ -44,7 +44,7 @@ $ascii-length:loop:
8a/copy-byte 0/mod/* 2/rm32/edx . . . 1/r32/CL . . # copy byte at *edx to CL
# if (c == '\0') break
81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0/imm32 # compare ecx
74/jump-if-equal $ascii-length:end/disp8
74/jump-if-= $ascii-length:end/disp8
# ++s
42/increment-edx
# ++result

View File

@ -35,7 +35,7 @@ Entry: # run tests if necessary, compute `factorial(5)` if not
# - if argc > 1 and argv[1] == "test", then return run_tests()
# if (argc <= 1) goto run-main
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0/disp8 1/imm32 # compare *ebp
7e/jump-if-lesser-or-equal $run-main/disp8
7e/jump-if-<= $run-main/disp8
# if (!kernel-string-equal?(argv[1], "test")) goto run-main
# . eax = kernel-string-equal?(argv[1], "test")
# . . push args
@ -47,7 +47,7 @@ Entry: # run tests if necessary, compute `factorial(5)` if not
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto run-main
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $run-main/disp8
74/jump-if-= $run-main/disp8
# run-tests()
e8/call run-tests/disp32
# syscall(exit, *Num-test-failures)

View File

@ -35,7 +35,7 @@ Entry: # run tests if necessary, compute `factorial(5)` if not
# - if argc > 1 and argv[1] == "test", then return run_tests()
# if (argc <= 1) goto run-main
81 7/subop/compare *ebp 1/imm32
7e/jump-if-lesser-or-equal $run-main/disp8
7e/jump-if-<= $run-main/disp8
# if (!kernel-string-equal?(argv[1], "test")) goto run-main
# . eax = kernel-string-equal?(argv[1], "test")
# . . push args
@ -47,7 +47,7 @@ Entry: # run tests if necessary, compute `factorial(5)` if not
81 0/subop/add %esp 8/imm32
# . if (eax == false) goto run-main
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $run-main/disp8
74/jump-if-= $run-main/disp8
# run-tests()
e8/call run-tests/disp32
# syscall(exit, *Num-test-failures)

View File

@ -29,12 +29,12 @@ Entry: # run tests if necessary, compute `factorial(5)` if not
# - if argc > 1 and argv[1] == "test", then return run_tests()
# if (argc <= 1) goto run-main
81 7/subop/compare *ebp 1/imm32
7e/jump-if-lesser-or-equal $run-main/disp8
7e/jump-if-<= $run-main/disp8
# if (!kernel-string-equal?(argv[1], "test")) goto run-main
(kernel-string-equal? *(ebp+8) "test") # => eax
# . if (eax == false) goto run-main
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $run-main/disp8
74/jump-if-= $run-main/disp8
#
(run-tests)
# syscall(exit, *Num-test-failures)

View File

@ -31,11 +31,11 @@ Entry: # run tests if necessary, compute `factorial(5)` if not
{
# if (argc <= 1) break
81 7/subop/compare *ebp 1/imm32
7e/jump-if-lesser-or-equal break/disp8
7e/jump-if-<= break/disp8
# if (!kernel-string-equal?(argv[1], "test")) break
(kernel-string-equal? *(ebp+8) "test") # => eax
3d/compare-eax-and 0/imm32/false
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
#
(run-tests)
# eax = *Num-test-failures
@ -45,7 +45,7 @@ Entry: # run tests if necessary, compute `factorial(5)` if not
{
# if (argc > 1) break
81 7/subop/compare *ebp 1/imm32
7f/jump-if-greater break/disp8
7f/jump-if-> break/disp8
# eax = factorial(5)
(factorial 5)
# syscall(exit, eax)
@ -64,12 +64,12 @@ factorial: # n : int -> int/eax
# if (n <= 1) return 1
81 7/subop/compare *(ebp+8) 1/imm32
{
7f/jump-if-greater break/disp8
7f/jump-if-> break/disp8
b8/copy-to-eax 1/imm32
}
# if (n > 1) return n * factorial(n-1)
{
7e/jump-if-lesser-or-equal break/disp8
7e/jump-if-<= break/disp8
# var ebx : int = n-1
8b/-> *(ebp+8) 3/r32/ebx
4b/decrement-ebx

View File

@ -69,7 +69,7 @@ new: # ad : (addr allocation-descriptor), n : int, out : (handle _)
89/copy 1/mod/*+disp8 2/rm32/edx . . . 0/r32/eax 4/disp8 . # copy eax to *(edx+4)
# if (eax == 0) out->alloc_id = 0, return
3d/compare-eax-and 0/imm32
75/jump-if-not-equal $new:continue/disp8
75/jump-if-!= $new:continue/disp8
c7 0/subop/copy 0/mod/indirect 2/rm32/edx . . . . . 0/imm32 # copy to *edx
eb/jump $new:end/disp8
$new:continue:
@ -239,7 +239,7 @@ lookup: # h : (handle T) -> eax : (addr T)
8b/copy 0/mod/indirect 0/rm32/eax . . . . . . # copy *eax to eax
# if (eax != handle->alloc_id) abort
39/compare 1/mod/*+disp8 4/rm32/sib 4/base/esp 4/index/none . 0/r32/eax 4/disp8 . # compare *(esp+4) and eax
75/jump-if-not-equal $lookup:abort/disp8
75/jump-if-!= $lookup:abort/disp8
# eax = pop handle->address
58/pop-to-eax
# discard handle->alloc_id
@ -254,7 +254,7 @@ lookup: # h : (handle T) -> eax : (addr T)
#? 8b/copy 1/mod/*+disp8 0/rm32/eax . . . 0/r32/eax 4/disp8 . # copy *(eax+4) to eax
#? # if (ecx != *eax) abort
#? 39/compare 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # compare *eax and ecx
#? 75/jump-if-not-equal $lookup:abort/disp8
#? 75/jump-if-!= $lookup:abort/disp8
#? # add 4 to eax
#? 05/add-to-eax 4/imm32
# - }

View File

@ -34,7 +34,7 @@ Entry: # run tests if necessary, convert stdin if not
# - if argc > 1 and argv[1] == "test", then return run_tests()
# if (argc <= 1) goto interactive
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0/disp8 1/imm32 # compare *ebp
7e/jump-if-lesser-or-equal $subx-hex-main:interactive/disp8
7e/jump-if-<= $subx-hex-main:interactive/disp8
# if (!kernel-string-equal?(argv[1], "test")) goto interactive
# . eax = kernel-string-equal?(argv[1], "test")
# . . push args
@ -46,7 +46,7 @@ Entry: # run tests if necessary, convert stdin if not
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto interactive
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $subx-hex-main:interactive/disp8
74/jump-if-= $subx-hex-main:interactive/disp8
# run-tests()
e8/call run-tests/disp32
# syscall(exit, *Num-test-failures)
@ -102,7 +102,7 @@ $subx-hex:loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp
# if (eax == Eof) break
3d/compare-eax-and 0xffffffff/imm32/Eof
74/jump-if-equal $subx-hex:loop-end/disp8
74/jump-if-= $subx-hex:loop-end/disp8
# write-byte-buffered(out, AL)
# . . push args
50/push-eax
@ -162,7 +162,7 @@ convert-next-octet: # in : (addr buffered-file), err : (addr buffered-file), ed
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp
# if (eax == Eof) return
3d/compare-eax-and 0xffffffff/imm32/Eof
74/jump-if-equal $convert-next-octet:end/disp8
74/jump-if-= $convert-next-octet:end/disp8
# eax = from-hex-char(eax)
e8/call from-hex-char/disp32
# ecx = eax
@ -178,7 +178,7 @@ convert-next-octet: # in : (addr buffered-file), err : (addr buffered-file), ed
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp
# if (eax == Eof) error(ed, err, "partial byte found.")
3d/compare-eax-and 0xffffffff/imm32/Eof
75/jump-if-not-equal $convert-next-octet:convert/disp8
75/jump-if-!= $convert-next-octet:convert/disp8
# . error-byte(ed, err, msg, '.') # reusing error-byte to avoid creating _yet_ another helper
# . . push args
68/push 0x2e/imm32/period/dummy
@ -284,7 +284,7 @@ test-convert-next-octet:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp
# return if abort
81 7/subop/compare 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 0/imm32 # compare *(ecx+4)
75/jump-if-not-equal $test-convert-next-octet:end/disp8
75/jump-if-!= $test-convert-next-octet:end/disp8
# check-ints-equal(eax, 0xab, msg)
# . . push args
68/push "F - test-convert-next-octet"/imm32
@ -374,7 +374,7 @@ test-convert-next-octet-handles-Eof:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp
# return if abort
81 7/subop/compare 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 0/imm32 # compare *(ecx+4)
75/jump-if-not-equal $test-convert-next-octet-handles-Eof:end/disp8
75/jump-if-!= $test-convert-next-octet-handles-Eof:end/disp8
# check-ints-equal(eax, Eof, msg)
# . . push args
68/push "F - test-convert-next-octet-handles-Eof"/imm32
@ -505,7 +505,7 @@ $scan-next-byte:loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# if (eax == Eof) return eax
3d/compare-with-eax 0xffffffff/imm32/Eof
74/jump-if-equal $scan-next-byte:end/disp8
74/jump-if-= $scan-next-byte:end/disp8
# if (is-hex-digit?(eax)) return eax
# . save eax for now
50/push-eax
@ -521,21 +521,21 @@ $scan-next-byte:loop:
# . restore eax (does not affect flags)
58/pop-to-eax
# . check whether to return
75/jump-if-not-equal $scan-next-byte:end/disp8
75/jump-if-!= $scan-next-byte:end/disp8
$scan-next-byte:check1:
# if (eax == ' ') continue
3d/compare-eax-and 0x20/imm32/space
74/jump-if-equal $scan-next-byte:loop/disp8
74/jump-if-= $scan-next-byte:loop/disp8
# if (eax == '\t') continue
3d/compare-eax-and 9/imm32/tab
74/jump-if-equal $scan-next-byte:loop/disp8
74/jump-if-= $scan-next-byte:loop/disp8
# if (eax == '\n') continue
3d/compare-eax-and 0xa/imm32/newline
74/jump-if-equal $scan-next-byte:loop/disp8
74/jump-if-= $scan-next-byte:loop/disp8
$scan-next-byte:check2:
# if (eax == '#') skip-until-newline(in)
3d/compare-with-eax 0x23/imm32
75/jump-if-not-equal $scan-next-byte:check3/disp8
75/jump-if-!= $scan-next-byte:check3/disp8
# . skip-until-newline(in)
# . . push args
ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8)
@ -641,7 +641,7 @@ test-scan-next-byte:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp
# return if abort
81 7/subop/compare 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 0/imm32 # compare *(ecx+4)
75/jump-if-not-equal $test-scan-next-byte:end/disp8
75/jump-if-!= $test-scan-next-byte:end/disp8
# check-ints-equal(eax, 0x61/a, msg)
# . . push args
68/push "F - test-scan-next-byte"/imm32
@ -739,7 +739,7 @@ test-scan-next-byte-skips-whitespace:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp
# return if abort
81 7/subop/compare 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 0/imm32 # compare *(ecx+4)
75/jump-if-not-equal $test-scan-next-byte-skips-whitespace:end/disp8
75/jump-if-!= $test-scan-next-byte-skips-whitespace:end/disp8
# check-ints-equal(eax, 0x61/a, msg)
# . . push args
68/push "F - test-scan-next-byte-skips-whitespace"/imm32
@ -845,7 +845,7 @@ test-scan-next-byte-skips-comment:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp
# return if abort
81 7/subop/compare 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 0/imm32 # compare *(ecx+4)
75/jump-if-not-equal $test-scan-next-byte-skips-comment:end/disp8
75/jump-if-!= $test-scan-next-byte-skips-comment:end/disp8
# check-ints-equal(eax, 0x61/a, msg)
# . . push args
68/push "F - test-scan-next-byte-skips-comment"/imm32
@ -951,7 +951,7 @@ test-scan-next-byte-skips-comment-and-whitespace:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp
# return if abort
81 7/subop/compare 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 0/imm32 # compare *(ecx+4)
75/jump-if-not-equal $test-scan-next-byte-skips-comment-and-whitespace:end/disp8
75/jump-if-!= $test-scan-next-byte-skips-comment-and-whitespace:end/disp8
# check-ints-equal(eax, 0x61/a, msg)
# . . push args
68/push "F - test-scan-next-byte-skips-comment-and-whitespace"/imm32
@ -1059,7 +1059,7 @@ test-scan-next-byte-skips-whitespace-and-comment:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp
# return if abort
81 7/subop/compare 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 0/imm32 # compare *(ecx+4)
75/jump-if-not-equal $test-scan-next-byte-skips-whitespace-and-comment:end/disp8
75/jump-if-!= $test-scan-next-byte-skips-whitespace-and-comment:end/disp8
# check-ints-equal(eax, 0x61/a, msg)
# . . push args
68/push "F - test-scan-next-byte-skips-whitespace-and-comment"/imm32
@ -1157,7 +1157,7 @@ test-scan-next-byte-reads-final-byte:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp
# return if abort
81 7/subop/compare 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 0/imm32 # compare *(ecx+4)
75/jump-if-not-equal $test-scan-next-byte-reads-final-byte:end/disp8
75/jump-if-!= $test-scan-next-byte-reads-final-byte:end/disp8
# check-ints-equal(eax, 0x61/a, msg)
# . . push args
68/push "F - test-scan-next-byte-reads-final-byte"/imm32
@ -1247,7 +1247,7 @@ test-scan-next-byte-handles-Eof:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp
# return if abort
81 7/subop/compare 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 0/imm32 # compare *(ecx+4)
75/jump-if-not-equal $test-scan-next-byte-handles-Eof:end/disp8
75/jump-if-!= $test-scan-next-byte-handles-Eof:end/disp8
# check-ints-equal(eax, Eof, msg)
# . . push args
68/push "F - test-scan-next-byte-handles-Eof"/imm32
@ -1373,10 +1373,10 @@ $skip-until-newline:loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax == Eof) break
3d/compare-eax-and 0xffffffff/imm32/Eof
74/jump-if-equal $skip-until-newline:end/disp8
74/jump-if-= $skip-until-newline:end/disp8
# . if (eax != 0xa/newline) loop
3d/compare-eax-and 0xa/imm32/newline
75/jump-if-not-equal $skip-until-newline:loop/disp8
75/jump-if-!= $skip-until-newline:loop/disp8
$skip-until-newline:end:
# . restore registers
58/pop-to-eax

View File

@ -374,11 +374,11 @@ Entry:
{
# if (argc <= 1) break
81 7/subop/compare *ebp 1/imm32
7e/jump-if-lesser-or-equal break/disp8
7e/jump-if-<= break/disp8
# if (argv[1] != "test") break
(kernel-string-equal? *(ebp+8) "test") # => eax
3d/compare-eax-and 0/imm32
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
#
(run-tests)
# syscall(exit, *Num-test-failures)
@ -1025,7 +1025,7 @@ $parse-mu:line-loop:
(read-line-buffered *(ebp+8) %ecx)
# if (line->write == 0) break
81 7/subop/compare *ecx 0/imm32
0f 84/jump-if-equal break/disp32
0f 84/jump-if-= break/disp32
#? # dump line {{{
#? (write 2 "parse-mu: ^")
#? (write-stream 2 %ecx)
@ -1036,7 +1036,7 @@ $parse-mu:line-loop:
# if slice-empty?(word-slice) continue
(slice-empty? %edx)
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal loop/disp32
0f 85/jump-if-!= loop/disp32
# if (*word-slice->start == "#") continue
# . eax = *word-slice->start
8b/-> *edx 0/r32/eax
@ -1044,13 +1044,13 @@ $parse-mu:line-loop:
81 4/subop/and %eax 0xff/imm32
# . if (eax == '#') continue
3d/compare-eax-and 0x23/imm32/hash
0f 84/jump-if-equal loop/disp32
0f 84/jump-if-= loop/disp32
# if (slice-equal?(word-slice, "fn")) parse a function
{
$parse-mu:fn:
(slice-equal? %edx "fn")
3d/compare-eax-and 0/imm32
0f 84/jump-if-equal break/disp32
0f 84/jump-if-= break/disp32
# var new-function/eax : (handle function) = populate-mu-function(in, new-function, vars)
(allocate Heap *Function-size) # => eax
(zero-out %eax *Function-size)
@ -1169,15 +1169,15 @@ populate-mu-function-header: # first-line : (addr stream byte), out : (handle f
# if (word-slice == '{') abort
(slice-equal? %ecx "{") # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $populate-mu-function-header:error1/disp32
0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
# if (word-slice == '->') abort
(slice-equal? %ecx "->") # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $populate-mu-function-header:error1/disp32
0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
# if (word-slice == '}') abort
(slice-equal? %ecx "}") # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $populate-mu-function-header:error1/disp32
0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
# save function name
(slice-to-string Heap %ecx) # => eax
89/<- *edi 0/r32/eax # Function-name
@ -1190,21 +1190,21 @@ $populate-mu-function-header:check-for-inout:
# if (word-slice == '{') goto done
(slice-equal? %ecx "{") # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $populate-mu-function-header:done/disp32
0f 85/jump-if-!= $populate-mu-function-header:done/disp32
# if (word-slice == '->') break
(slice-equal? %ecx "->") # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal break/disp32
0f 85/jump-if-!= break/disp32
# if (word-slice == '}') abort
(slice-equal? %ecx "}") # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $populate-mu-function-header:error1/disp32
0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
# var v/ebx : (handle var) = parse-var-with-type(word-slice, first-line)
(parse-var-with-type %ecx *(ebp+8)) # => eax
89/<- %ebx 0/r32/eax
# assert(v->register == null)
81 7/subop/compare *(ebx+0x10) 0/imm32 # Var-register
0f 85/jump-if-not-equal $populate-mu-function-header:error2/disp32
0f 85/jump-if-!= $populate-mu-function-header:error2/disp32
# v->stack-offset = next-offset
89/<- *(ebx+0xc) 2/r32/edx # Var-stack-offset
# next-offset += size-of(v)
@ -1224,21 +1224,21 @@ $parse-var-with-type:check-for-out:
# if (word-slice == '{') break
(slice-equal? %ecx "{") # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal break/disp32
0f 85/jump-if-!= break/disp32
# if (word-slice == '->') abort
(slice-equal? %ecx "->") # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $populate-mu-function-header:error1/disp32
0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
# if (word-slice == '}') abort
(slice-equal? %ecx "}") # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $populate-mu-function-header:error1/disp32
0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
#
(parse-var-with-type %ecx *(ebp+8)) # => eax
89/<- %ebx 0/r32/eax
# assert(var->register != null)
81 7/subop/compare *(ebx+0x10) 0/imm32 # Var-register
0f 84/jump-if-equal $populate-mu-function-header:error3/disp32
0f 84/jump-if-= $populate-mu-function-header:error3/disp32
(append-list Heap %ebx *(edi+0xc)) # Function-outputs => eax
89/<- *(edi+0xc) 0/r32/eax # Function-outputs
e9/jump loop/disp32
@ -1522,7 +1522,7 @@ $parse-var-with-type:save-name:
8a/copy-byte *eax 3/r32/BL
81 4/subop/and %ebx 0xff/imm32
81 7/subop/compare %ebx 0x3a/imm32/colon
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
89/<- *(ecx+4) 0/r32/eax
}
# . if s ends with ',', decrement s->end
@ -1532,7 +1532,7 @@ $parse-var-with-type:save-name:
8a/copy-byte *eax 3/r32/BL
81 4/subop/and %ebx 0xff/imm32
81 7/subop/compare %ebx 0x2c/imm32/comma
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
89/<- *(ecx+4) 0/r32/eax
}
$parse-var-with-type:write-name:
@ -1548,7 +1548,7 @@ $parse-var-with-type:save-register:
8a/copy-byte *eax 3/r32/BL
81 4/subop/and %ebx 0xff/imm32
81 7/subop/compare %ebx 0x3a/imm32/colon
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
89/<- *(ecx+4) 0/r32/eax
}
# . if s ends with ',', decrement s->end
@ -1558,7 +1558,7 @@ $parse-var-with-type:save-register:
8a/copy-byte *eax 3/r32/BL
81 4/subop/and %ebx 0xff/imm32
81 7/subop/compare %ebx 0x2c/imm32/comma
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
89/<- *(ecx+4) 0/r32/eax
}
# if (!slice-empty?(s)) v->register = slice-to-string(s)
@ -1568,7 +1568,7 @@ $parse-var-with-type:write-register:
# That's probably a sign we have the wrong algorithm for this function.
8b/-> *ecx 0/r32/eax
39/compare 0/r32/eax *(ecx+4)
76/jump-if-lesser-or-equal break/disp8
76/jump-if-<= break/disp8
(slice-to-string Heap %ecx)
89/<- *(edi+0x10) 0/r32/eax # Var-register
}
@ -1577,33 +1577,33 @@ $parse-var-with-type:write-register:
# if (word-slice == '{') abort
(slice-equal? %ecx "{") # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $parse-var-with-type:abort/disp32
0f 85/jump-if-!= $parse-var-with-type:abort/disp32
# if (word-slice == '->') abort
(slice-equal? %ecx "->") # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $parse-var-with-type:abort/disp32
0f 85/jump-if-!= $parse-var-with-type:abort/disp32
# if (word-slice == '}') abort
(slice-equal? %ecx "}") # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $parse-var-with-type:abort/disp32
0f 85/jump-if-!= $parse-var-with-type:abort/disp32
# if (slice-empty?(type)) skip
(slice-empty? %ecx)
{
3d/compare-eax-and 0/imm32
0f 84/jump-if-equal break/disp32
0f 84/jump-if-= break/disp32
(next-mu-token *(ebp+0xc) %ecx)
# if (word-slice == '{') abort
(slice-equal? %ecx "{") # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $parse-var-with-type:abort/disp32
0f 85/jump-if-!= $parse-var-with-type:abort/disp32
# if (word-slice == '->') abort
(slice-equal? %ecx "->") # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $parse-var-with-type:abort/disp32
0f 85/jump-if-!= $parse-var-with-type:abort/disp32
# if (word-slice == '}') abort
(slice-equal? %ecx "}") # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $parse-var-with-type:abort/disp32
0f 85/jump-if-!= $parse-var-with-type:abort/disp32
}
(type-for %ecx) # => eax
89/<- *(edi+4) 0/r32/eax # Var-type
@ -1655,7 +1655,7 @@ next-mu-token: # in: (addr stream byte), out: (addr slice)
8a/copy-byte *eax 3/r32/BL
81 4/subop/and %ebx 0xff/imm32
81 7/subop/compare %ebx 0x3a/imm32/colon
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
89/<- *(edi+4) 0/r32/eax
}
# if out ends with ',', decrement out->end
@ -1665,7 +1665,7 @@ next-mu-token: # in: (addr stream byte), out: (addr slice)
8a/copy-byte *eax 3/r32/BL
81 4/subop/and %ebx 0xff/imm32
81 7/subop/compare %ebx 0x2c/imm32/comma
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
89/<- *(edi+4) 0/r32/eax
}
$next-mu-token:end:
@ -1722,14 +1722,14 @@ pos-slice: # arr: (addr stream (handle array byte)), s: (addr slice) -> index/e
# if (curr >= max) return -1
39/compare %edx 3/r32/ebx
{
72/jump-if-lesser-unsigned break/disp8
72/jump-if-addr< break/disp8
b8/copy-to-eax 1/imm32
eb/jump $pos-slice:end/disp8
}
# if (slice-equal?(s, *curr)) break
(slice-equal? *(ebp+0xc) *edx) # => eax
3d/compare-eax-and 0/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
# ++index
41/increment-ecx
# curr += 4
@ -1901,7 +1901,7 @@ is-identifier?: # in : (addr slice) -> result/eax : boolean
# if (slice-empty?(in)) return false
(slice-empty? *(ebp+8)) # => eax
3d/compare-eax-and 0/imm32
75/jump-if-not-equal $is-identifier?:false/disp8
75/jump-if-!= $is-identifier?:false/disp8
# var c/eax : byte = *in->start
8b/-> *(ebp+8) 0/r32/eax
8b/-> *eax 0/r32/eax
@ -1909,18 +1909,18 @@ is-identifier?: # in : (addr slice) -> result/eax : boolean
81 4/subop/and %eax 0xff/imm32
# if (c == '$') return true
3d/compare-eax-and 0x24/imm32/$
74/jump-if-equal $is-identifier?:true/disp8
74/jump-if-= $is-identifier?:true/disp8
# if (c == '_') return true
3d/compare-eax-and 0x5f/imm32/_
74/jump-if-equal $is-identifier?:true/disp8
74/jump-if-= $is-identifier?:true/disp8
# drop case
25/and-eax-with 0x5f/imm32
# if (c < 'A') return false
3d/compare-eax-and 0x41/imm32/A
7c/jump-if-lesser $is-identifier?:false/disp8
7c/jump-if-< $is-identifier?:false/disp8
# if (c > 'Z') return false
3d/compare-eax-and 0x5a/imm32/Z
7f/jump-if-greater $is-identifier?:false/disp8
7f/jump-if-> $is-identifier?:false/disp8
# otherwise return true
$is-identifier?:true:
b8/copy-to-eax 1/imm32/true
@ -2282,7 +2282,7 @@ $parse-mu-block:line-loop:
#? (flush Stderr)
# if (line->write == 0) break
81 7/subop/compare *ecx 0/imm32
0f 84/jump-if-equal break/disp32
0f 84/jump-if-= break/disp32
# word-slice = next-word(line)
(next-word %ecx %edx)
#? (write-buffered Stderr "word: ")
@ -2292,7 +2292,7 @@ $parse-mu-block:line-loop:
# if slice-empty?(word-slice) continue
(slice-empty? %edx)
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal loop/disp32
0f 85/jump-if-!= loop/disp32
# if (slice-starts-with?(word-slice, '#') continue
# . eax = *word-slice->start
8b/-> *edx 0/r32/eax
@ -2300,13 +2300,13 @@ $parse-mu-block:line-loop:
81 4/subop/and %eax 0xff/imm32
# . if (eax == '#') continue
3d/compare-eax-and 0x23/imm32/hash
0f 84/jump-if-equal loop/disp32
0f 84/jump-if-= loop/disp32
# if slice-equal?(word-slice, "{")
{
$parse-mu-block:check-for-block:
(slice-equal? %edx "{")
3d/compare-eax-and 0/imm32
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
(check-no-tokens-left %ecx)
# parse new block and append
(parse-mu-block *(ebp+8) *(ebp+0xc) *(ebp+0x10)) # => eax
@ -2317,7 +2317,7 @@ $parse-mu-block:check-for-block:
$parse-mu-block:check-for-end:
(slice-equal? %edx "}")
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal break/disp32
0f 85/jump-if-!= break/disp32
# if slice-ends-with?(word-slice, ":") parse named block and append
{
$parse-mu-block:check-for-named-block:
@ -2327,7 +2327,7 @@ $parse-mu-block:check-for-named-block:
81 4/subop/and %eax 0xff/imm32
# . if (eax != ':') break
3d/compare-eax-and 0x23/imm32/hash
0f 85/jump-if-not-equal break/disp32
0f 85/jump-if-!= break/disp32
#
(parse-mu-named-block %edx %ecx *(ebp+8) *(ebp+0xc) *(ebp+0x10)) # => eax
(append-to-block %edi %eax)
@ -2338,7 +2338,7 @@ $parse-mu-block:check-for-named-block:
$parse-mu-block:check-for-var:
(slice-equal? %edx "var")
3d/compare-eax-and 0/imm32
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
#
(parse-mu-var-def %ecx *(ebp+0xc)) # => eax
(append-to-block %edi %eax)
@ -2394,7 +2394,7 @@ check-no-tokens-left: # line : (addr stream byte)
# if slice-empty?(s) return
(slice-empty? %ecx)
3d/compare-eax-and 0/imm32
75/jump-if-not-equal $check-no-tokens-left:end/disp8
75/jump-if-!= $check-no-tokens-left:end/disp8
# if (slice-starts-with?(s, '#') return
# . eax = *s->start
8b/-> *edx 0/r32/eax
@ -2402,7 +2402,7 @@ check-no-tokens-left: # line : (addr stream byte)
81 4/subop/and %eax 0xff/imm32
# . if (eax == '#') continue
3d/compare-eax-and 0x23/imm32/hash
74/jump-if-equal $check-no-tokens-left:end/disp8
74/jump-if-= $check-no-tokens-left:end/disp8
# abort
(write-buffered Stderr "'{' or '}' should be on its own line, but got '")
(rewind-stream %ecx)
@ -2520,7 +2520,7 @@ parse-mu-stmt: # line : (addr stream byte), vars : (addr stack (handle var)), f
{
(stmt-has-outputs? *(ebp+8))
3d/compare-eax-and 0/imm32
0f 84/jump-if-equal break/disp32
0f 84/jump-if-= break/disp32
{
$parse-mu-stmt:read-outputs:
# name = next-word(line)
@ -2528,15 +2528,15 @@ $parse-mu-stmt:read-outputs:
# if slice-empty?(word-slice) break
(slice-empty? %ecx)
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal break/disp32
0f 85/jump-if-!= break/disp32
# if (name == "<-") break
(slice-equal? %ecx "<-")
3d/compare-eax-and 0/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
# assert(is-identifier?(name))
(is-identifier? %ecx)
3d/compare-eax-and 0/imm32
0f 84/jump-if-equal $parse-mu-stmt:abort/disp32
0f 84/jump-if-= $parse-mu-stmt:abort/disp32
#
(lookup-or-define-var %ecx *(ebp+0xc) *(ebp+0x10)) # => eax
(append-list Heap %eax *(edi+0xc)) # Stmt1-outputs => eax
@ -2555,11 +2555,11 @@ $parse-mu-stmt:read-inouts:
# if slice-empty?(word-slice) break
(slice-empty? %ecx)
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal break/disp32
0f 85/jump-if-!= break/disp32
# if (name == "<-") abort
(slice-equal? %ecx "<-")
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $parse-mu-stmt:abort2/disp32
0f 85/jump-if-!= $parse-mu-stmt:abort2/disp32
#
(lookup-var-or-literal %ecx *(ebp+0xc)) # => eax
(append-list Heap %eax *(edi+8)) # Stmt1-inouts => eax
@ -2623,7 +2623,7 @@ stmt-has-outputs?: # line : (addr stream byte) -> result/eax : boolean
(slice-empty? %ecx)
3d/compare-eax-and 0/imm32
b8/copy-to-eax 0/imm32/false/result # restore result (if we're here it's still false)
0f 85/jump-if-not-equal break/disp32
0f 85/jump-if-!= break/disp32
# if slice-starts-with?(word-slice, '#') break
# . eax = *word-slice->start
8b/-> *ecx 0/r32/eax
@ -2632,11 +2632,11 @@ stmt-has-outputs?: # line : (addr stream byte) -> result/eax : boolean
# . if (eax == '#') break
3d/compare-eax-and 0x23/imm32/hash
b8/copy-to-eax 0/imm32/false/result # restore result (if we're here it's still false)
0f 84/jump-if-equal break/disp32
0f 84/jump-if-= break/disp32
# if slice-equal?(word-slice, '<-') return true
(slice-equal? %ecx "<-")
3d/compare-eax-and 0/imm32
74/jump-if-equal loop/disp8
74/jump-if-= loop/disp8
b8/copy-to-eax 1/imm32/true
}
$stmt-has-outputs:end:
@ -2664,7 +2664,7 @@ lookup-var-or-literal: # name: (addr slice), vars : (addr stack (handle var)) -
# if slice-empty?(name) abort
(slice-empty? %esi) # => eax
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $lookup-var-or-literal:abort/disp32
0f 85/jump-if-!= $lookup-var-or-literal:abort/disp32
# var ecx : byte = *name->start
8b/-> *esi 1/r32/ecx
8a/copy-byte *ecx 1/r32/CL
@ -2673,12 +2673,12 @@ lookup-var-or-literal: # name: (addr slice), vars : (addr stack (handle var)) -
(is-decimal-digit? %ecx) # => eax
81 7/subop/compare %eax 0/imm32
{
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
(new-literal-integer Heap %esi) # => eax
}
# otherwise return lookup-var(name, vars)
{
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
(lookup-var %esi *(ebp+0xc)) # => eax
}
$lookup-var-or-literal:end:
@ -2710,7 +2710,7 @@ lookup-var: # name: (addr slice), vars : (addr stack (handle var)) -> result/ea
(lookup-var-helper %eax *(ebp+0xc)) # => eax
# if (result == 0) abort
3d/compare-eax-and 0/imm32
74/jump-if-equal $lookup-var:abort/disp8
74/jump-if-= $lookup-var:abort/disp8
$lookup-var:end:
# . epilogue
89/<- %esp 5/r32/ebp
@ -2752,7 +2752,7 @@ lookup-var-helper: # name: (addr array byte), vars : (addr stack (handle var))
8b/-> *esi 3/r32/ebx
# if (vars->top > vars->length) abort
3b/compare 0/r32/eax *(esi+4)
0f 8f/jump-if-greater $lookup-var-helper:error1/disp32
0f 8f/jump-if-> $lookup-var-helper:error1/disp32
# var min/edx : (addr handle var) = vars->data
8d/copy-address *(esi+8) 2/r32/edx
# var curr/ebx : (addr handle var) = &vars->data[vars->top - 4]
@ -2762,14 +2762,14 @@ lookup-var-helper: # name: (addr array byte), vars : (addr stack (handle var))
# if (curr < min) return 0
39/compare %ebx 2/r32/edx
b8/copy-to-eax 0/imm32
0f 82/jump-if-lesser-unsigned break/disp32
0f 82/jump-if-addr< break/disp32
# var v/eax : (handle var) = *curr
8b/-> *ebx 0/r32/eax
# if (v->name == name) return v
(string-equal? *eax *(ebp+8)) # Var-name
3d/compare-eax-and 0/imm32
8b/-> *ebx 0/r32/eax
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
# curr -= 4
81 5/subop/subtract %ebx 4/imm32
e9/jump loop/disp32
@ -2810,13 +2810,13 @@ lookup-or-define-var: # name: (addr slice), vars : (addr stack (handle var)), f
{
# if (result != 0) return
3d/compare-eax-and 0/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
# if name is one of fn's outputs, return it
{
(find-in-function-outputs *(ebp+0x10) %ecx) # => eax
3d/compare-eax-and 0/imm32
# otherwise abort
0f 84/jump-if-not-equal $lookup-var:abort/disp32
0f 84/jump-if-!= $lookup-var:abort/disp32
}
}
$lookup-or-define-var:end:
@ -2839,7 +2839,7 @@ find-in-function-outputs: # fn : (handle function), name : (handle array byte)
# while curr != null
{
81 7/subop/compare %ecx 0/imm32
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
# var v : (handle var) = *curr
8b/-> *ecx 0/r32/eax # List-value
# if (curr->name == name) return curr
@ -2847,7 +2847,7 @@ find-in-function-outputs: # fn : (handle function), name : (handle array byte)
(string-equal? *eax *(ebp+0xc))
3d/compare-eax-and 0/imm32
58/pop-to-eax
75/jump-if-not-equal $find-in-function-outputs:end/disp8
75/jump-if-!= $find-in-function-outputs:end/disp8
# curr = curr->next
8b/-> *(ecx+4) 1/r32/ecx # List-next
eb/jump loop/disp8
@ -2960,7 +2960,7 @@ new-literal-integer: # ad: (addr allocation-descriptor), name: (addr slice) ->
# if (!is-hex-int?(name)) abort
(is-hex-int? *(ebp+0xc)) # => eax
3d/compare-eax-and 0/imm32
0f 84/jump-if-equal $new-literal-integer:abort/disp32
0f 84/jump-if-= $new-literal-integer:abort/disp32
# var s/ecx : (addr array byte)
(slice-to-string Heap *(ebp+0xc)) # => eax
89/<- %ecx 0/r32/eax
@ -3137,14 +3137,14 @@ append-list: # ad: (addr allocation-descriptor), value: _type, list: (handle li
89/<- *eax 1/r32/ecx # List-value
# if (list == null) return result
81 7/subop/compare *(ebp+0x10) 0/imm32
74/jump-if-equal $new-list:end/disp8
74/jump-if-= $new-list:end/disp8
# otherwise append
# var curr/ecx = list
8b/-> *(ebp+0x10) 1/r32/ecx
# while (curr->next != null) curr = curr->next
{
81 7/subop/compare *(ecx+4) 0/imm32 # List-next
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
# curr = curr->next
8b/-> *(ecx+4) 1/r32/ecx
eb/jump loop/disp8
@ -3225,7 +3225,7 @@ emit-subx: # out : (addr buffered-file)
{
# if (curr == null) break
81 7/subop/compare %ecx 0/imm32
0f 84/jump-if-equal break/disp32
0f 84/jump-if-= break/disp32
(emit-subx-function %edi %ecx)
# curr = curr->next
8b/-> *(ecx+0x14) 1/r32/ecx # Function-next
@ -3280,12 +3280,12 @@ emit-subx-block: # out : (addr buffered-file), block : (handle block)
{
$emit-subx-block:check-empty:
81 7/subop/compare %esi 0/imm32
0f 84/jump-if-equal break/disp32
0f 84/jump-if-= break/disp32
(write-buffered *(ebp+8) "{\n")
{
$emit-subx-block:stmt:
81 7/subop/compare %esi 0/imm32
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
(emit-subx-statement *(ebp+8) *esi Primitives *Program)
(write-buffered *(ebp+8) Newline)
8b/-> *(esi+4) 6/r32/esi # List-next
@ -3311,7 +3311,7 @@ emit-subx-statement: # out : (addr buffered-file), stmt : (handle statement), p
$emit-subx-statement:primitive:
(find-matching-primitive *(ebp+0x10) *(ebp+0xc)) # primitives, stmt => curr/eax
3d/compare-eax-and 0/imm32
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
(emit-subx-primitive *(ebp+8) *(ebp+0xc) %eax) # out, stmt, curr
e9/jump $emit-subx-statement:end/disp32
}
@ -3320,7 +3320,7 @@ $emit-subx-statement:primitive:
$emit-subx-statement:call:
(find-matching-function *(ebp+0x14) *(ebp+0xc)) # functions, stmt => curr/eax
3d/compare-eax-and 0/imm32
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
(emit-subx-call *(ebp+8) *(ebp+0xc) %eax) # out, stmt, curr
e9/jump $emit-subx-statement:end/disp32
}
@ -4136,7 +4136,7 @@ emit-subx-rm32: # out : (addr buffered-file), l : arg-location, stmt : (handle
50/push-eax
# if (l == 0) return
81 7/subop/compare *(ebp+0xc) 0/imm32
74/jump-if-equal $emit-subx-rm32:end/disp8
74/jump-if-= $emit-subx-rm32:end/disp8
#
(get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc)) # stmt, l => var/eax
(emit-subx-var-as-rm32 *(ebp+8) %eax) # out, var
@ -4161,7 +4161,7 @@ get-stmt-operand-from-arg-location: # stmt : (handle statement), l : arg-locati
# if (l == 1) return stmt->inouts->var
{
3d/compare-eax-and 1/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
$get-stmt-operand-from-arg-location:1:
8b/-> *(ecx+8) 0/r32/eax # Stmt1-inouts
8b/-> *eax 0/r32/eax # Operand-var
@ -4170,7 +4170,7 @@ $get-stmt-operand-from-arg-location:1:
# if (l == 2) return stmt->inouts->next->var
{
3d/compare-eax-and 2/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
$get-stmt-operand-from-arg-location:2:
8b/-> *(ecx+8) 0/r32/eax # Stmt1-inouts
8b/-> *(eax+4) 0/r32/eax # Operand-next
@ -4180,7 +4180,7 @@ $get-stmt-operand-from-arg-location:2:
# if (l == 3) return stmt->outputs
{
3d/compare-eax-and 3/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
$get-stmt-operand-from-arg-location:3:
8b/-> *(ecx+0xc) 0/r32/eax # Stmt1-outputs
8b/-> *eax 0/r32/eax # Operand-var
@ -4217,7 +4217,7 @@ emit-subx-r32: # out : (addr buffered-file), l : arg-location, stmt : (handle s
51/push-ecx
# if (location == 0) return
81 7/subop/compare *(ebp+0xc) 0/imm32
0f 84/jump-if-equal $emit-subx-r32:end/disp32
0f 84/jump-if-= $emit-subx-r32:end/disp32
#
(get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc)) # stmt, l => var/eax
(maybe-get Registers *(eax+0x10) 8) # Var-register => eax : (addr register-index)
@ -4242,7 +4242,7 @@ emit-subx-imm32: # out : (addr buffered-file), l : arg-location, stmt : (handle
51/push-ecx
# if (location == 0) return
81 7/subop/compare *(ebp+0xc) 0/imm32
74/jump-if-equal $emit-subx-imm32:end/disp8
74/jump-if-= $emit-subx-imm32:end/disp8
#
(get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc)) # stmt, l => var/eax
(write-buffered *(ebp+8) Space)
@ -4276,7 +4276,7 @@ emit-subx-call: # out : (addr buffered-file), stmt : (handle statement), callee
{
# if (curr == null) break
81 7/subop/compare %ecx 0/imm32
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
#
(emit-subx-call-operand *(ebp+8) *ecx)
# curr = curr->next
@ -4305,7 +4305,7 @@ emit-subx-call-operand: # out : (addr buffered-file), operand : (handle variabl
# if (operand->register) emit "%__"
{
81 7/subop/compare *(eax+0x10) 0/imm32 # Var-register
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
$emit-subx-call-operand:register:
(write-buffered *(ebp+8) " %")
(write-buffered *(ebp+8) *(eax+0x10)) # Var-register
@ -4314,7 +4314,7 @@ $emit-subx-call-operand:register:
# else if (operand->stack-offset) emit "*(ebp+__)"
{
81 7/subop/compare *(eax+0xc) 0/imm32 # Var-stack-offset
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
$emit-subx-call-operand:stack:
(write-buffered *(ebp+8) Space)
(write-buffered *(ebp+8) "*(ebp+")
@ -4329,7 +4329,7 @@ $emit-subx-call-operand:stack:
8b/-> *(eax+4) 0/r32/eax # Var-type
81 7/subop/compare *eax 0/imm32 # Tree-left
58/pop-to-eax
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
$emit-subx-call-operand:literal:
(write-buffered *(ebp+8) Space)
(write-buffered *(ebp+8) *eax)
@ -4353,7 +4353,7 @@ emit-subx-var-as-rm32: # out : (addr buffered-file), operand : (handle variable
# if (operand->register) emit "%__"
{
81 7/subop/compare *(eax+0x10) 0/imm32 # Var-register
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
$emit-subx-var-as-rm32:register:
(write-buffered *(ebp+8) " %")
(write-buffered *(ebp+8) *(eax+0x10)) # Var-register
@ -4361,7 +4361,7 @@ $emit-subx-var-as-rm32:register:
# else if (operand->stack-offset) emit "*(ebp+__)"
{
81 7/subop/compare *(eax+0xc) 0/imm32 # Var-stack-offset
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
$emit-subx-var-as-rm32:stack:
(write-buffered *(ebp+8) Space)
(write-buffered *(ebp+8) "*(ebp+")
@ -4388,12 +4388,12 @@ find-matching-function: # functions : (addr function), stmt : (handle statement
{
# if (curr == null) break
81 7/subop/compare %ecx 0/imm32
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
# if match(stmt, curr) return curr
{
(mu-stmt-matches-function? *(ebp+0xc) %ecx) # => eax
3d/compare-eax-and 0/imm32
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
89/<- %eax 1/r32/ecx
eb/jump $find-matching-function:end/disp8
}
@ -4423,7 +4423,7 @@ find-matching-primitive: # primitives : (handle primitive), stmt : (handle stat
$find-matching-primitive:loop:
# if (curr == null) break
81 7/subop/compare %ecx 0/imm32
0f 84/jump-if-equal break/disp32
0f 84/jump-if-= break/disp32
#? (write-buffered Stderr "prim: ")
#? (write-buffered Stderr *ecx) # Primitive-name
#? (write-buffered Stderr " => ")
@ -4434,7 +4434,7 @@ $find-matching-primitive:loop:
{
(mu-stmt-matches-primitive? *(ebp+0xc) %ecx) # => eax
3d/compare-eax-and 0/imm32
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
89/<- %eax 1/r32/ecx
eb/jump $find-matching-primitive:end/disp8
}
@ -4495,7 +4495,7 @@ $mu-stmt-matches-primitive?:check-name:
# if (primitive->name != stmt->operation) return false
(string-equal? *(ecx+4) *edx) # Stmt1-operation, Primitive-name => eax
3d/compare-eax-and 0/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
b8/copy-to-eax 0/imm32
e9/jump $mu-stmt-matches-primitive?:end/disp32
}
@ -4507,11 +4507,11 @@ $mu-stmt-matches-primitive?:check-inouts:
# if (curr == 0 && curr2 == 0) move on to check outputs
{
81 7/subop/compare %esi 0/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
$mu-stmt-matches-primitive?:stmt-inout-is-null:
{
81 7/subop/compare %edi 0/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
#
e9/jump $mu-stmt-matches-primitive?:check-outputs/disp32
}
@ -4522,7 +4522,7 @@ $mu-stmt-matches-primitive?:stmt-inout-is-null:
# if (curr2 == 0) return false
{
81 7/subop/compare %edi 0/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
$mu-stmt-matches-primitive?:prim-inout-is-null:
b8/copy-to-eax 0/imm32/false
e9/jump $mu-stmt-matches-primitive?:end/disp32
@ -4531,7 +4531,7 @@ $mu-stmt-matches-primitive?:prim-inout-is-null:
{
(operand-matches-primitive? *esi *edi) # => eax
3d/compare-eax-and 0/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
b8/copy-to-eax 0/imm32/false
e9/jump $mu-stmt-matches-primitive?:end/disp32
}
@ -4550,10 +4550,10 @@ $mu-stmt-matches-primitive?:check-outputs:
{
$mu-stmt-matches-primitive?:check-output:
81 7/subop/compare %esi 0/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
{
81 7/subop/compare %edi 0/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
# return true
b8/copy-to-eax 1/imm32
e9/jump $mu-stmt-matches-primitive?:end/disp32
@ -4565,7 +4565,7 @@ $mu-stmt-matches-primitive?:check-output:
# if (curr2 == 0) return false
{
81 7/subop/compare %edi 0/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
b8/copy-to-eax 0/imm32
e9/jump $mu-stmt-matches-primitive?:end/disp32
}
@ -4573,7 +4573,7 @@ $mu-stmt-matches-primitive?:check-output:
{
(operand-matches-primitive? *esi *edi) # List-value List-value => eax
3d/compare-eax-and 0/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
b8/copy-to-eax 0/imm32
e9/jump $mu-stmt-matches-primitive?:end/disp32
}
@ -4612,28 +4612,28 @@ operand-matches-primitive?: # var : (handle var), prim-var : (handle var) => re
(type-equal? *(esi+4) *(edi+4)) # Var-type, Var-type => eax
3d/compare-eax-and 0/imm32
b8/copy-to-eax 0/imm32/false
74/jump-if-equal $operand-matches-primitive?:end/disp8
74/jump-if-= $operand-matches-primitive?:end/disp8
# return false if var->register doesn't match prim-var->register
{
# if addresses are equal, don't return here
8b/-> *(esi+0x10) 0/r32/eax
39/compare *(edi+0x10) 0/r32/eax
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
# if either address is 0, return false
3d/compare-eax-and 0/imm32
74/jump-if-equal $operand-matches-primitive?:end/disp8 # eax goes from meaning var->register to result
74/jump-if-= $operand-matches-primitive?:end/disp8 # eax goes from meaning var->register to result
81 7/subop/compare *(edi+0x10) 0/imm32
74/jump-if-equal $operand-matches-primitive?:end/disp8 # eax goes from meaning var->register to result
74/jump-if-= $operand-matches-primitive?:end/disp8 # eax goes from meaning var->register to result
# if prim-var->register is "*", return true
(string-equal? *(edi+0x10) "*") # Var-register
3d/compare-eax-and 0/imm32
b8/copy-to-eax 1/imm32/true
75/jump-if-not-equal $operand-matches-primitive?:end/disp8
75/jump-if-!= $operand-matches-primitive?:end/disp8
# if string contents don't match, return false
(string-equal? *(esi+0x10) *(edi+0x10)) # Var-register Var-register
3d/compare-eax-and 0/imm32
b8/copy-to-eax 0/imm32/false
74/jump-if-equal $operand-matches-primitive?:end/disp8
74/jump-if-= $operand-matches-primitive?:end/disp8
}
# return true
b8/copy-to-eax 1/imm32/true
@ -4661,19 +4661,19 @@ type-equal?: # a : (handle tree type-id), b : (handle tree type-id) => result/e
8b/-> %ecx 0/r32/eax # Var-type
39/compare %edx 0/r32/eax # Var-type
b8/copy-to-eax 1/imm32/true
0f 84/jump-if-equal $type-equal?:end/disp32
0f 84/jump-if-= $type-equal?:end/disp32
# if (a == 0) return false
81 7/subop/compare %ecx 0/imm32
b8/copy-to-eax 0/imm32/false
0f 84/jump-if-equal $type-equal?:end/disp32
0f 84/jump-if-= $type-equal?:end/disp32
# if (b == 0) return false
81 7/subop/compare %edx 0/imm32
b8/copy-to-eax 0/imm32/false
0f 84/jump-if-equal $type-equal?:end/disp32
0f 84/jump-if-= $type-equal?:end/disp32
# if (!type-equal?(a->left, b->left)) return false
(type-equal? *ecx *edx) # Tree-left, Tree-left => eax
3d/compare-eax-and 0/imm32
0f 84/jump-if-equal $type-equal?:end/disp32
0f 84/jump-if-= $type-equal?:end/disp32
# return type-equal?(a->right, b->right
(type-equal? *(ecx+4) *(edx+4)) # Tree-right, Tree-right => eax
$type-equal?:end:

View File

@ -18,11 +18,11 @@ Entry: # run tests if necessary, a REPL if not
{
# if (argc <= 1) break
81 7/subop/compare *ebp 1/imm32
7e/jump-if-lesser-or-equal break/disp8
7e/jump-if-<= break/disp8
# if (argv[1] != "test")) break
(kernel-string-equal? *(ebp+8) "test") # => eax
3d/compare-eax-and 0/imm32
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
#
(run-tests)
# syscall(exit, *Num-test-failures)
@ -84,7 +84,7 @@ repl: # in : (addr buffered-file), out : (addr buffered-file)
(lisp-read Stdin) # => eax : (handle cell)
# if (eax == 0) break
3d/compare-eax-and 0/imm32
74/jump-if-equal break/disp8
74/jump-if-= break/disp8
#
(lisp-eval %eax) # => eax : (handle cell)
(lisp-print Stdout %eax)
@ -123,7 +123,7 @@ lisp-read: # in : (addr buffered-file) -> eax : (handle cell)
# if (s->write == 0) return null
{
81 7/subop/compare *ecx 0/imm32
75/jump-if-not-equal break/disp8
75/jump-if-!= break/disp8
b8/copy-to-eax 0/imm32/eof
eb/jump $lisp-read:end/disp8
}

View File

@ -35,7 +35,7 @@ Entry: # run tests if necessary, convert stdin if not
# - if argc > 1 and argv[1] == "test", then return run_tests()
# if (argc <= 1) goto interactive
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0/disp8 1/imm32 # compare *ebp
7e/jump-if-lesser-or-equal $subx-pack-main:interactive/disp8
7e/jump-if-<= $subx-pack-main:interactive/disp8
# if (!kernel-string-equal?(argv[1], "test")) goto interactive
# . eax = kernel-string-equal?(argv[1], "test")
# . . push args
@ -47,7 +47,7 @@ Entry: # run tests if necessary, convert stdin if not
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto interactive
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $subx-pack-main:interactive/disp8
74/jump-if-= $subx-pack-main:interactive/disp8
# run-tests()
e8/call run-tests/disp32
# syscall(exit, *Num-test-failures)
@ -159,7 +159,7 @@ $subx-pack:loop:
$subx-pack:check0:
# if (line->write == 0) break
81 7/subop/compare 0/mod/indirect 1/rm32/ecx . . . . . 0/imm32 # compare *ecx
0f 84/jump-if-equal $subx-pack:break/disp32
0f 84/jump-if-= $subx-pack:break/disp32
#? # dump line {{{
#? # . write(2/stderr, "LL: ")
#? # . . push args
@ -205,7 +205,7 @@ $subx-pack:check1:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) write-stream-data(out, line)
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $subx-pack:pass-through/disp32
0f 85/jump-if-!= $subx-pack:pass-through/disp32
$subx-pack:check2:
#? # dump word-slice {{{
#? # . write(2/stderr, "AA: ")
@ -258,7 +258,7 @@ $subx-pack:check2:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto check3
3d/compare-eax-and 0/imm32/false
0f 84/jump-if-equal $subx-pack:check3/disp32
0f 84/jump-if-= $subx-pack:check3/disp32
# word-slice = next-word(line)
# . . push args
52/push-edx
@ -330,7 +330,7 @@ $subx-pack:check3:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# if (in-code? != false) convert-instruction(line, out)
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0/imm32/false # compare ebx
74/jump-if-equal $subx-pack:data/disp8
74/jump-if-= $subx-pack:data/disp8
$subx-pack:code:
# . convert-instruction(line, out)
# . . push args
@ -1026,7 +1026,7 @@ $convert-data:check0:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) break
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $convert-data:break/disp32
0f 85/jump-if-!= $convert-data:break/disp32
$convert-data:check-for-comment:
# if (slice-starts-with?(word-slice, "#"))
# . var start/edx : (addr byte) = word-slice->start
@ -1036,7 +1036,7 @@ $convert-data:check-for-comment:
8a/copy-byte 0/mod/indirect 2/rm32/edx . . . 0/r32/AL . . # copy byte at *edx to AL
# . if (c != '#') goto next check
3d/compare-eax-and 0x23/imm32/hash
75/jump-if-not-equal $convert-data:check-for-label/disp8
75/jump-if-!= $convert-data:check-for-label/disp8
$convert-data:comment:
# write-slice-buffered(out, word-slice)
# . . push args
@ -1047,7 +1047,7 @@ $convert-data:comment:
# . . discard args
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# return
0f 85/jump-if-not-equal $convert-data:end/disp32
0f 85/jump-if-!= $convert-data:end/disp32
$convert-data:check-for-label:
# if (slice-ends-with?(word-slice, ":"))
# . var end/edx : (addr byte) = word-slice->end
@ -1057,7 +1057,7 @@ $convert-data:check-for-label:
8a/copy-byte 1/mod/*+disp8 2/rm32/edx . . . 0/r32/AL -1/disp8 . # copy byte at *ecx to AL
# . if (c != ':') goto next check
3d/compare-eax-and 0x3a/imm32/colon
75/jump-if-not-equal $convert-data:check-for-imm32/disp8
75/jump-if-!= $convert-data:check-for-imm32/disp8
$convert-data:label:
# write-stream-data(out, line)
# . . push args
@ -1068,7 +1068,7 @@ $convert-data:label:
# . . discard args
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# return
75/jump-if-not-equal $convert-data:end/disp8
75/jump-if-!= $convert-data:end/disp8
$convert-data:check-for-imm32:
# if (has-metadata?(word-slice, "imm32"))
# . eax = has-metadata?(ecx, "imm32")
@ -1081,7 +1081,7 @@ $convert-data:check-for-imm32:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) process as a single byte
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $convert-data:single-byte/disp8
74/jump-if-= $convert-data:single-byte/disp8
$convert-data:imm32:
# emit(out, word-slice, 4)
# . . push args
@ -1860,7 +1860,7 @@ $convert-instruction:check0:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) pass through
3d/compare-eax-and 0/imm32/false
75/jump-if-not-equal $convert-instruction:pass-through/disp8
75/jump-if-!= $convert-instruction:pass-through/disp8
$convert-instruction:check1:
# if (slice-starts-with?(word-slice, "#")) write-stream-data(out, line)
# . var start/edx : (addr byte) = word-slice->start
@ -1870,7 +1870,7 @@ $convert-instruction:check1:
8a/copy-byte 0/mod/indirect 2/rm32/edx . . . 0/r32/AL . . # copy byte at *edx to AL
# . if (c == '#') pass through
3d/compare-eax-and 0x23/imm32/hash
74/jump-if-equal $convert-instruction:pass-through/disp8
74/jump-if-= $convert-instruction:pass-through/disp8
$convert-instruction:check2:
# if (slice-ends-with?(word-slice, ":")) write-stream-data(out, line)
# . var end/edx : (addr byte) = word-slice->end
@ -1880,7 +1880,7 @@ $convert-instruction:check2:
8a/copy-byte 1/mod/*+disp8 2/rm32/edx . . . 0/r32/AL -1/disp8 . # copy byte at *ecx to AL
# . if (c == ':') pass through
3d/compare-eax-and 0x3a/imm32/colon
75/jump-if-not-equal $convert-instruction:really-convert/disp8
75/jump-if-!= $convert-instruction:really-convert/disp8
$convert-instruction:pass-through:
# write-stream-data(out, line)
# . . push args
@ -2028,7 +2028,7 @@ $emit-opcodes:op1:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) return
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $emit-opcodes:end/disp32
0f 85/jump-if-!= $emit-opcodes:end/disp32
# if (slice-starts-with?(op1, "#")) return
# . var start/ebx : (addr byte) = op1->start
8b/copy 0/mod/indirect 1/rm32/ecx . . . 3/r32/ebx . . # copy *ecx to ebx
@ -2037,7 +2037,7 @@ $emit-opcodes:op1:
8a/copy-byte 0/mod/indirect 3/rm32/ebx . . . 0/r32/AL . . # copy byte at *ebx to AL
# . if (c == '#') return
3d/compare-eax-and 0x23/imm32/hash
0f 84/jump-if-equal $emit-opcodes:end/disp32
0f 84/jump-if-= $emit-opcodes:end/disp32
# op1 = next-token-from-slice(op1->start, op1->end, '/')
# . . push args
51/push-ecx
@ -2075,7 +2075,7 @@ $emit-opcodes:op1:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) goto op2
3d/compare-eax-and 0/imm32/false
75/jump-if-not-equal $emit-opcodes:op2/disp8
75/jump-if-!= $emit-opcodes:op2/disp8
# if (slice-equal?(op1, "f2")) goto op2
# . eax = slice-equal?(op1, "f2")
# . . push args
@ -2087,7 +2087,7 @@ $emit-opcodes:op1:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) goto op2
3d/compare-eax-and 0/imm32/false
75/jump-if-not-equal $emit-opcodes:op2/disp8
75/jump-if-!= $emit-opcodes:op2/disp8
# if (slice-equal?(op1, "f3")) goto op2
# . eax = slice-equal?(op1, "f3")
# . . push args
@ -2099,7 +2099,7 @@ $emit-opcodes:op1:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) goto op2
3d/compare-eax-and 0/imm32/false
75/jump-if-not-equal $emit-opcodes:op2/disp8
75/jump-if-!= $emit-opcodes:op2/disp8
# otherwise return
e9/jump $emit-opcodes:end/disp32
$emit-opcodes:op2:
@ -2121,7 +2121,7 @@ $emit-opcodes:op2:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) return
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $emit-opcodes:end/disp32
0f 85/jump-if-!= $emit-opcodes:end/disp32
# if (slice-starts-with?(op2, "#")) return
# . var start/ebx : (addr byte) = op2->start
8b/copy 0/mod/indirect 2/rm32/edx . . . 3/r32/ebx . . # copy *edx to ebx
@ -2130,7 +2130,7 @@ $emit-opcodes:op2:
8a/copy-byte 0/mod/indirect 3/rm32/ebx . . . 0/r32/AL . . # copy byte at *ebx to AL
# . if (c == '#') return
3d/compare-eax-and 0x23/imm32/hash
0f 84/jump-if-equal $emit-opcodes:end/disp32
0f 84/jump-if-= $emit-opcodes:end/disp32
# op2 = next-token-from-slice(op2->start, op2->end, '/')
# . . push args
52/push-edx
@ -2168,7 +2168,7 @@ $emit-opcodes:op2:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) return
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $emit-opcodes:end/disp32
0f 85/jump-if-!= $emit-opcodes:end/disp32
# if (!slice-equal?(op2, "0f")) return
# . eax = slice-equal?(op2, "0f")
# . . push args
@ -2180,7 +2180,7 @@ $emit-opcodes:op2:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) return
3d/compare-eax-and 0/imm32/false
0f 84/jump-if-equal $emit-opcodes:end/disp32
0f 84/jump-if-= $emit-opcodes:end/disp32
$emit-opcodes:op3:
# next-word(line, op3) # reuse op2/edx
# . . push args
@ -2200,7 +2200,7 @@ $emit-opcodes:op3:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) return
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $emit-opcodes:end/disp32
0f 85/jump-if-!= $emit-opcodes:end/disp32
# if (slice-starts-with?(op3, "#")) return
# . var start/ebx : (addr byte) = op2->start
8b/copy 0/mod/indirect 2/rm32/edx . . . 3/r32/ebx . . # copy *edx to ebx
@ -2209,7 +2209,7 @@ $emit-opcodes:op3:
8a/copy-byte 0/mod/indirect 3/rm32/ebx . . . 0/r32/AL . . # copy byte at *ebx to AL
# . if (c == '#') return
3d/compare-eax-and 0x23/imm32/hash
0f 84/jump-if-equal $emit-opcodes:end/disp32
0f 84/jump-if-= $emit-opcodes:end/disp32
# op3 = next-token-from-slice(op3->start, op3->end, '/')
# . . push args
52/push-edx
@ -2397,7 +2397,7 @@ $emit-modrm:check0:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) pass through
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $emit-modrm:break/disp32
0f 85/jump-if-!= $emit-modrm:break/disp32
$emit-modrm:check1:
# if (slice-starts-with?(word-slice, "#")) break
# . spill edx
@ -2411,7 +2411,7 @@ $emit-modrm:check1:
5a/pop-to-edx
# . if (c == '#') pass through
3d/compare-eax-and 0x23/imm32/hash
0f 84/jump-if-equal $emit-modrm:break/disp32
0f 84/jump-if-= $emit-modrm:break/disp32
$emit-modrm:check-for-mod:
# if (has-metadata?(word-slice, "mod"))
# . eax = has-metadata?(ecx, "mod")
@ -2424,7 +2424,7 @@ $emit-modrm:check-for-mod:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto next check
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $emit-modrm:check-for-rm32/disp8
74/jump-if-= $emit-modrm:check-for-rm32/disp8
$emit-modrm:mod:
# mod = parse-hex-int(next-token-from-slice(word-slice->start, word-slice->end, '/'))
# . eax = parse-datum-of-word(word-slice)
@ -2452,7 +2452,7 @@ $emit-modrm:check-for-rm32:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto next check
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $emit-modrm:check-for-r32/disp8
74/jump-if-= $emit-modrm:check-for-r32/disp8
$emit-modrm:rm32:
# rm32 = parse-hex-int(next-token-from-slice(word-slice->start, word-slice->end, '/'))
# . eax = parse-datum-of-word(word-slice)
@ -2480,7 +2480,7 @@ $emit-modrm:check-for-r32:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto next check
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $emit-modrm:check-for-subop/disp8
74/jump-if-= $emit-modrm:check-for-subop/disp8
$emit-modrm:r32:
# r32 = parse-hex-int(next-token-from-slice(word-slice->start, word-slice->end, '/'))
# . eax = parse-datum-of-word(word-slice)
@ -2508,7 +2508,7 @@ $emit-modrm:check-for-subop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) loop
3d/compare-eax-and 0/imm32/false
0f 84/jump-if-equal $emit-modrm:loop/disp32
0f 84/jump-if-= $emit-modrm:loop/disp32
$emit-modrm:subop:
# r32 = parse-hex-int(next-token-from-slice(word-slice->start, word-slice->end, '/'))
# . eax = parse-datum-of-word(word-slice)
@ -2527,7 +2527,7 @@ $emit-modrm:subop:
$emit-modrm:break:
# if (!has-modrm?) return
81 7/subop/compare 3/mod/direct 2/rm32/edx . . . . . 0/imm32/false # compare edx
74/jump-if-equal $emit-modrm:end/disp8
74/jump-if-= $emit-modrm:end/disp8
$emit-modrm:calculate:
# var modrm/ebx : byte = mod & 0b11
81 4/subop/and 3/mod/direct 3/rm32/ebx . . . . . 3/imm32/0b11 # bitwise and of ebx
@ -2706,7 +2706,7 @@ $emit-sib:check0:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) pass through
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $emit-sib:break/disp32
0f 85/jump-if-!= $emit-sib:break/disp32
$emit-sib:check1:
# if (slice-starts-with?(word-slice, "#")) break
# . spill edx
@ -2720,7 +2720,7 @@ $emit-sib:check1:
5a/pop-to-edx
# . if (c == '#') pass through
3d/compare-eax-and 0x23/imm32/hash
0f 84/jump-if-equal $emit-sib:break/disp32
0f 84/jump-if-= $emit-sib:break/disp32
$emit-sib:check-for-scale:
# if (has-metadata?(word-slice, "scale"))
# . eax = has-metadata?(ecx, "scale")
@ -2733,7 +2733,7 @@ $emit-sib:check-for-scale:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto next check
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $emit-sib:check-for-base/disp8
74/jump-if-= $emit-sib:check-for-base/disp8
$emit-sib:scale:
# scale = parse-hex-int(next-token-from-slice(word-slice->start, word-slice->end, '/'))
# . eax = parse-datum-of-word(word-slice)
@ -2761,7 +2761,7 @@ $emit-sib:check-for-base:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto next check
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $emit-sib:check-for-index/disp8
74/jump-if-= $emit-sib:check-for-index/disp8
$emit-sib:base:
# base = parse-hex-int(next-token-from-slice(word-slice->start, word-slice->end, '/'))
# . eax = parse-datum-of-word(word-slice)
@ -2789,7 +2789,7 @@ $emit-sib:check-for-index:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) loop
3d/compare-eax-and 0/imm32/false
0f 84/jump-if-equal $emit-sib:loop/disp32
0f 84/jump-if-= $emit-sib:loop/disp32
$emit-sib:index:
# index = parse-hex-int(next-token-from-slice(word-slice->start, word-slice->end, '/'))
# . eax = parse-datum-of-word(word-slice)
@ -2808,7 +2808,7 @@ $emit-sib:index:
$emit-sib:break:
# if (!has-sib?) return
81 7/subop/compare 3/mod/direct 2/rm32/edx . . . . . 0/imm32/false # compare edx
74/jump-if-equal $emit-sib:end/disp8
74/jump-if-= $emit-sib:end/disp8
$emit-sib:calculate:
# var sib/ebx : byte = scale & 0b11
81 4/subop/and 3/mod/direct 3/rm32/ebx . . . . . 3/imm32/0b11 # bitwise and of ebx
@ -2969,7 +2969,7 @@ $emit-disp:check0:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) pass through
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $emit-disp:break/disp32
0f 85/jump-if-!= $emit-disp:break/disp32
$emit-disp:check1:
# if (slice-starts-with?(word-slice, "#")) break
# . var start/edx : (addr byte) = word-slice->start
@ -2979,7 +2979,7 @@ $emit-disp:check1:
8a/copy-byte 0/mod/indirect 2/rm32/edx . . . 0/r32/AL . . # copy byte at *edx to AL
# . if (c == '#') break
3d/compare-eax-and 0x23/imm32/hash
0f 84/jump-if-equal $emit-disp:break/disp32
0f 84/jump-if-= $emit-disp:break/disp32
$emit-disp:check-for-disp32:
# if (has-metadata?(word-slice, "disp32"))
# . eax = has-metadata?(ecx, "disp32")
@ -2992,7 +2992,7 @@ $emit-disp:check-for-disp32:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto next check
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $emit-disp:check-for-disp16/disp8
74/jump-if-= $emit-disp:check-for-disp16/disp8
$emit-disp:disp32:
# emit(out, word-slice, 4)
# . . push args
@ -3017,7 +3017,7 @@ $emit-disp:check-for-disp16:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto next check
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $emit-disp:check-for-disp8/disp8
74/jump-if-= $emit-disp:check-for-disp8/disp8
$emit-disp:disp16:
# emit(out, word-slice, 2)
# . . push args
@ -3042,7 +3042,7 @@ $emit-disp:check-for-disp8:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) loop
3d/compare-eax-and 0/imm32/false
0f 84/jump-if-equal $emit-disp:loop/disp32
0f 84/jump-if-= $emit-disp:loop/disp32
$emit-disp:disp8:
# emit(out, word-slice, 1)
# . . push args
@ -3188,7 +3188,7 @@ $emit-imm:check0:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) pass through
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $emit-imm:break/disp32
0f 85/jump-if-!= $emit-imm:break/disp32
$emit-imm:check1:
# if (slice-starts-with?(word-slice, "#")) break
# . var start/edx : (addr byte) = slice->start
@ -3198,7 +3198,7 @@ $emit-imm:check1:
8a/copy-byte 0/mod/indirect 2/rm32/edx . . . 0/r32/AL . . # copy byte at *edx to AL
# . if (c == '#') break
3d/compare-eax-and 0x23/imm32/hash
0f 84/jump-if-equal $emit-imm:break/disp32
0f 84/jump-if-= $emit-imm:break/disp32
$emit-imm:check-for-imm32:
# if (has-metadata?(word-slice, "imm32"))
# . eax = has-metadata?(ecx, "imm32")
@ -3211,7 +3211,7 @@ $emit-imm:check-for-imm32:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto next check
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $emit-imm:check-for-imm16/disp8
74/jump-if-= $emit-imm:check-for-imm16/disp8
$emit-imm:imm32:
# emit(out, word-slice, 4)
# . . push args
@ -3236,7 +3236,7 @@ $emit-imm:check-for-imm16:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto next check
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $emit-imm:check-for-imm8/disp8
74/jump-if-= $emit-imm:check-for-imm8/disp8
$emit-imm:imm16:
# emit(out, word-slice, 2)
# . . push args
@ -3261,7 +3261,7 @@ $emit-imm:check-for-imm8:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) loop
3d/compare-eax-and 0/imm32/false
0f 84/jump-if-equal $emit-imm:loop/disp32
0f 84/jump-if-= $emit-imm:loop/disp32
$emit-imm:imm8:
# emit(out, word-slice, 1)
# . . push args

View File

@ -68,7 +68,7 @@ Entry: # run tests if necessary, convert stdin if not
# - if argc > 1 and argv[1] == "test", then return run_tests()
# if (argc <= 1) goto interactive
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0/disp8 1/imm32 # compare *ebp
7e/jump-if-lesser-or-equal $subx-sigils-main:interactive/disp8
7e/jump-if-<= $subx-sigils-main:interactive/disp8
# if (!kernel-string-equal?(argv[1], "test")) goto interactive
# . eax = kernel-string-equal?(argv[1], "test")
# . . push args
@ -80,7 +80,7 @@ Entry: # run tests if necessary, convert stdin if not
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto interactive
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $subx-sigils-main:interactive/disp8
74/jump-if-= $subx-sigils-main:interactive/disp8
# run-tests()
e8/call run-tests/disp32
# syscall(exit, *Num-test-failures)
@ -170,7 +170,7 @@ $subx-sigils:line-loop:
$subx-sigils:check0:
# if (line->write == 0) break
81 7/subop/compare 0/mod/indirect 1/rm32/ecx . . . . . 0/imm32 # compare *ecx
0f 84/jump-if-equal $subx-sigils:break/disp32
0f 84/jump-if-= $subx-sigils:break/disp32
$subx-sigils:word-loop:
# next-word-or-expression(line, word-slice)
# . . push args
@ -191,7 +191,7 @@ $subx-sigils:check1:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) break
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $subx-sigils:next-line/disp32
0f 85/jump-if-!= $subx-sigils:next-line/disp32
$subx-sigils:check-for-comment:
# if (slice-starts-with?(word-slice, "#")) continue
# . start/ebx = word-slice->start
@ -201,11 +201,11 @@ $subx-sigils:check-for-comment:
8a/copy-byte 0/mod/indirect 3/rm32/ebx . . . 0/r32/AL . . # copy byte at *ebx to AL
# . if (eax == '#') continue
3d/compare-eax-and 0x23/imm32/hash
74/jump-if-equal $subx-sigils:word-loop/disp8
74/jump-if-= $subx-sigils:word-loop/disp8
$subx-sigils:check-for-direct-mode:
# if (!slice-starts-with?(word-slice, "%")) goto next check
3d/compare-eax-and 0x25/imm32/percent
75/jump-if-not-equal $subx-sigils:check-for-indirect-mode/disp8
75/jump-if-!= $subx-sigils:check-for-indirect-mode/disp8
$subx-sigils:direct-mode:
#? # dump word-slice {{{
#? # . write(2/stderr, "w: ")
@ -260,7 +260,7 @@ $subx-sigils:direct-mode:
$subx-sigils:check-for-indirect-mode:
# if (!slice-starts-with?(word-slice, "*")) goto next check
3d/compare-eax-and 0x2a/imm32/asterisk
75/jump-if-not-equal $subx-sigils:check-for-invalid-addition/disp8
75/jump-if-!= $subx-sigils:check-for-invalid-addition/disp8
# if (!disp32-mode?(word-slice)) goto indirect mode
# . eax = disp32-mode?(word-slice)
# . . push args
@ -271,7 +271,7 @@ $subx-sigils:check-for-indirect-mode:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax == false) goto indirect mode
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $subx-sigils:indirect-mode/disp8
74/jump-if-= $subx-sigils:indirect-mode/disp8
$subx-sigils:disp32-mode:
# emit-indirect-mode(out, word-slice)
# . . push args
@ -317,11 +317,11 @@ $subx-sigils:indirect-mode:
$subx-sigils:check-for-invalid-addition:
# if (slice-starts-with?(word-slice, "+")) goto error1
3d/compare-eax-and 0x2b/imm32/plus
74/jump-if-equal $subx-sigils:error1/disp8
74/jump-if-= $subx-sigils:error1/disp8
$subx-sigils:check-for-invalid-left-shift:
# if (slice-starts-with?(word-slice, "<")) goto error1
3d/compare-eax-and 0x3c/imm32/less-than
74/jump-if-equal $subx-sigils:error1/disp8
74/jump-if-= $subx-sigils:error1/disp8
$subx-sigils:regular-word:
# write-slice-buffered(out, word-slice)
# . . push args
@ -1652,7 +1652,7 @@ $next-word-or-expression:check0:
8b/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 . # copy *(esi+4) to ecx
# . if (ecx < line->write) goto next check
3b/compare 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # compare ecx with *esi
7c/jump-if-lesser $next-word-or-expression:check-for-comment/disp8
7c/jump-if-< $next-word-or-expression:check-for-comment/disp8
# . return out = {0, 0}
c7 0/subop/copy 0/mod/direct 7/rm32/edi . . . . . 0/imm32 # copy to *edi
c7 0/subop/copy 1/mod/*+disp8 7/rm32/edi . . . . 4/disp8 0/imm32 # copy to *(edi+4)
@ -1667,7 +1667,7 @@ $next-word-or-expression:check-for-comment:
8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 . # copy byte at *(esi+ecx+12) to AL
# . if (eax != '#') goto next check
3d/compare-eax-and 0x23/imm32/pound
75/jump-if-not-equal $next-word-or-expression:check-for-string-literal/disp8
75/jump-if-!= $next-word-or-expression:check-for-string-literal/disp8
$next-word-or-expression:comment:
# out->end = &line->data[line->write]
8b/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . . # copy *esi to eax
@ -1681,7 +1681,7 @@ $next-word-or-expression:comment:
$next-word-or-expression:check-for-string-literal:
# if (line->data[line->read] != '"') goto next check
3d/compare-eax-and 0x22/imm32/dquote
75/jump-if-not-equal $next-word-or-expression:check-for-expression/disp8
75/jump-if-!= $next-word-or-expression:check-for-expression/disp8
$next-word-or-expression:string-literal:
# skip-string(line)
# . . push args
@ -1695,14 +1695,14 @@ $next-word-or-expression:string-literal:
$next-word-or-expression:check-for-expression:
# if (line->data[line->read] != '*') goto next check
3d/compare-eax-and 0x2a/imm32/asterisk
75/jump-if-not-equal $next-word-or-expression:regular-word/disp8
75/jump-if-!= $next-word-or-expression:regular-word/disp8
# if (line->data[line->read + 1] == ' ') goto error1
8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xd/disp8 . # copy byte at *(esi+ecx+12+1) to AL
3d/compare-eax-and 0x20/imm32/space
74/jump-if-equal $next-word-or-expression:error1/disp8
74/jump-if-= $next-word-or-expression:error1/disp8
# if (line->data[line->read + 1] != '(') goto regular word
3d/compare-eax-and 0x28/imm32/open-paren
75/jump-if-not-equal $next-word-or-expression:regular-word/disp8
75/jump-if-!= $next-word-or-expression:regular-word/disp8
$next-word-or-expression:paren:
# skip-until-close-paren(line)
# . . push args
@ -1717,7 +1717,7 @@ $next-word-or-expression:paren:
8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 . # copy byte at *(esi+ecx+12) to AL
# . if (eax != ')') goto error2
3d/compare-eax-and 0x29/imm32/close-paren
75/jump-if-not-equal $next-word-or-expression:error2/disp8
75/jump-if-!= $next-word-or-expression:error2/disp8
# skip ')'
ff 0/subop/increment 1/mod/*+disp8 6/rm32/esi . . . . 4/disp8 . # increment *(esi+4)
# fall through
@ -2269,7 +2269,7 @@ $parse-effective-address:check-for-simple-register:
8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 0/r32/AL . . # copy byte at *eax to AL
81 4/subop/and 3/mod/direct 0/rm32/eax . . . . . 0xff/imm32 # bitwise and of eax
3d/compare-eax-and 0x28/imm32/open-paren
74/jump-if-equal $parse-effective-address:compound-expression/disp8
74/jump-if-= $parse-effective-address:compound-expression/disp8
$parse-effective-address:simple-register:
# local-slice = next-token-from-slice(local-slice->start, local-slice->end, "/")
# . . push args
@ -2335,13 +2335,13 @@ $parse-effective-address:compound-expression:
8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 0/r32/AL . . # copy byte at *eax to AL
81 4/subop/and 3/mod/direct 0/rm32/eax . . . . . 0xff/imm32 # bitwise and of eax
3d/compare-eax-and 0x29/imm32/close-paren
0f 84/jump-if-equal $parse-effective-address:end/disp32
0f 84/jump-if-= $parse-effective-address:end/disp32
# if (*local-slice->start == '-') goto displacement
3d/compare-eax-and 0x2d/imm32/minus
0f 84/jump-if-equal $parse-effective-address:displacement/disp32
0f 84/jump-if-= $parse-effective-address:displacement/disp32
# if (*local-slice->start != '+') goto error1
3d/compare-eax-and 0x2b/imm32/plus
0f 85/jump-if-not-equal $parse-effective-address:error1/disp32
0f 85/jump-if-!= $parse-effective-address:error1/disp32
$parse-effective-address:check-for-index:
# ++local-slice->start to skip '+'
ff 0/subop/increment 0/mod/indirect 6/rm32/esi . . . . . . # increment *esi
@ -2385,7 +2385,7 @@ $parse-effective-address:resolve-ambiguity:
59/pop-to-ecx
# . if (eax == 0) goto displacement
3d/compare-eax-and 0/imm32
0f 84/jump-if-equal $parse-effective-address:displacement/disp32
0f 84/jump-if-= $parse-effective-address:displacement/disp32
$parse-effective-address:index:
# read register into index
# . eax = next-register(local-slice)
@ -2412,11 +2412,11 @@ $parse-effective-address:index:
8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 0/r32/AL . . # copy byte at *eax to AL
81 4/subop/and 3/mod/direct 0/rm32/eax . . . . . 0xff/imm32 # bitwise and of eax
3d/compare-eax-and 0x29/imm32/close-paren
0f 84/jump-if-equal $parse-effective-address:end/disp32
0f 84/jump-if-= $parse-effective-address:end/disp32
$parse-effective-address:check-for-scale:
# if (*local-slice->start != '<') goto next check
3d/compare-eax-and 0x3c/imm32/less-than
75/jump-if-not-equal $parse-effective-address:check-for-displacement/disp8
75/jump-if-!= $parse-effective-address:check-for-displacement/disp8
# ++local-slice->start to skip '<'
ff 0/subop/increment 0/mod/indirect 6/rm32/esi . . . . . . # increment *esi
# if (*local-slice->start != '<') goto error2
@ -2424,7 +2424,7 @@ $parse-effective-address:check-for-scale:
8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 0/r32/AL . . # copy byte at *eax to AL
81 4/subop/and 3/mod/direct 0/rm32/eax . . . . . 0xff/imm32 # bitwise and of eax
3d/compare-eax-and 0x3c/imm32/less-than
0f 85/jump-if-not-equal $parse-effective-address:error2/disp32
0f 85/jump-if-!= $parse-effective-address:error2/disp32
# ++local-slice->start to skip '<'
ff 0/subop/increment 0/mod/indirect 6/rm32/esi . . . . . . # increment *esi
# skip whitespace
@ -2464,13 +2464,13 @@ $parse-effective-address:scale:
8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 0/r32/AL . . # copy byte at *eax to AL
81 4/subop/and 3/mod/direct 0/rm32/eax . . . . . 0xff/imm32 # bitwise and of eax
3d/compare-eax-and 0x29/imm32/close-paren
74/jump-if-equal $parse-effective-address:end/disp8
74/jump-if-= $parse-effective-address:end/disp8
$parse-effective-address:check-for-displacement:
# if (*local-slice->start not in '+' '-') goto error3
3d/compare-eax-and 0x2b/imm32/plus
74/jump-if-equal $parse-effective-address:displacement/disp8
74/jump-if-= $parse-effective-address:displacement/disp8
3d/compare-eax-and 0x2d/imm32/minus
74/jump-if-equal $parse-effective-address:displacement/disp8
74/jump-if-= $parse-effective-address:displacement/disp8
e9/jump $parse-effective-address:error3/disp32
$parse-effective-address:displacement:
# read integer into disp
@ -2498,7 +2498,7 @@ $parse-effective-address:displacement:
8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 0/r32/AL . . # copy byte at *eax to AL
81 4/subop/and 3/mod/direct 0/rm32/eax . . . . . 0xff/imm32 # bitwise and of eax
3d/compare-eax-and 0x29/imm32/close-paren
0f 85/jump-if-not-equal $parse-effective-address:error4/disp32
0f 85/jump-if-!= $parse-effective-address:error4/disp32
$parse-effective-address:end:
# return base in eax
89/copy 3/mod/direct 0/rm32/eax . . . 7/r32/edi . . # copy edi to eax
@ -3156,15 +3156,15 @@ emit-indirect-mode: # out : (addr buffered-file), base : int, index : int, scal
$emit-indirect-mode:check-for-ebp:
# if (base == 5) goto emit-sib
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 5/imm32 # compare *(ebp+12)
74/jump-if-equal $emit-indirect-mode:emit-sib/disp8
74/jump-if-= $emit-indirect-mode:emit-sib/disp8
$emit-indirect-mode:check-for-esp:
# if (base == 4) goto emit-sib
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 4/imm32 # compare *(ebp+12)
74/jump-if-equal $emit-indirect-mode:emit-sib/disp8
74/jump-if-= $emit-indirect-mode:emit-sib/disp8
$emit-indirect-mode:check-for-sib:
# if (index == 4/none) goto next check
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0x10/disp8 4/imm32 # compare *(ebp+16)
0f 84/jump-if-equal $emit-indirect-mode:check-for-disp/disp32
0f 84/jump-if-= $emit-indirect-mode:check-for-disp/disp32
$emit-indirect-mode:emit-sib:
# emit(out, "2/mod/indirect 4/rm32/sib " base "/base " index "/index " scale "/scale " disp "/disp32")
# . write-buffered(out, "2/mod/*+disp32 4/rm32/sib ")
@ -3243,7 +3243,7 @@ $emit-indirect-mode:emit-sib:
$emit-indirect-mode:check-for-disp:
# if (disp == 0) goto next check
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 0/imm32 # compare *(ebp+24)
74/jump-if-equal $emit-indirect-mode:emit-indirect/disp8
74/jump-if-= $emit-indirect-mode:emit-indirect/disp8
$emit-indirect-mode:emit-disp:
# emit(out, "2/mod/*+disp32 " base "/rm32 " disp "/disp32")
# . write-buffered(out, "2/mod/*+disp32 ")
@ -3877,7 +3877,7 @@ disp32-mode?: # in : (addr slice) -> reg/eax : boolean
8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 0/r32/AL . . # copy byte at *eax to AL
81 4/subop/and 3/mod/direct 0/rm32/eax . . . . . 0xff/imm32 # bitwise and of eax
3d/compare-eax-and 0x28/imm32/open-paren
74/jump-if-equal $disp32-mode?:false/disp8
74/jump-if-= $disp32-mode?:false/disp8
$disp32-mode?:check-for-register:
# local-slice = next-token-from-slice(local-slice->start, local-slice->end, "/")
# . . push args
@ -3900,7 +3900,7 @@ $disp32-mode?:check-for-register:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp
# if (eax != 0) return false
3d/compare-eax-and 0/imm32
75/jump-if-not-equal $disp32-mode?:false/disp8
75/jump-if-!= $disp32-mode?:false/disp8
# return true
b8/copy-to-eax 1/imm32/true
eb/jump $disp32-mode?:end/disp8
@ -3993,14 +3993,14 @@ next-hex-int: # in : (addr slice) -> result/eax
$next-hex-int:positive:
# if (*curr == '+') ++curr
3d/compare-eax-and 0x2b/imm32/+
75/jump-if-not-equal $next-hex-int:negative/disp8
75/jump-if-!= $next-hex-int:negative/disp8
# . ++curr
41/increment-ecx
eb/jump $next-hex-int:skip-whitespace/disp8
$next-hex-int:negative:
# else if (*curr == '-') ++curr, negate = true
3d/compare-eax-and 0x2d/imm32/-
75/jump-if-not-equal $next-hex-int:skip-whitespace/disp8
75/jump-if-!= $next-hex-int:skip-whitespace/disp8
$next-hex-int:need-to-negate:
# . ++curr
41/increment-ecx
@ -4027,24 +4027,24 @@ $next-hex-int:initial-0:
# . if (*curr != '0') jump to loop
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
3d/compare-eax-and 0x30/imm32/0
75/jump-if-not-equal $next-hex-int:loop/disp8
75/jump-if-!= $next-hex-int:loop/disp8
# . ++curr
41/increment-ecx
$next-hex-int:initial-0x:
# . if (curr >= in->end) return result
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $next-hex-int:end/disp8
73/jump-if-addr>= $next-hex-int:end/disp8
# . if (*curr != 'x') jump to loop # the previous '0' is still valid so doesn't need to be checked again
31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
3d/compare-eax-and 0x78/imm32/x
75/jump-if-not-equal $next-hex-int:loop/disp8
75/jump-if-!= $next-hex-int:loop/disp8
# . ++curr
41/increment-ecx
$next-hex-int:loop:
# if (curr >= in->end) break
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $next-hex-int:break/disp8
73/jump-if-addr>= $next-hex-int:break/disp8
# if (!is-hex-digit?(*curr)) break
# . eax = *curr
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
@ -4057,7 +4057,7 @@ $next-hex-int:loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax == false) break
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $next-hex-int:break/disp8
74/jump-if-= $next-hex-int:break/disp8
# eax = from-hex-char(*curr)
# . . copy arg to eax
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
@ -4073,7 +4073,7 @@ $next-hex-int:loop:
$next-hex-int:break:
# if (negate?) result = -result
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0/imm32/false # compare ebx
74/jump-if-equal $next-hex-int:end/disp8
74/jump-if-= $next-hex-int:end/disp8
$next-hex-int:negate:
f7 3/subop/negate 3/mod/direct 7/rm32/edi . . . . . . # negate edi
$next-hex-int:end:
@ -4410,24 +4410,24 @@ $next-positive-hex-int:initial-0:
# . if (*curr != '0') jump to loop
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
3d/compare-eax-and 0x30/imm32/0
75/jump-if-not-equal $next-positive-hex-int:loop/disp8
75/jump-if-!= $next-positive-hex-int:loop/disp8
# . ++curr
41/increment-ecx
$next-positive-hex-int:initial-0x:
# . if (curr >= in->end) return result
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $next-positive-hex-int:end/disp8
73/jump-if-addr>= $next-positive-hex-int:end/disp8
# . if (*curr != 'x') jump to loop # the previous '0' is still valid so doesn't need to be checked again
31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
3d/compare-eax-and 0x78/imm32/x
75/jump-if-not-equal $next-positive-hex-int:loop/disp8
75/jump-if-!= $next-positive-hex-int:loop/disp8
# . ++curr
41/increment-ecx
$next-positive-hex-int:loop:
# if (curr >= in->end) break
39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . . # compare ecx with edx
73/jump-if-greater-or-equal-unsigned $next-positive-hex-int:end/disp8
73/jump-if-addr>= $next-positive-hex-int:end/disp8
# if (!is-hex-digit?(*curr)) break
# . eax = *curr
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL
@ -4440,7 +4440,7 @@ $next-positive-hex-int:loop:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax == false) break
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $next-positive-hex-int:end/disp8
74/jump-if-= $next-positive-hex-int:end/disp8
# eax = from-hex-char(*curr)
# . . copy arg to eax
8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL

View File

@ -64,7 +64,7 @@ Entry: # run tests if necessary, convert stdin if not
# - if argc > 1 and argv[1] == "test", then return run_tests()
# if (argc <= 1) goto interactive
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0/disp8 1/imm32 # compare *ebp
7e/jump-if-lesser-or-equal $subx-survey-main:interactive/disp8
7e/jump-if-<= $subx-survey-main:interactive/disp8
# if (!kernel-string-equal?(argv[1], "test")) goto interactive
# . eax = kernel-string-equal?(argv[1], "test")
# . . push args
@ -76,7 +76,7 @@ Entry: # run tests if necessary, convert stdin if not
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto interactive
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $subx-survey-main:interactive/disp8
74/jump-if-= $subx-survey-main:interactive/disp8
# run-tests()
e8/call run-tests/disp32
# syscall(exit, *Num-test-failures)
@ -709,7 +709,7 @@ $compute-offsets:line-loop:
# if (line->write == 0) break
8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . . # copy *ecx to eax
3d/compare-eax-and 0/imm32
0f 84/jump-if-equal $compute-offsets:break-line-loop/disp32
0f 84/jump-if-= $compute-offsets:break-line-loop/disp32
#? # dump line {{{
#? # . write(2/stderr, "LL: ")
#? # . . push args
@ -793,7 +793,7 @@ $compute-offsets:word-loop:
#? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
#? # . if (curr-segment-name == 0) print curr-segment-name
#? 81 7/subop/compare 3/mod/direct 6/rm32/esi . . . . . 0/imm32 # compare esi
#? 74/jump-if-equal $compute-offsets:case-empty/disp8
#? 74/jump-if-= $compute-offsets:case-empty/disp8
#? # . write(2/stderr, "segment at start of word: ")
#? # . . push args
#? 68/push "segment at start of word: "/imm32
@ -835,7 +835,7 @@ $compute-offsets:case-empty:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) break
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $compute-offsets:line-loop/disp32
0f 85/jump-if-!= $compute-offsets:line-loop/disp32
$compute-offsets:case-comment:
# if slice-starts-with?(word-slice, "#") continue
68/push "#"/imm32
@ -845,7 +845,7 @@ $compute-offsets:case-comment:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) break
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $compute-offsets:line-loop/disp32
0f 85/jump-if-!= $compute-offsets:line-loop/disp32
$compute-offsets:case-segment-header:
# if (!slice-equal?(word-slice/edx, "==")) goto next case
# . eax = slice-equal?(word-slice/edx, "==")
@ -856,10 +856,10 @@ $compute-offsets:case-segment-header:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto next case
3d/compare-eax-and 0/imm32/false
0f 84/jump-if-equal $compute-offsets:case-label/disp32
0f 84/jump-if-= $compute-offsets:case-label/disp32
# if (curr-segment-name == 0) goto construct-next-segment
81 7/subop/compare 3/mod/direct 6/rm32/esi . . . . . 0/imm32 # compare esi
74/jump-if-equal $compute-offsets:construct-next-segment/disp8
74/jump-if-= $compute-offsets:construct-next-segment/disp8
# seg/eax = get-or-insert(segments, curr-segment-name, row-size=16)
# . . push args
68/push 0x10/imm32/row-size
@ -903,7 +903,7 @@ $compute-offsets:construct-next-segment:
#? # dump curr-segment-name if not null (clobbering eax) {{{
#? # . if (curr-segment-name == 0) goto update-curr-segment-name
#? 81 7/subop/compare 3/mod/direct 6/rm32/esi . . . . . 0/imm32 # compare esi
#? 74/jump-if-equal $compute-offsets:update-curr-segment-name/disp8
#? 74/jump-if-= $compute-offsets:update-curr-segment-name/disp8
#? # . write(2/stderr, "setting segment to: ")
#? # . . push args
#? 68/push "setting segment to: "/imm32
@ -960,7 +960,7 @@ $compute-offsets:update-curr-segment-name:
# if empty?(curr-segment-name) abort
# . if (eax == 0) abort
3d/compare-eax-and 0/imm32
0f 84/jump-if-equal $compute-offsets:abort/disp32
0f 84/jump-if-= $compute-offsets:abort/disp32
# next-word(line, segment-tmp)
68/push compute-offsets:segment-tmp/imm32
51/push-ecx
@ -975,7 +975,7 @@ $compute-offsets:update-curr-segment-name:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) abort
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $compute-offsets:abort/disp32
0f 85/jump-if-!= $compute-offsets:abort/disp32
# seg/ebx = get-or-insert(segments, curr-segment-name, row-size=16)
# . . push args
68/push 0x10/imm32/row-size
@ -1024,7 +1024,7 @@ $compute-offsets:case-label:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax == false) goto next case
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $compute-offsets:case-default/disp8
74/jump-if-= $compute-offsets:case-default/disp8
# strip trailing ':' from word-slice
ff 1/subop/decrement 1/mod/*+disp8 2/rm32/edx . . . . 4/disp8 . # decrement *(edx+4)
# x/eax = leaky-get-or-insert-slice(labels, word-slice, row-size=16)
@ -1428,7 +1428,7 @@ compute-addresses: # segments : (addr stream {string, segment-info}), labels :
$compute-addresses:segment-loop:
# if (srow >= max) break
39/compare 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . . # compare eax with ecx
73/jump-if-greater-or-equal-unsigned $compute-addresses:segment-break/disp8
73/jump-if-addr>= $compute-addresses:segment-break/disp8
# srow->file-offset += starting-offset
01/add 1/mod/*+disp8 0/rm32/eax . . . 7/r32/edi 8/disp8 . # add edi to *(eax+8)
# clear last 12 bits of srow->address for p_align=0x1000
@ -1495,7 +1495,7 @@ $compute-addresses:segment-break:
$compute-addresses:label-loop:
# if (lrow >= max) break
39/compare 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . . # compare eax with ecx
0f 83/jump-if-greater-or-equal-unsigned $compute-addresses:end/disp32
0f 83/jump-if-addr>= $compute-addresses:end/disp32
#? # dump lrow->key {{{
#? # . write(2/stderr, "label: ")
#? # . . push args
@ -2055,7 +2055,7 @@ $emit-segments:line-loop:
$emit-segments:check-for-end-of-input:
# if (line->write == 0) break
81 7/subop/compare 0/mod/indirect 1/rm32/ecx . . . . . 0/imm32 # compare *ecx
0f 84/jump-if-equal $emit-segments:end/disp32
0f 84/jump-if-= $emit-segments:end/disp32
# offset-of-next-instruction += num-bytes(line)
# . eax = num-bytes(line)
# . . push args
@ -2119,7 +2119,7 @@ $emit-segments:check-for-end-of-line:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != 0) break
3d/compare-eax-and 0/imm32
0f 85/jump-if-not-equal $emit-segments:next-line/disp32
0f 85/jump-if-!= $emit-segments:next-line/disp32
$emit-segments:check-for-comment:
# if (slice-starts-with?(word-slice, "#")) break
# . start/esi = word-slice->start
@ -2129,7 +2129,7 @@ $emit-segments:check-for-comment:
8a/copy-byte 0/mod/indirect 6/rm32/esi . . . 0/r32/AL . . # copy byte at *esi to AL
# . if (eax == '#') break
3d/compare-eax-and 0x23/imm32/hash
0f 84/jump-if-equal $emit-segments:next-line/disp32
0f 84/jump-if-= $emit-segments:next-line/disp32
$emit-segments:check-for-label:
# if is-label?(word-slice) break
# . eax = is-label?(word-slice)
@ -2141,7 +2141,7 @@ $emit-segments:check-for-label:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax != false) break
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $emit-segments:line-loop/disp32
0f 85/jump-if-!= $emit-segments:line-loop/disp32
$emit-segments:check-for-segment-header:
# if (slice-equal?(word-slice, "==")) break
# . eax = slice-equal?(word-slice, "==")
@ -2154,7 +2154,7 @@ $emit-segments:check-for-segment-header:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) break
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $emit-segments:line-loop/disp32
0f 85/jump-if-!= $emit-segments:line-loop/disp32
$emit-segments:2-character:
# if (length(word-slice) != 2) goto next check
# . eax = length(word-slice)
@ -2162,7 +2162,7 @@ $emit-segments:2-character:
2b/subtract 0/mod/indirect 2/rm32/edx . . . 0/r32/eax . . # subtract *edx from eax
# . if (eax != 2) goto next check
3d/compare-eax-and 2/imm32
75/jump-if-not-equal $emit-segments:check-metadata/disp8
75/jump-if-!= $emit-segments:check-metadata/disp8
# write-slice-buffered(out, word-slice)
# . . push args
52/push-edx
@ -2277,7 +2277,7 @@ $emit-segments:check-global-variable:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) goto code label checks
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $emit-segments:check-code-label-for-imm8/disp32
0f 85/jump-if-!= $emit-segments:check-code-label-for-imm8/disp32
$emit-segments:check-global-variable-for-disp8:
# if has-metadata?(word-slice, "disp8") abort
# . eax = has-metadata?(word-slice, "disp8")
@ -2290,7 +2290,7 @@ $emit-segments:check-global-variable-for-disp8:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) abort
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $emit-segments:global-variable-abort/disp32
0f 85/jump-if-!= $emit-segments:global-variable-abort/disp32
$emit-segments:check-global-variable-for-imm8:
# if has-metadata?(word-slice, "imm8") abort
# . eax = has-metadata?(word-slice, "imm8")
@ -2303,7 +2303,7 @@ $emit-segments:check-global-variable-for-imm8:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) abort
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $emit-segments:global-variable-abort/disp32
0f 85/jump-if-!= $emit-segments:global-variable-abort/disp32
$emit-segments:emit-global-variable:
# emit-hex(out, info->address, 4)
# . . push args
@ -2328,7 +2328,7 @@ $emit-segments:check-code-label-for-imm8:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax != false) abort
3d/compare-eax-and 0/imm32/false
0f 85/jump-if-not-equal $emit-segments:imm8-abort/disp32
0f 85/jump-if-!= $emit-segments:imm8-abort/disp32
$emit-segments:check-code-label-for-imm32:
# if (!has-metadata?(word-slice, "imm32")) goto next check
# . eax = has-metadata?(edx, "imm32")
@ -2341,7 +2341,7 @@ $emit-segments:check-code-label-for-imm32:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto next check
3d/compare-eax-and 0/imm32
74/jump-if-equal $emit-segments:check-code-label-for-disp8/disp8
74/jump-if-= $emit-segments:check-code-label-for-disp8/disp8
#? # dump info->address {{{
#? # . write(2/stderr, "info->address: ")
#? # . . push args
@ -2399,7 +2399,7 @@ $emit-segments:check-code-label-for-disp8:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto next check
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $emit-segments:check-code-label-for-disp32/disp8
74/jump-if-= $emit-segments:check-code-label-for-disp32/disp8
$emit-segments:emit-code-label-disp8:
# emit-hex(out, info->offset - offset-of-next-instruction, 1)
# . . push args
@ -2426,7 +2426,7 @@ $emit-segments:check-code-label-for-disp32:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) abort
3d/compare-eax-and 0/imm32/false
0f 84/jump-if-equal $emit-segments:abort/disp32
0f 84/jump-if-= $emit-segments:abort/disp32
$emit-segments:emit-code-label-disp32:
# emit-hex(out, info->offset - offset-of-next-instruction, 4)
# . . push args
@ -3218,7 +3218,7 @@ emit-headers: # out : (addr buffered-file), segments : (addr stream {string, se
$emit-headers:loop:
# if (curr-segment >= max) break
39/compare 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . . # compare eax with ecx
0f 83/jump-if-greater-or-equal-unsigned $emit-headers:end/disp32
0f 83/jump-if-addr>= $emit-headers:end/disp32
#? # dump curr-segment->name {{{
#? # . write(2/stderr, "about to emit ph entry: segment->name: ")
#? # . . push args
@ -3433,7 +3433,7 @@ emit-elf-program-header-entry: # out : (addr buffered-file), curr-segment : (ad
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto next check
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $emit-elf-program-header-entry:data/disp8
74/jump-if-= $emit-elf-program-header-entry:data/disp8
# *$Elf_p_flags = r-x
c7 0/subop/copy 0/mod/indirect 5/rm32/.disp32 . . . $Elf_p_flags/disp32 5/imm32 # copy to *$Elf_p_flags
eb/jump $emit-elf-program-header-entry:really-emit/disp8
@ -3491,7 +3491,7 @@ stream-add4: # in : (addr stream byte), key : addr, val1 : addr, val2 : addr, v
8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/esi 2/index/edx . 2/r32/edx 0xc/disp8 . # copy esi+edx+12 to edx
# if (curr >= max) abort
39/compare 3/mod/direct 0/rm32/eax . . . 2/r32/edx . . # compare eax with edx
73/jump-if-greater-or-equal-unsigned $stream-add4:abort/disp8
73/jump-if-addr>= $stream-add4:abort/disp8
# *curr = key
8b/copy 1/mod/*+disp8 5/rm32/ebp . . 1/r32/ecx 0xc/disp8 . # copy *(ebp+12) to ecx
89/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy ecx to *eax
@ -3499,7 +3499,7 @@ stream-add4: # in : (addr stream byte), key : addr, val1 : addr, val2 : addr, v
05/add-to-eax 4/imm32
# if (curr >= max) abort
39/compare 3/mod/direct 0/rm32/eax . . . 2/r32/edx . . # compare eax with edx
73/jump-if-greater-or-equal-unsigned $stream-add4:abort/disp8
73/jump-if-addr>= $stream-add4:abort/disp8
# *curr = val1
8b/copy 1/mod/*+disp8 5/rm32/ebp . . 1/r32/ecx 0x10/disp8 . # copy *(ebp+16) to ecx
89/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy ecx to *eax
@ -3507,7 +3507,7 @@ stream-add4: # in : (addr stream byte), key : addr, val1 : addr, val2 : addr, v
05/add-to-eax 4/imm32
# if (curr >= max) abort
39/compare 3/mod/direct 0/rm32/eax . . . 2/r32/edx . . # compare eax with edx
73/jump-if-greater-or-equal-unsigned $stream-add4:abort/disp8
73/jump-if-addr>= $stream-add4:abort/disp8
# *curr = val2
8b/copy 1/mod/*+disp8 5/rm32/ebp . . 1/r32/ecx 0x14/disp8 . # copy *(ebp+20) to ecx
89/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy ecx to *eax
@ -3515,7 +3515,7 @@ stream-add4: # in : (addr stream byte), key : addr, val1 : addr, val2 : addr, v
05/add-to-eax 4/imm32
# if (curr >= max) abort
39/compare 3/mod/direct 0/rm32/eax . . . 2/r32/edx . . # compare eax with edx
73/jump-if-greater-or-equal-unsigned $stream-add4:abort/disp8
73/jump-if-addr>= $stream-add4:abort/disp8
# *curr = val3
8b/copy 1/mod/*+disp8 5/rm32/ebp . . 1/r32/ecx 0x18/disp8 . # copy *(ebp+24) to ecx
89/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy ecx to *eax
@ -4251,7 +4251,7 @@ $num-bytes:check0:
3d/compare-eax-and 0/imm32/false
# . restore result now that ZF is set
58/pop-to-eax
75/jump-if-not-equal $num-bytes:end/disp8
75/jump-if-!= $num-bytes:end/disp8
$num-bytes:check-for-comment:
# if (slice-starts-with?(word-slice, "#")) break
# . start/edx = word-slice->start
@ -4261,7 +4261,7 @@ $num-bytes:check-for-comment:
8a/copy-byte 0/mod/indirect 2/rm32/edx . . . 3/r32/BL . . # copy byte at *edx to BL
# . if (ebx == '#') break
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x23/imm32/hash # compare ebx
74/jump-if-equal $num-bytes:end/disp8
74/jump-if-= $num-bytes:end/disp8
$num-bytes:check-for-label:
# if (slice-ends-with?(word-slice, ":")) break
# . end/edx = word-slice->end
@ -4271,7 +4271,7 @@ $num-bytes:check-for-label:
8a/copy-byte 1/mod/*+disp8 2/rm32/edx . . . 3/r32/BL -1/disp8 . # copy byte at *ecx to BL
# . if (ebx == ':') break
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x3a/imm32/colon # compare ebx
74/jump-if-equal $num-bytes:end/disp8
74/jump-if-= $num-bytes:end/disp8
$num-bytes:check-for-segment-header:
# if (slice-equal?(word-slice, "==")) break
# . push result
@ -4288,7 +4288,7 @@ $num-bytes:check-for-segment-header:
3d/compare-eax-and 0/imm32/false
# . restore result now that ZF is set
58/pop-to-eax
75/jump-if-not-equal $num-bytes:end/disp8
75/jump-if-!= $num-bytes:end/disp8
$num-bytes:loop-body:
# result += compute-width-of-slice(word-slice)
# . copy result to edx

View File

@ -33,7 +33,7 @@ Entry: # run tests if necessary, convert stdin if not
# - if argc > 1 and argv[1] == "test", then return run_tests()
# if (argc <= 1) goto run-main
81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0/disp8 1/imm32 # compare *ebp
7e/jump-if-lesser-or-equal $subx-tests-main:interactive/disp8
7e/jump-if-<= $subx-tests-main:interactive/disp8
# if (!kernel-string-equal?(argv[1], "test")) goto run-main
# . eax = kernel-string-equal?(argv[1], "test")
# . . push args
@ -45,7 +45,7 @@ Entry: # run tests if necessary, convert stdin if not
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) goto run-main
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $subx-tests-main:interactive/disp8
74/jump-if-= $subx-tests-main:interactive/disp8
# run-tests()
e8/call run-tests/disp32
# syscall(exit, *Num-test-failures)
@ -160,7 +160,7 @@ $subx-gen-run-tests:loop:
$subx-gen-run-tests:check0:
# if (line->write == 0) break
81 7/subop/compare 0/mod/indirect 1/rm32/ecx . . . . . 0/imm32 # compare *ecx
0f 84/jump-if-equal $subx-gen-run-tests:break/disp32
0f 84/jump-if-= $subx-gen-run-tests:break/disp32
# next-word(line, word-slice)
# . . push args
52/push-edx
@ -180,7 +180,7 @@ $subx-gen-run-tests:check-for-label:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp
# . if (eax == false) continue
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $subx-gen-run-tests:continue/disp8
74/jump-if-= $subx-gen-run-tests:continue/disp8
$subx-gen-run-tests:check-label-prefix:
# strip trailing ':' from word-slice
ff 1/subop/decrement 1/mod/*+disp8 2/rm32/edx . . . . 4/disp8 . # decrement *(edx+4)
@ -194,7 +194,7 @@ $subx-gen-run-tests:check-label-prefix:
81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp
# . if (eax == false) break
3d/compare-eax-and 0/imm32/false
74/jump-if-equal $subx-gen-run-tests:continue/disp8
74/jump-if-= $subx-gen-run-tests:continue/disp8
$subx-gen-run-tests:call-test-function:
# tests-found? = true
bb/copy-to-ebx 1/imm32/true
@ -243,7 +243,7 @@ $subx-gen-run-tests:continue:
$subx-gen-run-tests:break:
# if (!tests-found?) goto end
81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0/imm32/false # compare ebx
74/jump-if-equal $subx-gen-run-tests:end/disp8
74/jump-if-= $subx-gen-run-tests:end/disp8
# write(new-code-segment, " c3/return\n")
# . . push args
68/push " c3/return\n"/imm32

View File

@ -93,7 +93,7 @@ if ('onhashchange' in window) {
<span id="L34" class="LineNr">34 </span> cd/syscall 0x80/imm8
<span id="L35" class="LineNr">35 </span> <span class="subxComment"># if (eax &lt; 0) abort</span>
<span id="L36" class="LineNr">36 </span> 3d/compare-eax-with 0/imm32
<span id="L37" class="LineNr">37 </span> 0f 8c/jump-if-lesser $_write:abort/disp32
<span id="L37" class="LineNr">37 </span> 0f 8c/jump-if-&lt; $_write:abort/disp32
<span id="L38" class="LineNr">38 </span><span class="Constant">$_write:end</span>:
<span id="L39" class="LineNr">39 </span> <span class="subxS1Comment"># . restore registers</span>
<span id="L40" class="LineNr">40 </span> 5b/pop-to-ebx

View File

@ -140,17 +140,17 @@ if ('onhashchange' in window) {
<span id="L78" class="LineNr"> 78 </span><span class="Constant">$kernel-string-equal?:loop</span>:
<span id="L79" class="LineNr"> 79 </span> <span class="subxComment"># if (i &gt;= n) break</span>
<span id="L80" class="LineNr"> 80 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L81" class="LineNr"> 81 </span> 7d/jump-if-greater-or-equal $kernel-string-equal?:<span class="Constant">break</span>/disp8
<span id="L81" class="LineNr"> 81 </span> 7d/jump-if-&gt;= $kernel-string-equal?:<span class="Constant">break</span>/disp8
<span id="L82" class="LineNr"> 82 </span> <span class="subxComment"># c1 = *s1</span>
<span id="L83" class="LineNr"> 83 </span> 8a/copy-byte 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *edi to AL</span>
<span id="L84" class="LineNr"> 84 </span> <span class="subxComment"># c2 = *s2</span>
<span id="L85" class="LineNr"> 85 </span> 8a/copy-byte 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *esi to BL</span>
<span id="L86" class="LineNr"> 86 </span> <span class="subxComment"># if (c1 == 0) return false</span>
<span id="L87" class="LineNr"> 87 </span> 3d/compare-eax-and 0/imm32
<span id="L88" class="LineNr"> 88 </span> 74/jump-if-equal $kernel-string-equal?:false/disp8
<span id="L88" class="LineNr"> 88 </span> 74/jump-if-= $kernel-string-equal?:false/disp8
<span id="L89" class="LineNr"> 89 </span> <span class="subxComment"># if (c1 != c2) return false</span>
<span id="L90" class="LineNr"> 90 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax and ebx</span>
<span id="L91" class="LineNr"> 91 </span> 75/jump-if-not-equal $kernel-string-equal?:false/disp8
<span id="L91" class="LineNr"> 91 </span> 75/jump-if-!= $kernel-string-equal?:false/disp8
<span id="L92" class="LineNr"> 92 </span> <span class="subxComment"># ++i</span>
<span id="L93" class="LineNr"> 93 </span> 41/increment-ecx
<span id="L94" class="LineNr"> 94 </span> <span class="subxComment"># ++s1</span>
@ -162,7 +162,7 @@ if ('onhashchange' in window) {
<span id="L100" class="LineNr">100 </span> <span class="subxComment"># return *s1 == 0</span>
<span id="L101" class="LineNr">101 </span> 8a/copy-byte 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *edi to AL</span>
<span id="L102" class="LineNr">102 </span> 3d/compare-eax-and 0/imm32
<span id="L103" class="LineNr">103 </span> 75/jump-if-not-equal $kernel-string-equal?:false/disp8
<span id="L103" class="LineNr">103 </span> 75/jump-if-!= $kernel-string-equal?:false/disp8
<span id="L104" class="LineNr">104 </span><span class="Constant">$kernel-string-equal?:true</span>:
<span id="L105" class="LineNr">105 </span> b8/copy-to-eax 1/imm32
<span id="L106" class="LineNr">106 </span> eb/jump $kernel-string-equal?:end/disp8

View File

@ -112,7 +112,7 @@ if ('onhashchange' in window) {
<span id="L50" class="LineNr"> 50 </span><span class="Constant">$string-equal?:lengths</span>:
<span id="L51" class="LineNr"> 51 </span> <span class="subxComment"># if (ecx != benchmark-&gt;length) return false</span>
<span id="L52" class="LineNr"> 52 </span> 39/compare 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare *edi and ecx</span>
<span id="L53" class="LineNr"> 53 </span> 75/jump-if-not-equal $string-equal?:false/disp8
<span id="L53" class="LineNr"> 53 </span> 75/jump-if-!= $string-equal?:false/disp8
<span id="L54" class="LineNr"> 54 </span> <span class="subxComment"># var currs/esi : (addr byte) = s-&gt;data</span>
<span id="L55" class="LineNr"> 55 </span> 81 0/subop/add 3/mod/direct 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to esi</span>
<span id="L56" class="LineNr"> 56 </span> <span class="subxComment"># var maxs/ecx : (addr byte) = &amp;s-&gt;data[s-&gt;length]</span>
@ -126,14 +126,14 @@ if ('onhashchange' in window) {
<span id="L64" class="LineNr"> 64 </span><span class="Constant">$string-equal?:loop</span>:
<span id="L65" class="LineNr"> 65 </span> <span class="subxComment"># if (currs &gt;= maxs) return true</span>
<span id="L66" class="LineNr"> 66 </span> 39/compare 3/mod/direct 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare esi with ecx</span>
<span id="L67" class="LineNr"> 67 </span> 73/jump-if-greater-or-equal-unsigned $string-equal?:true/disp8
<span id="L67" class="LineNr"> 67 </span> 73/jump-if-addr&gt;= $string-equal?:true/disp8
<span id="L68" class="LineNr"> 68 </span> <span class="subxComment"># c1 = *currs</span>
<span id="L69" class="LineNr"> 69 </span> 8a/copy-byte 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *esi to AL</span>
<span id="L70" class="LineNr"> 70 </span> <span class="subxComment"># c2 = *currb</span>
<span id="L71" class="LineNr"> 71 </span> 8a/copy-byte 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/DL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *edi to DL</span>
<span id="L72" class="LineNr"> 72 </span> <span class="subxComment"># if (c1 != c2) return false</span>
<span id="L73" class="LineNr"> 73 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax and edx</span>
<span id="L74" class="LineNr"> 74 </span> 75/jump-if-not-equal $string-equal?:false/disp8
<span id="L74" class="LineNr"> 74 </span> 75/jump-if-!= $string-equal?:false/disp8
<span id="L75" class="LineNr"> 75 </span> <span class="subxComment"># ++currs</span>
<span id="L76" class="LineNr"> 76 </span> 46/increment-esi
<span id="L77" class="LineNr"> 77 </span> <span class="subxComment"># ++currb</span>

View File

@ -94,7 +94,7 @@ if ('onhashchange' in window) {
<span id="L36" class="LineNr">36 </span><span class="Constant">$clear-stream:loop</span>:
<span id="L37" class="LineNr">37 </span> <span class="subxComment"># if (curr &gt;= max) break</span>
<span id="L38" class="LineNr">38 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax with ecx</span>
<span id="L39" class="LineNr">39 </span> 73/jump-if-greater-or-equal-unsigned $clear-stream:end/disp8
<span id="L39" class="LineNr">39 </span> 73/jump-if-addr&gt;= $clear-stream:end/disp8
<span id="L40" class="LineNr">40 </span> <span class="subxComment"># *curr = 0</span>
<span id="L41" class="LineNr">41 </span> c6 0/subop/copy-byte 0/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm8 <span class="subxComment"># copy byte to *eax</span>
<span id="L42" class="LineNr">42 </span> <span class="subxComment"># ++curr</span>

View File

@ -180,7 +180,7 @@ if ('onhashchange' in window) {
<span id="L117" class="LineNr">117 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/imm32 <span class="subxComment"># add to esp</span>
<span id="L118" class="LineNr">118 </span> <span class="subxComment"># if (eax == 0) return</span>
<span id="L119" class="LineNr">119 </span> 3d/compare-eax-and 0/imm32
<span id="L120" class="LineNr">120 </span> 74/jump-if-equal $trace:end/disp8
<span id="L120" class="LineNr">120 </span> 74/jump-if-= $trace:end/disp8
<span id="L121" class="LineNr">121 </span> <span class="subxComment"># t-&gt;write += eax</span>
<span id="L122" class="LineNr">122 </span> 01/add 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># add eax to *edi</span>
<span id="L123" class="LineNr">123 </span> <span class="subxComment"># refresh ecx = t-&gt;write</span>
@ -398,7 +398,7 @@ if ('onhashchange' in window) {
<span id="L335" class="LineNr">335 </span><span class="Constant">$trace-scan:loop</span>:
<span id="L336" class="LineNr">336 </span> <span class="subxComment"># if (Trace-stream-&gt;read &gt;= Trace-stream-&gt;write) return false</span>
<span id="L337" class="LineNr">337 </span> 39/compare 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare ecx with *(esi+4)</span>
<span id="L338" class="LineNr">338 </span> 7d/jump-if-greater-or-equal $trace-scan:false/disp8
<span id="L338" class="LineNr">338 </span> 7d/jump-if-&gt;= $trace-scan:false/disp8
<span id="L339" class="LineNr">339 </span> <span class="subxComment"># eax = next-line-matches?(Trace-stream, line)</span>
<span id="L340" class="LineNr">340 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L341" class="LineNr">341 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span>
@ -409,7 +409,7 @@ if ('onhashchange' in window) {
<span id="L346" class="LineNr">346 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L347" class="LineNr">347 </span> <span class="subxComment"># if (eax == false) continue</span>
<span id="L348" class="LineNr">348 </span> 3d/compare-eax-and 0/imm32/false
<span id="L349" class="LineNr">349 </span> 74/jump-if-equal $trace-scan:continue/disp8
<span id="L349" class="LineNr">349 </span> 74/jump-if-= $trace-scan:continue/disp8
<span id="L350" class="LineNr">350 </span><span class="Constant">$trace-scan:true</span>:
<span id="L351" class="LineNr">351 </span> <span class="subxComment"># skip-next-line(Trace-stream)</span>
<span id="L352" class="LineNr">352 </span> <span class="subxS2Comment"># . . push args</span>
@ -667,12 +667,12 @@ if ('onhashchange' in window) {
<span id="L604" class="LineNr">604 </span><span class="Constant">$next-line-matches?:loop</span>:
<span id="L605" class="LineNr">605 </span> <span class="subxComment"># if (currl &gt;= maxl) break</span>
<span id="L606" class="LineNr">606 </span> 39/compare 3/mod/direct 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare esi and ecx</span>
<span id="L607" class="LineNr">607 </span> 73/jump-if-greater-or-equal-unsigned $next-line-matches?:<span class="Constant">break</span>/disp8
<span id="L607" class="LineNr">607 </span> 73/jump-if-addr&gt;= $next-line-matches?:<span class="Constant">break</span>/disp8
<span id="L608" class="LineNr">608 </span> <span class="subxComment"># if (currt &gt;= maxt) return false</span>
<span id="L609" class="LineNr">609 </span> <span class="subxS1Comment"># . eax = false</span>
<span id="L610" class="LineNr">610 </span> b8/copy-to-eax 0/imm32/false
<span id="L611" class="LineNr">611 </span> 39/compare 3/mod/direct 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare edi and edx</span>
<span id="L612" class="LineNr">612 </span> 73/jump-if-greater-or-equal-unsigned $next-line-matches?:end/disp8
<span id="L612" class="LineNr">612 </span> 73/jump-if-addr&gt;= $next-line-matches?:end/disp8
<span id="L613" class="LineNr">613 </span> <span class="subxComment"># if (*currt != *currl) return false</span>
<span id="L614" class="LineNr">614 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span>
<span id="L615" class="LineNr">615 </span> 31/xor 3/mod/direct 3/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear ebx</span>
@ -684,7 +684,7 @@ if ('onhashchange' in window) {
<span id="L621" class="LineNr">621 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax and ebx</span>
<span id="L622" class="LineNr">622 </span> <span class="subxS1Comment"># . eax = false</span>
<span id="L623" class="LineNr">623 </span> b8/copy-to-eax 0/imm32/false
<span id="L624" class="LineNr">624 </span> 75/jump-if-not-equal $next-line-matches?:end/disp8
<span id="L624" class="LineNr">624 </span> 75/jump-if-!= $next-line-matches?:end/disp8
<span id="L625" class="LineNr">625 </span> <span class="subxComment"># ++currt</span>
<span id="L626" class="LineNr">626 </span> 47/increment-edi
<span id="L627" class="LineNr">627 </span> <span class="subxComment"># ++currl</span>
@ -698,7 +698,7 @@ if ('onhashchange' in window) {
<span id="L635" class="LineNr">635 </span> 3d/compare-eax-and 0xa/imm32/newline
<span id="L636" class="LineNr">636 </span> <span class="subxS1Comment"># . eax = false</span>
<span id="L637" class="LineNr">637 </span> b8/copy-to-eax 1/imm32/true
<span id="L638" class="LineNr">638 </span> 74/jump-if-equal $next-line-matches?:end/disp8
<span id="L638" class="LineNr">638 </span> 74/jump-if-= $next-line-matches?:end/disp8
<span id="L639" class="LineNr">639 </span> b8/copy-to-eax 0/imm32/true
<span id="L640" class="LineNr">640 </span><span class="Constant">$next-line-matches?:end</span>:
<span id="L641" class="LineNr">641 </span> <span class="subxS1Comment"># . restore registers</span>
@ -834,14 +834,14 @@ if ('onhashchange' in window) {
<span id="L771" class="LineNr">771 </span><span class="Constant">$skip-next-line:loop</span>:
<span id="L772" class="LineNr">772 </span> <span class="subxComment"># if (curr &gt;= max) break</span>
<span id="L773" class="LineNr">773 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx and ebx</span>
<span id="L774" class="LineNr">774 </span> 73/jump-if-greater-or-equal-unsigned $skip-next-line:end/disp8
<span id="L774" class="LineNr">774 </span> 73/jump-if-addr&gt;= $skip-next-line:end/disp8
<span id="L775" class="LineNr">775 </span> <span class="subxComment"># ++i</span>
<span id="L776" class="LineNr">776 </span> 42/increment-edx
<span id="L777" class="LineNr">777 </span> <span class="subxComment"># if (*curr == '\n') break</span>
<span id="L778" class="LineNr">778 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span>
<span id="L779" class="LineNr">779 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *ecx to eax</span>
<span id="L780" class="LineNr">780 </span> 3d/compare-eax-and 0a/imm32/newline
<span id="L781" class="LineNr">781 </span> 74/jump-if-equal $skip-next-line:end/disp8
<span id="L781" class="LineNr">781 </span> 74/jump-if-= $skip-next-line:end/disp8
<span id="L782" class="LineNr">782 </span> <span class="subxComment"># ++curr</span>
<span id="L783" class="LineNr">783 </span> 41/increment-ecx
<span id="L784" class="LineNr">784 </span> <span class="subxComment"># loop</span>
@ -980,10 +980,10 @@ if ('onhashchange' in window) {
<span id="L917" class="LineNr">917 </span><span class="Constant">$_append-4:loop</span>:
<span id="L918" class="LineNr">918 </span> <span class="subxComment"># if (in &gt;= inend) break</span>
<span id="L919" class="LineNr">919 </span> 39/compare 3/mod/direct 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare esi with ecx</span>
<span id="L920" class="LineNr">920 </span> 73/jump-if-greater-or-equal-unsigned $_append-4:end/disp8
<span id="L920" class="LineNr">920 </span> 73/jump-if-addr&gt;= $_append-4:end/disp8
<span id="L921" class="LineNr">921 </span> <span class="subxComment"># if (out &gt;= outend) abort # just to catch test failures fast</span>
<span id="L922" class="LineNr">922 </span> 39/compare 3/mod/direct 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare edi with edx</span>
<span id="L923" class="LineNr">923 </span> 73/jump-if-greater-or-equal-unsigned $_append-4:abort/disp8
<span id="L923" class="LineNr">923 </span> 73/jump-if-addr&gt;= $_append-4:abort/disp8
<span id="L924" class="LineNr">924 </span> <span class="subxComment"># *out = *in</span>
<span id="L925" class="LineNr">925 </span> 8a/copy-byte 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *esi to BL</span>
<span id="L926" class="LineNr">926 </span> 88/copy-byte 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at BL to *edi</span>

View File

@ -87,7 +87,7 @@ if ('onhashchange' in window) {
<span id="L27" class="LineNr"> 27 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span>
<span id="L28" class="LineNr"> 28 </span> <span class="subxComment"># if (f &lt; 0x08000000) _write(f, s) and return # f can't be a user-mode address, so treat it as a kernel file descriptor</span>
<span id="L29" class="LineNr"> 29 </span> 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 0x08000000/imm32 <span class="subxComment"># compare *(ebp+8)</span>
<span id="L30" class="LineNr"> 30 </span> 73/jump-if-greater-unsigned-or-equal $write:fake/disp8
<span id="L30" class="LineNr"> 30 </span> 73/jump-if-addr&gt;= $write:fake/disp8
<span id="L31" class="LineNr"> 31 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L32" class="LineNr"> 32 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+12)</span>
<span id="L33" class="LineNr"> 33 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span>

View File

@ -87,7 +87,7 @@ if ('onhashchange' in window) {
<span id="L28" class="LineNr"> 28 </span><span class="Constant">$stream-data-equal?:compare-lengths</span>:
<span id="L29" class="LineNr"> 29 </span> <span class="subxComment"># if (f-&gt;write != s-&gt;length) return false</span>
<span id="L30" class="LineNr"> 30 </span> 39/compare 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare *edi and eax</span>
<span id="L31" class="LineNr"> 31 </span> 75/jump-if-not-equal $stream-data-equal?:false/disp8
<span id="L31" class="LineNr"> 31 </span> 75/jump-if-!= $stream-data-equal?:false/disp8
<span id="L32" class="LineNr"> 32 </span> <span class="subxComment"># var currs/edi : (addr byte) = s-&gt;data</span>
<span id="L33" class="LineNr"> 33 </span> 81 0/subop/add 3/mod/direct 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to edi</span>
<span id="L34" class="LineNr"> 34 </span> <span class="subxComment"># var eax : byte = 0</span>
@ -97,14 +97,14 @@ if ('onhashchange' in window) {
<span id="L38" class="LineNr"> 38 </span><span class="Constant">$stream-data-equal?:loop</span>:
<span id="L39" class="LineNr"> 39 </span> <span class="subxComment"># if (currf &gt;= maxf) return true</span>
<span id="L40" class="LineNr"> 40 </span> 39/compare 3/mod/direct 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare esi with edx</span>
<span id="L41" class="LineNr"> 41 </span> 73/jump-if-greater-or-equal-unsigned $stream-data-equal?:true/disp8
<span id="L41" class="LineNr"> 41 </span> 73/jump-if-addr&gt;= $stream-data-equal?:true/disp8
<span id="L42" class="LineNr"> 42 </span> <span class="subxComment"># AL = *currs</span>
<span id="L43" class="LineNr"> 43 </span> 8a/copy-byte 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *esi to AL</span>
<span id="L44" class="LineNr"> 44 </span> <span class="subxComment"># CL = *curr</span>
<span id="L45" class="LineNr"> 45 </span> 8a/copy-byte 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/CL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *edi to CL</span>
<span id="L46" class="LineNr"> 46 </span> <span class="subxComment"># if (eax != ecx) return false</span>
<span id="L47" class="LineNr"> 47 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax and ecx</span>
<span id="L48" class="LineNr"> 48 </span> 75/jump-if-not-equal $stream-data-equal?:false/disp8
<span id="L48" class="LineNr"> 48 </span> 75/jump-if-!= $stream-data-equal?:false/disp8
<span id="L49" class="LineNr"> 49 </span> <span class="subxComment"># ++f</span>
<span id="L50" class="LineNr"> 50 </span> 46/increment-esi
<span id="L51" class="LineNr"> 51 </span> <span class="subxComment"># ++curr</span>
@ -346,20 +346,20 @@ if ('onhashchange' in window) {
<span id="L287" class="LineNr">287 </span><span class="Constant">$next-stream-line-equal?:loop</span>:
<span id="L288" class="LineNr">288 </span> <span class="subxComment"># if (currf &gt;= f-&gt;write) break</span>
<span id="L289" class="LineNr">289 </span> 3b/compare 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with *esi</span>
<span id="L290" class="LineNr">290 </span> 7d/jump-if-greater-or-equal $next-stream-line-equal?:<span class="Constant">break</span>/disp8
<span id="L290" class="LineNr">290 </span> 7d/jump-if-&gt;= $next-stream-line-equal?:<span class="Constant">break</span>/disp8
<span id="L291" class="LineNr">291 </span> <span class="subxComment"># c1 = f-&gt;data[f-&gt;read]</span>
<span id="L292" class="LineNr">292 </span> 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx <span class="Normal"> . </span> 0/r32/AL 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy byte at *(esi+ecx+12) to AL</span>
<span id="L293" class="LineNr">293 </span> <span class="subxComment"># if (c1 == '\n') break</span>
<span id="L294" class="LineNr">294 </span> 3d/compare-eax-and 0xa/imm32/newline
<span id="L295" class="LineNr">295 </span> 74/jump-if-equal $next-stream-line-equal?:<span class="Constant">break</span>/disp8
<span id="L295" class="LineNr">295 </span> 74/jump-if-= $next-stream-line-equal?:<span class="Constant">break</span>/disp8
<span id="L296" class="LineNr">296 </span> <span class="subxComment"># if (currs &gt;= s-&gt;length) return false</span>
<span id="L297" class="LineNr">297 </span> 3b/compare 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare edx with *edi</span>
<span id="L298" class="LineNr">298 </span> 7d/jump-if-greater-or-equal $next-stream-line-equal?:false/disp8
<span id="L298" class="LineNr">298 </span> 7d/jump-if-&gt;= $next-stream-line-equal?:false/disp8
<span id="L299" class="LineNr">299 </span> <span class="subxComment"># c2 = s-&gt;data[currs]</span>
<span id="L300" class="LineNr">300 </span> 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 7/base/edi 2/index/edx <span class="Normal"> . </span> 3/r32/BL 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy byte at *(edi+edx+4) to BL</span>
<span id="L301" class="LineNr">301 </span> <span class="subxComment"># if (c1 != c2) return false</span>
<span id="L302" class="LineNr">302 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax and ebx</span>
<span id="L303" class="LineNr">303 </span> 75/jump-if-not-equal $next-stream-line-equal?:false/disp8
<span id="L303" class="LineNr">303 </span> 75/jump-if-!= $next-stream-line-equal?:false/disp8
<span id="L304" class="LineNr">304 </span> <span class="subxComment"># ++currf</span>
<span id="L305" class="LineNr">305 </span> 41/increment-ecx
<span id="L306" class="LineNr">306 </span> <span class="subxComment"># ++currs</span>
@ -370,7 +370,7 @@ if ('onhashchange' in window) {
<span id="L311" class="LineNr">311 </span> 41/increment-ecx
<span id="L312" class="LineNr">312 </span> <span class="subxComment"># if (currs &gt;= s-&gt;length) return true</span>
<span id="L313" class="LineNr">313 </span> 3b/compare 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare edx with *edi</span>
<span id="L314" class="LineNr">314 </span> 7c/jump-if-lesser $next-stream-line-equal?:false/disp8
<span id="L314" class="LineNr">314 </span> 7c/jump-if-&lt; $next-stream-line-equal?:false/disp8
<span id="L315" class="LineNr">315 </span><span class="Constant">$next-stream-line-equal?:true</span>:
<span id="L316" class="LineNr">316 </span> b8/copy-to-eax 1/imm32
<span id="L317" class="LineNr">317 </span> <span class="subxComment"># persist f-&gt;read on success</span>

View File

@ -156,7 +156,7 @@ if ('onhashchange' in window) {
<span id="L95" class="LineNr"> 95 </span> 8b/copy 1/mod/*+disp8 4/rm32/sib 4/base/esp 4/index/none <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(esp+4) to eax</span>
<span id="L96" class="LineNr"> 96 </span> <span class="subxComment"># if (ed-&gt;target == 0) really exit</span>
<span id="L97" class="LineNr"> 97 </span> 81 7/subop/compare 0/mod/indirect 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare *eax</span>
<span id="L98" class="LineNr"> 98 </span> 75/jump-if-not-equal $stop:fake/disp8
<span id="L98" class="LineNr"> 98 </span> 75/jump-if-!= $stop:fake/disp8
<span id="L99" class="LineNr"> 99 </span> <span class="subxS1Comment"># . syscall(exit, value)</span>
<span id="L100" class="LineNr">100 </span> 8b/copy 1/mod/*+disp8 4/rm32/sib 4/base/esp 4/index/none <span class="Normal"> . </span> 3/r32/ebx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(esp+8) to ebx</span>
<span id="L101" class="LineNr">101 </span> b8/copy-to-eax 1/imm32/exit

View File

@ -112,7 +112,7 @@ if ('onhashchange' in window) {
<span id="L51" class="LineNr"> 51 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span>
<span id="L52" class="LineNr"> 52 </span> <span class="subxComment"># if (f &lt; 0x08000000) return _read(f, s) # f can't be a user-mode address, so treat it as a kernel file descriptor</span>
<span id="L53" class="LineNr"> 53 </span> 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 0x08000000/imm32 <span class="subxComment"># compare *(ebp+8)</span>
<span id="L54" class="LineNr"> 54 </span> 73/jump-if-greater-unsigned-or-equal $read:fake/disp8
<span id="L54" class="LineNr"> 54 </span> 73/jump-if-addr&gt;= $read:fake/disp8
<span id="L55" class="LineNr"> 55 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L56" class="LineNr"> 56 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+12)</span>
<span id="L57" class="LineNr"> 57 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span>
@ -226,10 +226,10 @@ if ('onhashchange' in window) {
<span id="L165" class="LineNr">165 </span><span class="Constant">$_buffer-4:loop</span>:
<span id="L166" class="LineNr">166 </span> <span class="subxComment"># if (in &gt;= inend) break</span>
<span id="L167" class="LineNr">167 </span> 39/compare 3/mod/direct 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare esi with ecx</span>
<span id="L168" class="LineNr">168 </span> 73/jump-if-greater-or-equal-unsigned $_buffer-4:end/disp8
<span id="L168" class="LineNr">168 </span> 73/jump-if-addr&gt;= $_buffer-4:end/disp8
<span id="L169" class="LineNr">169 </span> <span class="subxComment"># if (out &gt;= outend) break # for now silently ignore filled up buffer</span>
<span id="L170" class="LineNr">170 </span> 39/compare 3/mod/direct 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare edi with edx</span>
<span id="L171" class="LineNr">171 </span> 73/jump-if-greater-or-equal-unsigned $_buffer-4:end/disp8
<span id="L171" class="LineNr">171 </span> 73/jump-if-addr&gt;= $_buffer-4:end/disp8
<span id="L172" class="LineNr">172 </span> <span class="subxComment"># *out = *in</span>
<span id="L173" class="LineNr">173 </span> 8a/copy-byte 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *esi to BL</span>
<span id="L174" class="LineNr">174 </span> 88/copy-byte 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at BL to *edi</span>

View File

@ -110,7 +110,7 @@ if ('onhashchange' in window) {
<span id="L48" class="LineNr"> 48 </span> 8b/copy 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(esi+8) to ecx</span>
<span id="L49" class="LineNr"> 49 </span> <span class="subxComment"># if (f-&gt;read &gt;= f-&gt;write) populate stream from file</span>
<span id="L50" class="LineNr"> 50 </span> 3b/compare 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare ecx with *(esi+4)</span>
<span id="L51" class="LineNr"> 51 </span> 7c/jump-if-lesser $read-byte-buffered:from-stream/disp8
<span id="L51" class="LineNr"> 51 </span> 7c/jump-if-&lt; $read-byte-buffered:from-stream/disp8
<span id="L52" class="LineNr"> 52 </span> <span class="subxS1Comment"># . clear-stream(stream = f+4)</span>
<span id="L53" class="LineNr"> 53 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L54" class="LineNr"> 54 </span> 8d/copy-address 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy esi+4 to eax</span>
@ -131,7 +131,7 @@ if ('onhashchange' in window) {
<span id="L69" class="LineNr"> 69 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L70" class="LineNr"> 70 </span> <span class="subxComment"># if (eax == 0) return 0xffffffff</span>
<span id="L71" class="LineNr"> 71 </span> 3d/compare-eax-and 0/imm32
<span id="L72" class="LineNr"> 72 </span> 75/jump-if-not-equal $read-byte-buffered:from-stream/disp8
<span id="L72" class="LineNr"> 72 </span> 75/jump-if-!= $read-byte-buffered:from-stream/disp8
<span id="L73" class="LineNr"> 73 </span> b8/copy-to-eax 0xffffffff/imm32/Eof
<span id="L74" class="LineNr"> 74 </span> eb/jump $read-byte-buffered:end/disp8
<span id="L75" class="LineNr"> 75 </span><span class="Constant">$read-byte-buffered:from-stream</span>:

View File

@ -82,7 +82,7 @@ if ('onhashchange' in window) {
<span id="L21" class="LineNr"> 21 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span>
<span id="L22" class="LineNr"> 22 </span> <span class="subxComment"># if (f &lt; 0x08000000) _write-stream(f, s), return # f can't be a user-mode address, so treat it as a kernel file descriptor</span>
<span id="L23" class="LineNr"> 23 </span> 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 0x08000000/imm32 <span class="subxComment"># compare *(ebp+8)</span>
<span id="L24" class="LineNr"> 24 </span> 73/jump-if-greater-unsigned-or-equal $write-stream:fake/disp8
<span id="L24" class="LineNr"> 24 </span> 73/jump-if-addr&gt;= $write-stream:fake/disp8
<span id="L25" class="LineNr"> 25 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L26" class="LineNr"> 26 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+12)</span>
<span id="L27" class="LineNr"> 27 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span>
@ -165,7 +165,7 @@ if ('onhashchange' in window) {
<span id="L104" class="LineNr">104 </span> cd/syscall 0x80/imm8
<span id="L105" class="LineNr">105 </span> <span class="subxComment"># if (eax &lt; 0) abort</span>
<span id="L106" class="LineNr">106 </span> 3d/compare-eax-with 0/imm32
<span id="L107" class="LineNr">107 </span> 0f 8c/jump-if-lesser $_write-stream:abort/disp32
<span id="L107" class="LineNr">107 </span> 0f 8c/jump-if-&lt; $_write-stream:abort/disp32
<span id="L108" class="LineNr">108 </span> <span class="subxComment"># s-&gt;read += eax</span>
<span id="L109" class="LineNr">109 </span> 01/add 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># add eax to *(esi+4)</span>
<span id="L110" class="LineNr">110 </span> <span class="subxS1Comment"># . restore registers</span>

View File

@ -105,7 +105,7 @@ if ('onhashchange' in window) {
<span id="L43" class="LineNr"> 43 </span> 8b/copy 1/mod/*+disp8 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(edi+4) to ecx</span>
<span id="L44" class="LineNr"> 44 </span> <span class="subxComment"># if (f-&gt;write &gt;= f-&gt;length) flush and clear f's stream</span>
<span id="L45" class="LineNr"> 45 </span> 3b/compare 1/mod/*+disp8 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare ecx with *(edi+12)</span>
<span id="L46" class="LineNr"> 46 </span> 7c/jump-if-lesser $write-byte-buffered:to-stream/disp8
<span id="L46" class="LineNr"> 46 </span> 7c/jump-if-&lt; $write-byte-buffered:to-stream/disp8
<span id="L47" class="LineNr"> 47 </span> <span class="subxS1Comment"># . flush(f)</span>
<span id="L48" class="LineNr"> 48 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L49" class="LineNr"> 49 </span> 57/push-edi
@ -280,7 +280,7 @@ if ('onhashchange' in window) {
<span id="L218" class="LineNr">218 </span> 8b/copy 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *edi to ecx</span>
<span id="L219" class="LineNr">219 </span> <span class="subxComment"># if (f-&gt;write &gt;= f-&gt;length) abort</span>
<span id="L220" class="LineNr">220 </span> 3b/compare 1/mod/*+disp8 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare ecx with *(edi+8)</span>
<span id="L221" class="LineNr">221 </span> 7d/jump-if-greater-or-equal $append-byte:abort/disp8
<span id="L221" class="LineNr">221 </span> 7d/jump-if-&gt;= $append-byte:abort/disp8
<span id="L222" class="LineNr">222 </span><span class="Constant">$append-byte:to-stream</span>:
<span id="L223" class="LineNr">223 </span> <span class="subxComment"># write to stream</span>
<span id="L224" class="LineNr">224 </span> <span class="subxComment"># f-&gt;data[f-&gt;write] = LSB(n)</span>

View File

@ -113,10 +113,10 @@ if ('onhashchange' in window) {
<span id="L52" class="LineNr"> 52 </span><span class="Constant">$write-buffered:loop</span>:
<span id="L53" class="LineNr"> 53 </span> <span class="subxComment"># if (in &gt;= inend) break</span>
<span id="L54" class="LineNr"> 54 </span> 39/compare 3/mod/direct 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare esi with ecx</span>
<span id="L55" class="LineNr"> 55 </span> 73/jump-if-greater-or-equal-unsigned $write-buffered:loop-end/disp8
<span id="L55" class="LineNr"> 55 </span> 73/jump-if-addr&gt;= $write-buffered:loop-end/disp8
<span id="L56" class="LineNr"> 56 </span> <span class="subxComment"># if (f-&gt;write &gt;= f-&gt;length) flush and clear f's stream</span>
<span id="L57" class="LineNr"> 57 </span> 39/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ebx with edx</span>
<span id="L58" class="LineNr"> 58 </span> 7c/jump-if-lesser $write-buffered:to-stream/disp8
<span id="L58" class="LineNr"> 58 </span> 7c/jump-if-&lt; $write-buffered:to-stream/disp8
<span id="L59" class="LineNr"> 59 </span> <span class="subxS1Comment"># . persist f-&gt;write</span>
<span id="L60" class="LineNr"> 60 </span> 89/copy 1/mod/*+disp8 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ebx to *(edi+4)</span>
<span id="L61" class="LineNr"> 61 </span> <span class="subxS1Comment"># . flush(f)</span>

View File

@ -71,7 +71,7 @@ if ('onhashchange' in window) {
<span id="L10" class="LineNr"> 10 </span> <span class="subxComment"># no error checking; accepts argument in eax</span>
<span id="L11" class="LineNr"> 11 </span> <span class="subxComment"># if (eax &lt;= 9) return eax + '0'</span>
<span id="L12" class="LineNr"> 12 </span> 3d/compare-eax-with 0x9/imm32/9
<span id="L13" class="LineNr"> 13 </span> 7f/jump-if-greater $to-hex-char:else/disp8
<span id="L13" class="LineNr"> 13 </span> 7f/jump-if-&gt; $to-hex-char:else/disp8
<span id="L14" class="LineNr"> 14 </span> 05/add-to-eax 0x30/imm32/0
<span id="L15" class="LineNr"> 15 </span> c3/return
<span id="L16" class="LineNr"> 16 </span><span class="Constant">$to-hex-char:else</span>:
@ -267,7 +267,7 @@ if ('onhashchange' in window) {
<span id="L206" class="LineNr">206 </span><span class="Constant">$print-int32:loop</span>:
<span id="L207" class="LineNr">207 </span> <span class="subxComment"># if (ecx &lt; 0) break</span>
<span id="L208" class="LineNr">208 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare ecx</span>
<span id="L209" class="LineNr">209 </span> 7c/jump-if-lesser $print-int32:end/disp8
<span id="L209" class="LineNr">209 </span> 7c/jump-if-&lt; $print-int32:end/disp8
<span id="L210" class="LineNr">210 </span> <span class="subxComment"># eax = n &gt;&gt; ecx</span>
<span id="L211" class="LineNr">211 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to eax</span>
<span id="L212" class="LineNr">212 </span> d3/&gt;&gt;ecx 5/subop/pad-zeroes 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># shift eax right by ecx bits, padding zeroes</span>
@ -355,7 +355,7 @@ if ('onhashchange' in window) {
<span id="L294" class="LineNr">294 </span><span class="Constant">$print-int32-buffered:loop</span>:
<span id="L295" class="LineNr">295 </span> <span class="subxComment"># if (ecx &lt; 0) break</span>
<span id="L296" class="LineNr">296 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare ecx</span>
<span id="L297" class="LineNr">297 </span> 7c/jump-if-lesser $print-int32-buffered:end/disp8
<span id="L297" class="LineNr">297 </span> 7c/jump-if-&lt; $print-int32-buffered:end/disp8
<span id="L298" class="LineNr">298 </span> <span class="subxComment"># eax = n &gt;&gt; ecx</span>
<span id="L299" class="LineNr">299 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to eax</span>
<span id="L300" class="LineNr">300 </span> d3/&gt;&gt;ecx 5/subop/pad-zeroes 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># shift eax right by ecx bits, padding zeroes</span>

View File

@ -83,13 +83,13 @@ if ('onhashchange' in window) {
<span id="L23" class="LineNr"> 23 </span> <span class="subxComment"># if s is empty return false</span>
<span id="L24" class="LineNr"> 24 </span> b8/copy-to-eax 0/imm32/false
<span id="L25" class="LineNr"> 25 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L26" class="LineNr"> 26 </span> 73/jump-if-greater-or-equal-unsigned $is-hex-int?:end/disp8
<span id="L26" class="LineNr"> 26 </span> 73/jump-if-addr&gt;= $is-hex-int?:end/disp8
<span id="L27" class="LineNr"> 27 </span> <span class="subxComment"># skip past leading '-'</span>
<span id="L28" class="LineNr"> 28 </span> <span class="subxS1Comment"># . if (*curr == '-') ++curr</span>
<span id="L29" class="LineNr"> 29 </span> 31/xor 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear ebx</span>
<span id="L30" class="LineNr"> 30 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ecx to BL</span>
<span id="L31" class="LineNr"> 31 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x2d/imm32/- <span class="subxComment"># compare ebx</span>
<span id="L32" class="LineNr"> 32 </span> 75/jump-if-not-equal $is-hex-int?:initial-0/disp8
<span id="L32" class="LineNr"> 32 </span> 75/jump-if-!= $is-hex-int?:initial-0/disp8
<span id="L33" class="LineNr"> 33 </span> <span class="subxS1Comment"># . ++curr</span>
<span id="L34" class="LineNr"> 34 </span> 41/increment-ecx
<span id="L35" class="LineNr"> 35 </span> <span class="subxComment"># skip past leading '0x'</span>
@ -98,24 +98,24 @@ if ('onhashchange' in window) {
<span id="L38" class="LineNr"> 38 </span> 31/xor 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear ebx</span>
<span id="L39" class="LineNr"> 39 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ecx to BL</span>
<span id="L40" class="LineNr"> 40 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x30/imm32/0 <span class="subxComment"># compare ebx</span>
<span id="L41" class="LineNr"> 41 </span> 75/jump-if-not-equal $is-hex-int?:<span class="Constant">loop</span>/disp8
<span id="L41" class="LineNr"> 41 </span> 75/jump-if-!= $is-hex-int?:<span class="Constant">loop</span>/disp8
<span id="L42" class="LineNr"> 42 </span> <span class="subxS1Comment"># . ++curr</span>
<span id="L43" class="LineNr"> 43 </span> 41/increment-ecx
<span id="L44" class="LineNr"> 44 </span><span class="Constant">$is-hex-int?:initial-0x</span>:
<span id="L45" class="LineNr"> 45 </span> <span class="subxS1Comment"># . if (curr &gt;= in-&gt;end) return true</span>
<span id="L46" class="LineNr"> 46 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L47" class="LineNr"> 47 </span> 73/jump-if-greater-or-equal-unsigned $is-hex-int?:true/disp8
<span id="L47" class="LineNr"> 47 </span> 73/jump-if-addr&gt;= $is-hex-int?:true/disp8
<span id="L48" class="LineNr"> 48 </span> <span class="subxS1Comment"># . if (*curr != 'x') jump to loop # the previous '0' is still valid so doesn't need to be checked again</span>
<span id="L49" class="LineNr"> 49 </span> 31/xor 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear ebx</span>
<span id="L50" class="LineNr"> 50 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ecx to BL</span>
<span id="L51" class="LineNr"> 51 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x78/imm32/x <span class="subxComment"># compare ebx</span>
<span id="L52" class="LineNr"> 52 </span> 75/jump-if-not-equal $is-hex-int?:<span class="Constant">loop</span>/disp8
<span id="L52" class="LineNr"> 52 </span> 75/jump-if-!= $is-hex-int?:<span class="Constant">loop</span>/disp8
<span id="L53" class="LineNr"> 53 </span> <span class="subxS1Comment"># . ++curr</span>
<span id="L54" class="LineNr"> 54 </span> 41/increment-ecx
<span id="L55" class="LineNr"> 55 </span><span class="Constant">$is-hex-int?:loop</span>:
<span id="L56" class="LineNr"> 56 </span> <span class="subxComment"># if (curr &gt;= in-&gt;end) return true</span>
<span id="L57" class="LineNr"> 57 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L58" class="LineNr"> 58 </span> 73/jump-if-greater-or-equal-unsigned $is-hex-int?:true/disp8
<span id="L58" class="LineNr"> 58 </span> 73/jump-if-addr&gt;= $is-hex-int?:true/disp8
<span id="L59" class="LineNr"> 59 </span> <span class="subxComment"># var eax : boolean = is-hex-digit?(*curr)</span>
<span id="L60" class="LineNr"> 60 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L61" class="LineNr"> 61 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ecx to AL</span>
@ -126,7 +126,7 @@ if ('onhashchange' in window) {
<span id="L66" class="LineNr"> 66 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L67" class="LineNr"> 67 </span> <span class="subxComment"># if (eax == false) return false</span>
<span id="L68" class="LineNr"> 68 </span> 3d/compare-eax-and 0/imm32
<span id="L69" class="LineNr"> 69 </span> 74/jump-if-equal $is-hex-int?:end/disp8
<span id="L69" class="LineNr"> 69 </span> 74/jump-if-= $is-hex-int?:end/disp8
<span id="L70" class="LineNr"> 70 </span> <span class="subxComment"># ++curr</span>
<span id="L71" class="LineNr"> 71 </span> 41/increment-ecx
<span id="L72" class="LineNr"> 72 </span> <span class="subxComment"># loop</span>
@ -435,7 +435,7 @@ if ('onhashchange' in window) {
<span id="L375" class="LineNr">375 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span>
<span id="L376" class="LineNr">376 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ecx to AL</span>
<span id="L377" class="LineNr">377 </span> 3d/compare-eax-and 0x2d/imm32/-
<span id="L378" class="LineNr">378 </span> 75/jump-if-not-equal $parse-hex-int:initial-0/disp8
<span id="L378" class="LineNr">378 </span> 75/jump-if-!= $parse-hex-int:initial-0/disp8
<span id="L379" class="LineNr">379 </span> <span class="subxS1Comment"># . ++curr</span>
<span id="L380" class="LineNr">380 </span> 41/increment-ecx
<span id="L381" class="LineNr">381 </span> <span class="subxS1Comment"># . negate = true</span>
@ -445,24 +445,24 @@ if ('onhashchange' in window) {
<span id="L385" class="LineNr">385 </span> <span class="subxS1Comment"># . if (*curr != '0') jump to loop</span>
<span id="L386" class="LineNr">386 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ecx to AL</span>
<span id="L387" class="LineNr">387 </span> 3d/compare-eax-and 0x30/imm32/0
<span id="L388" class="LineNr">388 </span> 75/jump-if-not-equal $parse-hex-int:<span class="Constant">loop</span>/disp8
<span id="L388" class="LineNr">388 </span> 75/jump-if-!= $parse-hex-int:<span class="Constant">loop</span>/disp8
<span id="L389" class="LineNr">389 </span> <span class="subxS1Comment"># . ++curr</span>
<span id="L390" class="LineNr">390 </span> 41/increment-ecx
<span id="L391" class="LineNr">391 </span><span class="Constant">$parse-hex-int:initial-0x</span>:
<span id="L392" class="LineNr">392 </span> <span class="subxS1Comment"># . if (curr &gt;= in-&gt;end) return result</span>
<span id="L393" class="LineNr">393 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L394" class="LineNr">394 </span> 73/jump-if-greater-or-equal-unsigned $parse-hex-int:end/disp8
<span id="L394" class="LineNr">394 </span> 73/jump-if-addr&gt;= $parse-hex-int:end/disp8
<span id="L395" class="LineNr">395 </span> <span class="subxS1Comment"># . if (*curr != 'x') jump to loop # the previous '0' is still valid so doesn't need to be checked again</span>
<span id="L396" class="LineNr">396 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span>
<span id="L397" class="LineNr">397 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ecx to AL</span>
<span id="L398" class="LineNr">398 </span> 3d/compare-eax-and 0x78/imm32/x
<span id="L399" class="LineNr">399 </span> 75/jump-if-not-equal $parse-hex-int:<span class="Constant">loop</span>/disp8
<span id="L399" class="LineNr">399 </span> 75/jump-if-!= $parse-hex-int:<span class="Constant">loop</span>/disp8
<span id="L400" class="LineNr">400 </span> <span class="subxS1Comment"># . ++curr</span>
<span id="L401" class="LineNr">401 </span> 41/increment-ecx
<span id="L402" class="LineNr">402 </span><span class="Constant">$parse-hex-int:loop</span>:
<span id="L403" class="LineNr">403 </span> <span class="subxComment"># if (curr &gt;= in-&gt;end) break</span>
<span id="L404" class="LineNr">404 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L405" class="LineNr">405 </span> 73/jump-if-greater-or-equal-unsigned $parse-hex-int:negate/disp8
<span id="L405" class="LineNr">405 </span> 73/jump-if-addr&gt;= $parse-hex-int:negate/disp8
<span id="L406" class="LineNr">406 </span> <span class="subxComment"># var eax : int = from-hex-char(*curr)</span>
<span id="L407" class="LineNr">407 </span> <span class="subxS2Comment"># . . copy arg to eax</span>
<span id="L408" class="LineNr">408 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ecx to AL</span>
@ -478,7 +478,7 @@ if ('onhashchange' in window) {
<span id="L418" class="LineNr">418 </span><span class="Constant">$parse-hex-int:negate</span>:
<span id="L419" class="LineNr">419 </span> <span class="subxComment"># if (negate?) result = -result</span>
<span id="L420" class="LineNr">420 </span> 81 7/subop/compare 3/mod/direct 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32/false <span class="subxComment"># compare esi</span>
<span id="L421" class="LineNr">421 </span> 74/jump-if-equal $parse-hex-int:end/disp8
<span id="L421" class="LineNr">421 </span> 74/jump-if-= $parse-hex-int:end/disp8
<span id="L422" class="LineNr">422 </span> f7 3/subop/negate 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># negate ebx</span>
<span id="L423" class="LineNr">423 </span><span class="Constant">$parse-hex-int:end</span>:
<span id="L424" class="LineNr">424 </span> <span class="subxComment"># return result</span>
@ -707,18 +707,18 @@ if ('onhashchange' in window) {
<span id="L647" class="LineNr">647 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+8) to ecx</span>
<span id="L648" class="LineNr">648 </span> <span class="subxComment"># return false if c &lt; '0'</span>
<span id="L649" class="LineNr">649 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x30/imm32 <span class="subxComment"># compare ecx</span>
<span id="L650" class="LineNr">650 </span> 7c/jump-if-lesser $is-hex-digit?:false/disp8
<span id="L650" class="LineNr">650 </span> 7c/jump-if-&lt; $is-hex-digit?:false/disp8
<span id="L651" class="LineNr">651 </span> <span class="subxComment"># return true if c &lt;= '9'</span>
<span id="L652" class="LineNr">652 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x39/imm32 <span class="subxComment"># compare ecx</span>
<span id="L653" class="LineNr">653 </span> 7e/jump-if-lesser-or-equal $is-hex-digit?:true/disp8
<span id="L653" class="LineNr">653 </span> 7e/jump-if-&lt;= $is-hex-digit?:true/disp8
<span id="L654" class="LineNr">654 </span> <span class="subxComment"># drop case</span>
<span id="L655" class="LineNr">655 </span> 25/and-eax-with 0x5f/imm32
<span id="L656" class="LineNr">656 </span> <span class="subxComment"># return false if c &gt; 'f'</span>
<span id="L657" class="LineNr">657 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x66/imm32 <span class="subxComment"># compare ecx</span>
<span id="L658" class="LineNr">658 </span> 7f/jump-if-greater $is-hex-digit?:false/disp8
<span id="L658" class="LineNr">658 </span> 7f/jump-if-&gt; $is-hex-digit?:false/disp8
<span id="L659" class="LineNr">659 </span> <span class="subxComment"># return true if c &gt;= 'a'</span>
<span id="L660" class="LineNr">660 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x61/imm32 <span class="subxComment"># compare ecx</span>
<span id="L661" class="LineNr">661 </span> 7d/jump-if-greater-or-equal $is-hex-digit?:true/disp8
<span id="L661" class="LineNr">661 </span> 7d/jump-if-&gt;= $is-hex-digit?:true/disp8
<span id="L662" class="LineNr">662 </span> <span class="subxComment"># otherwise return false</span>
<span id="L663" class="LineNr">663 </span><span class="Constant">$is-hex-digit?:false</span>:
<span id="L664" class="LineNr">664 </span> b8/copy-to-eax 0/imm32/false
@ -864,15 +864,15 @@ if ('onhashchange' in window) {
<span id="L804" class="LineNr">804 </span><span class="Constant">$from-hex-char:check0</span>:
<span id="L805" class="LineNr">805 </span> <span class="subxComment"># if (eax &lt; '0') goto abort</span>
<span id="L806" class="LineNr">806 </span> 3d/compare-eax-with 0x30/imm32/0
<span id="L807" class="LineNr">807 </span> 7c/jump-if-lesser $from-hex-char:abort/disp8
<span id="L807" class="LineNr">807 </span> 7c/jump-if-&lt; $from-hex-char:abort/disp8
<span id="L808" class="LineNr">808 </span><span class="Constant">$from-hex-char:check1</span>:
<span id="L809" class="LineNr">809 </span> <span class="subxComment"># if (eax &gt; 'f') goto abort</span>
<span id="L810" class="LineNr">810 </span> 3d/compare-eax-with 0x66/imm32/f
<span id="L811" class="LineNr">811 </span> 7f/jump-if-greater $from-hex-char:abort/disp8
<span id="L811" class="LineNr">811 </span> 7f/jump-if-&gt; $from-hex-char:abort/disp8
<span id="L812" class="LineNr">812 </span><span class="Constant">$from-hex-char:check2</span>:
<span id="L813" class="LineNr">813 </span> <span class="subxComment"># if (eax &gt; '9') goto next check</span>
<span id="L814" class="LineNr">814 </span> 3d/compare-eax-with 0x39/imm32/9
<span id="L815" class="LineNr">815 </span> 7f/jump-if-greater $from-hex-char:check3/disp8
<span id="L815" class="LineNr">815 </span> 7f/jump-if-&gt; $from-hex-char:check3/disp8
<span id="L816" class="LineNr">816 </span><span class="Constant">$from-hex-char:digit</span>:
<span id="L817" class="LineNr">817 </span> <span class="subxComment"># return eax - '0'</span>
<span id="L818" class="LineNr">818 </span> 2d/subtract-from-eax 0x30/imm32/0
@ -880,7 +880,7 @@ if ('onhashchange' in window) {
<span id="L820" class="LineNr">820 </span><span class="Constant">$from-hex-char:check3</span>:
<span id="L821" class="LineNr">821 </span> <span class="subxComment"># if (eax &lt; 'a') goto abort</span>
<span id="L822" class="LineNr">822 </span> 3d/compare-eax-with 0x61/imm32/a
<span id="L823" class="LineNr">823 </span> 7c/jump-if-lesser $from-hex-char:abort/disp8
<span id="L823" class="LineNr">823 </span> 7c/jump-if-&lt; $from-hex-char:abort/disp8
<span id="L824" class="LineNr">824 </span><span class="Constant">$from-hex-char:letter</span>:
<span id="L825" class="LineNr">825 </span> <span class="subxComment"># return eax - ('a'-10)</span>
<span id="L826" class="LineNr">826 </span> 2d/subtract-from-eax 0x57/imm32/a-10

View File

@ -133,7 +133,7 @@ if ('onhashchange' in window) {
<span id="L72" class="LineNr"> 72 </span> 89/copy 3/mod/direct 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy eax to edx</span>
<span id="L73" class="LineNr"> 73 </span> 03/add 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># add *(ebp+12) to edx</span>
<span id="L74" class="LineNr"> 74 </span> 3b/compare 1/mod/*+disp8 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare edx with *(ecx+4)</span>
<span id="L75" class="LineNr"> 75 </span> 73/jump-if-greater-or-equal-signed $allocate:abort/disp8
<span id="L75" class="LineNr"> 75 </span> 73/jump-if-&gt;=-signed $allocate:abort/disp8
<span id="L76" class="LineNr"> 76 </span><span class="Constant">$allocate:commit</span>:
<span id="L77" class="LineNr"> 77 </span> <span class="subxComment"># update ad-&gt;curr</span>
<span id="L78" class="LineNr"> 78 </span> 89/copy 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy edx to *ecx</span>
@ -257,7 +257,7 @@ if ('onhashchange' in window) {
<span id="L196" class="LineNr">196 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L197" class="LineNr">197 </span> <span class="subxComment"># if (eax == 0) abort</span>
<span id="L198" class="LineNr">198 </span> 3d/compare-eax-and 0/imm32
<span id="L199" class="LineNr">199 </span> 74/jump-if-equal $allocate-region:abort/disp8
<span id="L199" class="LineNr">199 </span> 74/jump-if-= $allocate-region:abort/disp8
<span id="L200" class="LineNr">200 </span> <span class="subxComment"># earmark 8 bytes at the start for a new allocation descriptor</span>
<span id="L201" class="LineNr">201 </span> <span class="subxS1Comment"># . *eax = eax + 8</span>
<span id="L202" class="LineNr">202 </span> 89/copy 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy eax to ecx</span>

View File

@ -78,7 +78,7 @@ if ('onhashchange' in window) {
<span id="L19" class="LineNr"> 19 </span> f7 4/subop/multiply 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># multiply *(ebp+12) into eax</span>
<span id="L20" class="LineNr"> 20 </span> <span class="subxS1Comment"># . if overflow abort</span>
<span id="L21" class="LineNr"> 21 </span> 81 7/subop/compare 3/mod/direct 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare edx</span>
<span id="L22" class="LineNr"> 22 </span> 75/jump-if-not-equal $new-stream:abort/disp8
<span id="L22" class="LineNr"> 22 </span> 75/jump-if-!= $new-stream:abort/disp8
<span id="L23" class="LineNr"> 23 </span> <span class="subxS1Comment"># . edx = elemsize*length</span>
<span id="L24" class="LineNr"> 24 </span> 89/copy 3/mod/direct 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy eax to edx</span>
<span id="L25" class="LineNr"> 25 </span> <span class="subxS1Comment"># . eax += 12</span>

View File

@ -97,10 +97,10 @@ if ('onhashchange' in window) {
<span id="L37" class="LineNr"> 37 </span><span class="Constant">$read-line-buffered:loop</span>:
<span id="L38" class="LineNr"> 38 </span> <span class="subxComment"># if (s-&gt;write &gt;= s-&gt;length) abort</span>
<span id="L39" class="LineNr"> 39 </span> 3b/compare 1/mod/*+disp8 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare edx with *(edi+8)</span>
<span id="L40" class="LineNr"> 40 </span> 7d/jump-if-greater-or-equal $read-line-buffered:abort/disp8
<span id="L40" class="LineNr"> 40 </span> 7d/jump-if-&gt;= $read-line-buffered:abort/disp8
<span id="L41" class="LineNr"> 41 </span> <span class="subxComment"># if (f-&gt;read &gt;= f-&gt;write) populate stream from file</span>
<span id="L42" class="LineNr"> 42 </span> 3b/compare 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare ecx with *(esi+4)</span>
<span id="L43" class="LineNr"> 43 </span> 7c/jump-if-lesser $read-line-buffered:from-stream/disp8
<span id="L43" class="LineNr"> 43 </span> 7c/jump-if-&lt; $read-line-buffered:from-stream/disp8
<span id="L44" class="LineNr"> 44 </span> <span class="subxS1Comment"># . clear-stream(stream = f+4)</span>
<span id="L45" class="LineNr"> 45 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L46" class="LineNr"> 46 </span> 8d/copy-address 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy esi+4 to eax</span>
@ -123,7 +123,7 @@ if ('onhashchange' in window) {
<span id="L63" class="LineNr"> 63 </span> <span class="subxComment"># since f-&gt;read was initially 0, eax is the same as f-&gt;write</span>
<span id="L64" class="LineNr"> 64 </span> <span class="subxS1Comment"># . if (eax == 0) return true</span>
<span id="L65" class="LineNr"> 65 </span> 3d/compare-eax-and 0/imm32
<span id="L66" class="LineNr"> 66 </span> 74/jump-if-equal $read-line-buffered:end/disp8
<span id="L66" class="LineNr"> 66 </span> 74/jump-if-= $read-line-buffered:end/disp8
<span id="L67" class="LineNr"> 67 </span><span class="Constant">$read-line-buffered:from-stream</span>:
<span id="L68" class="LineNr"> 68 </span> <span class="subxComment"># AL = f-&gt;data[f-&gt;read]</span>
<span id="L69" class="LineNr"> 69 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span>
@ -136,7 +136,7 @@ if ('onhashchange' in window) {
<span id="L76" class="LineNr"> 76 </span> 42/increment-edx
<span id="L77" class="LineNr"> 77 </span> <span class="subxComment"># if (AL == '\n') return</span>
<span id="L78" class="LineNr"> 78 </span> 3d/compare-eax-and 0xa/imm32
<span id="L79" class="LineNr"> 79 </span> 75/jump-if-not-equal $read-line-buffered:<span class="Constant">loop</span>/disp8
<span id="L79" class="LineNr"> 79 </span> 75/jump-if-!= $read-line-buffered:<span class="Constant">loop</span>/disp8
<span id="L80" class="LineNr"> 80 </span><span class="Constant">$read-line-buffered:end</span>:
<span id="L81" class="LineNr"> 81 </span> <span class="subxComment"># save f-&gt;read</span>
<span id="L82" class="LineNr"> 82 </span> 89/copy 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ecx to *(esi+8)</span>
@ -306,10 +306,10 @@ if ('onhashchange' in window) {
<span id="L246" class="LineNr">246 </span><span class="Constant">$read-line:loop</span>:
<span id="L247" class="LineNr">247 </span> <span class="subxComment"># if (s-&gt;write &gt;= s-&gt;length) abort</span>
<span id="L248" class="LineNr">248 </span> 3b/compare 1/mod/*+disp8 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare edx with *(edi+8)</span>
<span id="L249" class="LineNr">249 </span> 0f 8d/jump-if-greater-or-equal $read-line:abort/disp32
<span id="L249" class="LineNr">249 </span> 0f 8d/jump-if-&gt;= $read-line:abort/disp32
<span id="L250" class="LineNr">250 </span> <span class="subxComment"># if (f-&gt;read &gt;= f-&gt;write) break</span>
<span id="L251" class="LineNr">251 </span> 3b/compare 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with *esi</span>
<span id="L252" class="LineNr">252 </span> 7d/jump-if-greater-or-equal $read-line:end/disp8
<span id="L252" class="LineNr">252 </span> 7d/jump-if-&gt;= $read-line:end/disp8
<span id="L253" class="LineNr">253 </span> <span class="subxComment"># AL = f-&gt;data[f-&gt;read]</span>
<span id="L254" class="LineNr">254 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span>
<span id="L255" class="LineNr">255 </span> 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx <span class="Normal"> . </span> 0/r32/AL 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy byte at *(esi+ecx+12) to AL</span>
@ -321,7 +321,7 @@ if ('onhashchange' in window) {
<span id="L261" class="LineNr">261 </span> 42/increment-edx
<span id="L262" class="LineNr">262 </span> <span class="subxComment"># if (AL == '\n') return</span>
<span id="L263" class="LineNr">263 </span> 3d/compare-eax-and 0xa/imm32
<span id="L264" class="LineNr">264 </span> 0f 85/jump-if-not-equal $read-line:<span class="Constant">loop</span>/disp32
<span id="L264" class="LineNr">264 </span> 0f 85/jump-if-!= $read-line:<span class="Constant">loop</span>/disp32
<span id="L265" class="LineNr">265 </span><span class="Constant">$read-line:end</span>:
<span id="L266" class="LineNr">266 </span> <span class="subxComment"># save f-&gt;read</span>
<span id="L267" class="LineNr">267 </span> 89/copy 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ecx to *(esi+4)</span>

View File

@ -81,7 +81,7 @@ if ('onhashchange' in window) {
<span id="L20" class="LineNr"> 20 </span> <span class="subxS1Comment"># . compare eax and s-&gt;end</span>
<span id="L21" class="LineNr"> 21 </span> 39/compare 1/mod/*+disp8 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare eax and *(ecx+4)</span>
<span id="L22" class="LineNr"> 22 </span> b8/copy-to-eax 1/imm32/true
<span id="L23" class="LineNr"> 23 </span> 74/jump-if-equal $slice-empty?:end/disp8
<span id="L23" class="LineNr"> 23 </span> 74/jump-if-= $slice-empty?:end/disp8
<span id="L24" class="LineNr"> 24 </span> b8/copy-to-eax 0/imm32/false
<span id="L25" class="LineNr"> 25 </span><span class="Constant">$slice-empty?:end</span>:
<span id="L26" class="LineNr"> 26 </span> <span class="subxS1Comment"># . restore registers</span>
@ -190,16 +190,16 @@ if ('onhashchange' in window) {
<span id="L129" class="LineNr"> 129 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to ebx</span>
<span id="L130" class="LineNr"> 130 </span> <span class="subxComment"># if (p != 0) goto next check</span>
<span id="L131" class="LineNr"> 131 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare ebx</span>
<span id="L132" class="LineNr"> 132 </span> 75/jump-if-not-equal $slice-equal?:nonnull-string/disp8
<span id="L132" class="LineNr"> 132 </span> 75/jump-if-!= $slice-equal?:nonnull-string/disp8
<span id="L133" class="LineNr"> 133 </span><span class="Constant">$slice-equal?:null-string</span>:
<span id="L134" class="LineNr"> 134 </span> <span class="subxComment"># return s-&gt;start == s-&gt;end</span>
<span id="L135" class="LineNr"> 135 </span> 3d/compare-eax-and 0/imm32
<span id="L136" class="LineNr"> 136 </span> 74/jump-if-equal $slice-equal?:true/disp8
<span id="L136" class="LineNr"> 136 </span> 74/jump-if-= $slice-equal?:true/disp8
<span id="L137" class="LineNr"> 137 </span> eb/jump $slice-equal?:false/disp8
<span id="L138" class="LineNr"> 138 </span><span class="Constant">$slice-equal?:nonnull-string</span>:
<span id="L139" class="LineNr"> 139 </span> <span class="subxComment"># if (slen != p-&gt;length) return false</span>
<span id="L140" class="LineNr"> 140 </span> 39/compare 0/mod/indirect 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare *ebx and eax</span>
<span id="L141" class="LineNr"> 141 </span> 75/jump-if-not-equal $slice-equal?:false/disp8
<span id="L141" class="LineNr"> 141 </span> 75/jump-if-!= $slice-equal?:false/disp8
<span id="L142" class="LineNr"> 142 </span> <span class="subxComment"># var currp/ebx : (addr byte) = p-&gt;data</span>
<span id="L143" class="LineNr"> 143 </span> 81 0/subop/add 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to ebx</span>
<span id="L144" class="LineNr"> 144 </span> <span class="subxComment"># var c1/eax : byte = 0</span>
@ -209,14 +209,14 @@ if ('onhashchange' in window) {
<span id="L148" class="LineNr"> 148 </span><span class="Constant">$slice-equal?:loop</span>:
<span id="L149" class="LineNr"> 149 </span> <span class="subxComment"># if (currs &gt;= maxs) return true</span>
<span id="L150" class="LineNr"> 150 </span> 39/compare 3/mod/direct 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare edx with esi</span>
<span id="L151" class="LineNr"> 151 </span> 73/jump-if-greater-or-equal-unsigned $slice-equal?:true/disp8
<span id="L151" class="LineNr"> 151 </span> 73/jump-if-addr&gt;= $slice-equal?:true/disp8
<span id="L152" class="LineNr"> 152 </span> <span class="subxComment"># c1 = *currp</span>
<span id="L153" class="LineNr"> 153 </span> 8a/copy-byte 0/mod/indirect 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ebx to AL</span>
<span id="L154" class="LineNr"> 154 </span> <span class="subxComment"># c2 = *currs</span>
<span id="L155" class="LineNr"> 155 </span> 8a/copy-byte 0/mod/indirect 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/CL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *edx to CL</span>
<span id="L156" class="LineNr"> 156 </span> <span class="subxComment"># if (c1 != c2) return false</span>
<span id="L157" class="LineNr"> 157 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax and ecx</span>
<span id="L158" class="LineNr"> 158 </span> 75/jump-if-not-equal $slice-equal?:false/disp8
<span id="L158" class="LineNr"> 158 </span> 75/jump-if-!= $slice-equal?:false/disp8
<span id="L159" class="LineNr"> 159 </span> <span class="subxComment"># ++currp</span>
<span id="L160" class="LineNr"> 160 </span> 43/increment-ebx
<span id="L161" class="LineNr"> 161 </span> <span class="subxComment"># ++currs</span>
@ -558,7 +558,7 @@ if ('onhashchange' in window) {
<span id="L497" class="LineNr"> 497 </span> 8b/copy 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *edi to edx</span>
<span id="L498" class="LineNr"> 498 </span> <span class="subxComment"># if (lenh &gt; lens) return false</span>
<span id="L499" class="LineNr"> 499 </span> 39/compare 3/mod/direct 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare edx with ecx</span>
<span id="L500" class="LineNr"> 500 </span> 7f/jump-if-greater $slice-starts-with?:false/disp8
<span id="L500" class="LineNr"> 500 </span> 7f/jump-if-&gt; $slice-starts-with?:false/disp8
<span id="L501" class="LineNr"> 501 </span> <span class="subxComment"># var currs/esi : (addr byte) = s-&gt;start</span>
<span id="L502" class="LineNr"> 502 </span> 8b/subtract 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *esi to esi</span>
<span id="L503" class="LineNr"> 503 </span> <span class="subxComment"># var currh/edi : (addr byte) = head-&gt;data</span>
@ -572,14 +572,14 @@ if ('onhashchange' in window) {
<span id="L511" class="LineNr"> 511 </span><span class="Constant">$slice-starts-with?:loop</span>:
<span id="L512" class="LineNr"> 512 </span> <span class="subxComment"># if (i &gt;= lenh) return true</span>
<span id="L513" class="LineNr"> 513 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L514" class="LineNr"> 514 </span> 7d/jump-if-greater-or-equal $slice-starts-with?:true/disp8
<span id="L514" class="LineNr"> 514 </span> 7d/jump-if-&gt;= $slice-starts-with?:true/disp8
<span id="L515" class="LineNr"> 515 </span> <span class="subxComment"># c1 = *currs</span>
<span id="L516" class="LineNr"> 516 </span> 8a/copy-byte 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *esi to AL</span>
<span id="L517" class="LineNr"> 517 </span> <span class="subxComment"># c2 = *currh</span>
<span id="L518" class="LineNr"> 518 </span> 8a/copy-byte 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *edi to BL</span>
<span id="L519" class="LineNr"> 519 </span> <span class="subxComment"># if (c1 != c2) return false</span>
<span id="L520" class="LineNr"> 520 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax and ebx</span>
<span id="L521" class="LineNr"> 521 </span> 75/jump-if-not-equal $slice-starts-with?:false/disp8
<span id="L521" class="LineNr"> 521 </span> 75/jump-if-!= $slice-starts-with?:false/disp8
<span id="L522" class="LineNr"> 522 </span> <span class="subxComment"># ++i</span>
<span id="L523" class="LineNr"> 523 </span> 41/increment-ecx
<span id="L524" class="LineNr"> 524 </span> <span class="subxComment"># ++currs</span>
@ -848,10 +848,10 @@ if ('onhashchange' in window) {
<span id="L787" class="LineNr"> 787 </span><span class="Constant">$write-slice:loop</span>:
<span id="L788" class="LineNr"> 788 </span> <span class="subxComment"># if (curr &gt;= max) break</span>
<span id="L789" class="LineNr"> 789 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with esi</span>
<span id="L790" class="LineNr"> 790 </span> 73/jump-if-greater-or-equal-unsigned $write-slice:loop-end/disp8
<span id="L790" class="LineNr"> 790 </span> 73/jump-if-addr&gt;= $write-slice:loop-end/disp8
<span id="L791" class="LineNr"> 791 </span> <span class="subxComment"># if (out-&gt;write &gt;= out-&gt;length) abort</span>
<span id="L792" class="LineNr"> 792 </span> 39/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ebx with edx</span>
<span id="L793" class="LineNr"> 793 </span> 7d/jump-if-greater-or-equal $write-slice:abort/disp8
<span id="L793" class="LineNr"> 793 </span> 7d/jump-if-&gt;= $write-slice:abort/disp8
<span id="L794" class="LineNr"> 794 </span> <span class="subxComment"># out-&gt;data[out-&gt;write] = *in</span>
<span id="L795" class="LineNr"> 795 </span> <span class="subxS1Comment"># . AL = *in</span>
<span id="L796" class="LineNr"> 796 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span>
@ -964,10 +964,10 @@ if ('onhashchange' in window) {
<span id="L903" class="LineNr"> 903 </span><span class="Constant">$write-slice-buffered:loop</span>:
<span id="L904" class="LineNr"> 904 </span> <span class="subxComment"># if (curr &gt;= max) break</span>
<span id="L905" class="LineNr"> 905 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with esi</span>
<span id="L906" class="LineNr"> 906 </span> 73/jump-if-greater-or-equal-unsigned $write-slice-buffered:loop-end/disp8
<span id="L906" class="LineNr"> 906 </span> 73/jump-if-addr&gt;= $write-slice-buffered:loop-end/disp8
<span id="L907" class="LineNr"> 907 </span> <span class="subxComment"># if (out-&gt;write &gt;= out-&gt;length) flush and clear out's stream</span>
<span id="L908" class="LineNr"> 908 </span> 39/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ebx with edx</span>
<span id="L909" class="LineNr"> 909 </span> 7c/jump-if-lesser $write-slice-buffered:to-stream/disp8
<span id="L909" class="LineNr"> 909 </span> 7c/jump-if-&lt; $write-slice-buffered:to-stream/disp8
<span id="L910" class="LineNr"> 910 </span> <span class="subxS1Comment"># . persist out-&gt;write</span>
<span id="L911" class="LineNr"> 911 </span> 89/copy 1/mod/*+disp8 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ebx to *(edi+4)</span>
<span id="L912" class="LineNr"> 912 </span> <span class="subxS1Comment"># . flush(out)</span>
@ -1102,7 +1102,7 @@ if ('onhashchange' in window) {
<span id="L1041" class="LineNr">1041 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L1042" class="LineNr">1042 </span> <span class="subxComment"># if (eax == 0) abort</span>
<span id="L1043" class="LineNr">1043 </span> 3d/compare-eax-and 0/imm32
<span id="L1044" class="LineNr">1044 </span> 74/jump-if-equal $slice-to-string:abort/disp8
<span id="L1044" class="LineNr">1044 </span> 74/jump-if-= $slice-to-string:abort/disp8
<span id="L1045" class="LineNr">1045 </span> <span class="subxComment"># out-&gt;length = size-4</span>
<span id="L1046" class="LineNr">1046 </span> 89/copy 0/mod/indirect 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ecx to *eax</span>
<span id="L1047" class="LineNr">1047 </span> 81 5/subop/subtract 0/mod/indirect 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># subtract 4 from *eax</span>

View File

@ -418,13 +418,13 @@ if ('onhashchange' in window) {
<span id="L359" class="LineNr"> 359 </span><span class="Constant">$skip-chars-matching:loop</span>:
<span id="L360" class="LineNr"> 360 </span> <span class="subxComment"># if (in-&gt;read &gt;= in-&gt;write) break</span>
<span id="L361" class="LineNr"> 361 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with ebx</span>
<span id="L362" class="LineNr"> 362 </span> 7d/jump-if-greater-or-equal $skip-chars-matching:end/disp8
<span id="L362" class="LineNr"> 362 </span> 7d/jump-if-&gt;= $skip-chars-matching:end/disp8
<span id="L363" class="LineNr"> 363 </span> <span class="subxComment"># eax = in-&gt;data[in-&gt;read]</span>
<span id="L364" class="LineNr"> 364 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span>
<span id="L365" class="LineNr"> 365 </span> 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx <span class="Normal"> . </span> 0/r32/AL 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy byte at *(esi+ecx+12) to AL</span>
<span id="L366" class="LineNr"> 366 </span> <span class="subxComment"># if (eax != delimiter) break</span>
<span id="L367" class="LineNr"> 367 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax and edx</span>
<span id="L368" class="LineNr"> 368 </span> 75/jump-if-not-equal $skip-chars-matching:end/disp8
<span id="L368" class="LineNr"> 368 </span> 75/jump-if-!= $skip-chars-matching:end/disp8
<span id="L369" class="LineNr"> 369 </span> <span class="subxComment"># ++in-&gt;read</span>
<span id="L370" class="LineNr"> 370 </span> 41/increment-ecx
<span id="L371" class="LineNr"> 371 </span> eb/jump $skip-chars-matching:<span class="Constant">loop</span>/disp8
@ -538,22 +538,22 @@ if ('onhashchange' in window) {
<span id="L479" class="LineNr"> 479 </span><span class="Constant">$skip-chars-matching-whitespace:loop</span>:
<span id="L480" class="LineNr"> 480 </span> <span class="subxComment"># if (in-&gt;read &gt;= in-&gt;write) break</span>
<span id="L481" class="LineNr"> 481 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with ebx</span>
<span id="L482" class="LineNr"> 482 </span> 7d/jump-if-greater-or-equal $skip-chars-matching-whitespace:end/disp8
<span id="L482" class="LineNr"> 482 </span> 7d/jump-if-&gt;= $skip-chars-matching-whitespace:end/disp8
<span id="L483" class="LineNr"> 483 </span> <span class="subxComment"># eax = in-&gt;data[in-&gt;read]</span>
<span id="L484" class="LineNr"> 484 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span>
<span id="L485" class="LineNr"> 485 </span> 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx <span class="Normal"> . </span> 0/r32/AL 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy byte at *(esi+ecx+12) to AL</span>
<span id="L486" class="LineNr"> 486 </span> <span class="subxComment"># if (eax == ' ') goto body</span>
<span id="L487" class="LineNr"> 487 </span> 3d/compare-eax-and 0x20/imm32/space
<span id="L488" class="LineNr"> 488 </span> 74/jump-if-equal $skip-chars-matching-whitespace:body/disp8
<span id="L488" class="LineNr"> 488 </span> 74/jump-if-= $skip-chars-matching-whitespace:body/disp8
<span id="L489" class="LineNr"> 489 </span> <span class="subxComment"># if (eax == '\n') goto body</span>
<span id="L490" class="LineNr"> 490 </span> 3d/compare-eax-and 0x0a/imm32/newline
<span id="L491" class="LineNr"> 491 </span> 74/jump-if-equal $skip-chars-matching-whitespace:body/disp8
<span id="L491" class="LineNr"> 491 </span> 74/jump-if-= $skip-chars-matching-whitespace:body/disp8
<span id="L492" class="LineNr"> 492 </span> <span class="subxComment"># if (eax == '\t') goto body</span>
<span id="L493" class="LineNr"> 493 </span> 3d/compare-eax-and 0x09/imm32/tab
<span id="L494" class="LineNr"> 494 </span> 74/jump-if-equal $skip-chars-matching-whitespace:body/disp8
<span id="L494" class="LineNr"> 494 </span> 74/jump-if-= $skip-chars-matching-whitespace:body/disp8
<span id="L495" class="LineNr"> 495 </span> <span class="subxComment"># if (eax != '\r') break</span>
<span id="L496" class="LineNr"> 496 </span> 3d/compare-eax-and 0x0d/imm32/cr
<span id="L497" class="LineNr"> 497 </span> 75/jump-if-not-equal $skip-chars-matching-whitespace:end/disp8
<span id="L497" class="LineNr"> 497 </span> 75/jump-if-!= $skip-chars-matching-whitespace:end/disp8
<span id="L498" class="LineNr"> 498 </span><span class="Constant">$skip-chars-matching-whitespace:body</span>:
<span id="L499" class="LineNr"> 499 </span> <span class="subxComment"># ++in-&gt;read</span>
<span id="L500" class="LineNr"> 500 </span> 41/increment-ecx
@ -631,13 +631,13 @@ if ('onhashchange' in window) {
<span id="L572" class="LineNr"> 572 </span><span class="Constant">$skip-chars-not-matching:loop</span>:
<span id="L573" class="LineNr"> 573 </span> <span class="subxComment"># if (in-&gt;read &gt;= in-&gt;write) break</span>
<span id="L574" class="LineNr"> 574 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with ebx</span>
<span id="L575" class="LineNr"> 575 </span> 7d/jump-if-greater-or-equal $skip-chars-not-matching:end/disp8
<span id="L575" class="LineNr"> 575 </span> 7d/jump-if-&gt;= $skip-chars-not-matching:end/disp8
<span id="L576" class="LineNr"> 576 </span> <span class="subxComment"># eax = in-&gt;data[in-&gt;read]</span>
<span id="L577" class="LineNr"> 577 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span>
<span id="L578" class="LineNr"> 578 </span> 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx <span class="Normal"> . </span> 0/r32/AL 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy byte at *(esi+ecx+12) to AL</span>
<span id="L579" class="LineNr"> 579 </span> <span class="subxComment"># if (eax == delimiter) break</span>
<span id="L580" class="LineNr"> 580 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax and edx</span>
<span id="L581" class="LineNr"> 581 </span> 74/jump-if-equal $skip-chars-not-matching:end/disp8
<span id="L581" class="LineNr"> 581 </span> 74/jump-if-= $skip-chars-not-matching:end/disp8
<span id="L582" class="LineNr"> 582 </span> <span class="subxComment"># ++in-&gt;read</span>
<span id="L583" class="LineNr"> 583 </span> 41/increment-ecx
<span id="L584" class="LineNr"> 584 </span> eb/jump $skip-chars-not-matching:<span class="Constant">loop</span>/disp8
@ -790,22 +790,22 @@ if ('onhashchange' in window) {
<span id="L731" class="LineNr"> 731 </span><span class="Constant">$skip-chars-not-matching-whitespace:loop</span>:
<span id="L732" class="LineNr"> 732 </span> <span class="subxComment"># if (in-&gt;read &gt;= in-&gt;write) break</span>
<span id="L733" class="LineNr"> 733 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with ebx</span>
<span id="L734" class="LineNr"> 734 </span> 7d/jump-if-greater-or-equal $skip-chars-not-matching-whitespace:end/disp8
<span id="L734" class="LineNr"> 734 </span> 7d/jump-if-&gt;= $skip-chars-not-matching-whitespace:end/disp8
<span id="L735" class="LineNr"> 735 </span> <span class="subxComment"># eax = in-&gt;data[in-&gt;read]</span>
<span id="L736" class="LineNr"> 736 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span>
<span id="L737" class="LineNr"> 737 </span> 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx <span class="Normal"> . </span> 0/r32/AL 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy byte at *(esi+ecx+12) to AL</span>
<span id="L738" class="LineNr"> 738 </span> <span class="subxComment"># if (eax == ' ') break</span>
<span id="L739" class="LineNr"> 739 </span> 3d/compare-eax-and 0x20/imm32/space
<span id="L740" class="LineNr"> 740 </span> 74/jump-if-equal $skip-chars-not-matching-whitespace:end/disp8
<span id="L740" class="LineNr"> 740 </span> 74/jump-if-= $skip-chars-not-matching-whitespace:end/disp8
<span id="L741" class="LineNr"> 741 </span> <span class="subxComment"># if (eax == '\n') break</span>
<span id="L742" class="LineNr"> 742 </span> 3d/compare-eax-and 0x0a/imm32/newline
<span id="L743" class="LineNr"> 743 </span> 74/jump-if-equal $skip-chars-not-matching-whitespace:end/disp8
<span id="L743" class="LineNr"> 743 </span> 74/jump-if-= $skip-chars-not-matching-whitespace:end/disp8
<span id="L744" class="LineNr"> 744 </span> <span class="subxComment"># if (eax == '\t') break</span>
<span id="L745" class="LineNr"> 745 </span> 3d/compare-eax-and 0x09/imm32/tab
<span id="L746" class="LineNr"> 746 </span> 74/jump-if-equal $skip-chars-not-matching-whitespace:end/disp8
<span id="L746" class="LineNr"> 746 </span> 74/jump-if-= $skip-chars-not-matching-whitespace:end/disp8
<span id="L747" class="LineNr"> 747 </span> <span class="subxComment"># if (eax == '\r') break</span>
<span id="L748" class="LineNr"> 748 </span> 3d/compare-eax-and 0x0d/imm32/cr
<span id="L749" class="LineNr"> 749 </span> 74/jump-if-equal $skip-chars-not-matching-whitespace:end/disp8
<span id="L749" class="LineNr"> 749 </span> 74/jump-if-= $skip-chars-not-matching-whitespace:end/disp8
<span id="L750" class="LineNr"> 750 </span> <span class="subxComment"># ++in-&gt;read</span>
<span id="L751" class="LineNr"> 751 </span> 41/increment-ecx
<span id="L752" class="LineNr"> 752 </span> eb/jump $skip-chars-not-matching-whitespace:<span class="Constant">loop</span>/disp8
@ -879,12 +879,12 @@ if ('onhashchange' in window) {
<span id="L820" class="LineNr"> 820 </span><span class="Constant">$skip-chars-matching-in-slice:loop</span>:
<span id="L821" class="LineNr"> 821 </span> <span class="subxComment"># if (curr &gt;= end) break</span>
<span id="L822" class="LineNr"> 822 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax with ecx</span>
<span id="L823" class="LineNr"> 823 </span> 73/jump-if-greater-or-equal-unsigned $skip-chars-matching-in-slice:end/disp8
<span id="L823" class="LineNr"> 823 </span> 73/jump-if-addr&gt;= $skip-chars-matching-in-slice:end/disp8
<span id="L824" class="LineNr"> 824 </span> <span class="subxComment"># c = *curr</span>
<span id="L825" class="LineNr"> 825 </span> 8a/copy-byte 0/mod/indirect 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *eax to BL</span>
<span id="L826" class="LineNr"> 826 </span> <span class="subxComment"># if (c != delimiter) break</span>
<span id="L827" class="LineNr"> 827 </span> 39/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ebx and edx</span>
<span id="L828" class="LineNr"> 828 </span> 75/jump-if-not-equal $skip-chars-matching-in-slice:end/disp8
<span id="L828" class="LineNr"> 828 </span> 75/jump-if-!= $skip-chars-matching-in-slice:end/disp8
<span id="L829" class="LineNr"> 829 </span> <span class="subxComment"># ++curr</span>
<span id="L830" class="LineNr"> 830 </span> 40/increment-eax
<span id="L831" class="LineNr"> 831 </span> eb/jump $skip-chars-matching-in-slice:<span class="Constant">loop</span>/disp8
@ -972,21 +972,21 @@ if ('onhashchange' in window) {
<span id="L913" class="LineNr"> 913 </span><span class="Constant">$skip-chars-matching-whitespace-in-slice:loop</span>:
<span id="L914" class="LineNr"> 914 </span> <span class="subxComment"># if (curr &gt;= end) break</span>
<span id="L915" class="LineNr"> 915 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax with ecx</span>
<span id="L916" class="LineNr"> 916 </span> 0f 83/jump-if-greater-or-equal-unsigned $skip-chars-matching-in-slice:end/disp32
<span id="L916" class="LineNr"> 916 </span> 0f 83/jump-if-addr&gt;= $skip-chars-matching-in-slice:end/disp32
<span id="L917" class="LineNr"> 917 </span> <span class="subxComment"># c = *curr</span>
<span id="L918" class="LineNr"> 918 </span> 8a/copy-byte 0/mod/indirect 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *eax to BL</span>
<span id="L919" class="LineNr"> 919 </span> <span class="subxComment"># if (c == ' ') goto body</span>
<span id="L920" class="LineNr"> 920 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x20/imm32/space <span class="subxComment"># compare ebx</span>
<span id="L921" class="LineNr"> 921 </span> 74/jump-if-equal $skip-chars-matching-whitespace-in-slice:body/disp8
<span id="L921" class="LineNr"> 921 </span> 74/jump-if-= $skip-chars-matching-whitespace-in-slice:body/disp8
<span id="L922" class="LineNr"> 922 </span> <span class="subxComment"># if (c == '\n') goto body</span>
<span id="L923" class="LineNr"> 923 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x0a/imm32/newline <span class="subxComment"># compare ebx</span>
<span id="L924" class="LineNr"> 924 </span> 74/jump-if-equal $skip-chars-matching-whitespace-in-slice:body/disp8
<span id="L924" class="LineNr"> 924 </span> 74/jump-if-= $skip-chars-matching-whitespace-in-slice:body/disp8
<span id="L925" class="LineNr"> 925 </span> <span class="subxComment"># if (c == '\t') goto body</span>
<span id="L926" class="LineNr"> 926 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x09/imm32/tab <span class="subxComment"># compare ebx</span>
<span id="L927" class="LineNr"> 927 </span> 74/jump-if-equal $skip-chars-matching-whitespace-in-slice:body/disp8
<span id="L927" class="LineNr"> 927 </span> 74/jump-if-= $skip-chars-matching-whitespace-in-slice:body/disp8
<span id="L928" class="LineNr"> 928 </span> <span class="subxComment"># if (c != '\r') break</span>
<span id="L929" class="LineNr"> 929 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x0d/imm32/cr <span class="subxComment"># compare ebx</span>
<span id="L930" class="LineNr"> 930 </span> 75/jump-if-not-equal $skip-chars-matching-whitespace-in-slice:end/disp8
<span id="L930" class="LineNr"> 930 </span> 75/jump-if-!= $skip-chars-matching-whitespace-in-slice:end/disp8
<span id="L931" class="LineNr"> 931 </span><span class="Constant">$skip-chars-matching-whitespace-in-slice:body</span>:
<span id="L932" class="LineNr"> 932 </span> <span class="subxComment"># ++curr</span>
<span id="L933" class="LineNr"> 933 </span> 40/increment-eax
@ -1048,12 +1048,12 @@ if ('onhashchange' in window) {
<span id="L989" class="LineNr"> 989 </span><span class="Constant">$skip-chars-not-matching-in-slice:loop</span>:
<span id="L990" class="LineNr"> 990 </span> <span class="subxComment"># if (curr &gt;= end) break</span>
<span id="L991" class="LineNr"> 991 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax with ecx</span>
<span id="L992" class="LineNr"> 992 </span> 73/jump-if-greater-or-equal-unsigned $skip-chars-not-matching-in-slice:end/disp8
<span id="L992" class="LineNr"> 992 </span> 73/jump-if-addr&gt;= $skip-chars-not-matching-in-slice:end/disp8
<span id="L993" class="LineNr"> 993 </span> <span class="subxComment"># c = *curr</span>
<span id="L994" class="LineNr"> 994 </span> 8a/copy-byte 0/mod/indirect 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *eax to BL</span>
<span id="L995" class="LineNr"> 995 </span> <span class="subxComment"># if (c == delimiter) break</span>
<span id="L996" class="LineNr"> 996 </span> 39/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ebx and edx</span>
<span id="L997" class="LineNr"> 997 </span> 74/jump-if-equal $skip-chars-not-matching-in-slice:end/disp8
<span id="L997" class="LineNr"> 997 </span> 74/jump-if-= $skip-chars-not-matching-in-slice:end/disp8
<span id="L998" class="LineNr"> 998 </span> <span class="subxComment"># ++curr</span>
<span id="L999" class="LineNr"> 999 </span> 40/increment-eax
<span id="L1000" class="LineNr">1000 </span> eb/jump $skip-chars-not-matching-in-slice:<span class="Constant">loop</span>/disp8
@ -1170,21 +1170,21 @@ if ('onhashchange' in window) {
<span id="L1111" class="LineNr">1111 </span><span class="Constant">$skip-chars-not-matching-whitespace-in-slice:loop</span>:
<span id="L1112" class="LineNr">1112 </span> <span class="subxComment"># if (curr &gt;= end) break</span>
<span id="L1113" class="LineNr">1113 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax with ecx</span>
<span id="L1114" class="LineNr">1114 </span> 0f 83/jump-if-greater-or-equal-unsigned $skip-chars-not-matching-in-slice:end/disp32
<span id="L1114" class="LineNr">1114 </span> 0f 83/jump-if-addr&gt;= $skip-chars-not-matching-in-slice:end/disp32
<span id="L1115" class="LineNr">1115 </span> <span class="subxComment"># c = *curr</span>
<span id="L1116" class="LineNr">1116 </span> 8a/copy-byte 0/mod/indirect 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *eax to BL</span>
<span id="L1117" class="LineNr">1117 </span> <span class="subxComment"># if (c == ' ') break</span>
<span id="L1118" class="LineNr">1118 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x20/imm32/space <span class="subxComment"># compare ebx</span>
<span id="L1119" class="LineNr">1119 </span> 74/jump-if-equal $skip-chars-not-matching-whitespace-in-slice:end/disp8
<span id="L1119" class="LineNr">1119 </span> 74/jump-if-= $skip-chars-not-matching-whitespace-in-slice:end/disp8
<span id="L1120" class="LineNr">1120 </span> <span class="subxComment"># if (c == '\n') break</span>
<span id="L1121" class="LineNr">1121 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x0a/imm32/newline <span class="subxComment"># compare ebx</span>
<span id="L1122" class="LineNr">1122 </span> 74/jump-if-equal $skip-chars-not-matching-whitespace-in-slice:end/disp8
<span id="L1122" class="LineNr">1122 </span> 74/jump-if-= $skip-chars-not-matching-whitespace-in-slice:end/disp8
<span id="L1123" class="LineNr">1123 </span> <span class="subxComment"># if (c == '\t') break</span>
<span id="L1124" class="LineNr">1124 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x09/imm32/tab <span class="subxComment"># compare ebx</span>
<span id="L1125" class="LineNr">1125 </span> 74/jump-if-equal $skip-chars-not-matching-whitespace-in-slice:end/disp8
<span id="L1125" class="LineNr">1125 </span> 74/jump-if-= $skip-chars-not-matching-whitespace-in-slice:end/disp8
<span id="L1126" class="LineNr">1126 </span> <span class="subxComment"># if (c == '\r') break</span>
<span id="L1127" class="LineNr">1127 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x0d/imm32/cr <span class="subxComment"># compare ebx</span>
<span id="L1128" class="LineNr">1128 </span> 74/jump-if-equal $skip-chars-not-matching-whitespace-in-slice:end/disp8
<span id="L1128" class="LineNr">1128 </span> 74/jump-if-= $skip-chars-not-matching-whitespace-in-slice:end/disp8
<span id="L1129" class="LineNr">1129 </span> <span class="subxComment"># ++curr</span>
<span id="L1130" class="LineNr">1130 </span> 40/increment-eax
<span id="L1131" class="LineNr">1131 </span> eb/jump $skip-chars-not-matching-whitespace-in-slice:<span class="Constant">loop</span>/disp8
@ -1488,17 +1488,17 @@ if ('onhashchange' in window) {
<span id="L1429" class="LineNr">1429 </span><span class="Constant">$skip-string-in-slice:loop</span>:
<span id="L1430" class="LineNr">1430 </span> <span class="subxComment"># if (curr &gt;= end) return curr</span>
<span id="L1431" class="LineNr">1431 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L1432" class="LineNr">1432 </span> 73/jump-if-greater-unsigned-or-equal $skip-string-in-slice:return-curr/disp8
<span id="L1432" class="LineNr">1432 </span> 73/jump-if-addr&gt;= $skip-string-in-slice:return-curr/disp8
<span id="L1433" class="LineNr">1433 </span> <span class="subxComment"># c = *curr</span>
<span id="L1434" class="LineNr">1434 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ecx to AL</span>
<span id="L1435" class="LineNr">1435 </span><span class="Constant">$skip-string-in-slice:dquote</span>:
<span id="L1436" class="LineNr">1436 </span> <span class="subxComment"># if (c == '&quot;') break</span>
<span id="L1437" class="LineNr">1437 </span> 3d/compare-eax-and 0x22/imm32/double-quote
<span id="L1438" class="LineNr">1438 </span> 74/jump-if-equal $skip-string-in-slice:<span class="Constant">break</span>/disp8
<span id="L1438" class="LineNr">1438 </span> 74/jump-if-= $skip-string-in-slice:<span class="Constant">break</span>/disp8
<span id="L1439" class="LineNr">1439 </span><span class="Constant">$skip-string-in-slice:check-for-escape</span>:
<span id="L1440" class="LineNr">1440 </span> <span class="subxComment"># if (c == '\') escape next char</span>
<span id="L1441" class="LineNr">1441 </span> 3d/compare-eax-and 0x5c/imm32/backslash
<span id="L1442" class="LineNr">1442 </span> 75/jump-if-not-equal $skip-string-in-slice:continue/disp8
<span id="L1442" class="LineNr">1442 </span> 75/jump-if-!= $skip-string-in-slice:continue/disp8
<span id="L1443" class="LineNr">1443 </span><span class="Constant">$skip-string-in-slice:escape</span>:
<span id="L1444" class="LineNr">1444 </span> 41/increment-ecx
<span id="L1445" class="LineNr">1445 </span><span class="Constant">$skip-string-in-slice:continue</span>:
@ -1860,13 +1860,13 @@ if ('onhashchange' in window) {
<span id="L1801" class="LineNr">1801 </span><span class="Constant">$skip-until-close-paren-in-slice:loop</span>:
<span id="L1802" class="LineNr">1802 </span> <span class="subxComment"># if (curr &gt;= end) break</span>
<span id="L1803" class="LineNr">1803 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L1804" class="LineNr">1804 </span> 73/jump-if-greater-unsigned-or-equal $skip-until-close-paren-in-slice:<span class="Constant">break</span>/disp8
<span id="L1804" class="LineNr">1804 </span> 73/jump-if-addr&gt;= $skip-until-close-paren-in-slice:<span class="Constant">break</span>/disp8
<span id="L1805" class="LineNr">1805 </span> <span class="subxComment"># c = *curr</span>
<span id="L1806" class="LineNr">1806 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ecx to AL</span>
<span id="L1807" class="LineNr">1807 </span><span class="Constant">$skip-until-close-paren-in-slice:check-close</span>:
<span id="L1808" class="LineNr">1808 </span> <span class="subxComment"># if (c == ')') break</span>
<span id="L1809" class="LineNr">1809 </span> 3d/compare-eax-and 0x29/imm32/close-paren
<span id="L1810" class="LineNr">1810 </span> 74/jump-if-equal $skip-until-close-paren-in-slice:<span class="Constant">break</span>/disp8
<span id="L1810" class="LineNr">1810 </span> 74/jump-if-= $skip-until-close-paren-in-slice:<span class="Constant">break</span>/disp8
<span id="L1811" class="LineNr">1811 </span> <span class="subxComment"># ++curr</span>
<span id="L1812" class="LineNr">1812 </span> 41/increment-ecx
<span id="L1813" class="LineNr">1813 </span> eb/jump $skip-until-close-paren-in-slice:<span class="Constant">loop</span>/disp8

View File

@ -112,7 +112,7 @@ if ('onhashchange' in window) {
<span id="L51" class="LineNr"> 51 </span> <span class="subxComment"># var eax : int = abs(n)</span>
<span id="L52" class="LineNr"> 52 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to eax</span>
<span id="L53" class="LineNr"> 53 </span> 3d/compare-eax-with 0/imm32
<span id="L54" class="LineNr"> 54 </span> 7d/jump-if-greater-or-equal $print-int32-decimal:read-loop/disp8
<span id="L54" class="LineNr"> 54 </span> 7d/jump-if-&gt;= $print-int32-decimal:read-loop/disp8
<span id="L55" class="LineNr"> 55 </span><span class="Constant">$print-int32-decimal:negative</span>:
<span id="L56" class="LineNr"> 56 </span> f7 3/subop/negate 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># negate eax</span>
<span id="L57" class="LineNr"> 57 </span><span class="Constant">$print-int32-decimal:read-loop</span>:
@ -125,11 +125,11 @@ if ('onhashchange' in window) {
<span id="L64" class="LineNr"> 64 </span> 52/push-edx
<span id="L65" class="LineNr"> 65 </span> <span class="subxComment"># if (eax == 0) break</span>
<span id="L66" class="LineNr"> 66 </span> 3d/compare-eax-and 0/imm32
<span id="L67" class="LineNr"> 67 </span> 7f/jump-if-greater $print-int32-decimal:read-loop/disp8
<span id="L67" class="LineNr"> 67 </span> 7f/jump-if-&gt; $print-int32-decimal:read-loop/disp8
<span id="L68" class="LineNr"> 68 </span><span class="Constant">$print-int32-decimal:read-break</span>:
<span id="L69" class="LineNr"> 69 </span> <span class="subxComment"># if (n &lt; 0) push('-')</span>
<span id="L70" class="LineNr"> 70 </span> 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/disp8 0/imm32 <span class="subxComment"># compare *(ebp+12)</span>
<span id="L71" class="LineNr"> 71 </span> 7d/jump-if-greater-or-equal $print-int32-decimal:<a href='057write.subx.html#L24'>write</a>/disp8
<span id="L71" class="LineNr"> 71 </span> 7d/jump-if-&gt;= $print-int32-decimal:<a href='057write.subx.html#L24'>write</a>/disp8
<span id="L72" class="LineNr"> 72 </span><span class="Constant">$print-int32-decimal:push-negative</span>:
<span id="L73" class="LineNr"> 73 </span> 68/push 0x2d/imm32/-
<span id="L74" class="LineNr"> 74 </span><span class="Constant">$print-int32-decimal:<a href='057write.subx.html#L24'>write</a></span>:
@ -147,10 +147,10 @@ if ('onhashchange' in window) {
<span id="L86" class="LineNr"> 86 </span> 58/pop-to-eax
<span id="L87" class="LineNr"> 87 </span> <span class="subxComment"># if (eax == sentinel) break</span>
<span id="L88" class="LineNr"> 88 </span> 3d/compare-eax-and 0/imm32/sentinel
<span id="L89" class="LineNr"> 89 </span> 74/jump-if-equal $print-int32-decimal:write-break/disp8
<span id="L89" class="LineNr"> 89 </span> 74/jump-if-= $print-int32-decimal:write-break/disp8
<span id="L90" class="LineNr"> 90 </span> <span class="subxComment"># if (curr &gt;= max) abort</span>
<span id="L91" class="LineNr"> 91 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with ebx</span>
<span id="L92" class="LineNr"> 92 </span> 73/jump-if-greater-or-equal-unsigned $print-int32-decimal:abort/disp8
<span id="L92" class="LineNr"> 92 </span> 73/jump-if-addr&gt;= $print-int32-decimal:abort/disp8
<span id="L93" class="LineNr"> 93 </span><span class="Constant">$print-int32-decimal:write-char</span>:
<span id="L94" class="LineNr"> 94 </span> <span class="subxComment"># *curr = AL</span>
<span id="L95" class="LineNr"> 95 </span> 88/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy AL to byte at *ecx</span>
@ -350,10 +350,10 @@ if ('onhashchange' in window) {
<span id="L314" class="LineNr">314 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+8) to ecx</span>
<span id="L315" class="LineNr">315 </span> <span class="subxComment"># return false if c &lt; '0'</span>
<span id="L316" class="LineNr">316 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x30/imm32 <span class="subxComment"># compare ecx</span>
<span id="L317" class="LineNr">317 </span> 7c/jump-if-lesser $is-decimal-digit?:false/disp8
<span id="L317" class="LineNr">317 </span> 7c/jump-if-&lt; $is-decimal-digit?:false/disp8
<span id="L318" class="LineNr">318 </span> <span class="subxComment"># return true if c &lt;= '9'</span>
<span id="L319" class="LineNr">319 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x39/imm32 <span class="subxComment"># compare ecx</span>
<span id="L320" class="LineNr">320 </span> 7e/jump-if-lesser-or-equal $is-decimal-digit?:true/disp8
<span id="L320" class="LineNr">320 </span> 7e/jump-if-&lt;= $is-decimal-digit?:true/disp8
<span id="L321" class="LineNr">321 </span> <span class="subxComment"># otherwise return false</span>
<span id="L322" class="LineNr">322 </span><span class="Constant">$is-decimal-digit?:false</span>:
<span id="L323" class="LineNr">323 </span> b8/copy-to-eax 0/imm32/false

View File

@ -93,7 +93,7 @@ if ('onhashchange' in window) {
<span id="L34" class="LineNr"> 34 </span> 8b/copy 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(esi+4) to eax</span>
<span id="L35" class="LineNr"> 35 </span> <span class="subxS1Comment"># . if (eax &lt; line-&gt;write) goto next check</span>
<span id="L36" class="LineNr"> 36 </span> 3b/compare 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax with *esi</span>
<span id="L37" class="LineNr"> 37 </span> 7c/jump-if-lesser $next-word:check-for-comment/disp8
<span id="L37" class="LineNr"> 37 </span> 7c/jump-if-&lt; $next-word:check-for-comment/disp8
<span id="L38" class="LineNr"> 38 </span> <span class="subxS1Comment"># . return out</span>
<span id="L39" class="LineNr"> 39 </span> c7 0/subop/copy 0/mod/direct 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># copy to *edi</span>
<span id="L40" class="LineNr"> 40 </span> c7 0/subop/copy 1/mod/*+disp8 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/disp8 0/imm32 <span class="subxComment"># copy to *(edi+4)</span>
@ -109,7 +109,7 @@ if ('onhashchange' in window) {
<span id="L50" class="LineNr"> 50 </span> 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx <span class="Normal"> . </span> 0/r32/AL 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy byte at *(esi+ecx+12) to AL</span>
<span id="L51" class="LineNr"> 51 </span> <span class="subxS1Comment"># . compare</span>
<span id="L52" class="LineNr"> 52 </span> 3d/compare-eax-and 0x23/imm32/pound
<span id="L53" class="LineNr"> 53 </span> 75/jump-if-not-equal $next-word:regular-word/disp8
<span id="L53" class="LineNr"> 53 </span> 75/jump-if-!= $next-word:regular-word/disp8
<span id="L54" class="LineNr"> 54 </span><span class="Constant">$next-word:comment</span>:
<span id="L55" class="LineNr"> 55 </span> <span class="subxS1Comment"># . out-&gt;end = &amp;line-&gt;data[line-&gt;write]</span>
<span id="L56" class="LineNr"> 56 </span> 8b/copy 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *esi to eax</span>

View File

@ -121,7 +121,7 @@ if ('onhashchange' in window) {
<span id="L62" class="LineNr"> 62 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L63" class="LineNr"> 63 </span> <span class="subxS1Comment"># . if (eax != false) return false</span>
<span id="L64" class="LineNr"> 64 </span> 3d/compare-eax-and 0/imm32/false
<span id="L65" class="LineNr"> 65 </span> 75/jump-if-not-equal $has-metadata?:false/disp8
<span id="L65" class="LineNr"> 65 </span> 75/jump-if-!= $has-metadata?:false/disp8
<span id="L66" class="LineNr"> 66 </span> <span class="subxComment"># if (slice-equal?(twig, s)) return true</span>
<span id="L67" class="LineNr"> 67 </span> <span class="subxS1Comment"># . eax = slice-equal?(twig, s)</span>
<span id="L68" class="LineNr"> 68 </span> <span class="subxS2Comment"># . . push args</span>
@ -134,7 +134,7 @@ if ('onhashchange' in window) {
<span id="L75" class="LineNr"> 75 </span> <span class="subxS1Comment"># . if (eax != false) return true</span>
<span id="L76" class="LineNr"> 76 </span> 3d/compare-eax-and 0/imm32/false
<span id="L77" class="LineNr"> 77 </span> <span class="subxComment"># eax already contains true</span>
<span id="L78" class="LineNr"> 78 </span> 75/jump-if-not-equal $has-metadata?:end/disp8
<span id="L78" class="LineNr"> 78 </span> 75/jump-if-!= $has-metadata?:end/disp8
<span id="L79" class="LineNr"> 79 </span> eb/jump $has-metadata?:<span class="Constant">loop</span>/disp8
<span id="L80" class="LineNr"> 80 </span><span class="Constant">$has-metadata?:false</span>:
<span id="L81" class="LineNr"> 81 </span> b8/copy-to-eax 0/imm32/false
@ -348,29 +348,29 @@ if ('onhashchange' in window) {
<span id="L289" class="LineNr">289 </span><span class="Constant">$is-valid-name?:check0</span>:
<span id="L290" class="LineNr">290 </span> <span class="subxComment"># if (start &gt;= in-&gt;end) return false</span>
<span id="L291" class="LineNr">291 </span> 3b/compare 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare ecx with *(esi+4)</span>
<span id="L292" class="LineNr">292 </span> 73/jump-if-greater-or-equal-unsigned $is-valid-name?:false/disp8
<span id="L292" class="LineNr">292 </span> 73/jump-if-addr&gt;= $is-valid-name?:false/disp8
<span id="L293" class="LineNr">293 </span><span class="Constant">$is-valid-name?:check1</span>:
<span id="L294" class="LineNr">294 </span> <span class="subxComment"># var len/eax : int = in-&gt;end - start</span>
<span id="L295" class="LineNr">295 </span> 8b/copy 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(esi+4) to eax</span>
<span id="L296" class="LineNr">296 </span> 29/subtract 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># subtract ecx from eax</span>
<span id="L297" class="LineNr">297 </span> <span class="subxComment"># if (eax == 2) return false</span>
<span id="L298" class="LineNr">298 </span> 3d/compare-eax-and 2/imm32
<span id="L299" class="LineNr">299 </span> 74/jump-if-equal $is-valid-name?:false/disp8
<span id="L299" class="LineNr">299 </span> 74/jump-if-= $is-valid-name?:false/disp8
<span id="L300" class="LineNr">300 </span><span class="Constant">$is-valid-name?:check2</span>:
<span id="L301" class="LineNr">301 </span> <span class="subxComment"># var c/eax : (addr byte) = *start</span>
<span id="L302" class="LineNr">302 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span>
<span id="L303" class="LineNr">303 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ecx to AL</span>
<span id="L304" class="LineNr">304 </span> <span class="subxComment"># if (c == &quot;-&quot;) return false</span>
<span id="L305" class="LineNr">305 </span> 3d/compare-eax-and 2d/imm32/-
<span id="L306" class="LineNr">306 </span> 74/jump-if-equal $is-valid-name?:false/disp8
<span id="L306" class="LineNr">306 </span> 74/jump-if-= $is-valid-name?:false/disp8
<span id="L307" class="LineNr">307 </span><span class="Constant">$is-valid-name?:check3a</span>:
<span id="L308" class="LineNr">308 </span> <span class="subxComment"># if (c &lt; &quot;0&quot;) return true</span>
<span id="L309" class="LineNr">309 </span> 3d/compare-eax-with 30/imm32/0
<span id="L310" class="LineNr">310 </span> 7c/jump-if-lesser $is-valid-name?:true/disp8
<span id="L310" class="LineNr">310 </span> 7c/jump-if-&lt; $is-valid-name?:true/disp8
<span id="L311" class="LineNr">311 </span><span class="Constant">$is-valid-name?:check3b</span>:
<span id="L312" class="LineNr">312 </span> <span class="subxComment"># if (c &gt; &quot;9&quot;) return true</span>
<span id="L313" class="LineNr">313 </span> 3d/compare-eax-with 39/imm32/9
<span id="L314" class="LineNr">314 </span> 7f/jump-if-greater $is-valid-name?:true/disp8
<span id="L314" class="LineNr">314 </span> 7f/jump-if-&gt; $is-valid-name?:true/disp8
<span id="L315" class="LineNr">315 </span><span class="Constant">$is-valid-name?:false</span>:
<span id="L316" class="LineNr">316 </span> <span class="subxComment"># return false</span>
<span id="L317" class="LineNr">317 </span> b8/copy-to-eax 0/imm32/false
@ -608,7 +608,7 @@ if ('onhashchange' in window) {
<span id="L549" class="LineNr">549 </span> <span class="subxS1Comment"># . return (eax == ':')</span>
<span id="L550" class="LineNr">550 </span> 3d/compare-eax-and 0x3a/imm32/colon
<span id="L551" class="LineNr">551 </span> b8/copy-to-eax 1/imm32/true
<span id="L552" class="LineNr">552 </span> 74/jump-if-equal $is-label?:end/disp8
<span id="L552" class="LineNr">552 </span> 74/jump-if-= $is-label?:end/disp8
<span id="L553" class="LineNr">553 </span> b8/copy-to-eax 0/imm32/false
<span id="L554" class="LineNr">554 </span><span class="Constant">$is-label?:end</span>:
<span id="L555" class="LineNr">555 </span> <span class="subxS1Comment"># . restore registers</span>

View File

@ -84,7 +84,7 @@ if ('onhashchange' in window) {
<span id="L25" class="LineNr"> 25 </span><span class="Constant">$emit-hex:loop</span>:
<span id="L26" class="LineNr"> 26 </span> <span class="subxComment"># if (curr &gt;= width) break</span>
<span id="L27" class="LineNr"> 27 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L28" class="LineNr"> 28 </span> 7d/jump-if-greater-or-equal $emit-hex:end/disp8
<span id="L28" class="LineNr"> 28 </span> 7d/jump-if-&gt;= $emit-hex:end/disp8
<span id="L29" class="LineNr"> 29 </span> <span class="subxComment"># print-byte-buffered(out, ebx) # only BL used</span>
<span id="L30" class="LineNr"> 30 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L31" class="LineNr"> 31 </span> 53/push-ebx

View File

@ -102,7 +102,7 @@ if ('onhashchange' in window) {
<span id="L41" class="LineNr"> 41 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L42" class="LineNr"> 42 </span> <span class="subxS1Comment"># . if (eax != false)</span>
<span id="L43" class="LineNr"> 43 </span> 3d/compare-eax-and 0/imm32/false
<span id="L44" class="LineNr"> 44 </span> 74/jump-if-equal $emit:hex-int/disp8
<span id="L44" class="LineNr"> 44 </span> 74/jump-if-= $emit:hex-int/disp8
<span id="L45" class="LineNr"> 45 </span><span class="Constant">$emit:name</span>:
<span id="L46" class="LineNr"> 46 </span> <span class="subxS1Comment"># . write-slice-buffered(out, word)</span>
<span id="L47" class="LineNr"> 47 </span> <span class="subxS2Comment"># . . push args</span>

View File

@ -91,7 +91,7 @@ if ('onhashchange' in window) {
<span id="L32" class="LineNr">32 </span><span class="Constant">$zero-out:loop</span>:
<span id="L33" class="LineNr">33 </span> <span class="subxComment"># if (i &gt;= len) break</span>
<span id="L34" class="LineNr">34 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L35" class="LineNr">35 </span> 7d/jump-if-greater-or-equal $zero-out:end/disp8
<span id="L35" class="LineNr">35 </span> 7d/jump-if-&gt;= $zero-out:end/disp8
<span id="L36" class="LineNr">36 </span> <span class="subxComment"># *curr = 0</span>
<span id="L37" class="LineNr">37 </span> c6 0/subop/copy 0/mod/direct 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm8 <span class="subxComment"># copy byte to *esi</span>
<span id="L38" class="LineNr">38 </span> <span class="subxComment"># ++curr</span>

View File

@ -112,7 +112,7 @@ if ('onhashchange' in window) {
<span id="L51" class="LineNr"> 51 </span><span class="Constant">$get:search-loop</span>:
<span id="L52" class="LineNr"> 52 </span> <span class="subxComment"># if (curr &gt;= max) abort</span>
<span id="L53" class="LineNr"> 53 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L54" class="LineNr"> 54 </span> 73/jump-if-greater-or-equal-unsigned $get:abort/disp8
<span id="L54" class="LineNr"> 54 </span> 73/jump-if-addr&gt;= $get:abort/disp8
<span id="L55" class="LineNr"> 55 </span> <span class="subxComment"># if (string-equal?(key, *curr)) return curr+4</span>
<span id="L56" class="LineNr"> 56 </span> <span class="subxS1Comment"># . eax = string-equal?(key, *curr)</span>
<span id="L57" class="LineNr"> 57 </span> <span class="subxS2Comment"># . . push args</span>
@ -124,7 +124,7 @@ if ('onhashchange' in window) {
<span id="L63" class="LineNr"> 63 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L64" class="LineNr"> 64 </span> <span class="subxS1Comment"># . if (eax != false) return eax = curr+4</span>
<span id="L65" class="LineNr"> 65 </span> 3d/compare-eax-and 0/imm32/false
<span id="L66" class="LineNr"> 66 </span> 74/jump-if-equal $get:mismatch/disp8
<span id="L66" class="LineNr"> 66 </span> 74/jump-if-= $get:mismatch/disp8
<span id="L67" class="LineNr"> 67 </span> 8d/copy-address 1/mod/*+disp8 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ecx+4 to eax</span>
<span id="L68" class="LineNr"> 68 </span> eb/jump $get:end/disp8
<span id="L69" class="LineNr"> 69 </span><span class="Constant">$get:mismatch</span>:
@ -286,7 +286,7 @@ if ('onhashchange' in window) {
<span id="L225" class="LineNr"> 225 </span><span class="Constant">$get-slice:search-loop</span>:
<span id="L226" class="LineNr"> 226 </span> <span class="subxComment"># if (curr &gt;= max) abort</span>
<span id="L227" class="LineNr"> 227 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L228" class="LineNr"> 228 </span> 73/jump-if-greater-or-equal-unsigned $get-slice:abort/disp8
<span id="L228" class="LineNr"> 228 </span> 73/jump-if-addr&gt;= $get-slice:abort/disp8
<span id="L229" class="LineNr"> 229 </span> <span class="subxComment"># if (slice-equal?(key, *curr)) return curr+4</span>
<span id="L230" class="LineNr"> 230 </span> <span class="subxS1Comment"># . eax = slice-equal?(key, *curr)</span>
<span id="L231" class="LineNr"> 231 </span> <span class="subxS2Comment"># . . push args</span>
@ -298,7 +298,7 @@ if ('onhashchange' in window) {
<span id="L237" class="LineNr"> 237 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L238" class="LineNr"> 238 </span> <span class="subxS1Comment"># . if (eax != false) return eax = curr+4</span>
<span id="L239" class="LineNr"> 239 </span> 3d/compare-eax-and 0/imm32/false
<span id="L240" class="LineNr"> 240 </span> 74/jump-if-equal $get-slice:mismatch/disp8
<span id="L240" class="LineNr"> 240 </span> 74/jump-if-= $get-slice:mismatch/disp8
<span id="L241" class="LineNr"> 241 </span> 8d/copy-address 1/mod/*+disp8 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ecx+4 to eax</span>
<span id="L242" class="LineNr"> 242 </span> eb/jump $get-slice:end/disp8
<span id="L243" class="LineNr"> 243 </span><span class="Constant">$get-slice:mismatch</span>:
@ -494,7 +494,7 @@ if ('onhashchange' in window) {
<span id="L433" class="LineNr"> 433 </span><span class="Constant">$get-or-insert:search-loop</span>:
<span id="L434" class="LineNr"> 434 </span> <span class="subxComment"># if (curr &gt;= max) break</span>
<span id="L435" class="LineNr"> 435 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L436" class="LineNr"> 436 </span> 73/jump-if-greater-or-equal-unsigned $get-or-insert:not-found/disp8
<span id="L436" class="LineNr"> 436 </span> 73/jump-if-addr&gt;= $get-or-insert:not-found/disp8
<span id="L437" class="LineNr"> 437 </span> <span class="subxComment"># if (string-equal?(key, *curr)) return curr+4</span>
<span id="L438" class="LineNr"> 438 </span> <span class="subxS1Comment"># . eax = string-equal?(key, *curr)</span>
<span id="L439" class="LineNr"> 439 </span> <span class="subxS2Comment"># . . push args</span>
@ -506,7 +506,7 @@ if ('onhashchange' in window) {
<span id="L445" class="LineNr"> 445 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L446" class="LineNr"> 446 </span> <span class="subxS1Comment"># . if (eax != false) return eax = curr+4</span>
<span id="L447" class="LineNr"> 447 </span> 3d/compare-eax-and 0/imm32/false
<span id="L448" class="LineNr"> 448 </span> 74/jump-if-equal $get-or-insert:mismatch/disp8
<span id="L448" class="LineNr"> 448 </span> 74/jump-if-= $get-or-insert:mismatch/disp8
<span id="L449" class="LineNr"> 449 </span> 8d/copy-address 1/mod/*+disp8 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ecx+4 to eax</span>
<span id="L450" class="LineNr"> 450 </span> eb/jump $get-or-insert:end/disp8
<span id="L451" class="LineNr"> 451 </span><span class="Constant">$get-or-insert:mismatch</span>:
@ -520,7 +520,7 @@ if ('onhashchange' in window) {
<span id="L459" class="LineNr"> 459 </span> <span class="subxComment"># if (table-&gt;write &gt;= table-&gt;length) abort</span>
<span id="L460" class="LineNr"> 460 </span> 8b/copy 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *esi to ecx</span>
<span id="L461" class="LineNr"> 461 </span> 3b/compare 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare ecx with *(esi+8)</span>
<span id="L462" class="LineNr"> 462 </span> 73/jump-if-greater-or-equal-unsigned $get-or-insert:abort/disp8
<span id="L462" class="LineNr"> 462 </span> 73/jump-if-addr&gt;= $get-or-insert:abort/disp8
<span id="L463" class="LineNr"> 463 </span> <span class="subxComment"># zero-out(max, row-size)</span>
<span id="L464" class="LineNr"> 464 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L465" class="LineNr"> 465 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x10/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+16)</span>
@ -745,7 +745,7 @@ if ('onhashchange' in window) {
<span id="L684" class="LineNr"> 684 </span><span class="Constant">$leaky-get-or-insert-slice:search-loop</span>:
<span id="L685" class="LineNr"> 685 </span> <span class="subxComment"># if (curr &gt;= max) break</span>
<span id="L686" class="LineNr"> 686 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L687" class="LineNr"> 687 </span> 73/jump-if-greater-or-equal-unsigned $leaky-get-or-insert-slice:not-found/disp8
<span id="L687" class="LineNr"> 687 </span> 73/jump-if-addr&gt;= $leaky-get-or-insert-slice:not-found/disp8
<span id="L688" class="LineNr"> 688 </span> <span class="subxComment"># if (slice-equal?(key, *curr)) return curr+4</span>
<span id="L689" class="LineNr"> 689 </span> <span class="subxS1Comment"># . eax = slice-equal?(key, *curr)</span>
<span id="L690" class="LineNr"> 690 </span> <span class="subxS2Comment"># . . push args</span>
@ -757,7 +757,7 @@ if ('onhashchange' in window) {
<span id="L696" class="LineNr"> 696 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L697" class="LineNr"> 697 </span> <span class="subxS1Comment"># . if (eax != false) return eax = curr+4</span>
<span id="L698" class="LineNr"> 698 </span> 3d/compare-eax-and 0/imm32/false
<span id="L699" class="LineNr"> 699 </span> 74/jump-if-equal $leaky-get-or-insert-slice:mismatch/disp8
<span id="L699" class="LineNr"> 699 </span> 74/jump-if-= $leaky-get-or-insert-slice:mismatch/disp8
<span id="L700" class="LineNr"> 700 </span> 8d/copy-address 1/mod/*+disp8 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ecx+4 to eax</span>
<span id="L701" class="LineNr"> 701 </span> eb/jump $leaky-get-or-insert-slice:end/disp8
<span id="L702" class="LineNr"> 702 </span><span class="Constant">$leaky-get-or-insert-slice:mismatch</span>:
@ -771,7 +771,7 @@ if ('onhashchange' in window) {
<span id="L710" class="LineNr"> 710 </span> <span class="subxComment"># if (table-&gt;write &gt;= table-&gt;length) abort</span>
<span id="L711" class="LineNr"> 711 </span> 8b/copy 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *esi to ecx</span>
<span id="L712" class="LineNr"> 712 </span> 3b/compare 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare ecx with *(esi+8)</span>
<span id="L713" class="LineNr"> 713 </span> 7d/jump-if-greater-or-equal $leaky-get-or-insert-slice:abort/disp8
<span id="L713" class="LineNr"> 713 </span> 7d/jump-if-&gt;= $leaky-get-or-insert-slice:abort/disp8
<span id="L714" class="LineNr"> 714 </span> <span class="subxComment"># zero-out(max, row-size)</span>
<span id="L715" class="LineNr"> 715 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L716" class="LineNr"> 716 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x10/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+16)</span>
@ -1015,7 +1015,7 @@ if ('onhashchange' in window) {
<span id="L954" class="LineNr"> 954 </span><span class="Constant">$get-or-stop:search-loop</span>:
<span id="L955" class="LineNr"> 955 </span> <span class="subxComment"># if (curr &gt;= max) stop(ed)</span>
<span id="L956" class="LineNr"> 956 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L957" class="LineNr"> 957 </span> 73/jump-if-greater-or-equal-unsigned $get-or-stop:<a href='059stop.subx.html#L92'>stop</a>/disp8
<span id="L957" class="LineNr"> 957 </span> 73/jump-if-addr&gt;= $get-or-stop:<a href='059stop.subx.html#L92'>stop</a>/disp8
<span id="L958" class="LineNr"> 958 </span> <span class="subxComment"># if (string-equal?(key, *curr)) return curr+4</span>
<span id="L959" class="LineNr"> 959 </span> <span class="subxS1Comment"># . eax = string-equal?(key, *curr)</span>
<span id="L960" class="LineNr"> 960 </span> <span class="subxS2Comment"># . . push args</span>
@ -1027,7 +1027,7 @@ if ('onhashchange' in window) {
<span id="L966" class="LineNr"> 966 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L967" class="LineNr"> 967 </span> <span class="subxS1Comment"># . if (eax != false) return eax = curr+4</span>
<span id="L968" class="LineNr"> 968 </span> 3d/compare-eax-and 0/imm32/false
<span id="L969" class="LineNr"> 969 </span> 74/jump-if-equal $get-or-stop:mismatch/disp8
<span id="L969" class="LineNr"> 969 </span> 74/jump-if-= $get-or-stop:mismatch/disp8
<span id="L970" class="LineNr"> 970 </span> 8d/copy-address 1/mod/*+disp8 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ecx+4 to eax</span>
<span id="L971" class="LineNr"> 971 </span> eb/jump $get-or-stop:end/disp8
<span id="L972" class="LineNr"> 972 </span><span class="Constant">$get-or-stop:mismatch</span>:
@ -1231,7 +1231,7 @@ if ('onhashchange' in window) {
<span id="L1170" class="LineNr">1170 </span><span class="Constant">$get-slice-or-stop:search-loop</span>:
<span id="L1171" class="LineNr">1171 </span> <span class="subxComment"># if (curr &gt;= max) stop(ed)</span>
<span id="L1172" class="LineNr">1172 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L1173" class="LineNr">1173 </span> 73/jump-if-greater-or-equal-unsigned $get-slice-or-stop:<a href='059stop.subx.html#L92'>stop</a>/disp8
<span id="L1173" class="LineNr">1173 </span> 73/jump-if-addr&gt;= $get-slice-or-stop:<a href='059stop.subx.html#L92'>stop</a>/disp8
<span id="L1174" class="LineNr">1174 </span> <span class="subxComment"># if (slice-equal?(key, *curr)) return curr+4</span>
<span id="L1175" class="LineNr">1175 </span> <span class="subxS1Comment"># . eax = slice-equal?(key, *curr)</span>
<span id="L1176" class="LineNr">1176 </span> <span class="subxS2Comment"># . . push args</span>
@ -1243,7 +1243,7 @@ if ('onhashchange' in window) {
<span id="L1182" class="LineNr">1182 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L1183" class="LineNr">1183 </span> <span class="subxS1Comment"># . if (eax != false) return eax = curr+4</span>
<span id="L1184" class="LineNr">1184 </span> 3d/compare-eax-and 0/imm32/false
<span id="L1185" class="LineNr">1185 </span> 74/jump-if-equal $get-slice-or-stop:mismatch/disp8
<span id="L1185" class="LineNr">1185 </span> 74/jump-if-= $get-slice-or-stop:mismatch/disp8
<span id="L1186" class="LineNr">1186 </span> 8d/copy-address 1/mod/*+disp8 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ecx+4 to eax</span>
<span id="L1187" class="LineNr">1187 </span> eb/jump $get-slice-or-stop:end/disp8
<span id="L1188" class="LineNr">1188 </span><span class="Constant">$get-slice-or-stop:mismatch</span>:
@ -1467,7 +1467,7 @@ if ('onhashchange' in window) {
<span id="L1406" class="LineNr">1406 </span><span class="Constant">$maybe-get:search-loop</span>:
<span id="L1407" class="LineNr">1407 </span> <span class="subxComment"># if (curr &gt;= max) return null</span>
<span id="L1408" class="LineNr">1408 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L1409" class="LineNr">1409 </span> 73/jump-if-greater-or-equal-unsigned $maybe-get:null/disp8
<span id="L1409" class="LineNr">1409 </span> 73/jump-if-addr&gt;= $maybe-get:null/disp8
<span id="L1410" class="LineNr">1410 </span> <span class="subxComment"># if (string-equal?(key, *curr)) return curr+4</span>
<span id="L1411" class="LineNr">1411 </span> <span class="subxS1Comment"># . eax = string-equal?(key, *curr)</span>
<span id="L1412" class="LineNr">1412 </span> <span class="subxS2Comment"># . . push args</span>
@ -1479,7 +1479,7 @@ if ('onhashchange' in window) {
<span id="L1418" class="LineNr">1418 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L1419" class="LineNr">1419 </span> <span class="subxS1Comment"># . if (eax != false) return eax = curr+4</span>
<span id="L1420" class="LineNr">1420 </span> 3d/compare-eax-and 0/imm32/false
<span id="L1421" class="LineNr">1421 </span> 74/jump-if-equal $maybe-get:mismatch/disp8
<span id="L1421" class="LineNr">1421 </span> 74/jump-if-= $maybe-get:mismatch/disp8
<span id="L1422" class="LineNr">1422 </span> 8d/copy-address 1/mod/*+disp8 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ecx+4 to eax</span>
<span id="L1423" class="LineNr">1423 </span> eb/jump $maybe-get:end/disp8
<span id="L1424" class="LineNr">1424 </span><span class="Constant">$maybe-get:mismatch</span>:
@ -1614,7 +1614,7 @@ if ('onhashchange' in window) {
<span id="L1553" class="LineNr">1553 </span><span class="Constant">$maybe-get-slice:search-loop</span>:
<span id="L1554" class="LineNr">1554 </span> <span class="subxComment"># if (curr &gt;= max) return null</span>
<span id="L1555" class="LineNr">1555 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L1556" class="LineNr">1556 </span> 73/jump-if-greater-or-equal-unsigned $maybe-get-slice:null/disp8
<span id="L1556" class="LineNr">1556 </span> 73/jump-if-addr&gt;= $maybe-get-slice:null/disp8
<span id="L1557" class="LineNr">1557 </span> <span class="subxComment"># if (slice-equal?(key, *curr)) return curr+4</span>
<span id="L1558" class="LineNr">1558 </span> <span class="subxS1Comment"># . eax = slice-equal?(key, *curr)</span>
<span id="L1559" class="LineNr">1559 </span> <span class="subxS2Comment"># . . push args</span>
@ -1626,7 +1626,7 @@ if ('onhashchange' in window) {
<span id="L1565" class="LineNr">1565 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L1566" class="LineNr">1566 </span> <span class="subxS1Comment"># . if (eax != false) return eax = curr+4</span>
<span id="L1567" class="LineNr">1567 </span> 3d/compare-eax-and 0/imm32/false
<span id="L1568" class="LineNr">1568 </span> 74/jump-if-equal $maybe-get-slice:mismatch/disp8
<span id="L1568" class="LineNr">1568 </span> 74/jump-if-= $maybe-get-slice:mismatch/disp8
<span id="L1569" class="LineNr">1569 </span> 8d/copy-address 1/mod/*+disp8 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ecx+4 to eax</span>
<span id="L1570" class="LineNr">1570 </span> eb/jump $maybe-get-slice:end/disp8
<span id="L1571" class="LineNr">1571 </span><span class="Constant">$maybe-get-slice:mismatch</span>:

View File

@ -94,10 +94,10 @@ if ('onhashchange' in window) {
<span id="L35" class="LineNr"> 35 </span><span class="Constant">$slurp:loop</span>:
<span id="L36" class="LineNr"> 36 </span> <span class="subxComment"># if (s-&gt;write &gt;= s-&gt;length) abort</span>
<span id="L37" class="LineNr"> 37 </span> 3b/compare 1/mod/*+disp8 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare edx with *(edi+8)</span>
<span id="L38" class="LineNr"> 38 </span> 7d/jump-if-greater-or-equal $slurp:abort/disp8
<span id="L38" class="LineNr"> 38 </span> 7d/jump-if-&gt;= $slurp:abort/disp8
<span id="L39" class="LineNr"> 39 </span> <span class="subxComment"># if (f-&gt;read &gt;= f-&gt;write) populate stream from file</span>
<span id="L40" class="LineNr"> 40 </span> 3b/compare 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare ecx with *(esi+4)</span>
<span id="L41" class="LineNr"> 41 </span> 7c/jump-if-lesser $slurp:from-stream/disp8
<span id="L41" class="LineNr"> 41 </span> 7c/jump-if-&lt; $slurp:from-stream/disp8
<span id="L42" class="LineNr"> 42 </span> <span class="subxS1Comment"># . clear-stream(stream = f+4)</span>
<span id="L43" class="LineNr"> 43 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L44" class="LineNr"> 44 </span> 8d/copy-address 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy esi+4 to eax</span>
@ -120,7 +120,7 @@ if ('onhashchange' in window) {
<span id="L61" class="LineNr"> 61 </span> <span class="subxComment"># since f-&gt;read was initially 0, eax is the same as f-&gt;write</span>
<span id="L62" class="LineNr"> 62 </span> <span class="subxS1Comment"># . if (eax == 0) return true</span>
<span id="L63" class="LineNr"> 63 </span> 3d/compare-eax-and 0/imm32
<span id="L64" class="LineNr"> 64 </span> 74/jump-if-equal $slurp:end/disp8
<span id="L64" class="LineNr"> 64 </span> 74/jump-if-= $slurp:end/disp8
<span id="L65" class="LineNr"> 65 </span><span class="Constant">$slurp:from-stream</span>:
<span id="L66" class="LineNr"> 66 </span> <span class="subxComment"># var c/eax : byte = f-&gt;data[f-&gt;read]</span>
<span id="L67" class="LineNr"> 67 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span>

View File

@ -121,7 +121,7 @@ if ('onhashchange' in window) {
<span id="L62" class="LineNr"> 62 </span> <span class="subxS1Comment"># . if (eax != false) return 4</span>
<span id="L63" class="LineNr"> 63 </span> 3d/compare-eax-and 0/imm32/false
<span id="L64" class="LineNr"> 64 </span> b8/copy-to-eax 4/imm32 <span class="subxComment"># ZF is set, so we can overwrite eax now</span>
<span id="L65" class="LineNr"> 65 </span> 75/jump-if-not-equal $compute-width-of-slice:end/disp8
<span id="L65" class="LineNr"> 65 </span> 75/jump-if-!= $compute-width-of-slice:end/disp8
<span id="L66" class="LineNr"> 66 </span> <span class="subxComment"># if (has-metadata?(word, &quot;disp32&quot;)) return 4</span>
<span id="L67" class="LineNr"> 67 </span> <span class="subxS1Comment"># . eax = has-metadata?(word, &quot;disp32&quot;)</span>
<span id="L68" class="LineNr"> 68 </span> <span class="subxS2Comment"># . . push args</span>
@ -134,7 +134,7 @@ if ('onhashchange' in window) {
<span id="L75" class="LineNr"> 75 </span> <span class="subxS1Comment"># . if (eax != false) return 4</span>
<span id="L76" class="LineNr"> 76 </span> 3d/compare-eax-and 0/imm32/false
<span id="L77" class="LineNr"> 77 </span> b8/copy-to-eax 4/imm32 <span class="subxComment"># ZF is set, so we can overwrite eax now</span>
<span id="L78" class="LineNr"> 78 </span> 75/jump-if-not-equal $compute-width-of-slice:end/disp8
<span id="L78" class="LineNr"> 78 </span> 75/jump-if-!= $compute-width-of-slice:end/disp8
<span id="L79" class="LineNr"> 79 </span> <span class="subxComment"># if (has-metadata?(word, &quot;imm16&quot;)) return 2</span>
<span id="L80" class="LineNr"> 80 </span> <span class="subxS1Comment"># . eax = has-metadata?(word, &quot;imm16&quot;)</span>
<span id="L81" class="LineNr"> 81 </span> <span class="subxS2Comment"># . . push args</span>
@ -147,7 +147,7 @@ if ('onhashchange' in window) {
<span id="L88" class="LineNr"> 88 </span> <span class="subxS1Comment"># . if (eax != false) return 2</span>
<span id="L89" class="LineNr"> 89 </span> 3d/compare-eax-and 0/imm32/false
<span id="L90" class="LineNr"> 90 </span> b8/copy-to-eax 2/imm32 <span class="subxComment"># ZF is set, so we can overwrite eax now</span>
<span id="L91" class="LineNr"> 91 </span> 75/jump-if-not-equal $compute-width-of-slice:end/disp8
<span id="L91" class="LineNr"> 91 </span> 75/jump-if-!= $compute-width-of-slice:end/disp8
<span id="L92" class="LineNr"> 92 </span> <span class="subxComment"># if (has-metadata?(word, &quot;disp16&quot;)) return 2</span>
<span id="L93" class="LineNr"> 93 </span> <span class="subxS1Comment"># . eax = has-metadata?(word, &quot;disp16&quot;)</span>
<span id="L94" class="LineNr"> 94 </span> <span class="subxS2Comment"># . . push args</span>
@ -160,7 +160,7 @@ if ('onhashchange' in window) {
<span id="L101" class="LineNr">101 </span> <span class="subxS1Comment"># . if (eax != false) return 2</span>
<span id="L102" class="LineNr">102 </span> 3d/compare-eax-and 0/imm32/false
<span id="L103" class="LineNr">103 </span> b8/copy-to-eax 2/imm32 <span class="subxComment"># ZF is set, so we can overwrite eax now</span>
<span id="L104" class="LineNr">104 </span> 75/jump-if-not-equal $compute-width-of-slice:end/disp8
<span id="L104" class="LineNr">104 </span> 75/jump-if-!= $compute-width-of-slice:end/disp8
<span id="L105" class="LineNr">105 </span> <span class="subxComment"># otherwise return 1</span>
<span id="L106" class="LineNr">106 </span> b8/copy-to-eax 1/imm32
<span id="L107" class="LineNr">107 </span><span class="Constant">$compute-width-of-slice:end</span>:

View File

@ -87,7 +87,7 @@ if ('onhashchange' in window) {
<span id="L27" class="LineNr"> 27 </span><span class="Constant">$emit-hex-array:loop</span>:
<span id="L28" class="LineNr"> 28 </span> <span class="subxComment"># if (curr &gt;= width) break</span>
<span id="L29" class="LineNr"> 29 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L30" class="LineNr"> 30 </span> 73/jump-if-greater-or-equal-unsigned $emit-hex-array:end/disp8
<span id="L30" class="LineNr"> 30 </span> 73/jump-if-addr&gt;= $emit-hex-array:end/disp8
<span id="L31" class="LineNr"> 31 </span> <span class="subxComment"># emit-hex(out, c = *curr, width=1)</span>
<span id="L32" class="LineNr"> 32 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L33" class="LineNr"> 33 </span> 68/push 1/imm32/width

View File

@ -91,7 +91,7 @@ if ('onhashchange' in window) {
<span id="L32" class="LineNr"> 32 </span> 8b/copy 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(esi+4) to eax</span>
<span id="L33" class="LineNr"> 33 </span> <span class="subxS1Comment"># . if (eax &lt; line-&gt;write) goto next check</span>
<span id="L34" class="LineNr"> 34 </span> 3b/compare 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax with *esi</span>
<span id="L35" class="LineNr"> 35 </span> 7c/jump-if-lesser $next-word-or-string:check-for-comment/disp8
<span id="L35" class="LineNr"> 35 </span> 7c/jump-if-&lt; $next-word-or-string:check-for-comment/disp8
<span id="L36" class="LineNr"> 36 </span> <span class="subxS1Comment"># . return out</span>
<span id="L37" class="LineNr"> 37 </span> c7 0/subop/copy 0/mod/direct 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># copy to *edi</span>
<span id="L38" class="LineNr"> 38 </span> c7 0/subop/copy 1/mod/*+disp8 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/disp8 0/imm32 <span class="subxComment"># copy to *(edi+4)</span>
@ -107,7 +107,7 @@ if ('onhashchange' in window) {
<span id="L48" class="LineNr"> 48 </span> 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx <span class="Normal"> . </span> 0/r32/AL 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy byte at *(esi+ecx+12) to AL</span>
<span id="L49" class="LineNr"> 49 </span> <span class="subxS1Comment"># . compare</span>
<span id="L50" class="LineNr"> 50 </span> 3d/compare-eax-and 0x23/imm32/pound
<span id="L51" class="LineNr"> 51 </span> 75/jump-if-not-equal $next-word-or-string:check-for-string-literal/disp8
<span id="L51" class="LineNr"> 51 </span> 75/jump-if-!= $next-word-or-string:check-for-string-literal/disp8
<span id="L52" class="LineNr"> 52 </span><span class="Constant">$next-word-or-string:comment</span>:
<span id="L53" class="LineNr"> 53 </span> <span class="subxComment"># out-&gt;end = &amp;line-&gt;data[line-&gt;write]</span>
<span id="L54" class="LineNr"> 54 </span> 8b/copy 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *esi to eax</span>
@ -125,7 +125,7 @@ if ('onhashchange' in window) {
<span id="L66" class="LineNr"> 66 </span> 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx <span class="Normal"> . </span> 0/r32/AL 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy byte at *(esi+ecx+12) to AL</span>
<span id="L67" class="LineNr"> 67 </span> <span class="subxS1Comment"># . compare</span>
<span id="L68" class="LineNr"> 68 </span> 3d/compare-eax-and 0x22/imm32/dquote
<span id="L69" class="LineNr"> 69 </span> 75/jump-if-not-equal $next-word-or-string:regular-word/disp8
<span id="L69" class="LineNr"> 69 </span> 75/jump-if-!= $next-word-or-string:regular-word/disp8
<span id="L70" class="LineNr"> 70 </span><span class="Constant">$next-word-or-string:string-literal</span>:
<span id="L71" class="LineNr"> 71 </span> <span class="subxComment"># skip-string(line)</span>
<span id="L72" class="LineNr"> 72 </span> <span class="subxS2Comment"># . . push args</span>

View File

@ -79,7 +79,7 @@ if ('onhashchange' in window) {
<span id="L19" class="LineNr"> 19 </span> 8b/copy 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *edi to ecx</span>
<span id="L20" class="LineNr"> 20 </span> <span class="subxComment"># if (out-&gt;write &gt;= out-&gt;length) abort</span>
<span id="L21" class="LineNr"> 21 </span> 3b/compare 1/mod/*+disp8 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare ecx with *(edi+8)</span>
<span id="L22" class="LineNr"> 22 </span> 7d/jump-if-greater-or-equal $write-int:abort/disp8
<span id="L22" class="LineNr"> 22 </span> 7d/jump-if-&gt;= $write-int:abort/disp8
<span id="L23" class="LineNr"> 23 </span><span class="Constant">$write-int:to-stream</span>:
<span id="L24" class="LineNr"> 24 </span> <span class="subxComment"># out-&gt;data[out-&gt;write] = n</span>
<span id="L25" class="LineNr"> 25 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to eax</span>

View File

@ -86,7 +86,7 @@ if ('onhashchange' in window) {
<span id="L26" class="LineNr"> 26 </span><span class="Constant">$clear-stack:loop</span>:
<span id="L27" class="LineNr"> 27 </span> <span class="subxComment"># if (curr &gt;= max) break</span>
<span id="L28" class="LineNr"> 28 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax with ecx</span>
<span id="L29" class="LineNr"> 29 </span> 73/jump-if-greater-or-equal-unsigned $clear-stack:end/disp8
<span id="L29" class="LineNr"> 29 </span> 73/jump-if-addr&gt;= $clear-stack:end/disp8
<span id="L30" class="LineNr"> 30 </span> <span class="subxComment"># *curr = 0</span>
<span id="L31" class="LineNr"> 31 </span> c6 0/subop/copy 0/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm8 <span class="subxComment"># copy byte to *eax</span>
<span id="L32" class="LineNr"> 32 </span> <span class="subxComment"># ++curr</span>
@ -181,7 +181,7 @@ if ('onhashchange' in window) {
<span id="L121" class="LineNr">121 </span> 8b/copy 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *esi to ecx</span>
<span id="L122" class="LineNr">122 </span> <span class="subxComment"># if (s-&gt;top &gt;= s-&gt;length) abort</span>
<span id="L123" class="LineNr">123 </span> 39/compare 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># compare *(esi+4) and ecx</span>
<span id="L124" class="LineNr">124 </span> 7e/jump-if-lesser-or-equal $push:abort/disp8
<span id="L124" class="LineNr">124 </span> 7e/jump-if-&lt;= $push:abort/disp8
<span id="L125" class="LineNr">125 </span> <span class="subxComment"># s-&gt;data[s-&gt;top] = n</span>
<span id="L126" class="LineNr">126 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to eax</span>
<span id="L127" class="LineNr">127 </span> 89/copy 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx <span class="Normal"> . </span> 0/r32/eax 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy eax to *(esi+ecx+8)</span>
@ -298,7 +298,7 @@ if ('onhashchange' in window) {
<span id="L238" class="LineNr">238 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+8) to esi</span>
<span id="L239" class="LineNr">239 </span> <span class="subxComment"># if (s-&gt;top &lt;= 0) abort</span>
<span id="L240" class="LineNr">240 </span> 81 7/subop/compare 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare *esi</span>
<span id="L241" class="LineNr">241 </span> 7e/jump-if-lesser-or-equal $pop:abort/disp8
<span id="L241" class="LineNr">241 </span> 7e/jump-if-&lt;= $pop:abort/disp8
<span id="L242" class="LineNr">242 </span> <span class="subxComment"># s-&gt;top -= 4</span>
<span id="L243" class="LineNr">243 </span> 81 5/subop/subtract 0/mod/direct 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># subtract from *esi</span>
<span id="L244" class="LineNr">244 </span> <span class="subxComment"># eax = s-&gt;data[s-&gt;top]</span>
@ -402,7 +402,7 @@ if ('onhashchange' in window) {
<span id="L342" class="LineNr">342 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+8) to esi</span>
<span id="L343" class="LineNr">343 </span> <span class="subxComment"># if (s-&gt;top &lt;= 0) abort</span>
<span id="L344" class="LineNr">344 </span> 81 7/subop/compare 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare *esi</span>
<span id="L345" class="LineNr">345 </span> 7e/jump-if-lesser-or-equal $top:abort/disp8
<span id="L345" class="LineNr">345 </span> 7e/jump-if-&lt;= $top:abort/disp8
<span id="L346" class="LineNr">346 </span> <span class="subxComment"># n = s-&gt;data[s-&gt;top - 4]</span>
<span id="L347" class="LineNr">347 </span> 8b/copy 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *esi to ecx</span>
<span id="L348" class="LineNr">348 </span> 81 5/subop/subtract 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># subtract from ecx</span>

View File

@ -102,7 +102,7 @@ if ('onhashchange' in window) {
<span id="L42" class="LineNr"> 42 </span><span class="Constant">$array-equal?:lengths</span>:
<span id="L43" class="LineNr"> 43 </span> <span class="subxComment"># if (lena != b-&gt;length) return false</span>
<span id="L44" class="LineNr"> 44 </span> 39/compare *edi 2/r32/edx
<span id="L45" class="LineNr"> 45 </span> 75/jump-if-not-equal $array-equal?:false/disp8
<span id="L45" class="LineNr"> 45 </span> 75/jump-if-!= $array-equal?:false/disp8
<span id="L46" class="LineNr"> 46 </span> <span class="subxComment"># var curra/esi : (addr byte) = a-&gt;data</span>
<span id="L47" class="LineNr"> 47 </span> 81 0/subop/add %esi 4/imm32
<span id="L48" class="LineNr"> 48 </span> <span class="subxComment"># var currb/edi : (addr byte) = b-&gt;data</span>
@ -114,14 +114,14 @@ if ('onhashchange' in window) {
<span id="L54" class="LineNr"> 54 </span><span class="Constant">$array-equal?:loop</span>:
<span id="L55" class="LineNr"> 55 </span> <span class="subxComment"># if (i &gt;= lena) return true</span>
<span id="L56" class="LineNr"> 56 </span> 39/compare %ecx 2/r32/edx
<span id="L57" class="LineNr"> 57 </span> 7d/jump-if-greater-or-equal $array-equal?:true/disp8
<span id="L57" class="LineNr"> 57 </span> 7d/jump-if-&gt;= $array-equal?:true/disp8
<span id="L58" class="LineNr"> 58 </span> <span class="subxComment"># var vala/eax : int = *curra</span>
<span id="L59" class="LineNr"> 59 </span> 8b/-&gt; *esi 0/r32/eax
<span id="L60" class="LineNr"> 60 </span> <span class="subxComment"># var valb/ebx : int = *currb</span>
<span id="L61" class="LineNr"> 61 </span> 8b/-&gt; *edi 3/r32/ebx
<span id="L62" class="LineNr"> 62 </span> <span class="subxComment"># if (vala != valb) return false</span>
<span id="L63" class="LineNr"> 63 </span> 39/compare %eax 3/r32/ebx
<span id="L64" class="LineNr"> 64 </span> 75/jump-if-not-equal $array-equal?:false/disp8
<span id="L64" class="LineNr"> 64 </span> 75/jump-if-!= $array-equal?:false/disp8
<span id="L65" class="LineNr"> 65 </span> <span class="subxComment"># i += 4</span>
<span id="L66" class="LineNr"> 66 </span> 81 0/subop/add %ecx 4/imm32
<span id="L67" class="LineNr"> 67 </span> <span class="subxComment"># currs += 4</span>
@ -335,7 +335,7 @@ if ('onhashchange' in window) {
<span id="L275" class="LineNr">275 </span><span class="Constant">$parse-array-of-ints:loop1</span>:
<span id="L276" class="LineNr">276 </span> <span class="subxComment"># if (curr &gt;= end) break</span>
<span id="L277" class="LineNr">277 </span> 39/compare %ecx 2/r32/edx
<span id="L278" class="LineNr">278 </span> 73/jump-if-greater-or-equal-unsigned $parse-array-of-ints:break1/disp8
<span id="L278" class="LineNr">278 </span> 73/jump-if-addr&gt;= $parse-array-of-ints:break1/disp8
<span id="L279" class="LineNr">279 </span> <span class="subxComment"># curr = skip-chars-matching-in-slice(curr, end, ' ')</span>
<span id="L280" class="LineNr">280 </span> <span class="subxS1Comment"># . eax = skip-chars-matching-in-slice(curr, end, ' ')</span>
<span id="L281" class="LineNr">281 </span> <span class="subxS2Comment"># . . push args</span>
@ -350,7 +350,7 @@ if ('onhashchange' in window) {
<span id="L290" class="LineNr">290 </span> 89/&lt;- %ecx 0/r32/eax
<span id="L291" class="LineNr">291 </span> <span class="subxComment"># if (curr &gt;= end) break</span>
<span id="L292" class="LineNr">292 </span> 39/compare %ecx 2/r32/edx
<span id="L293" class="LineNr">293 </span> 73/jump-if-greater-or-equal-unsigned $parse-array-of-ints:break1/disp8
<span id="L293" class="LineNr">293 </span> 73/jump-if-addr&gt;= $parse-array-of-ints:break1/disp8
<span id="L294" class="LineNr">294 </span> <span class="subxComment"># curr = skip-chars-not-matching-in-slice(curr, end, ' ')</span>
<span id="L295" class="LineNr">295 </span> <span class="subxS1Comment"># . eax = skip-chars-not-matching-in-slice(curr, end, ' ')</span>
<span id="L296" class="LineNr">296 </span> <span class="subxS2Comment"># . . push args</span>
@ -393,7 +393,7 @@ if ('onhashchange' in window) {
<span id="L333" class="LineNr">333 </span><span class="Constant">$parse-array-of-ints:loop2</span>:
<span id="L334" class="LineNr">334 </span> <span class="subxComment"># if (slice-&gt;start &gt;= end) break</span>
<span id="L335" class="LineNr">335 </span> 39/compare *ecx 2/r32/edx
<span id="L336" class="LineNr">336 </span> 73/jump-if-greater-or-equal-unsigned $parse-array-of-ints:end/disp8
<span id="L336" class="LineNr">336 </span> 73/jump-if-addr&gt;= $parse-array-of-ints:end/disp8
<span id="L337" class="LineNr">337 </span> <span class="subxComment"># slice-&gt;start = skip-chars-matching-in-slice(slice-&gt;start, end, ' ')</span>
<span id="L338" class="LineNr">338 </span> <span class="subxS1Comment"># . eax = skip-chars-matching-in-slice(slice-&gt;start, end, ' ')</span>
<span id="L339" class="LineNr">339 </span> <span class="subxS2Comment"># . . push args</span>
@ -408,7 +408,7 @@ if ('onhashchange' in window) {
<span id="L348" class="LineNr">348 </span> 89/&lt;- *ecx 0/r32/eax
<span id="L349" class="LineNr">349 </span> <span class="subxComment"># if (slice-&gt;start &gt;= end) break</span>
<span id="L350" class="LineNr">350 </span> 39/compare *ecx 2/r32/edx
<span id="L351" class="LineNr">351 </span> 73/jump-if-greater-or-equal-unsigned $parse-array-of-ints:end/disp8
<span id="L351" class="LineNr">351 </span> 73/jump-if-addr&gt;= $parse-array-of-ints:end/disp8
<span id="L352" class="LineNr">352 </span> <span class="subxComment"># slice-&gt;end = skip-chars-not-matching-in-slice(slice-&gt;start, end, ' ')</span>
<span id="L353" class="LineNr">353 </span> <span class="subxS1Comment"># . eax = skip-chars-not-matching-in-slice(curr, end, ' ')</span>
<span id="L354" class="LineNr">354 </span> <span class="subxS2Comment"># . . push args</span>

View File

@ -102,7 +102,7 @@ if ('onhashchange' in window) {
<span id="L40" class="LineNr"> 40 </span> <span class="subxH1Comment"># - if argc &gt; 1 and argv[1] == &quot;test&quot;, then return run_tests()</span>
<span id="L41" class="LineNr"> 41 </span> <span class="subxComment"># if (argc &lt;= 1) goto interactive</span>
<span id="L42" class="LineNr"> 42 </span> 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/disp8 1/imm32 <span class="subxComment"># compare *ebp</span>
<span id="L43" class="LineNr"> 43 </span> 7e/jump-if-lesser-or-equal $subx-assort-main:interactive/disp8
<span id="L43" class="LineNr"> 43 </span> 7e/jump-if-&lt;= $subx-assort-main:interactive/disp8
<span id="L44" class="LineNr"> 44 </span> <span class="subxComment"># if (!kernel-string-equal?(argv[1], &quot;test&quot;)) goto interactive</span>
<span id="L45" class="LineNr"> 45 </span> <span class="subxS1Comment"># . eax = kernel-string-equal?(argv[1], &quot;test&quot;)</span>
<span id="L46" class="LineNr"> 46 </span> <span class="subxS2Comment"># . . push args</span>
@ -114,7 +114,7 @@ if ('onhashchange' in window) {
<span id="L52" class="LineNr"> 52 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L53" class="LineNr"> 53 </span> <span class="subxS1Comment"># . if (eax == false) goto interactive</span>
<span id="L54" class="LineNr"> 54 </span> 3d/compare-eax-and 0/imm32/false
<span id="L55" class="LineNr"> 55 </span> 74/jump-if-equal $subx-assort-main:interactive/disp8
<span id="L55" class="LineNr"> 55 </span> 74/jump-if-= $subx-assort-main:interactive/disp8
<span id="L56" class="LineNr"> 56 </span> <span class="subxComment"># run-tests()</span>
<span id="L57" class="LineNr"> 57 </span> e8/call run-tests/disp32
<span id="L58" class="LineNr"> 58 </span> <span class="subxComment"># syscall(exit, *Num-test-failures)</span>
@ -539,7 +539,7 @@ if ('onhashchange' in window) {
<span id="L525" class="LineNr">525 </span><span class="Constant">$read-segments:check0</span>:
<span id="L526" class="LineNr">526 </span> <span class="subxComment"># if (line-&gt;write == 0) break</span>
<span id="L527" class="LineNr">527 </span> 81 7/subop/compare 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare *ecx</span>
<span id="L528" class="LineNr">528 </span> 0f 84/jump-if-equal $read-segments:<span class="Constant">break</span>/disp32
<span id="L528" class="LineNr">528 </span> 0f 84/jump-if-= $read-segments:<span class="Constant">break</span>/disp32
<span id="L529" class="Folded">529 </span><span class="Folded">+-- 33 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------</span>
<span id="L562" class="LineNr">562 </span> <span class="subxComment"># next-word-or-string(line, word-slice)</span>
<span id="L563" class="LineNr">563 </span> <span class="subxS2Comment"># . . push args</span>
@ -561,7 +561,7 @@ if ('onhashchange' in window) {
<span id="L587" class="LineNr">587 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L588" class="LineNr">588 </span> <span class="subxS1Comment"># . if (eax != false) continue</span>
<span id="L589" class="LineNr">589 </span> 3d/compare-eax-and 0/imm32/false
<span id="L590" class="LineNr">590 </span> 0f 85/jump-if-not-equal $read-segments:<span class="Constant">loop</span>/disp32
<span id="L590" class="LineNr">590 </span> 0f 85/jump-if-!= $read-segments:<span class="Constant">loop</span>/disp32
<span id="L591" class="LineNr">591 </span><span class="Constant">$read-segments:check-for-comment</span>:
<span id="L592" class="Folded">592 </span><span class="Folded">+-- 9 lines: #? # print(&quot;check for comment\n&quot;) ----------------------------------------------------------------------------------------------------------</span>
<span id="L601" class="LineNr">601 </span> <span class="subxComment"># if (slice-starts-with?(word-slice, &quot;#&quot;)) continue</span>
@ -572,7 +572,7 @@ if ('onhashchange' in window) {
<span id="L606" class="LineNr">606 </span> 8a/copy-byte 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *esi to AL</span>
<span id="L607" class="LineNr">607 </span> <span class="subxS1Comment"># . if (c == '#') continue</span>
<span id="L608" class="LineNr">608 </span> 3d/compare-eax-and 0x23/imm32/hash
<span id="L609" class="LineNr">609 </span> 0f 84/jump-if-equal $read-segments:<span class="Constant">loop</span>/disp32
<span id="L609" class="LineNr">609 </span> 0f 84/jump-if-= $read-segments:<span class="Constant">loop</span>/disp32
<span id="L610" class="LineNr">610 </span><span class="Constant">$read-segments:check-for-segment-header</span>:
<span id="L611" class="Folded">611 </span><span class="Folded">+-- 9 lines: #? # print(&quot;check for segment header\n&quot;) ---------------------------------------------------------------------------------------------------</span>
<span id="L620" class="Folded">620 </span><span class="Folded">+-- 40 lines: #? # dump word-slice -----------------------------------------------------------------------------------------------------------------------</span>
@ -587,7 +587,7 @@ if ('onhashchange' in window) {
<span id="L668" class="LineNr">668 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L669" class="LineNr">669 </span> <span class="subxS1Comment"># . if (eax == false) goto check3</span>
<span id="L670" class="LineNr">670 </span> 3d/compare-eax-and 0/imm32/false
<span id="L671" class="LineNr">671 </span> 0f 84/jump-if-equal $read-segments:regular-line/disp32
<span id="L671" class="LineNr">671 </span> 0f 84/jump-if-= $read-segments:regular-line/disp32
<span id="L672" class="LineNr">672 </span> <span class="subxComment"># segment-name = next-word-or-string(line)</span>
<span id="L673" class="LineNr">673 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L674" class="LineNr">674 </span> 52/push-edx
@ -610,7 +610,7 @@ if ('onhashchange' in window) {
<span id="L730" class="LineNr">730 </span> 8b/copy 0/mod/indirect 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *eax to ebx</span>
<span id="L731" class="LineNr">731 </span> <span class="subxComment"># if (curr-segment != 0) continue</span>
<span id="L732" class="LineNr">732 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare ebx</span>
<span id="L733" class="LineNr">733 </span> 0f 85/jump-if-not-equal $read-segments:<span class="Constant">loop</span>/disp32
<span id="L733" class="LineNr">733 </span> 0f 85/jump-if-!= $read-segments:<span class="Constant">loop</span>/disp32
<span id="L734" class="LineNr">734 </span> <span class="subxComment"># curr-segment = new-stream(Heap, Segment-size, 1)</span>
<span id="L735" class="LineNr">735 </span> <span class="subxS1Comment"># . save segment-slot</span>
<span id="L736" class="LineNr">736 </span> 50/push-eax
@ -695,7 +695,7 @@ if ('onhashchange' in window) {
<span id="L871" class="LineNr">871 </span><span class="Constant">$write-segments:loop</span>:
<span id="L872" class="LineNr">872 </span> <span class="subxComment"># if (curr &gt;= max) break</span>
<span id="L873" class="LineNr">873 </span> 39/compare 3/mod/direct 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare esi with edx</span>
<span id="L874" class="LineNr">874 </span> 73/jump-if-greater-or-equal-unsigned $write-segments:<span class="Constant">break</span>/disp8
<span id="L874" class="LineNr">874 </span> 73/jump-if-addr&gt;= $write-segments:<span class="Constant">break</span>/disp8
<span id="L875" class="LineNr">875 </span> <span class="subxComment"># var stream/eax : (addr stream byte) = table[i].stream</span>
<span id="L876" class="LineNr">876 </span> 8b/copy 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(esi+4) to eax</span>
<span id="L877" class="LineNr">877 </span> <span class="subxComment"># write-stream-data(out, stream)</span>

View File

@ -116,11 +116,11 @@ if ('onhashchange' in window) {
<span id="L57" class="LineNr"> 57 </span> (<a href='../053new-segment.subx.html#L41'>new-segment</a> *<span class="SpecialChar"><a href='../069allocate.subx.html#L29'>Heap-size</a></span> <span class="SpecialChar"><a href='../069allocate.subx.html#L22'>Heap</a></span>)
<span id="L58" class="LineNr"> 58 </span> <span class="subxComment"># if (argc &lt;= 1) goto interactive</span>
<span id="L59" class="LineNr"> 59 </span> 81 7/subop/compare *ebp 1/imm32
<span id="L60" class="LineNr"> 60 </span> 7e/jump-if-lesser-or-equal $subx-braces-main:interactive/disp8
<span id="L60" class="LineNr"> 60 </span> 7e/jump-if-&lt;= $subx-braces-main:interactive/disp8
<span id="L61" class="LineNr"> 61 </span> <span class="subxComment"># if (argv[1] != &quot;test&quot;)) goto interactive</span>
<span id="L62" class="LineNr"> 62 </span> (<a href='../052kernel-string-equal.subx.html#L33'>kernel-string-equal?</a> *(ebp+8) <span class="Constant">&quot;test&quot;</span>) <span class="subxComment"># =&gt; eax</span>
<span id="L63" class="LineNr"> 63 </span> 3d/compare-eax-and 0/imm32
<span id="L64" class="LineNr"> 64 </span> 74/jump-if-equal $subx-braces-main:interactive/disp8
<span id="L64" class="LineNr"> 64 </span> 74/jump-if-= $subx-braces-main:interactive/disp8
<span id="L65" class="LineNr"> 65 </span> <span class="subxComment">#</span>
<span id="L66" class="LineNr"> 66 </span> (run-tests)
<span id="L67" class="LineNr"> 67 </span> <span class="subxComment"># syscall(exit, *Num-test-failures)</span>
@ -205,7 +205,7 @@ if ('onhashchange' in window) {
<span id="L146" class="LineNr">146 </span><span class="Constant">$subx-braces:check0</span>:
<span id="L147" class="LineNr">147 </span> <span class="subxComment"># if (line-&gt;write == 0) break</span>
<span id="L148" class="LineNr">148 </span> 81 7/subop/compare *ecx 0/imm32
<span id="L149" class="LineNr">149 </span> 0f 84/jump-if-equal $subx-braces:<span class="Constant">break</span>/disp32
<span id="L149" class="LineNr">149 </span> 0f 84/jump-if-= $subx-braces:<span class="Constant">break</span>/disp32
<span id="L150" class="LineNr">150 </span> (<a href='../073next-token.subx.html#L464'>skip-chars-matching-whitespace</a> %ecx)
<span id="L151" class="LineNr">151 </span><span class="Constant">$subx-braces:check-for-curly-open</span>:
<span id="L152" class="LineNr">152 </span> <span class="subxComment"># if (line-&gt;data[line-&gt;read] != '{') goto next check</span>
@ -215,7 +215,7 @@ if ('onhashchange' in window) {
<span id="L156" class="LineNr">156 </span> 81 4/subop/and %eax 0xff/imm32
<span id="L157" class="LineNr">157 </span> <span class="subxS1Comment"># . if (eax != '{') continue</span>
<span id="L158" class="LineNr">158 </span> 3d/compare-eax-and 0x7b/imm32/open-curly
<span id="L159" class="LineNr">159 </span> 0f 85/jump-if-not-equal $subx-braces:check-for-curly-closed/disp32
<span id="L159" class="LineNr">159 </span> 0f 85/jump-if-!= $subx-braces:check-for-curly-closed/disp32
<span id="L160" class="LineNr">160 </span><span class="Constant">$subx-braces:emit-curly-open</span>:
<span id="L161" class="LineNr">161 </span> <span class="subxComment"># print(out, &quot;_loop&quot; next-label-id &quot;:&quot;)</span>
<span id="L162" class="LineNr">162 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+0xc) <span class="Constant">&quot;_loop&quot;</span>)
@ -230,7 +230,7 @@ if ('onhashchange' in window) {
<span id="L171" class="LineNr">171 </span><span class="Constant">$subx-braces:check-for-curly-closed</span>:
<span id="L172" class="LineNr">172 </span> <span class="subxComment"># if (line-&gt;data[line-&gt;read] != '}') goto next check</span>
<span id="L173" class="LineNr">173 </span> 3d/compare-eax-and 0x7d/imm32/close-curly
<span id="L174" class="LineNr">174 </span> 0f 85/jump-if-equal $subx-braces:word-loop/disp32
<span id="L174" class="LineNr">174 </span> 0f 85/jump-if-= $subx-braces:word-loop/disp32
<span id="L175" class="LineNr">175 </span><span class="Constant">$subx-braces:emit-curly-closed</span>:
<span id="L176" class="LineNr">176 </span> <span class="subxComment"># eax = pop(label-stack)</span>
<span id="L177" class="LineNr">177 </span> (<a href='../092stack.subx.html#L230'>pop</a> %edx)
@ -246,7 +246,7 @@ if ('onhashchange' in window) {
<span id="L187" class="LineNr">187 </span> <span class="subxComment"># if (slice-empty?(word-slice)) break</span>
<span id="L188" class="LineNr">188 </span> (<a href='../072slice.subx.html#L9'>slice-empty?</a> %edi)
<span id="L189" class="LineNr">189 </span> 3d/compare-eax-and 0/imm32
<span id="L190" class="LineNr">190 </span> 0f 85/jump-if-not-equal $subx-braces:next-line/disp32
<span id="L190" class="LineNr">190 </span> 0f 85/jump-if-!= $subx-braces:next-line/disp32
<span id="L191" class="LineNr">191 </span><span class="Constant">$subx-braces:check-for-comment</span>:
<span id="L192" class="LineNr">192 </span> <span class="subxComment"># if (slice-starts-with?(word-slice, &quot;#&quot;)) continue</span>
<span id="L193" class="LineNr">193 </span> <span class="subxS1Comment"># . eax = *word-slice-&gt;start</span>
@ -255,14 +255,14 @@ if ('onhashchange' in window) {
<span id="L196" class="LineNr">196 </span> 81 4/subop/and %eax 0xff/imm32
<span id="L197" class="LineNr">197 </span> <span class="subxS1Comment"># . if (eax == '#') continue</span>
<span id="L198" class="LineNr">198 </span> 3d/compare-eax-and 0x23/imm32/hash
<span id="L199" class="LineNr">199 </span> 74/jump-if-equal $subx-braces:word-loop/disp8
<span id="L199" class="LineNr">199 </span> 74/jump-if-= $subx-braces:word-loop/disp8
<span id="L200" class="LineNr">200 </span><span class="Constant">$subx-braces:check-for-break</span>:
<span id="L201" class="LineNr">201 </span> <span class="subxComment"># if (!slice-starts-with?(word-slice, &quot;break/&quot;)) goto next check</span>
<span id="L202" class="LineNr">202 </span> <span class="subxS1Comment"># . eax = slice-starts-with?(word-slice, &quot;break/&quot;)</span>
<span id="L203" class="LineNr">203 </span> (<a href='../072slice.subx.html#L458'>slice-starts-with?</a> %edi <span class="Constant">&quot;break/&quot;</span>)
<span id="L204" class="LineNr">204 </span> <span class="subxS1Comment"># . if (eax == false) goto next check</span>
<span id="L205" class="LineNr">205 </span> 3d/compare-eax-and 0/imm32/false
<span id="L206" class="LineNr">206 </span> 74/jump-if-equal $subx-braces:check-for-loop/disp8
<span id="L206" class="LineNr">206 </span> 74/jump-if-= $subx-braces:check-for-loop/disp8
<span id="L207" class="LineNr">207 </span><span class="Constant">$subx-braces:emit-break</span>:
<span id="L208" class="LineNr">208 </span> (<a href='../092stack.subx.html#L334'>top</a> %edx)
<span id="L209" class="LineNr">209 </span> <span class="subxComment"># print(out, &quot;_break&quot; eax)</span>
@ -278,7 +278,7 @@ if ('onhashchange' in window) {
<span id="L219" class="LineNr">219 </span> (<a href='../072slice.subx.html#L458'>slice-starts-with?</a> %edi <span class="Constant">&quot;loop/&quot;</span>)
<span id="L220" class="LineNr">220 </span> <span class="subxS1Comment"># . if (eax == false) goto next check</span>
<span id="L221" class="LineNr">221 </span> 3d/compare-eax-and 0/imm32/false
<span id="L222" class="LineNr">222 </span> 74/jump-if-equal $subx-braces:emit-word-slice/disp8
<span id="L222" class="LineNr">222 </span> 74/jump-if-= $subx-braces:emit-word-slice/disp8
<span id="L223" class="LineNr">223 </span><span class="Constant">$subx-braces:emit-loop</span>:
<span id="L224" class="LineNr">224 </span> (<a href='../092stack.subx.html#L334'>top</a> %edx)
<span id="L225" class="LineNr">225 </span> <span class="subxComment"># print(out, &quot;_loop&quot; eax)</span>

View File

@ -102,7 +102,7 @@ if ('onhashchange' in window) {
<span id="L41" class="LineNr"> 41 </span> <span class="subxH1Comment"># - if argc &gt; 1 and argv[1] == &quot;test&quot;, then return run_tests()</span>
<span id="L42" class="LineNr"> 42 </span> <span class="subxComment"># if (argc &lt;= 1) goto run-main</span>
<span id="L43" class="LineNr"> 43 </span> 81 7/subop/compare *ebp 1/imm32
<span id="L44" class="LineNr"> 44 </span> 7e/jump-if-lesser-or-equal $subx-calls-main:interactive/disp8
<span id="L44" class="LineNr"> 44 </span> 7e/jump-if-&lt;= $subx-calls-main:interactive/disp8
<span id="L45" class="LineNr"> 45 </span> <span class="subxComment"># if (!kernel-string-equal?(argv[1], &quot;test&quot;)) goto run-main</span>
<span id="L46" class="LineNr"> 46 </span> <span class="subxS1Comment"># . eax = kernel-string-equal?(argv[1], &quot;test&quot;)</span>
<span id="L47" class="LineNr"> 47 </span> <span class="subxS2Comment"># . . push args</span>
@ -114,7 +114,7 @@ if ('onhashchange' in window) {
<span id="L53" class="LineNr"> 53 </span> 81 0/subop/add %esp 8/imm32
<span id="L54" class="LineNr"> 54 </span> <span class="subxS1Comment"># . if (eax == false) goto run-main</span>
<span id="L55" class="LineNr"> 55 </span> 3d/compare-eax-and 0/imm32/false
<span id="L56" class="LineNr"> 56 </span> 74/jump-if-equal $subx-calls-main:interactive/disp8
<span id="L56" class="LineNr"> 56 </span> 74/jump-if-= $subx-calls-main:interactive/disp8
<span id="L57" class="LineNr"> 57 </span> <span class="subxComment"># run-tests()</span>
<span id="L58" class="LineNr"> 58 </span> e8/call run-tests/disp32
<span id="L59" class="LineNr"> 59 </span> <span class="subxComment"># syscall(exit, *Num-test-failures)</span>
@ -197,7 +197,7 @@ if ('onhashchange' in window) {
<span id="L136" class="LineNr"> 136 </span><span class="Constant">$subx-calls:check0</span>:
<span id="L137" class="LineNr"> 137 </span> <span class="subxComment"># if (line-&gt;write == 0) break</span>
<span id="L138" class="LineNr"> 138 </span> 81 7/subop/compare *esi 0/imm32
<span id="L139" class="LineNr"> 139 </span> 0f 84/jump-if-equal $subx-calls:<span class="Constant">break</span>/disp32
<span id="L139" class="LineNr"> 139 </span> 0f 84/jump-if-= $subx-calls:<span class="Constant">break</span>/disp32
<span id="L140" class="LineNr"> 140 </span> <span class="subxComment"># skip-chars-matching-whitespace(line)</span>
<span id="L141" class="LineNr"> 141 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L142" class="LineNr"> 142 </span> 56/push-esi
@ -213,7 +213,7 @@ if ('onhashchange' in window) {
<span id="L152" class="LineNr"> 152 </span> 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
<span id="L153" class="LineNr"> 153 </span> <span class="subxS1Comment"># . if (eax == '(') goto convert-call</span>
<span id="L154" class="LineNr"> 154 </span> 3d/compare-eax-and 0x28/imm32/open-paren
<span id="L155" class="LineNr"> 155 </span> 74/jump-if-equal $subx-calls:convert-call/disp8
<span id="L155" class="LineNr"> 155 </span> 74/jump-if-= $subx-calls:convert-call/disp8
<span id="L156" class="LineNr"> 156 </span><span class="Constant">$subx-calls:pass-through</span>:
<span id="L157" class="LineNr"> 157 </span> <span class="subxComment"># write-stream-data(out, line)</span>
<span id="L158" class="LineNr"> 158 </span> <span class="subxS2Comment"># . . push args</span>
@ -331,7 +331,7 @@ if ('onhashchange' in window) {
<span id="L270" class="LineNr"> 270 </span> 81 0/subop/add %esp 4/imm32
<span id="L271" class="LineNr"> 271 </span> <span class="subxS1Comment"># . if (eax != false) break</span>
<span id="L272" class="LineNr"> 272 </span> 3d/compare-eax-and 0/imm32/false
<span id="L273" class="LineNr"> 273 </span> 0f 85/jump-if-not-equal $parse-line:end/disp32
<span id="L273" class="LineNr"> 273 </span> 0f 85/jump-if-!= $parse-line:end/disp32
<span id="L274" class="Folded"> 274 </span><span class="Folded">+-- 40 lines: #? # dump word-slice -----------------------------------------------------------------------------------------------------------------------</span>
<span id="L314" class="LineNr"> 314 </span><span class="Constant">$parse-line:write-word</span>:
<span id="L315" class="LineNr"> 315 </span> <span class="subxComment"># write-int(words, word-slice-&gt;start)</span>
@ -402,7 +402,7 @@ if ('onhashchange' in window) {
<span id="L380" class="LineNr"> 380 </span> <span class="subxS1Comment"># . ecx = words-&gt;write - 8</span>
<span id="L381" class="LineNr"> 381 </span> 8b/-&gt; *esi 1/r32/ecx
<span id="L382" class="LineNr"> 382 </span> 81 5/subop/subtract %ecx 8/imm32
<span id="L383" class="LineNr"> 383 </span> 0f 8c/jump-if-lesser $emit-call:error1/disp32
<span id="L383" class="LineNr"> 383 </span> 0f 8c/jump-if-&lt; $emit-call:error1/disp32
<span id="L384" class="LineNr"> 384 </span> <span class="subxComment"># var curr/ecx : (addr slice) = &amp;words-&gt;data[words-&gt;write-8]</span>
<span id="L385" class="LineNr"> 385 </span> 8d/copy-address *(esi+ecx+0xc) 1/r32/ecx
<span id="L386" class="LineNr"> 386 </span> <span class="subxComment"># var min/edx : (addr byte) = words-&gt;data</span>
@ -411,7 +411,7 @@ if ('onhashchange' in window) {
<span id="L389" class="LineNr"> 389 </span><span class="Constant">$emit-call:push-loop</span>:
<span id="L390" class="LineNr"> 390 </span> <span class="subxComment"># if (curr &lt;= min) break</span>
<span id="L391" class="LineNr"> 391 </span> 39/compare %ecx 2/r32/edx
<span id="L392" class="LineNr"> 392 </span> 0f 8e/jump-if-lesser-or-equal $emit-call:call-instruction/disp32
<span id="L392" class="LineNr"> 392 </span> 0f 8e/jump-if-&lt;= $emit-call:call-instruction/disp32
<span id="L393" class="LineNr"> 393 </span> <span class="subxComment"># if (*curr-&gt;start in '%' '*') goto push-rm32</span>
<span id="L394" class="LineNr"> 394 </span> <span class="subxS1Comment"># . var start/eax : (addr byte) = curr-&gt;start</span>
<span id="L395" class="LineNr"> 395 </span> 8b/-&gt; *ecx 0/r32/eax
@ -420,10 +420,10 @@ if ('onhashchange' in window) {
<span id="L398" class="LineNr"> 398 </span> 81 4/subop/and %eax 0xff/imm32
<span id="L399" class="LineNr"> 399 </span> <span class="subxS1Comment"># . if (c == '%') goto push-rm32</span>
<span id="L400" class="LineNr"> 400 </span> 3d/compare-eax-and 0x25/imm32/percent
<span id="L401" class="LineNr"> 401 </span> 74/jump-if-equal $emit-call:push-rm32/disp8
<span id="L401" class="LineNr"> 401 </span> 74/jump-if-= $emit-call:push-rm32/disp8
<span id="L402" class="LineNr"> 402 </span> <span class="subxS1Comment"># . if (c == '*') goto push-rm32</span>
<span id="L403" class="LineNr"> 403 </span> 3d/compare-eax-and 0x2a/imm32/asterisk
<span id="L404" class="LineNr"> 404 </span> 74/jump-if-equal $emit-call:push-rm32/disp8
<span id="L404" class="LineNr"> 404 </span> 74/jump-if-= $emit-call:push-rm32/disp8
<span id="L405" class="LineNr"> 405 </span><span class="Constant">$emit-call:push-imm32</span>:
<span id="L406" class="LineNr"> 406 </span> <span class="subxComment"># write-buffered(out, &quot;68/push &quot;)</span>
<span id="L407" class="LineNr"> 407 </span> 68/push <span class="Constant">&quot;68/push &quot;</span>/imm32
@ -814,7 +814,7 @@ if ('onhashchange' in window) {
<span id="L824" class="LineNr"> 824 </span> 8b/-&gt; *(esi+4) 1/r32/ecx
<span id="L825" class="LineNr"> 825 </span> <span class="subxS1Comment"># . if (ecx &gt;= line-&gt;write) return out = {0, 0}</span>
<span id="L826" class="LineNr"> 826 </span> 3b/compare 1/r32/ecx *esi
<span id="L827" class="LineNr"> 827 </span> 0f 8d/jump-if-greater-or-equal $next-word-string-or-expression-without-metadata:return-eol/disp32
<span id="L827" class="LineNr"> 827 </span> 0f 8d/jump-if-&gt;= $next-word-string-or-expression-without-metadata:return-eol/disp32
<span id="L828" class="LineNr"> 828 </span><span class="Constant">$next-word-string-or-expression-without-metadata:check-for-comment</span>:
<span id="L829" class="LineNr"> 829 </span> <span class="subxComment"># out-&gt;start = &amp;line-&gt;data[line-&gt;read]</span>
<span id="L830" class="LineNr"> 830 </span> 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
@ -825,7 +825,7 @@ if ('onhashchange' in window) {
<span id="L835" class="LineNr"> 835 </span> 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
<span id="L836" class="LineNr"> 836 </span> <span class="subxS1Comment"># . if (eax != '#') goto next check</span>
<span id="L837" class="LineNr"> 837 </span> 3d/compare-eax-and 0x23/imm32/pound
<span id="L838" class="LineNr"> 838 </span> 75/jump-if-not-equal $next-word-string-or-expression-without-metadata:check-for-string-literal/disp8
<span id="L838" class="LineNr"> 838 </span> 75/jump-if-!= $next-word-string-or-expression-without-metadata:check-for-string-literal/disp8
<span id="L839" class="LineNr"> 839 </span><span class="Constant">$next-word-string-or-expression-without-metadata:comment</span>:
<span id="L840" class="LineNr"> 840 </span> <span class="subxComment"># out-&gt;end = &amp;line-&gt;data[line-&gt;write]</span>
<span id="L841" class="LineNr"> 841 </span> 8b/-&gt; *esi 0/r32/eax
@ -839,7 +839,7 @@ if ('onhashchange' in window) {
<span id="L849" class="LineNr"> 849 </span><span class="Constant">$next-word-string-or-expression-without-metadata:check-for-string-literal</span>:
<span id="L850" class="LineNr"> 850 </span> <span class="subxComment"># if (line-&gt;data[line-&gt;read] != '&quot;') goto next check</span>
<span id="L851" class="LineNr"> 851 </span> 3d/compare-eax-and 0x22/imm32/dquote
<span id="L852" class="LineNr"> 852 </span> 75/jump-if-not-equal $next-word-string-or-expression-without-metadata:check-for-expression/disp8
<span id="L852" class="LineNr"> 852 </span> 75/jump-if-!= $next-word-string-or-expression-without-metadata:check-for-expression/disp8
<span id="L853" class="LineNr"> 853 </span><span class="Constant">$next-word-string-or-expression-without-metadata:string-literal</span>:
<span id="L854" class="LineNr"> 854 </span> <span class="subxComment"># skip-string(line)</span>
<span id="L855" class="LineNr"> 855 </span> <span class="subxS2Comment"># . . push args</span>
@ -857,14 +857,14 @@ if ('onhashchange' in window) {
<span id="L867" class="LineNr"> 867 </span><span class="Constant">$next-word-string-or-expression-without-metadata:check-for-expression</span>:
<span id="L868" class="LineNr"> 868 </span> <span class="subxComment"># if (line-&gt;data[line-&gt;read] != '*') goto next check</span>
<span id="L869" class="LineNr"> 869 </span> 3d/compare-eax-and 0x2a/imm32/asterisk
<span id="L870" class="LineNr"> 870 </span> 75/jump-if-not-equal $next-word-string-or-expression-without-metadata:check-for-end-of-call/disp8
<span id="L870" class="LineNr"> 870 </span> 75/jump-if-!= $next-word-string-or-expression-without-metadata:check-for-end-of-call/disp8
<span id="L871" class="LineNr"> 871 </span> <span class="subxComment"># if (line-&gt;data[line-&gt;read + 1] == ' ') goto error1</span>
<span id="L872" class="LineNr"> 872 </span> 8a/copy-byte *(esi+ecx+0xd) 0/r32/AL
<span id="L873" class="LineNr"> 873 </span> 3d/compare-eax-and 0x20/imm32/space
<span id="L874" class="LineNr"> 874 </span> 0f 84/jump-if-equal $next-word-string-or-expression-without-metadata:error1/disp32
<span id="L874" class="LineNr"> 874 </span> 0f 84/jump-if-= $next-word-string-or-expression-without-metadata:error1/disp32
<span id="L875" class="LineNr"> 875 </span> <span class="subxComment"># if (line-&gt;data[line-&gt;read + 1] != '(') goto regular-word</span>
<span id="L876" class="LineNr"> 876 </span> 3d/compare-eax-and 0x28/imm32/open-paren
<span id="L877" class="LineNr"> 877 </span> 0f 85/jump-if-not-equal $next-word-string-or-expression-without-metadata:regular-word-without-metadata/disp32
<span id="L877" class="LineNr"> 877 </span> 0f 85/jump-if-!= $next-word-string-or-expression-without-metadata:regular-word-without-metadata/disp32
<span id="L878" class="LineNr"> 878 </span><span class="Constant">$next-word-string-or-expression-without-metadata:paren</span>:
<span id="L879" class="LineNr"> 879 </span> <span class="subxComment"># skip-until-close-paren(line)</span>
<span id="L880" class="LineNr"> 880 </span> <span class="subxS2Comment"># . . push args</span>
@ -879,7 +879,7 @@ if ('onhashchange' in window) {
<span id="L889" class="LineNr"> 889 </span> 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
<span id="L890" class="LineNr"> 890 </span> <span class="subxS1Comment"># . if (eax != ')') goto error2</span>
<span id="L891" class="LineNr"> 891 </span> 3d/compare-eax-and 0x29/imm32/close-paren
<span id="L892" class="LineNr"> 892 </span> 0f 85/jump-if-not-equal $next-word-string-or-expression-without-metadata:error2/disp32
<span id="L892" class="LineNr"> 892 </span> 0f 85/jump-if-!= $next-word-string-or-expression-without-metadata:error2/disp32
<span id="L893" class="LineNr"> 893 </span> <span class="subxComment"># ++line-&gt;read to skip ')'</span>
<span id="L894" class="LineNr"> 894 </span> ff 0/subop/increment *(esi+4)
<span id="L895" class="LineNr"> 895 </span> <span class="subxComment"># out-&gt;end = &amp;line-&gt;data[line-&gt;read]</span>
@ -891,7 +891,7 @@ if ('onhashchange' in window) {
<span id="L901" class="LineNr"> 901 </span><span class="Constant">$next-word-string-or-expression-without-metadata:check-for-end-of-call</span>:
<span id="L902" class="LineNr"> 902 </span> <span class="subxComment"># if (line-&gt;data[line-&gt;read] != ')') goto next check</span>
<span id="L903" class="LineNr"> 903 </span> 3d/compare-eax-and 0x29/imm32/close-paren
<span id="L904" class="LineNr"> 904 </span> 75/jump-if-not-equal $next-word-string-or-expression-without-metadata:regular-word-without-metadata/disp8
<span id="L904" class="LineNr"> 904 </span> 75/jump-if-!= $next-word-string-or-expression-without-metadata:regular-word-without-metadata/disp8
<span id="L905" class="LineNr"> 905 </span> <span class="subxComment"># ++line-&gt;read to skip ')'</span>
<span id="L906" class="LineNr"> 906 </span> ff 0/subop/increment *(esi+4)
<span id="L907" class="LineNr"> 907 </span> <span class="subxH1Comment"># - error checking: make sure there's nothing else of importance on the line</span>
@ -900,13 +900,13 @@ if ('onhashchange' in window) {
<span id="L910" class="LineNr"> 910 </span> 8b/-&gt; *(esi+4) 1/r32/ecx
<span id="L911" class="LineNr"> 911 </span> <span class="subxS1Comment"># . if (ecx &gt;= line-&gt;write) return {0, 0}</span>
<span id="L912" class="LineNr"> 912 </span> 3b/compare 1/r32/ecx *esi
<span id="L913" class="LineNr"> 913 </span> 0f 8d/jump-if-greater-or-equal $next-word-string-or-expression-without-metadata:return-eol/disp32
<span id="L913" class="LineNr"> 913 </span> 0f 8d/jump-if-&gt;= $next-word-string-or-expression-without-metadata:return-eol/disp32
<span id="L914" class="LineNr"> 914 </span> <span class="subxComment"># if (line-&gt;data[line-&gt;read] == '/') goto error3</span>
<span id="L915" class="LineNr"> 915 </span> <span class="subxS1Comment"># . eax = line-&gt;data[line-&gt;read]</span>
<span id="L916" class="LineNr"> 916 </span> 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
<span id="L917" class="LineNr"> 917 </span> <span class="subxS1Comment"># . if (eax == '/') goto error3</span>
<span id="L918" class="LineNr"> 918 </span> 3d/compare-eax-and 0x2f/imm32/slash
<span id="L919" class="LineNr"> 919 </span> 0f 84/jump-if-equal $next-word-string-or-expression-without-metadata:error3/disp32
<span id="L919" class="LineNr"> 919 </span> 0f 84/jump-if-= $next-word-string-or-expression-without-metadata:error3/disp32
<span id="L920" class="LineNr"> 920 </span> <span class="subxComment"># skip-chars-matching-whitespace(line)</span>
<span id="L921" class="LineNr"> 921 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L922" class="LineNr"> 922 </span> 56/push-esi
@ -919,14 +919,14 @@ if ('onhashchange' in window) {
<span id="L929" class="LineNr"> 929 </span> 8b/-&gt; *(esi+4) 1/r32/ecx
<span id="L930" class="LineNr"> 930 </span> <span class="subxS1Comment"># . if (ecx &gt;= line-&gt;write) return {0, 0}</span>
<span id="L931" class="LineNr"> 931 </span> 3b/compare 1/r32/ecx *esi
<span id="L932" class="LineNr"> 932 </span> 0f 8d/jump-if-greater-or-equal $next-word-string-or-expression-without-metadata:return-eol/disp32
<span id="L932" class="LineNr"> 932 </span> 0f 8d/jump-if-&gt;= $next-word-string-or-expression-without-metadata:return-eol/disp32
<span id="L933" class="LineNr"> 933 </span> <span class="subxComment"># if (line-&gt;data[line-&gt;read] == '#') return out = {0, 0}</span>
<span id="L934" class="LineNr"> 934 </span> <span class="subxS1Comment"># . eax = line-&gt;data[line-&gt;read]</span>
<span id="L935" class="LineNr"> 935 </span> 8b/-&gt; *(esi+4) 1/r32/ecx
<span id="L936" class="LineNr"> 936 </span> 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
<span id="L937" class="LineNr"> 937 </span> <span class="subxS1Comment"># . if (eax == '#') return out = {0, 0}</span>
<span id="L938" class="LineNr"> 938 </span> 3d/compare-eax-and 0x23/imm32/pound
<span id="L939" class="LineNr"> 939 </span> 74/jump-if-equal $next-word-string-or-expression-without-metadata:return-eol/disp8
<span id="L939" class="LineNr"> 939 </span> 74/jump-if-= $next-word-string-or-expression-without-metadata:return-eol/disp8
<span id="L940" class="LineNr"> 940 </span> <span class="subxComment"># otherwise goto error4</span>
<span id="L941" class="LineNr"> 941 </span> e9/jump $next-word-string-or-expression-without-metadata:error4/disp32
<span id="L942" class="LineNr"> 942 </span><span class="Constant">$next-word-string-or-expression-without-metadata:regular-word-without-metadata</span>:
@ -935,20 +935,20 @@ if ('onhashchange' in window) {
<span id="L945" class="LineNr"> 945 </span> 8b/-&gt; *(esi+4) 1/r32/ecx
<span id="L946" class="LineNr"> 946 </span> <span class="subxS1Comment"># . if (ecx &gt;= line-&gt;write) break</span>
<span id="L947" class="LineNr"> 947 </span> 3b/compare *esi 1/r32/ecx
<span id="L948" class="LineNr"> 948 </span> 7d/jump-if-greater-or-equal $next-word-string-or-expression-without-metadata:regular-word-break/disp8
<span id="L948" class="LineNr"> 948 </span> 7d/jump-if-&gt;= $next-word-string-or-expression-without-metadata:regular-word-break/disp8
<span id="L949" class="LineNr"> 949 </span> <span class="subxComment"># if (line-&gt;data[line-&gt;read] == ' ') break</span>
<span id="L950" class="LineNr"> 950 </span> <span class="subxS1Comment"># . eax = line-&gt;data[line-&gt;read]</span>
<span id="L951" class="LineNr"> 951 </span> 8b/-&gt; *(esi+4) 1/r32/ecx
<span id="L952" class="LineNr"> 952 </span> 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
<span id="L953" class="LineNr"> 953 </span> <span class="subxS1Comment"># . if (eax == ' ') break</span>
<span id="L954" class="LineNr"> 954 </span> 3d/compare-eax-and 0x20/imm32/space
<span id="L955" class="LineNr"> 955 </span> 74/jump-if-equal $next-word-string-or-expression-without-metadata:regular-word-break/disp8
<span id="L955" class="LineNr"> 955 </span> 74/jump-if-= $next-word-string-or-expression-without-metadata:regular-word-break/disp8
<span id="L956" class="LineNr"> 956 </span> <span class="subxComment"># if (line-&gt;data[line-&gt;read] == ')') break</span>
<span id="L957" class="LineNr"> 957 </span> 3d/compare-eax-and 0x29/imm32/close-paren
<span id="L958" class="LineNr"> 958 </span> 0f 84/jump-if-equal $next-word-string-or-expression-without-metadata:regular-word-break/disp32
<span id="L958" class="LineNr"> 958 </span> 0f 84/jump-if-= $next-word-string-or-expression-without-metadata:regular-word-break/disp32
<span id="L959" class="LineNr"> 959 </span> <span class="subxComment"># if (line-&gt;data[line-&gt;read] == '/') goto error5</span>
<span id="L960" class="LineNr"> 960 </span> 3d/compare-eax-and 0x2f/imm32/slash
<span id="L961" class="LineNr"> 961 </span> 0f 84/jump-if-equal $next-word-string-or-expression-without-metadata:error5/disp32
<span id="L961" class="LineNr"> 961 </span> 0f 84/jump-if-= $next-word-string-or-expression-without-metadata:error5/disp32
<span id="L962" class="LineNr"> 962 </span> <span class="subxComment"># ++line-&gt;read</span>
<span id="L963" class="LineNr"> 963 </span> ff 0/subop/increment *(esi+4)
<span id="L964" class="LineNr"> 964 </span> <span class="subxComment"># loop</span>

View File

@ -108,7 +108,7 @@ if ('onhashchange' in window) {
<span id="L47" class="LineNr"> 47 </span> <span class="subxH1Comment"># - if argc &gt; 1 and argv[1] == &quot;test&quot;, then return run_tests()</span>
<span id="L48" class="LineNr"> 48 </span> <span class="subxComment"># if (argc &lt;= 1) goto run-main</span>
<span id="L49" class="LineNr"> 49 </span> 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/disp8 1/imm32 <span class="subxComment"># compare *ebp</span>
<span id="L50" class="LineNr"> 50 </span> 7e/jump-if-lesser-or-equal $run-main/disp8
<span id="L50" class="LineNr"> 50 </span> 7e/jump-if-&lt;= $run-main/disp8
<span id="L51" class="LineNr"> 51 </span> <span class="subxComment"># if (!kernel-string-equal?(argv[1], &quot;test&quot;)) goto run-main</span>
<span id="L52" class="LineNr"> 52 </span> <span class="subxS1Comment"># . eax = kernel-string-equal?(argv[1], &quot;test&quot;)</span>
<span id="L53" class="LineNr"> 53 </span> <span class="subxS2Comment"># . . push args</span>
@ -120,7 +120,7 @@ if ('onhashchange' in window) {
<span id="L59" class="LineNr"> 59 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L60" class="LineNr"> 60 </span> <span class="subxS1Comment"># . if (eax == false) goto run-main</span>
<span id="L61" class="LineNr"> 61 </span> 3d/compare-eax-and 0/imm32/false
<span id="L62" class="LineNr"> 62 </span> 74/jump-if-equal $run-main/disp8
<span id="L62" class="LineNr"> 62 </span> 74/jump-if-= $run-main/disp8
<span id="L63" class="LineNr"> 63 </span> <span class="subxComment"># run-tests()</span>
<span id="L64" class="LineNr"> 64 </span> e8/call run-tests/disp32
<span id="L65" class="LineNr"> 65 </span> <span class="subxComment"># syscall(exit, *Num-test-failures)</span>
@ -285,7 +285,7 @@ if ('onhashchange' in window) {
<span id="L224" class="LineNr">224 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L225" class="LineNr">225 </span> <span class="subxS1Comment"># . if (eax == false)</span>
<span id="L226" class="LineNr">226 </span> 3d/compare-eax-and 0/imm32/false
<span id="L227" class="LineNr">227 </span> 75/jump-if-not-equal $get-num:<a href='../mu-init-test.subx.html#L7'>main</a>/disp8
<span id="L227" class="LineNr">227 </span> 75/jump-if-!= $get-num:<a href='../mu-init-test.subx.html#L7'>main</a>/disp8
<span id="L228" class="LineNr">228 </span> <span class="subxS1Comment"># . expected(ed, err, &quot;integer&quot;)</span>
<span id="L229" class="LineNr">229 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L230" class="LineNr">230 </span> 68/push <span class="Constant">&quot;integer&quot;</span>/imm32
@ -316,7 +316,7 @@ if ('onhashchange' in window) {
<span id="L255" class="LineNr">255 </span><span class="Constant">$get-num:loop</span>:
<span id="L256" class="LineNr">256 </span> <span class="subxComment"># if (out-&gt;write &gt;= out-&gt;length) error</span>
<span id="L257" class="LineNr">257 </span> 39/compare 3/mod/direct 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare edx with ecx</span>
<span id="L258" class="LineNr">258 </span> 7d/jump-if-lesser $get-num:stage2/disp8
<span id="L258" class="LineNr">258 </span> 7d/jump-if-&lt; $get-num:stage2/disp8
<span id="L259" class="LineNr">259 </span> <span class="subxS1Comment"># . error(ed, err, msg) # TODO: show full number</span>
<span id="L260" class="LineNr">260 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L261" class="LineNr">261 </span> 68/push <span class="Constant">&quot;get-num: too many digits in number&quot;</span>/imm32
@ -604,10 +604,10 @@ if ('onhashchange' in window) {
<span id="L543" class="LineNr">543 </span> b8/copy-to-eax 0/imm32
<span id="L544" class="LineNr">544 </span> <span class="subxComment"># if (c &lt; '0') return false</span>
<span id="L545" class="LineNr">545 </span> 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 0x30/imm32 <span class="subxComment"># compare *(ebp+8)</span>
<span id="L546" class="LineNr">546 </span> 7c/jump-if-lesser $is-digit?:end/disp8
<span id="L546" class="LineNr">546 </span> 7c/jump-if-&lt; $is-digit?:end/disp8
<span id="L547" class="LineNr">547 </span> <span class="subxComment"># if (c &gt; '9') return false</span>
<span id="L548" class="LineNr">548 </span> 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 0x39/imm32 <span class="subxComment"># compare *(ebp+8)</span>
<span id="L549" class="LineNr">549 </span> 7f/jump-if-greater $is-digit?:end/disp8
<span id="L549" class="LineNr">549 </span> 7f/jump-if-&gt; $is-digit?:end/disp8
<span id="L550" class="LineNr">550 </span> <span class="subxComment"># otherwise return true</span>
<span id="L551" class="LineNr">551 </span> b8/copy-to-eax 1/imm32
<span id="L552" class="LineNr">552 </span><span class="Constant">$is-digit?:end</span>:

View File

@ -108,7 +108,7 @@ if ('onhashchange' in window) {
<span id="L47" class="LineNr"> 47 </span> <span class="subxH1Comment"># - if argc &gt; 1 and argv[1] == &quot;test&quot;, then return run_tests()</span>
<span id="L48" class="LineNr"> 48 </span> <span class="subxComment"># if (argc &lt;= 1) goto run-main</span>
<span id="L49" class="LineNr"> 49 </span> 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/disp8 1/imm32 <span class="subxComment"># compare *ebp</span>
<span id="L50" class="LineNr"> 50 </span> 7e/jump-if-lesser-or-equal $run-main/disp8
<span id="L50" class="LineNr"> 50 </span> 7e/jump-if-&lt;= $run-main/disp8
<span id="L51" class="LineNr"> 51 </span> <span class="subxComment"># if (!kernel-string-equal?(argv[1], &quot;test&quot;)) goto run-main</span>
<span id="L52" class="LineNr"> 52 </span> <span class="subxS1Comment"># . eax = kernel-string-equal?(argv[1], &quot;test&quot;)</span>
<span id="L53" class="LineNr"> 53 </span> <span class="subxS2Comment"># . . push args</span>
@ -120,7 +120,7 @@ if ('onhashchange' in window) {
<span id="L59" class="LineNr"> 59 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L60" class="LineNr"> 60 </span> <span class="subxS1Comment"># . if (eax == false) goto run-main</span>
<span id="L61" class="LineNr"> 61 </span> 3d/compare-eax-and 0/imm32/false
<span id="L62" class="LineNr"> 62 </span> 74/jump-if-equal $run-main/disp8
<span id="L62" class="LineNr"> 62 </span> 74/jump-if-= $run-main/disp8
<span id="L63" class="LineNr"> 63 </span> <span class="subxComment"># run-tests()</span>
<span id="L64" class="LineNr"> 64 </span> e8/call run-tests/disp32
<span id="L65" class="LineNr"> 65 </span> <span class="subxComment"># syscall(exit, *Num-test-failures)</span>
@ -290,7 +290,7 @@ if ('onhashchange' in window) {
<span id="L229" class="LineNr">229 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L230" class="LineNr">230 </span> <span class="subxS1Comment"># . if (eax == false)</span>
<span id="L231" class="LineNr">231 </span> 3d/compare-eax-and 0/imm32/false
<span id="L232" class="LineNr">232 </span> 75/jump-if-not-equal $get-num:<a href='../mu-init-test.subx.html#L7'>main</a>/disp8
<span id="L232" class="LineNr">232 </span> 75/jump-if-!= $get-num:<a href='../mu-init-test.subx.html#L7'>main</a>/disp8
<span id="L233" class="LineNr">233 </span> <span class="subxS1Comment"># . expected(ed, err, &quot;integer&quot;)</span>
<span id="L234" class="LineNr">234 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L235" class="LineNr">235 </span> 68/push <span class="Constant">&quot;integer&quot;</span>/imm32
@ -321,7 +321,7 @@ if ('onhashchange' in window) {
<span id="L260" class="LineNr">260 </span><span class="Constant">$get-num:loop</span>:
<span id="L261" class="LineNr">261 </span> <span class="subxComment"># if (out-&gt;write &gt;= out-&gt;length) error</span>
<span id="L262" class="LineNr">262 </span> 39/compare 3/mod/direct 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare edx with ecx</span>
<span id="L263" class="LineNr">263 </span> 7d/jump-if-lesser $get-num:loop-stage2/disp8
<span id="L263" class="LineNr">263 </span> 7d/jump-if-&lt; $get-num:loop-stage2/disp8
<span id="L264" class="LineNr">264 </span> <span class="subxS1Comment"># . error(ed, err, msg) # TODO: show full number</span>
<span id="L265" class="LineNr">265 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L266" class="LineNr">266 </span> 68/push <span class="Constant">&quot;get-num: too many digits in number&quot;</span>/imm32
@ -355,7 +355,7 @@ if ('onhashchange' in window) {
<span id="L294" class="LineNr">294 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L295" class="LineNr">295 </span> <span class="subxS1Comment"># . if (eax != false) loop</span>
<span id="L296" class="LineNr">296 </span> 3d/compare-eax-and 0/imm32/false
<span id="L297" class="LineNr">297 </span> 0f 85/jump-if-not-equal $get-num:<span class="Constant">loop</span>/disp32
<span id="L297" class="LineNr">297 </span> 0f 85/jump-if-!= $get-num:<span class="Constant">loop</span>/disp32
<span id="L298" class="LineNr">298 </span><span class="Constant">$get-num:loop-end</span>:
<span id="L299" class="LineNr">299 </span> <span class="subxComment"># persist necessary variables from registers</span>
<span id="L300" class="LineNr">300 </span> 89/copy 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ecx to *edi</span>
@ -798,10 +798,10 @@ if ('onhashchange' in window) {
<span id="L737" class="LineNr">737 </span> b8/copy-to-eax 0/imm32
<span id="L738" class="LineNr">738 </span> <span class="subxComment"># if (c &lt; '0') return false</span>
<span id="L739" class="LineNr">739 </span> 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 0x30/imm32 <span class="subxComment"># compare *(ebp+8)</span>
<span id="L740" class="LineNr">740 </span> 7c/jump-if-lesser $is-digit?:end/disp8
<span id="L740" class="LineNr">740 </span> 7c/jump-if-&lt; $is-digit?:end/disp8
<span id="L741" class="LineNr">741 </span> <span class="subxComment"># if (c &gt; '9') return false</span>
<span id="L742" class="LineNr">742 </span> 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 0x39/imm32 <span class="subxComment"># compare *(ebp+8)</span>
<span id="L743" class="LineNr">743 </span> 7f/jump-if-greater $is-digit?:end/disp8
<span id="L743" class="LineNr">743 </span> 7f/jump-if-&gt; $is-digit?:end/disp8
<span id="L744" class="LineNr">744 </span> <span class="subxComment"># otherwise return true</span>
<span id="L745" class="LineNr">745 </span> b8/copy-to-eax 1/imm32
<span id="L746" class="LineNr">746 </span><span class="Constant">$is-digit?:end</span>:

View File

@ -99,7 +99,7 @@ if ('onhashchange' in window) {
<span id="L36" class="LineNr"> 36 </span> <span class="subxH1Comment"># - if argc &gt; 1 and argv[1] == &quot;test&quot;, then return run-tests()</span>
<span id="L37" class="LineNr"> 37 </span> <span class="subxComment"># if (argc &lt;= 1) goto interactive</span>
<span id="L38" class="LineNr"> 38 </span> 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/disp8 1/imm32 <span class="subxComment"># compare *ebp</span>
<span id="L39" class="LineNr"> 39 </span> 7e/jump-if-lesser-or-equal $subx-dquotes-main:interactive/disp8
<span id="L39" class="LineNr"> 39 </span> 7e/jump-if-&lt;= $subx-dquotes-main:interactive/disp8
<span id="L40" class="LineNr"> 40 </span> <span class="subxComment"># if (!kernel-string-equal?(argv[1], &quot;test&quot;)) goto interactive</span>
<span id="L41" class="LineNr"> 41 </span> <span class="subxS1Comment"># . eax = kernel-string-equal?(argv[1], &quot;test&quot;)</span>
<span id="L42" class="LineNr"> 42 </span> <span class="subxS2Comment"># . . push args</span>
@ -111,7 +111,7 @@ if ('onhashchange' in window) {
<span id="L48" class="LineNr"> 48 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span>
<span id="L49" class="LineNr"> 49 </span> <span class="subxS1Comment"># . if (eax == false) goto interactive</span>
<span id="L50" class="LineNr"> 50 </span> 3d/compare-eax-and 0/imm32/false
<span id="L51" class="LineNr"> 51 </span> 74/jump-if-equal $subx-dquotes-main:interactive/disp8
<span id="L51" class="LineNr"> 51 </span> 74/jump-if-= $subx-dquotes-main:interactive/disp8
<span id="L52" class="LineNr"> 52 </span> <span class="subxComment"># run-tests()</span>
<span id="L53" class="LineNr"> 53 </span> e8/call run-tests/disp32
<span id="L54" class="LineNr"> 54 </span> <span class="subxComment"># syscall(exit, *Num-test-failures)</span>
@ -237,7 +237,7 @@ if ('onhashchange' in window) {
<span id="L174" class="LineNr"> 174 </span><span class="Constant">$subx-dquotes:check0</span>:
<span id="L175" class="LineNr"> 175 </span> <span class="subxComment"># if (line-&gt;write == 0) break</span>
<span id="L176" class="LineNr"> 176 </span> 81 7/subop/compare 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare *ecx</span>
<span id="L177" class="LineNr"> 177 </span> 0f 84/jump-if-equal $subx-dquotes:<span class="Constant">break</span>/disp32
<span id="L177" class="LineNr"> 177 </span> 0f 84/jump-if-= $subx-dquotes:<span class="Constant">break</span>/disp32
<span id="L178" class="LineNr"> 178 </span><span class="Constant">$subx-dquotes:word-loop</span>:
<span id="L179" class="LineNr"> 179 </span> <span class="subxComment"># next-word-or-string(line, word-slice)</span>
<span id="L180" class="LineNr"> 180 </span> <span class="subxS2Comment"># . . push args</span>
@ -258,7 +258,7 @@ if ('onhashchange' in window) {
<span id="L195" class="LineNr"> 195 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L196" class="LineNr"> 196 </span> <span class="subxS1Comment"># . if (eax != false) break</span>
<span id="L197" class="LineNr"> 197 </span> 3d/compare-eax-and 0/imm32/false
<span id="L198" class="LineNr"> 198 </span> 0f 85/jump-if-not-equal $subx-dquotes:next-line/disp32
<span id="L198" class="LineNr"> 198 </span> 0f 85/jump-if-!= $subx-dquotes:next-line/disp32
<span id="L199" class="LineNr"> 199 </span><span class="Constant">$subx-dquotes:check-for-comment</span>:
<span id="L200" class="LineNr"> 200 </span> <span class="subxComment"># if (slice-starts-with?(word-slice, &quot;#&quot;)) continue</span>
<span id="L201" class="LineNr"> 201 </span> <span class="subxS1Comment"># . var start/esi : (addr byte) = word-slice-&gt;start</span>
@ -268,11 +268,11 @@ if ('onhashchange' in window) {
<span id="L205" class="LineNr"> 205 </span> 8a/copy-byte 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *esi to AL</span>
<span id="L206" class="LineNr"> 206 </span> <span class="subxS1Comment"># . if (c == '#') continue</span>
<span id="L207" class="LineNr"> 207 </span> 3d/compare-eax-and 0x23/imm32/hash
<span id="L208" class="LineNr"> 208 </span> 74/jump-if-equal $subx-dquotes:word-loop/disp8
<span id="L208" class="LineNr"> 208 </span> 74/jump-if-= $subx-dquotes:word-loop/disp8
<span id="L209" class="LineNr"> 209 </span><span class="Constant">$subx-dquotes:check-for-string-literal</span>:
<span id="L210" class="LineNr"> 210 </span> <span class="subxComment"># if (slice-starts-with?(word-slice, '&quot;')) continue</span>
<span id="L211" class="LineNr"> 211 </span> 3d/compare-eax-and 0x22/imm32/dquote
<span id="L212" class="LineNr"> 212 </span> 75/jump-if-not-equal $subx-dquotes:regular-word/disp8
<span id="L212" class="LineNr"> 212 </span> 75/jump-if-!= $subx-dquotes:regular-word/disp8
<span id="L213" class="LineNr"> 213 </span><span class="Constant">$subx-dquotes:string-literal</span>:
<span id="L214" class="LineNr"> 214 </span> <span class="subxComment"># process-string-literal(word-slice, out, new-data-segment)</span>
<span id="L215" class="LineNr"> 215 </span> <span class="subxS2Comment"># . . push args</span>
@ -931,25 +931,25 @@ if ('onhashchange' in window) {
<span id="L925" class="LineNr"> 925 </span><span class="Constant">$emit-string-literal-data:loop</span>:
<span id="L926" class="LineNr"> 926 </span> <span class="subxComment"># if (curr &gt;= max) break</span>
<span id="L927" class="LineNr"> 927 </span> 39/compare 3/mod/direct 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare edx with esi</span>
<span id="L928" class="LineNr"> 928 </span> 0f 83/jump-if-greater-or-equal-unsigned $emit-string-literal-data:end/disp32
<span id="L928" class="LineNr"> 928 </span> 0f 83/jump-if-addr&gt;= $emit-string-literal-data:end/disp32
<span id="L929" class="LineNr"> 929 </span> <span class="subxComment"># CL = *curr</span>
<span id="L930" class="LineNr"> 930 </span> 8a/copy-byte 0/mod/indirect 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/CL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *edx to CL</span>
<span id="L931" class="LineNr"> 931 </span> <span class="subxComment"># if (c == '&quot;') break</span>
<span id="L932" class="LineNr"> 932 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x22/imm32/dquote <span class="subxComment"># compare ecx</span>
<span id="L933" class="LineNr"> 933 </span> 0f 84/jump-if-equal $emit-string-literal-data:end/disp32
<span id="L933" class="LineNr"> 933 </span> 0f 84/jump-if-= $emit-string-literal-data:end/disp32
<span id="L934" class="LineNr"> 934 </span> <span class="subxComment"># if (c != '\') goto emit</span>
<span id="L935" class="LineNr"> 935 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x5c/imm32/backslash <span class="subxComment"># compare ecx</span>
<span id="L936" class="LineNr"> 936 </span> 75/jump-if-not-equal $emit-string-literal-data:<a href='../079emit.subx.html#L10'>emit</a>/disp8
<span id="L936" class="LineNr"> 936 </span> 75/jump-if-!= $emit-string-literal-data:<a href='../079emit.subx.html#L10'>emit</a>/disp8
<span id="L937" class="LineNr"> 937 </span> <span class="subxComment"># ++curr</span>
<span id="L938" class="LineNr"> 938 </span> 42/increment-edx
<span id="L939" class="LineNr"> 939 </span> <span class="subxComment"># if (curr &gt;= max) break</span>
<span id="L940" class="LineNr"> 940 </span> 39/compare 3/mod/direct 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare edx with esi</span>
<span id="L941" class="LineNr"> 941 </span> 0f 83/jump-if-greater-or-equal-unsigned $emit-string-literal-data:end/disp32
<span id="L941" class="LineNr"> 941 </span> 0f 83/jump-if-addr&gt;= $emit-string-literal-data:end/disp32
<span id="L942" class="LineNr"> 942 </span> <span class="subxComment"># c = *curr</span>
<span id="L943" class="LineNr"> 943 </span> 8a/copy-byte 0/mod/indirect 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/CL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *edx to CL</span>
<span id="L944" class="LineNr"> 944 </span> <span class="subxComment"># if (c == 'n') c = newline</span>
<span id="L945" class="LineNr"> 945 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x6e/imm32/n <span class="subxComment"># compare ecx</span>
<span id="L946" class="LineNr"> 946 </span> 75/jump-if-not-equal $emit-string-literal-data:<a href='../079emit.subx.html#L10'>emit</a>/disp8
<span id="L946" class="LineNr"> 946 </span> 75/jump-if-!= $emit-string-literal-data:<a href='../079emit.subx.html#L10'>emit</a>/disp8
<span id="L947" class="LineNr"> 947 </span> b9/copy-to-ecx 0x0a/imm32/newline
<span id="L948" class="LineNr"> 948 </span><span class="Constant">$emit-string-literal-data:<a href='../079emit.subx.html#L10'>emit</a></span>:
<span id="L949" class="LineNr"> 949 </span> <span class="subxComment"># append-byte-hex(out, CL)</span>
@ -970,7 +970,7 @@ if ('onhashchange' in window) {
<span id="L964" class="LineNr"> 964 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to esp</span>
<span id="L965" class="LineNr"> 965 </span> <span class="subxS1Comment"># . if (eax == false) goto char-done</span>
<span id="L966" class="LineNr"> 966 </span> 3d/compare-eax-and 0/imm32/false
<span id="L967" class="LineNr"> 967 </span> 74/jump-if-equal $emit-string-literal-data:char-done/disp8
<span id="L967" class="LineNr"> 967 </span> 74/jump-if-= $emit-string-literal-data:char-done/disp8
<span id="L968" class="LineNr"> 968 </span> <span class="subxS1Comment"># . write(out, &quot;/&quot;)</span>
<span id="L969" class="LineNr"> 969 </span> <span class="subxS2Comment"># . . push args</span>
<span id="L970" class="LineNr"> 970 </span> 68/push <span class="SpecialChar"><a href='../051test.subx.html#L101'>Slash</a></span>/imm32
@ -1002,7 +1002,7 @@ if ('onhashchange' in window) {
<span id="L996" class="LineNr"> 996 </span> 43/increment-ebx
<span id="L997" class="LineNr"> 997 </span> <span class="subxComment"># if (idx &lt; 0x40) continue</span>
<span id="L998" class="LineNr"> 998 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x40/imm32 <span class="subxComment"># compare ebx</span>
<span id="L999" class="LineNr"> 999 </span> 7c/jump-if-lesser $emit-string-literal-data:next-char/disp8
<span id="L999" class="LineNr"> 999 </span> 7c/jump-if-&lt; $emit-string-literal-data:next-char/disp8
<span id="L1000" class="LineNr">1000 </span> <span class="subxComment"># idx = 0</span>
<span id="L1001" class="LineNr">1001 </span> 31/xor 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear ebx</span>
<span id="L1002" class="LineNr">1002 </span> <span class="subxComment"># write(out, &quot;\n&quot;)</span>
@ -1035,22 +1035,22 @@ if ('onhashchange' in window) {
<span id="L1029" class="LineNr">1029 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+8) to eax</span>
<span id="L1030" class="LineNr">1030 </span> <span class="subxComment"># if (c &lt; '0') return false</span>
<span id="L1031" class="LineNr">1031 </span> 3d/compare-eax-with 0x30/imm32/0
<span id="L1032" class="LineNr">1032 </span> 7c/jump-if-lesser $is-alphanumeric?:false/disp8
<span id="L1032" class="LineNr">1032 </span> 7c/jump-if-&lt; $is-alphanumeric?:false/disp8
<span id="L1033" class="LineNr">1033 </span> <span class="subxComment"># if (c &lt;= '9') return true</span>
<span id="L1034" class="LineNr">1034 </span> 3d/compare-eax-with 0x39/imm32/9
<span id="L1035" class="LineNr">1035 </span> 7e/jump-if-lesser-or-equal $is-alphanumeric?:true/disp8
<span id="L1035" class="LineNr">1035 </span> 7e/jump-if-&lt;= $is-alphanumeric?:true/disp8
<span id="L1036" class="LineNr">1036 </span> <span class="subxComment"># if (c &lt; 'A') return false</span>
<span id="L1037" class="LineNr">1037 </span> 3d/compare-eax-with 0x41/imm32/A
<span id="L1038" class="LineNr">1038 </span> 7c/jump-if-lesser $is-alphanumeric?:false/disp8
<span id="L1038" class="LineNr">1038 </span> 7c/jump-if-&lt; $is-alphanumeric?:false/disp8
<span id="L1039" class="LineNr">1039 </span> <span class="subxComment"># if (c &lt;= 'Z') return true</span>
<span id="L1040" class="LineNr">1040 </span> 3d/compare-eax-with 0x5a/imm32/Z
<span id="L1041" class="LineNr">1041 </span> 7e/jump-if-lesser-or-equal $is-alphanumeric?:true/disp8
<span id="L1041" class="LineNr">1041 </span> 7e/jump-if-&lt;= $is-alphanumeric?:true/disp8
<span id="L1042" class="LineNr">1042 </span> <span class="subxComment"># if (c &lt; 'a') return false</span>
<span id="L1043" class="LineNr">1043 </span> 3d/compare-eax-with 0x61/imm32/a
<span id="L1044" class="LineNr">1044 </span> 7c/jump-if-lesser $is-alphanumeric?:false/disp8
<span id="L1044" class="LineNr">1044 </span> 7c/jump-if-&lt; $is-alphanumeric?:false/disp8
<span id="L1045" class="LineNr">1045 </span> <span class="subxComment"># if (c &lt;= 'z') return true</span>
<span id="L1046" class="LineNr">1046 </span> 3d/compare-eax-with 0x7a/imm32/z
<span id="L1047" class="LineNr">1047 </span> 7e/jump-if-lesser-or-equal $is-alphanumeric?:true/disp8
<span id="L1047" class="LineNr">1047 </span> 7e/jump-if-&lt;= $is-alphanumeric?:true/disp8
<span id="L1048" class="LineNr">1048 </span> <span class="subxComment"># return false</span>
<span id="L1049" class="LineNr">1049 </span><span class="Constant">$is-alphanumeric?:false</span>:
<span id="L1050" class="LineNr">1050 </span> b8/copy-to-eax 0/imm32/false
@ -1301,7 +1301,7 @@ if ('onhashchange' in window) {
<span id="L1420" class="LineNr">1420 </span> <span class="subxH1Comment"># - if (*curr == '&quot;') curr = skip-string-in-slice(curr, end)</span>
<span id="L1421" class="LineNr">1421 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ecx to AL</span>
<span id="L1422" class="LineNr">1422 </span> 3d/compare-eax-and 0x22/imm32/dquote
<span id="L1423" class="LineNr">1423 </span> 75/jump-if-not-equal $emit-metadata:skip-datum-loop/disp8
<span id="L1423" class="LineNr">1423 </span> 75/jump-if-!= $emit-metadata:skip-datum-loop/disp8
<span id="L1424" class="LineNr">1424 </span><span class="Constant">$emit-metadata:skip-string-literal</span>:
<span id="L1425" class="LineNr">1425 </span> <span class="subxS1Comment"># . eax = skip-string-in-slice(curr, end)</span>
<span id="L1426" class="LineNr">1426 </span> <span class="subxS2Comment"># . . push args</span>
@ -1318,11 +1318,11 @@ if ('onhashchange' in window) {
<span id="L1437" class="LineNr">1437 </span> <span class="subxH1Comment"># - otherwise scan for '/'</span>
<span id="L1438" class="LineNr">1438 </span> <span class="subxComment"># if (curr == end) return</span>
<span id="L1439" class="LineNr">1439 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx and edx</span>
<span id="L1440" class="LineNr">1440 </span> 74/jump-if-equal $emit-metadata:end/disp8
<span id="L1440" class="LineNr">1440 </span> 74/jump-if-= $emit-metadata:end/disp8
<span id="L1441" class="LineNr">1441 </span> <span class="subxComment"># if (*curr == '/') break</span>
<span id="L1442" class="LineNr">1442 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ecx to AL</span>
<span id="L1443" class="LineNr">1443 </span> 3d/compare-eax-and 0x2f/imm32/slash
<span id="L1444" class="LineNr">1444 </span> 74/jump-if-equal $emit-metadata:<a href='../079emit.subx.html#L10'>emit</a>/disp8
<span id="L1444" class="LineNr">1444 </span> 74/jump-if-= $emit-metadata:<a href='../079emit.subx.html#L10'>emit</a>/disp8
<span id="L1445" class="LineNr">1445 </span> <span class="subxComment"># ++curr</span>
<span id="L1446" class="LineNr">1446 </span> 41/increment-ecx
<span id="L1447" class="LineNr">1447 </span> eb/jump $emit-metadata:skip-datum-loop/disp8
@ -1655,17 +1655,17 @@ if ('onhashchange' in window) {
<span id="L1799" class="LineNr">1799 </span><span class="Constant">$string-length-at-start-of-slice:loop</span>:
<span id="L1800" class="LineNr">1800 </span> <span class="subxComment"># if (curr &gt;= end) return length</span>
<span id="L1801" class="LineNr">1801 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L1802" class="LineNr">1802 </span> 73/jump-if-greater-unsigned-or-equal $string-length-at-start-of-slice:end/disp8
<span id="L1802" class="LineNr">1802 </span> 73/jump-if-addr&gt;= $string-length-at-start-of-slice:end/disp8
<span id="L1803" class="LineNr">1803 </span> <span class="subxComment"># c = *curr</span>
<span id="L1804" class="LineNr">1804 </span> 8a/copy-byte 0/mod/indirect 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ecx to BL</span>
<span id="L1805" class="LineNr">1805 </span><span class="Constant">$string-length-at-start-of-slice:dquote</span>:
<span id="L1806" class="LineNr">1806 </span> <span class="subxComment"># if (c == '&quot;') break</span>
<span id="L1807" class="LineNr">1807 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x22/imm32/dquote <span class="subxComment"># compare ebx</span>
<span id="L1808" class="LineNr">1808 </span> 74/jump-if-equal $string-length-at-start-of-slice:end/disp8
<span id="L1808" class="LineNr">1808 </span> 74/jump-if-= $string-length-at-start-of-slice:end/disp8
<span id="L1809" class="LineNr">1809 </span><span class="Constant">$string-length-at-start-of-slice:check-for-escape</span>:
<span id="L1810" class="LineNr">1810 </span> <span class="subxComment"># if (c == '\') escape next char</span>
<span id="L1811" class="LineNr">1811 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0x5c/imm32/backslash <span class="subxComment"># compare ebx</span>
<span id="L1812" class="LineNr">1812 </span> 75/jump-if-not-equal $string-length-at-start-of-slice:continue/disp8
<span id="L1812" class="LineNr">1812 </span> 75/jump-if-!= $string-length-at-start-of-slice:continue/disp8
<span id="L1813" class="LineNr">1813 </span><span class="Constant">$string-length-at-start-of-slice:escape</span>:
<span id="L1814" class="LineNr">1814 </span> <span class="subxComment"># increment curr but not result</span>
<span id="L1815" class="LineNr">1815 </span> 41/increment-ecx

View File

@ -104,10 +104,10 @@ if ('onhashchange' in window) {
<span id="L45" class="LineNr">45 </span> 8a/copy-byte 0/mod/indirect 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *edx to BL</span>
<span id="L46" class="LineNr">46 </span> <span class="subxComment"># if (c1 == 0) break</span>
<span id="L47" class="LineNr">47 </span> 3d/compare-eax-and 0/imm32
<span id="L48" class="LineNr">48 </span> 74/jump-if-equal $argv-equal:<span class="Constant">break</span>/disp8
<span id="L48" class="LineNr">48 </span> 74/jump-if-= $argv-equal:<span class="Constant">break</span>/disp8
<span id="L49" class="LineNr">49 </span> <span class="subxComment"># if (c1 != c2) return false</span>
<span id="L50" class="LineNr">50 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax and ebx</span>
<span id="L51" class="LineNr">51 </span> 75/jump-if-not-equal $argv-equal:false/disp8
<span id="L51" class="LineNr">51 </span> 75/jump-if-!= $argv-equal:false/disp8
<span id="L52" class="LineNr">52 </span> <span class="subxComment"># ++s1, ++s2</span>
<span id="L53" class="LineNr">53 </span> 41/increment-ecx
<span id="L54" class="LineNr">54 </span> 42/increment-edx
@ -116,7 +116,7 @@ if ('onhashchange' in window) {
<span id="L57" class="LineNr">57 </span><span class="Constant">$argv-equal:break</span>:
<span id="L58" class="LineNr">58 </span> <span class="subxComment"># if (c2 == 0) return true</span>
<span id="L59" class="LineNr">59 </span> 81 7/subop/compare 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare ebx</span>
<span id="L60" class="LineNr">60 </span> 75/jump-if-not-equal $argv-equal:false/disp8
<span id="L60" class="LineNr">60 </span> 75/jump-if-!= $argv-equal:false/disp8
<span id="L61" class="LineNr">61 </span><span class="Constant">$argv-equal:success</span>:
<span id="L62" class="LineNr">62 </span> b8/copy-to-eax 1/imm32
<span id="L63" class="LineNr">63 </span> c3/return

View File

@ -135,17 +135,17 @@ if ('onhashchange' in window) {
<span id="L73" class="LineNr"> 73 </span><span class="Constant">$kernel-string-equal?:loop</span>:
<span id="L74" class="LineNr"> 74 </span> <span class="subxComment"># if (i &gt;= n) break</span>
<span id="L75" class="LineNr"> 75 </span> 39/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare ecx with edx</span>
<span id="L76" class="LineNr"> 76 </span> 7d/jump-if-greater-or-equal $kernel-string-equal?:<span class="Constant">break</span>/disp8
<span id="L76" class="LineNr"> 76 </span> 7d/jump-if-&gt;= $kernel-string-equal?:<span class="Constant">break</span>/disp8
<span id="L77" class="LineNr"> 77 </span> <span class="subxComment"># c1 = *s1</span>
<span id="L78" class="LineNr"> 78 </span> 8a/copy-byte 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *edi to AL</span>
<span id="L79" class="LineNr"> 79 </span> <span class="subxComment"># c2 = *s2</span>
<span id="L80" class="LineNr"> 80 </span> 8a/copy-byte 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *esi to BL</span>
<span id="L81" class="LineNr"> 81 </span> <span class="subxComment"># if (c1 == 0) return false</span>
<span id="L82" class="LineNr"> 82 </span> 3d/compare-eax-and 0/imm32
<span id="L83" class="LineNr"> 83 </span> 74/jump-if-equal $kernel-string-equal?:false/disp8
<span id="L83" class="LineNr"> 83 </span> 74/jump-if-= $kernel-string-equal?:false/disp8
<span id="L84" class="LineNr"> 84 </span> <span class="subxComment"># if (c1 != c2) return false</span>
<span id="L85" class="LineNr"> 85 </span> 39/compare 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare eax and ebx</span>
<span id="L86" class="LineNr"> 86 </span> 75/jump-if-not-equal $kernel-string-equal?:false/disp8
<span id="L86" class="LineNr"> 86 </span> 75/jump-if-!= $kernel-string-equal?:false/disp8
<span id="L87" class="LineNr"> 87 </span> <span class="subxComment"># ++i</span>
<span id="L88" class="LineNr"> 88 </span> 41/increment-ecx
<span id="L89" class="LineNr"> 89 </span> <span class="subxComment"># ++s1</span>
@ -157,7 +157,7 @@ if ('onhashchange' in window) {
<span id="L95" class="LineNr"> 95 </span> <span class="subxComment"># return *s1 == 0</span>
<span id="L96" class="LineNr"> 96 </span> 8a/copy-byte 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *edi to AL</span>
<span id="L97" class="LineNr"> 97 </span> 3d/compare-eax-and 0/imm32
<span id="L98" class="LineNr"> 98 </span> 75/jump-if-not-equal $kernel-string-equal?:false/disp8
<span id="L98" class="LineNr"> 98 </span> 75/jump-if-!= $kernel-string-equal?:false/disp8
<span id="L99" class="LineNr"> 99 </span><span class="Constant">$kernel-string-equal?:true</span>:
<span id="L100" class="LineNr">100 </span> b8/copy-to-eax 1/imm32
<span id="L101" class="LineNr">101 </span> eb/jump $kernel-string-equal?:end/disp8

View File

@ -79,7 +79,7 @@ if ('onhashchange' in window) {
<span id="L21" class="LineNr">21 </span><span class="Constant">$loop</span>:
<span id="L22" class="LineNr">22 </span> <span class="subxComment"># if (counter &gt; 10) break</span>
<span id="L23" class="LineNr">23 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xa/imm32 <span class="subxComment"># compare ecx</span>
<span id="L24" class="LineNr">24 </span> 7f/jump-if-greater $exit/disp8
<span id="L24" class="LineNr">24 </span> 7f/jump-if-&gt; $exit/disp8
<span id="L25" class="LineNr">25 </span> <span class="subxComment"># result += counter</span>
<span id="L26" class="LineNr">26 </span> 01/add 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># add ecx to ebx</span>
<span id="L27" class="LineNr">27 </span> <span class="subxComment"># ++counter</span>

View File

@ -103,7 +103,7 @@ if ('onhashchange' in window) {
<span id="L44" class="LineNr">44 </span> 8a/copy-byte 0/mod/* 2/rm32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/CL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *edx to CL</span>
<span id="L45" class="LineNr">45 </span> <span class="subxComment"># if (c == '\0') break</span>
<span id="L46" class="LineNr">46 </span> 81 7/subop/compare 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/imm32 <span class="subxComment"># compare ecx</span>
<span id="L47" class="LineNr">47 </span> 74/jump-if-equal $ascii-length:end/disp8
<span id="L47" class="LineNr">47 </span> 74/jump-if-= $ascii-length:end/disp8
<span id="L48" class="LineNr">48 </span> <span class="subxComment"># ++s</span>
<span id="L49" class="LineNr">49 </span> 42/increment-edx
<span id="L50" class="LineNr">50 </span> <span class="subxComment"># ++result</span>

Some files were not shown because too many files have changed in this diff Show More