2 ;; requires: WinSys, WinFont
13 ch_smallradio: equ 247
14 ch_smallradio0:equ 247
15 ch_smallradio1:equ 248
19 ch_smallcheck: equ 253
20 ch_smallcheck0:equ 253
21 ch_smallcheck1:equ 254
27 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
28 ;; get asciiz string width
33 ;; hl: ptr to "terminator char"
34 ;; af, b, de: destroyed
35 ;; actually, the string terminates by any char with code <= #1D(29)
44 ; #1E(30): set attrs to (next_byte)
51 ; #1F(31): print (next_byte) charz with the code taken from (next_byte+1)
71 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
72 ;; print asciiz string
76 ;; 1..#19(25): new line
78 ;; #1A(26): "right" the next substring; end of substring: 0..#1C
79 ;; #1B(27): "center" the next substring; end of substring: 0..#1C
80 ;; #1C(28): at -- x=(next_byte); y=(next_byte+1) (y in charz); y>127: don't change
81 ;; #1D(29): move to the next attr pos (mainly used when changing attrz)
82 ;; #1E(30): set attrs to (next_byte)
83 ;; #1F(31): print (next_byte) charz with the code taken from (next_byte+1)
85 ;; af,af',bc,de: destroyed
86 ;; hl: address of the first char after the end of the string
98 ; #1F(31): print (next_byte) charz with the code taken from (next_byte+1)
111 ; #1D(29): move to the next attr pos
115 ld a,#ff ; #ff is the empty square; width=8
122 ; #1E(30): set attrs to (next_byte)
130 ; #1C(28): at -- x=(next_byte); y=(next_byte+1) (y in charz)
135 ld (WinSys.printxy),de
140 ; #1A(26): "right" the next substring; end of substring: 0..#1C
141 ; #1B(27): "center" the next substring; end of substring: 0..#1C
170 call printstr__doNL_routine
172 @printstr__doNL_routine:
178 ld a,(WinSys.wsize+1)
195 call printstr__doNL_routine
200 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
202 ;; a: char code (32-255)
204 ;; af', af: destroyed
222 ld hl,(WinFont.chars)
224 ld a,(hl) ; a: char width
228 ; calc char pos if the last pixel
237 ; right edge just beyond the right screen edge; pissfuckshit!
274 push bc ; b: char width
276 ld de,(WinSys.printxy)
291 ;call WinMisc.scrCalcAddrDE_HL
351 ld de,(WinFont.chars)
354 ; now: hl: char addr; de: screen addr
357 ; now: de: char addr; hl: screen addr
417 ; move to the next x pos
433 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
434 ;; scroll window contents (up)
436 ;; af,bc,de,hl: destroyed
458 ; now: de: dest; c: width; b: height
460 ; now: hl: src; de: dest; c: width; b: height
534 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
537 ;; af,bc,de,hl: destroyed
540 ld (WinSys.printxy),hl
542 ;call WinMisc.scrAddr8DE_HL