From 35a18609864470b3dc49f3a9a6cb6ec93e57300d Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Thu, 25 Feb 2021 12:43:11 -0500 Subject: - Implemented the multiply expression into the assembler. - Implemented support for the SIB addressing mode into the assembler. SIB is short for "Scale Index, and Base", and works much like x86's version of SIB (scale*index+base), although my version supports any scale value between 1, and 256. - Redid the line shifting routine in SuBEditor. It now uses memcpy, and memset to do that, and also supports shifting the line left, or right by any number of characters. --- programs/sub-suite/tmp-stuff/test-size.s | 59 -------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 programs/sub-suite/tmp-stuff/test-size.s (limited to 'programs/sub-suite/tmp-stuff/test-size.s') diff --git a/programs/sub-suite/tmp-stuff/test-size.s b/programs/sub-suite/tmp-stuff/test-size.s deleted file mode 100644 index b543a36..0000000 --- a/programs/sub-suite/tmp-stuff/test-size.s +++ /dev/null @@ -1,59 +0,0 @@ -MAGIC = $AA - - -.org 0 -findramend: - and #0 ; Reset A. -; lda #MAGIC ; Set A to a magic number. -@loop: - mov a, (d) ; Preserve the value. - mov (d), #MAGIC ; Write the magic number to the current end of RAM. - cmp (d), #MAGIC ; Is the value in RAM, the same as the magic number we wrote? - bne @moveback ; No, so move back until we find the last writable memory location. - mov (d), a ; Yes, so restore the previous value. - add.w d, #$4000 ; Increment the end of RAM pointer by 16K. - bra @loop ; Keep looping. -@moveback: - dec d ; Decrement the end of RAM pointer. - mov a, (d) ; Preserve the value. - mov (d), #MAGIC ; Write the magic number to the current end of RAM. - cmp (d), #MAGIC ; Is the value in RAM, the same as the magic number we wrote? - bne @moveback ; No, so keep looping. - mov (d), a ; Yes, so restore the previous value. -@end: - mov a, d ; Return the end of RAM pointer. -; ple.q ; Restore E. - rts ; End of findramend. - - -;findramend: -; phe.q ; Preserve E. -; phb.q ; Preserve B. -; mov e, d ; Set E to the RAM pointer. -; and #0 ; Reset A. -; lda #MAGIC ; Set A to a magic number. -;@loop: -; ldb (e) ; Preserve the value. -; sta (e) ; Write the magic number to the current end of RAM. -; cmp (e) ; Is the value in RAM, the same as the magic number we wrote? -; bne @moveback ; No, so move back until we find the last writable memory location. -; stb (e) ; Yes, so restore the previous value. -; ade.w #$4000 ; Increment the end of RAM pointer by 16K. -; bra @loop ; Keep looping. -;@moveback: -; dee ; Decrement the end of RAM pointer. -; ldb (e) ; Preserve the value. -; sta (e) ; Write the magic number to the current end of RAM. -; cmp (e) ; Is the value in RAM, the same as the magic number we wrote? -; bne @moveback ; No, so keep looping. -; stb (e) ; Yes, so restore the previous value. -;@end: -; mov a, e ; Return the end of RAM pointer. -; ple.q ; Restore E. -; plb.q ; Restore B. -; rts ; End of findramend. - -a -.org findramend -v -q -- cgit v1.2.3-13-gbd6f