mirror of
https://gitlab.com/jusax23/raspberry-pi-pico-machine-code-emulator.git
synced 2024-11-22 22:56:36 +01:00
80 lines
830 B
ActionScript
80 lines
830 B
ActionScript
|
|
||
|
v0 = 0;4
|
||
|
SHS 4
|
||
|
;code
|
||
|
|
||
|
;defvar: executing value:
|
||
|
|
||
|
;num: Loading num
|
||
|
LIA 0
|
||
|
|
||
|
;defvar: Store Value
|
||
|
STA 4 v0
|
||
|
|
||
|
beforloop2:
|
||
|
|
||
|
;<: execute first
|
||
|
|
||
|
;var: load Variable
|
||
|
LDA 4 v0
|
||
|
|
||
|
PSH 4
|
||
|
;<: execute secound
|
||
|
|
||
|
;num: Loading num
|
||
|
LIA 65535
|
||
|
|
||
|
CAB
|
||
|
PUL 4
|
||
|
CMP 0 0
|
||
|
LIA 1
|
||
|
JS .endcompare1
|
||
|
LIA 0
|
||
|
endcompare1:
|
||
|
|
||
|
LIB 1
|
||
|
CMP 0 0
|
||
|
JNE .afterloop3
|
||
|
;loop code
|
||
|
|
||
|
|
||
|
;print: executing value:
|
||
|
|
||
|
;var: load Variable
|
||
|
LDA 4 v0
|
||
|
|
||
|
;print Value
|
||
|
OUT 0
|
||
|
|
||
|
;let: executing value:
|
||
|
|
||
|
;+: next value
|
||
|
|
||
|
;var: load Variable
|
||
|
LDA 4 v0
|
||
|
|
||
|
|
||
|
PSH 4
|
||
|
|
||
|
;+: next value
|
||
|
|
||
|
;num: Loading num
|
||
|
LIA 1
|
||
|
|
||
|
|
||
|
;+: Pull/Add next
|
||
|
CAB
|
||
|
PUL 4
|
||
|
ADD 0 0 0
|
||
|
|
||
|
;let: Store Value
|
||
|
STA 4 v0
|
||
|
|
||
|
|
||
|
JMP .beforloop2
|
||
|
afterloop3:
|
||
|
|
||
|
HLT
|
||
|
;functions
|
||
|
|