diff options
Diffstat (limited to '092stack.subx')
-rw-r--r-- | 092stack.subx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/092stack.subx b/092stack.subx index 95e819f1..6f2e5e8a 100644 --- a/092stack.subx +++ b/092stack.subx @@ -7,7 +7,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 -clear-stack: # s : (addr stack) +clear-stack: # s: (addr stack) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -16,12 +16,12 @@ clear-stack: # s : (addr stack) 51/push-ecx # eax = s 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 8/disp8 . # copy *(ebp+8) to eax - # var max/ecx : (addr byte) = &s->data[s->length] + # var max/ecx: (addr byte) = &s->data[s->length] 8b/copy 1/mod/*+disp8 0/rm32/eax . . . 1/r32/ecx 4/disp8 . # copy *(eax+4) to eax 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 8/disp8 . # copy eax+ecx+8 to ecx # s->top = 0 c7 0/subop/copy 0/mod/direct 0/rm32/eax . . . . . 0/imm32 # copy to *eax - # var curr/eax : (addr byte) = s->data + # var curr/eax: (addr byte) = s->data 81 0/subop/add 3/mod/direct 0/rm32/eax . . . . . 8/imm32 # add to eax $clear-stack:loop: # if (curr >= max) break @@ -107,7 +107,7 @@ test-clear-stack: 5d/pop-to-ebp c3/return -push: # s : (addr stack), n : int +push: # s: (addr stack), n: int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -227,7 +227,7 @@ test-push: 5d/pop-to-ebp c3/return -pop: # s : (addr stack) -> n/eax : int +pop: # s: (addr stack) -> n/eax: int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -331,7 +331,7 @@ test-pop: 5d/pop-to-ebp c3/return -top: # s : (addr stack) -> n/eax : int +top: # s: (addr stack) -> n/eax: int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp |