add N@ and N! to transfer a group of cells to or from memory
This commit is contained in:
parent
92d806298b
commit
15fa156d02
24
jumpforth.S
24
jumpforth.S
|
|
@ -843,6 +843,30 @@ defcode FILL
|
|||
rep stosb
|
||||
NEXT
|
||||
|
||||
/* ( xu ... x1 n a-addr -- ) Store x1 through xn in ascending cells at a-addr */
|
||||
defcode NSTORE,"N!"
|
||||
mov %esi,%edx
|
||||
pop %edi
|
||||
pop %ecx
|
||||
mov %esp,%esi
|
||||
lea (%esp,%ecx,4),%esp
|
||||
rep movsd
|
||||
mov %edx,%esi
|
||||
NEXT
|
||||
|
||||
/* ( n a-addr -- xu ... x1 ) Load x1 through xn from ascending cells at a-addr */
|
||||
defcode NFETCH,"N@"
|
||||
mov %esi,%edx
|
||||
pop %esi
|
||||
pop %ecx
|
||||
mov %ecx,%ebx
|
||||
neg %ebx
|
||||
lea (%esp,%ebx,4),%esp
|
||||
mov %esp,%edi
|
||||
rep movsd
|
||||
mov %edx,%esi
|
||||
NEXT
|
||||
|
||||
/* ( src dst n -- ) Block copy n bytes from src to dst (ascending addresses) */
|
||||
defcode CMOVE
|
||||
mov %esi,%edx
|
||||
|
|
|
|||
Loading…
Reference in New Issue