ANd portray_clause to stablize output logical variable names.
This commit is contained in:
Simon Forman
2019-11-10 14:35:57 -08:00
parent 0b210d7754
commit 3126dce307
4 changed files with 129 additions and 113 deletions
+12 -4
View File
@@ -79,7 +79,7 @@ Mark II
store_word(TOS, SP, 0), % RAM[SP] := TOS
do_offset(Main)
],([
],([
halt(HALT), % ======================================
@@ -102,10 +102,18 @@ Mark II
incr(SP),
sub_base_from_offset(TEMP3, SP),
chain_link(TOS, TEMP3),
jump(Done) % Rely on mainloop::Done to write TOS to RAM.
jump(Done), % Rely on mainloop::Done to write TOS to RAM.
definition(Dup)
]),[
% TermAddr := TOS << 2 >> 17
lsl_imm(TermAddr, TOS, 2),
asr_imm(TermAddr, TermAddr, 17)
],⟐([
jump(PUSH)
]),[
label(Expression),
expr_cell(Cons, 0)
expr_cell(Dup, 0)
].
@@ -182,7 +190,7 @@ do :-
compile_program(Binary) :-
phrase(⟐(program), ASM),
writeln(ASM),
portray_clause(ASM),
phrase(linker(ASM), EnumeratedASM),
phrase(asm(EnumeratedASM), Binary).