From 1ec19679b3db209429b0897f6ccda6d09d018a70 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Sat, 8 Aug 2020 10:28:36 -0400 Subject: Did a ton of stuff. - Changed the file structure of the SuB Suite, so that all variable declarations, symbols, and constants are in a single file. - Moved the C library functionss into a separate file, and made them use stack frames. - Added support for using the emulator's assembler for realtime debugging, to enter it, get in to stepping mode by pressing Ctrl+s, press any other key, then press F1, The reason for having to press some other key before pressing F1 is because it only allows entering the assembler when the keyboard is not ready. - Added the ".res" directive to the emulator's assembler, the ".res" directive tells the assembler to reserve however many bytes specified by the operand. - Fixed some bugs in the emulator's assembler. --- test/stack-frame.s | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'test/stack-frame.s') diff --git a/test/stack-frame.s b/test/stack-frame.s index 6e64b86..0f631b9 100644 --- a/test/stack-frame.s +++ b/test/stack-frame.s @@ -1,6 +1,10 @@ ; Testing stack frames. ; Written by mr b0nk 500 +.org $0 +var: + .byte 0 + .org $8000 reset: cps ; @@ -10,16 +14,18 @@ reset: tay ; tax ; tab ; + sta.q var ; start: inc ; pha ; - ldb sp, $1 ; + ldb sp+1 ; pla ; - sta $0 ; + sta var ; + ldy #var ; phy.q ; - ldb (sp, $8) ; + ldb (sp+1) ; ply.q ; - ldb (sp, -$8) ; + ldb (sp-7) ; bra start ; .org $FFC0 -- cgit v1.2.3-13-gbd6f