summaryrefslogtreecommitdiff
path: root/programs
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2020-10-05 08:47:08 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2020-10-05 08:47:08 -0400
commit96ae48f8a79f33cff0a89fac211b6862866e1a44 (patch)
tree885ba3a75da7b3f711cabce8c7590e8430104075 /programs
parentca8e2f93acc794b00464c5513956bd84de258913 (diff)
- Added a routine for testing the SuB Suite's
implementation of free(), although it's commented out. - Removed the sbc() function from the emulator, since sbc can be done by just inverting the second operand of adc.
Diffstat (limited to 'programs')
-rw-r--r--programs/sub-suite/subeditor.s26
1 files changed, 26 insertions, 0 deletions
diff --git a/programs/sub-suite/subeditor.s b/programs/sub-suite/subeditor.s
index 7e124a2..d98d068 100644
--- a/programs/sub-suite/subeditor.s
+++ b/programs/sub-suite/subeditor.s
@@ -12,6 +12,7 @@ reset:
tyx ; Reset X.
jsr init_heap ; Initialize the heap.
jsr init_tables ; Initialize the main tables.
+; jsr test_free ;
jsr clr_scr ; Clear the screen.
jsr pnt_strt ; Print the starting message.
bra start ; Goto the start of the main program.
@@ -48,6 +49,30 @@ init_tables:
rts ; End of init_tables.
+;test_free:
+; inc step ;
+; lda.q bitabl ;
+; jsr free ;
+; lda.q buffer ;
+; jsr free ;
+; and #0 ; Reset A.
+; lda.w #LWSIZE ; Allocate LWSIZE bytes of RAM for the linewrap table.
+; jsr malloc ;
+; sta.q bitabl ;
+; lda.q cmd_buf ;
+; jsr free ;
+; and #0 ; Reset A.
+; lda.w #SCRSIZE ; Allocate SCRSIZE bytes of RAM for the screen buffer.
+; jsr malloc ;
+; sta.q buffer ;
+; and #0 ; Reset A.
+; lda.w #CMDSIZE ; Allocate CMDSIZE bytes of RAM for the command buffer.
+; jsr malloc ;
+; sta.q cmd_buf ;
+; and #0 ; Reset A.
+; rts ; End of test_free.
+
+
clr_arr:
phb ; Preserve whatever was in B.
ldb #0 ; Clear B.
@@ -78,6 +103,7 @@ clr_arr:
plb ; Get whatever was in the B register, back.
rts ; End of clr_arr.
+
pnt_strt:
lda.w #ed_name ; Print the name of the editor.
jsr print_str ;