2023-07-10 00:58:05 +00:00
|
|
|
.include "equates.s"
|
|
|
|
.include "macros.s"
|
|
|
|
|
|
|
|
.org $0000
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2023-07-17 03:10:00 +00:00
|
|
|
; renderString (Far entry point at $050000)
|
2023-07-10 00:58:05 +00:00
|
|
|
;
|
2023-07-17 03:10:00 +00:00
|
|
|
; Draws a Pascal string in any font
|
2023-07-10 00:58:05 +00:00
|
|
|
;
|
2023-07-13 21:33:34 +00:00
|
|
|
; PARAML0 = Pointer to string
|
2023-07-10 00:58:05 +00:00
|
|
|
; Y = VRAM position of lower right corner of string at which to draw
|
2023-07-17 03:10:00 +00:00
|
|
|
; A = Font index
|
2023-07-10 00:58:05 +00:00
|
|
|
;
|
2023-07-17 03:10:00 +00:00
|
|
|
; Trashes SCRATCHL,X,Y,A
|
2023-07-10 00:58:05 +00:00
|
|
|
;
|
|
|
|
renderString:
|
|
|
|
NATIVE
|
2023-07-13 21:33:34 +00:00
|
|
|
SAVE_DBR
|
2023-07-10 00:58:05 +00:00
|
|
|
|
2023-07-13 21:33:34 +00:00
|
|
|
asl
|
2023-07-10 00:58:05 +00:00
|
|
|
tax
|
2023-07-17 03:10:00 +00:00
|
|
|
jmp (fontJumpTable,x) ; Can't JSR here because we need the stack in a particular state (with DBR cached on top)
|
2023-07-10 00:58:05 +00:00
|
|
|
|
2023-07-17 03:10:00 +00:00
|
|
|
renderStringReturn:
|
2023-07-13 21:33:34 +00:00
|
|
|
RESTORE_DBR
|
2023-07-10 00:58:05 +00:00
|
|
|
rtl
|
|
|
|
|
2023-07-13 21:33:34 +00:00
|
|
|
fontJumpTable:
|
2023-07-17 03:10:00 +00:00
|
|
|
.addr renderString_tinyNum
|
|
|
|
.addr renderString_font8
|
2023-08-06 22:55:42 +00:00
|
|
|
.addr renderString_font16
|
2023-07-13 21:33:34 +00:00
|
|
|
|
2023-07-16 22:18:06 +00:00
|
|
|
|
2023-07-17 03:10:00 +00:00
|
|
|
.include "fonts.s"
|
2023-07-13 21:33:34 +00:00
|
|
|
|
2023-07-10 00:58:05 +00:00
|
|
|
|
|
|
|
; Suppress some linker warnings - Must be the last thing in the file
|
|
|
|
; This is because Quinn doesn't really know how to use ca65 properly
|
|
|
|
.SEGMENT "ZPSAVE"
|
|
|
|
.SEGMENT "EXEHDR"
|
|
|
|
.SEGMENT "STARTUP"
|
|
|
|
.SEGMENT "INIT"
|
|
|
|
.SEGMENT "LOWCODE"
|
|
|
|
|