Skip to content

Commit 168d48c

Browse files
committed
F100-L: Fix assembler issues.
1 parent 43e819c commit 168d48c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

generator/F100_L.cxx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ int F100_L::open(const char *filename)
6969
fprintf(out, "heap_ptr equ 0x%04x\n", heap_ptr);
7070
fprintf(out, "frame_ptr equ 0x%04x\n", frame_ptr);
7171
fprintf(out, "temp_ptr equ 0x%04x\n", temp_ptr);
72+
fprintf(out, "temp_1 equ 0x%04x\n", temp_1);
73+
fprintf(out, "temp_2 equ 0x%04x\n", temp_2);
7274
fprintf(out, "global_vars equ 0x%04x\n", global_vars);
7375
fprintf(out, "lsp equ 0x0000\n");
7476

@@ -181,7 +183,7 @@ void F100_L::method_start(
181183
fprintf(out,
182184
" lda java_stack_ptr\n"
183185
" add #%d\n"
184-
" sto temp_ptr\n,"
186+
" sto temp_ptr\n"
185187
" lda frame_ptr\n"
186188
" sto [temp_ptr]+\n"
187189
" lda java_stack_ptr\n"
@@ -915,7 +917,7 @@ int F100_L::return_local(int index, int local_count)
915917
" lda [frame_ptr]\n"
916918
" sto temp_1\n"
917919
" lda frame_ptr\n"
918-
" sta temp_ptr\n"
920+
" sto temp_ptr\n"
919921
" lda #%d + 2\n"
920922
" lda [temp_ptr]+\n"
921923
" sto frame_ptr\n"
@@ -936,10 +938,10 @@ int F100_L::return_integer(int local_count)
936938
// Restore java_stack_ptr
937939
fprintf(out,
938940
" ;; return_void(local_count=%d)\n"
939-
" lda [java_stack]-\n"
941+
" lda [java_stack_ptr]-\n"
940942
" sto temp_1\n"
941943
" lda frame_ptr\n"
942-
" sta temp_ptr\n"
944+
" sto temp_ptr\n"
943945
" lda #%d + 2\n"
944946
" lda [temp_ptr]+\n"
945947
" sto frame_ptr\n"
@@ -960,7 +962,7 @@ int F100_L::return_void(int local_count)
960962
fprintf(out,
961963
" ;; return_void(local_count=%d)\n"
962964
" lda frame_ptr\n"
963-
" sta temp_ptr\n"
965+
" sto temp_ptr\n"
964966
" lda #%d + 2\n"
965967
" lda [temp_ptr]+\n"
966968
" sto frame_ptr\n"

0 commit comments

Comments
 (0)