From 7e7a8a6eaeb4c22acb94aaca87a7b15c180ca077 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 3 Jan 2020 01:36:34 -0800 Subject: 5876 - address -> addr --- 077subx-words.subx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to '077subx-words.subx') diff --git a/077subx-words.subx b/077subx-words.subx index a166217a..3b523cb6 100644 --- a/077subx-words.subx +++ b/077subx-words.subx @@ -5,7 +5,7 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -has-metadata?: # word : (address slice), s : (address string) -> eax : boolean +has-metadata?: # word : (addr slice), s : (addr string) -> eax : boolean # pseudocode: # var twig : &slice = next-token-from-slice(word->start, word->end, '/') # skip name # curr = twig->end @@ -25,7 +25,7 @@ has-metadata?: # word : (address slice), s : (address string) -> eax : boolean 57/push-edi # esi = word 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - # var edx : (address byte) = word->end + # var edx : (addr byte) = word->end 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 2/r32/edx 4/disp8 . # copy *(esi+4) to edx # var twig/edi : (ref slice) 68/push 0/imm32/end @@ -275,7 +275,7 @@ test-has-metadata-multiple-false: #: - if it starts with '0x' it's treated as a number. (redundant) #: - if it's two characters long, it can't be a name. Either it's a hex #: byte, or it raises an error. -is-valid-name?: # in : (address slice) -> eax : boolean +is-valid-name?: # in : (addr slice) -> eax : boolean # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -284,7 +284,7 @@ is-valid-name?: # in : (address slice) -> eax : boolean 56/push-esi # esi = in 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - # var start/ecx : (address byte) = in->start + # var start/ecx : (addr byte) = in->start 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # copy *esi to ecx $is-valid-name?:check0: # if (start >= in->end) return false @@ -298,7 +298,7 @@ $is-valid-name?:check1: 3d/compare-eax-and 2/imm32 74/jump-if-equal $is-valid-name?:false/disp8 $is-valid-name?:check2: - # var c/eax : (address byte) = *start + # 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 @@ -532,7 +532,7 @@ test-is-valid-name-starts-with-digit: 5d/pop-to-ebp c3/return -is-label?: # word : (address slice) -> eax : boolean +is-label?: # word : (addr slice) -> eax : boolean # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -540,7 +540,7 @@ is-label?: # word : (address slice) -> eax : boolean 51/push-ecx # ecx = word 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 8/disp8 . # copy *(ebp+8) to ecx - # var end/ecx : (address byte) = word->end + # var end/ecx : (addr byte) = word->end 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 1/r32/ecx 4/disp8 . # copy *(ecx+4) to ecx # return *(end - 1) == ':' # . eax = *(end-1) -- cgit 1.4.1-2-gfad0