Execute Computer/Zero: Difference between revisions
RPL: optimized version
(RPL: add section) |
(RPL: optimized version) |
||
Line 2,189:
|-
|
≪ SWAP DROP ''''RAM'''' SWAP
≪ ''''RAM'''' SWAP
≪ ''''RAM'''' SWAP
≪ ''''RAM'''' SWAP
≪ '''IF'''
≪
≪ DROP 1 SF ≫
} ''''µCODE'''' STO
Line 2,201:
≪
{ 32 } RDM ''''RAM'''' STO
0
'''WHILE''' 1 FC? '''REPEAT'''
32 DUP2 MOD
'''IF THEN 'µCODE'''' LAST GET EVAL '''ELSE''' DROP
'''END
≫
|
'''µCODE''' ''( counter accumulator address --
LDA x
STA x
Line 2,216:
BRZ x
JMP x
STP x
'''RUN''' ''( [ program ] -- counter accumulator )''
load program to memory
reset accumulator, counter and flag
Line 2,225:
increment pointer and read byte
instruction, addresss = divmod(byte,32)
if instruction <> NOP then execute it
display accumulator
Line 2,232:
<pre>
[ 35 100 224 2 2 ] RUN
</pre>
{{out}}
|