halt.
This commit is contained in:
parent
2e301fa6c3
commit
0b210d7754
|
|
@ -77,14 +77,12 @@ Mark II
|
||||||
|
|
||||||
label(Done),
|
label(Done),
|
||||||
store_word(TOS, SP, 0), % RAM[SP] := TOS
|
store_word(TOS, SP, 0), % RAM[SP] := TOS
|
||||||
do_offset(Main),
|
do_offset(Main)
|
||||||
|
|
||||||
label(HALT), % This is a HALT loop, the emulator detects and traps
|
|
||||||
do_offset(HALT) % on this "10 goto 10" instruction.
|
|
||||||
|
|
||||||
% ======================================
|
|
||||||
],⟐([
|
],⟐([
|
||||||
|
|
||||||
|
halt(HALT), % ======================================
|
||||||
|
|
||||||
definition(Cons), % Let's cons.
|
definition(Cons), % Let's cons.
|
||||||
|
|
||||||
unpack_pair(TOS, TEMP0, TOS, SP),
|
unpack_pair(TOS, TEMP0, TOS, SP),
|
||||||
|
|
@ -147,6 +145,9 @@ language.
|
||||||
|
|
||||||
⟐(jump(To)) --> [do_offset(To)]. % Pass through.
|
⟐(jump(To)) --> [do_offset(To)]. % Pass through.
|
||||||
|
|
||||||
|
⟐(halt(Halt)) --> [label(Halt), do_offset(Halt)].
|
||||||
|
% This is a HALT loop, the emulator detects and traps on this "10 goto 10" instruction.
|
||||||
|
|
||||||
⟐(incr(SP)) --> [sub_imm(SP, SP, 4)]. % SP -= 1 (word, not byte).
|
⟐(incr(SP)) --> [sub_imm(SP, SP, 4)]. % SP -= 1 (word, not byte).
|
||||||
|
|
||||||
⟐(if_literal(TERM, Push, TEMP)) -->
|
⟐(if_literal(TERM, Push, TEMP)) -->
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue