summaryrefslogtreecommitdiff
path: root/programs
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2020-01-23 13:55:00 -0500
committermrb0nk500 <b0nk@b0nk.xyz>2020-01-23 13:55:00 -0500
commit63d5046ecabd5fd1524d3c4bc4590176c3b8a4eb (patch)
tree9cfc71691294d818e87bb2e0026f37b8ee8eb892 /programs
parent861d56e556b597115ad01b4b4cc0e5b932545ce9 (diff)
Start optimizing the emulator.
I also added a new input testing program called input-3.s, which contains a mostly working editor.
Diffstat (limited to 'programs')
-rw-r--r--programs/pos-check.s12
-rw-r--r--programs/scr-to-buf.s7
2 files changed, 19 insertions, 0 deletions
diff --git a/programs/pos-check.s b/programs/pos-check.s
new file mode 100644
index 0000000..315147b
--- /dev/null
+++ b/programs/pos-check.s
@@ -0,0 +1,12 @@
+cmd_clr:
+ lda scr_row
+ cmp #23
+ beq cmd_vwrap
+ inc scr_row
+ jmp cmd_clr_end
+cmd_vwrap:
+ jsl rset_row
+cmd_clr_end:
+ jsl update_pos
+ lda #0
+ rtl
diff --git a/programs/scr-to-buf.s b/programs/scr-to-buf.s
new file mode 100644
index 0000000..1787dc3
--- /dev/null
+++ b/programs/scr-to-buf.s
@@ -0,0 +1,7 @@
+scr_to_buf:
+ tax
+ mul #80
+ adc scr_col
+ tay
+ txa
+ rtl