mirror of
https://github.com/Michaelangel007/apple2_print_uint16.git
synced 2024-12-26 15:29:15 +00:00
Split demo from library -- can now directly include into your assembly
This commit is contained in:
parent
8a6fae8cc7
commit
a4712dc8a8
18
Makefile
18
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)
|
all: $(TARGETS)
|
||||||
|
|
||||||
.PHONY: clean dump
|
.PHONY: clean dump
|
||||||
clean:
|
clean:
|
||||||
rm $(TARGETS)
|
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
|
print_uint16_sans_zp: print_uint16_sans_zp.s
|
||||||
merlin32 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
|
merlin32 print_uint16_with_sp.s
|
||||||
|
|
||||||
dump: $(TARGETS)
|
dump: $(TARGETS)
|
||||||
hexdump8 print_uint16_sans_zp 800
|
hexdump8 demo_sans_zp 800
|
||||||
hexdump8 print_uint16_with_zp 900
|
hexdump8 demo_with_zp 900
|
||||||
hexdump8 print_uint16_with_sp a00
|
hexdump8 demo_with_sp a00
|
||||||
|
|
||||||
|
12
demo_cc65.s
Normal file
12
demo_cc65.s
Normal 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
demo_sans_zp.s
Normal file
11
demo_sans_zp.s
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
; Demo
|
||||||
|
|
||||||
|
ORG $800
|
||||||
|
|
||||||
|
LDA #$12
|
||||||
|
LDX #$34
|
||||||
|
JMP PrintUint16
|
||||||
|
|
||||||
|
; Merlin32 include
|
||||||
|
PUT print_uint16_sans_zp.s
|
||||||
|
|
11
demo_with_sp.s
Normal file
11
demo_with_sp.s
Normal 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
demo_with_zp.s
Normal file
11
demo_with_zp.s
Normal 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.
@ -8,12 +8,6 @@
|
|||||||
PRHEXZ = $FDE5
|
PRHEXZ = $FDE5
|
||||||
SCRN2 = $F879
|
SCRN2 = $F879
|
||||||
|
|
||||||
ORG $800
|
|
||||||
|
|
||||||
LDA #$12
|
|
||||||
LDX #$34
|
|
||||||
JMP PrintUint16
|
|
||||||
|
|
||||||
; Print unsigned 16-bit integer
|
; Print unsigned 16-bit integer
|
||||||
; A=High byte
|
; A=High byte
|
||||||
; X=Low byte
|
; X=Low byte
|
||||||
@ -82,6 +76,8 @@ _HaveLeadingDigit
|
|||||||
BEQ _PrintDone
|
BEQ _PrintDone
|
||||||
JMP PRHEXZ
|
JMP PRHEXZ
|
||||||
|
|
||||||
_bcd ds 3 ; 6 chars for printing dec
|
_bcd BRK ; 6 chars for printing dec
|
||||||
_temp db 0
|
BRK
|
||||||
|
BRK
|
||||||
|
_temp BRK
|
||||||
|
|
||||||
|
Binary file not shown.
@ -8,12 +8,6 @@
|
|||||||
PRHEXZ = $FDE5
|
PRHEXZ = $FDE5
|
||||||
SCRN2 = $F879
|
SCRN2 = $F879
|
||||||
|
|
||||||
ORG $A00 ; Intentionally different from sans-zero-page & with-zero-page
|
|
||||||
|
|
||||||
LDA #$12
|
|
||||||
LDX #$34
|
|
||||||
JMP PrintUint16
|
|
||||||
|
|
||||||
; Print unsigned 16-bit integer
|
; Print unsigned 16-bit integer
|
||||||
; A=High byte
|
; A=High byte
|
||||||
; X=Low byte
|
; X=Low byte
|
||||||
|
Binary file not shown.
@ -12,12 +12,6 @@ SCRN2 = $F879
|
|||||||
_temp = $fc
|
_temp = $fc
|
||||||
_bcd = $fd ; NOTE: Optimized for ZP,X addressing in _DoubleDabble
|
_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
|
; Print unsigned 16-bit integer
|
||||||
; A=High byte
|
; A=High byte
|
||||||
; X=Low byte
|
; X=Low byte
|
||||||
|
Loading…
Reference in New Issue
Block a user