diff options
Diffstat (limited to '052kernel-string-equal.subx')
-rw-r--r-- | 052kernel-string-equal.subx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/052kernel-string-equal.subx b/052kernel-string-equal.subx index f63ef9ed..94953e59 100644 --- a/052kernel-string-equal.subx +++ b/052kernel-string-equal.subx @@ -30,7 +30,7 @@ Entry: # run all tests # compare a null-terminated ascii string with a more idiomatic length-prefixed byte array # reason for the name: the only place we should have null-terminated ascii strings is from commandline args -kernel-string-equal?: # s : (address kernel-string), benchmark : (address array byte) -> eax : boolean +kernel-string-equal?: # s : (addr kernel-string), benchmark : (addr array byte) -> eax : boolean # pseudocode: # n = benchmark->length # s1 = s @@ -61,12 +61,12 @@ kernel-string-equal?: # s : (address kernel-string), benchmark : (address array 53/push-ebx 56/push-esi 57/push-edi - # var s1/edi : (address byte) = s + # var s1/edi : (addr byte) = s 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 7/r32/edi 8/disp8 . # copy *(ebp+8) to edi # var n/edx : int = benchmark->length 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 2/r32/edx 0xc/disp8 . # copy *(ebp+12) to edx 8b/copy 0/mod/indirect 2/rm32/edx . . . 2/r32/edx . . # copy *edx to edx - # var s2/esi : (address byte) = benchmark->data + # var s2/esi : (addr byte) = benchmark->data 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 0xc/disp8 . # copy *(ebp+12) to esi 81 0/subop/add 3/mod/direct 6/rm32/esi . . . . . 4/imm32 # add to esi # var i/ecx : int = 0 @@ -262,10 +262,10 @@ test-compare-kernel-string-with-longer-array: == data -Null-kernel-string: # (address kernel-string) +Null-kernel-string: # (addr kernel-string) 00/null -_test-Abc-kernel-string: # (address kernel-string) +_test-Abc-kernel-string: # (addr kernel-string) 41/A 62/b 63/c 00/null # . . vim:nowrap:textwidth=0 |