From 96ae48f8a79f33cff0a89fac211b6862866e1a44 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Mon, 5 Oct 2020 08:47:08 -0400 Subject: - 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. --- programs/sub-suite/subeditor.s | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'programs') 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 ; -- cgit v1.2.3-13-gbd6f