aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/msp430/words/do-variable.asm
blob: 2198c4b289bcf87bf0a3658886973aa4ac9b6a39 (plain)
1
2
3
4
5
6
7
8
9
10
11
; DOCON, code action of CONSTANT,
; entered with W=Parameter Field Adrs
; This is also the action of VARIABLE (Harvard model)
; This is also the action of CREATE (Harvard model)
docreate: ; -- a-addr   ; ROMable CREATE fetches address from PFA
DOCON:  ; -- x          ; CONSTANT fetches cell from PFA to TOS
PFA_DOVARIABLE:
        SUB #2,PSP      ; make room on stack
        MOV TOS,0(PSP)
        MOV @W,TOS      ; fetch from parameter field to TOS
        NEXT