diff options
Diffstat (limited to 'subx/058stream-equal.subx')
-rw-r--r-- | subx/058stream-equal.subx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/subx/058stream-equal.subx b/subx/058stream-equal.subx index b9ab889b..c65112cc 100644 --- a/subx/058stream-equal.subx +++ b/subx/058stream-equal.subx @@ -19,7 +19,7 @@ stream-data-equal?: # f : (address stream), s : (address string) -> EAX : boole 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 8/disp8 . # copy *(EBP+8) to ESI # EAX = f->write 8b/copy 0/mod/indirect 6/rm32/ESI . . . 0/r32/EAX . . # copy *ESI to EAX - # max/EDX = f->data + f->write + # maxf/EDX = f->data + f->write 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/ESI 0/index/EAX . 2/r32/EDX 0xc/disp8 . # copy ESI+EAX+12 to EDX # currf/ESI = f->data 81 0/subop/add 3/mod/direct 6/rm32/ESI . . . . . 0xc/imm32 # add to ESI @@ -34,9 +34,9 @@ stream-data-equal?: # f : (address stream), s : (address string) -> EAX : boole 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . . # clear EAX 31/xor 3/mod/direct 1/rm32/ECX . . . 1/r32/ECX . . # clear ECX $stream-data-equal?:loop: - # if (curr >= max) return true + # if (currf >= maxf) return true 39/compare 3/mod/direct 6/rm32/ESI . . . 2/r32/EDX . . # compare ESI with EDX - 7d/jump-if-greater-or-equal $stream-data-equal?:true/disp8 + 73/jump-if-greater-or-equal-unsigned $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 |