Split demo from library -- can now directly include into your assembly

This commit is contained in:
Michaelangel007
2017-07-07 17:01:02 -07:00
parent 8a6fae8cc7
commit a4712dc8a8
11 changed files with 63 additions and 24 deletions
+14 -4
View File
@@ -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
+12
View File
@@ -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"
+11
View File
@@ -0,0 +1,11 @@
; Demo
ORG $800
LDA #$12
LDX #$34
JMP PrintUint16
; Merlin32 include
PUT print_uint16_sans_zp.s
+11
View File
@@ -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
+11
View File
@@ -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
Binary file not shown.
+4 -8
View File
@@ -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
Binary file not shown.
-6
View File
@@ -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
Binary file not shown.
-6
View File
@@ -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