diff --git a/Makefile b/Makefile index 045913b..6788255 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,20 @@ -TARGETS=print_uint16_sans_zp print_uint16_with_zp print_uint16_with_sp +TARGETS=print_uint16_sans_zp print_uint16_with_zp print_uint16_with_sp \ + demo_sans_zp demo_with_zp demo_with_sp all: $(TARGETS) .PHONY: clean dump clean: rm $(TARGETS) +demo_sans_zp: demo_sans_zp.s + merlin32 demo_sans_zp.s + +demo_with_zp: demo_with_zp.s + merlin32 demo_with_zp.s + +demo_with_sp: demo_with_sp.s + merlin32 demo_with_sp.s + print_uint16_sans_zp: print_uint16_sans_zp.s merlin32 print_uint16_sans_zp.s @@ -15,7 +25,7 @@ print_uint16_with_sp: print_uint16_with_sp.s merlin32 print_uint16_with_sp.s dump: $(TARGETS) - hexdump8 print_uint16_sans_zp 800 - hexdump8 print_uint16_with_zp 900 - hexdump8 print_uint16_with_sp a00 + hexdump8 demo_sans_zp 800 + hexdump8 demo_with_zp 900 + hexdump8 demo_with_sp a00 diff --git a/demo_cc65.s b/demo_cc65.s new file mode 100644 index 0000000..4ce9ff2 --- /dev/null +++ b/demo_cc65.s @@ -0,0 +1,12 @@ +.feature labels_without_colons +.export _printu + + .org $800 + + LDA #$12 + LDX #$34 + JMP _printu + +_printu +.include "print_uint16_sans_zp.s" + diff --git a/demo_sans_zp.s b/demo_sans_zp.s new file mode 100644 index 0000000..4adeda2 --- /dev/null +++ b/demo_sans_zp.s @@ -0,0 +1,11 @@ +; Demo + + ORG $800 + + LDA #$12 + LDX #$34 + JMP PrintUint16 + +; Merlin32 include + PUT print_uint16_sans_zp.s + diff --git a/demo_with_sp.s b/demo_with_sp.s new file mode 100644 index 0000000..b9d6077 --- /dev/null +++ b/demo_with_sp.s @@ -0,0 +1,11 @@ +; Demo + + ORG $A00 ; Intentionally different from sans-zero-page & with-zero-page + + LDA #$12 + LDX #$34 + JMP PrintUint16 + +; Merlin32 include + PUT print_uint16_with_sp.s + diff --git a/demo_with_zp.s b/demo_with_zp.s new file mode 100644 index 0000000..1a467c1 --- /dev/null +++ b/demo_with_zp.s @@ -0,0 +1,11 @@ +; Demo + + ORG $900 ; Intentionally different from sans-zero-page version for testing both + + LDA #$12 + LDX #$34 + JMP PrintUint16 + +; Merlin32 include + PUT print_uint16_with_zp.s + diff --git a/print_uint16_sans_zp b/print_uint16_sans_zp index e559b16..a7d3c89 100644 Binary files a/print_uint16_sans_zp and b/print_uint16_sans_zp differ diff --git a/print_uint16_sans_zp.s b/print_uint16_sans_zp.s index 5ce54d4..e4b8db8 100644 --- a/print_uint16_sans_zp.s +++ b/print_uint16_sans_zp.s @@ -8,12 +8,6 @@ PRHEXZ = $FDE5 SCRN2 = $F879 - ORG $800 - - LDA #$12 - LDX #$34 - JMP PrintUint16 - ; Print unsigned 16-bit integer ; A=High byte ; X=Low byte @@ -82,6 +76,8 @@ _HaveLeadingDigit BEQ _PrintDone JMP PRHEXZ -_bcd ds 3 ; 6 chars for printing dec -_temp db 0 +_bcd BRK ; 6 chars for printing dec + BRK + BRK +_temp BRK diff --git a/print_uint16_with_sp b/print_uint16_with_sp index 5c37466..8138fa8 100644 Binary files a/print_uint16_with_sp and b/print_uint16_with_sp differ diff --git a/print_uint16_with_sp.s b/print_uint16_with_sp.s index e1c6890..14ab1c7 100644 --- a/print_uint16_with_sp.s +++ b/print_uint16_with_sp.s @@ -8,12 +8,6 @@ PRHEXZ = $FDE5 SCRN2 = $F879 - ORG $A00 ; Intentionally different from sans-zero-page & with-zero-page - - LDA #$12 - LDX #$34 - JMP PrintUint16 - ; Print unsigned 16-bit integer ; A=High byte ; X=Low byte diff --git a/print_uint16_with_zp b/print_uint16_with_zp index e4928cf..80d5d3f 100644 Binary files a/print_uint16_with_zp and b/print_uint16_with_zp differ diff --git a/print_uint16_with_zp.s b/print_uint16_with_zp.s index 27e2ca1..bf44132 100644 --- a/print_uint16_with_zp.s +++ b/print_uint16_with_zp.s @@ -12,12 +12,6 @@ SCRN2 = $F879 _temp = $fc _bcd = $fd ; NOTE: Optimized for ZP,X addressing in _DoubleDabble - ORG $900 ; Intentionally different from sans-zero-page version for testing both - - LDA #$12 - LDX #$34 - JMP PrintUint16 - ; Print unsigned 16-bit integer ; A=High byte ; X=Low byte