1 ;;; This file defines "memory access words"
5 ;; Load value v from address addr
12 ;; Store value v at address addr.
18 WORD p_Cget, 'C@',fasm
20 ;; Load the (unsigned) byte v from address addr.
27 WORD p_Cput, 'C!',fasm
29 ;; Store byte value v at address addr.
35 WORD p_2get, '2@',fasm
37 ;; Load the cell pair {v1,v2} from address addr.
39 push qword [rax+8] ; v2
43 WORD p_2put, '2!',fasm
45 ;; Store value pair {v1,v2} at address addr.
48 mov qword [rax], rbx ; v1
50 mov qword [rax+8], rbx ; v2
53 WORD p_erase, 'ERASE',fasm
55 ;; Clear u bytes at address addr and up.
62 mov qword [rbx],0 ; mov qword[rbx],rcx
67 mov [rbx],byte 0 ; mov byte [rbx], cl
74 WORD p_1plus, '1+',fasm
76 ;; Add one (1) to n1 resulting in n2.
80 WORD p_plus_put, '+!',fasm
82 ;; Add n to the value at addr.
88 WORD p_1minus, '1-',fasm
90 ;; Subtract one (1) from n1 resulting in n2.
94 WORD p_2mult, '2*',fasm
96 ;; x2 is the result of shifting x1 one bit toward the
97 ;; most-significant bit, filling the vacated least-significant
102 WORD p_2div, '2/',fasm
104 ;; x2 is the result of shifting x1 one bit toward the
105 ;; least-significant bit, leaving the most-significant bit
106 ;; unchanged. (signed right shift)