raspberry-pi-pico-machine-c.../compiler/output/loops.as
2022-05-16 17:45:34 +02:00

79 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