1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ;; 6x8 font printing engine
3 ;; the font was stolen from the
4 ;; BYTEX font editor, (c) BYTEX Group
5 ;; all dumb code is mine.
6 ;; all smart code is taken from
7 ;; the font editor & slighly tweaked.
9 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14 $FORTH_CONST (E6FONT) font6x8
15 $FORTH_CONST (E6CURXY) emit6y
16 $FORTH_CONST (E6CURX) emit6x
17 $FORTH_CONST (E6CURY) emit6y
18 $FORTH_CONST (E6WASSCROLL) emit6wasscrl
19 $FORTH_CONST CONWIDTH 42
31 ;; check for the new line
35 jr c,emit6i_0 ;; no new line
44 jr c,emit6i_1 ;; no scroll
50 call #0DFE ;; CL-SC-ALL
60 ;; draw6InvMask: char inverse mask (norm: #00; inv: #FC)
61 ;; draw6CharMask: screen AND mask (norm: #03; over: #FF)
62 ;; draw6PutALU0: OR(#B2)/XOR(#AA) -- curr. XOR
63 ;; draw6PutALU1: OR(#B3)/XOR(#AB) -- curr. XOR
74 ;; calc screen address
109 ld (Draw6Shift),a ; [#00] [#00]
115 draw6InvMask: equ $+1
120 draw6CharMask: equ $+2
155 and #1F ;; char byte is zero?
177 ;; end of internal EmitChar
182 ;; check for the new line
199 jp #0DFE ;; CL-SC-ALL
200 ;; end of internal CR proc
203 ;; draw one char, advance pos, scroll if necessary
204 $FORTH_CODE_WORD XEMIT
212 $FORTH_END_CODE_WORD XEMIT
227 $FORTH_END_CODE_WORD CLS
230 ;; backspace (back one char)
231 $FORTH_CODE_WORD EMITBS
237 jp z,i_next ;; can't move above the top
240 jr z,bs6_0 ;; up one line
249 $FORTH_END_CODE_WORD EMITBS
252 ;; draw one char, advance pos, scroll if necessary
260 ;; #13 -- cr (no line feed)
261 $FORTH_CODE_WORD EMIT
296 $FORTH_END_CODE_WORD EMIT
307 $FORTH_END_CODE_WORD CR
310 ;; vertical tab (#10)
311 $FORTH_CODE_WORD VTAB
318 $FORTH_END_CODE_WORD VTAB
321 ;; horizontal tab (#9)
322 $FORTH_CODE_WORD HTAB
329 jr c,htab6_0 ;; no new line
334 jr c,htab6_q ;; there were spaces, so tab is complete %-)
354 $FORTH_END_CODE_WORD HTAB
356 $FORTH_CODE_WORD WHEREX
362 $FORTH_END_CODE_WORD WHEREX
364 $FORTH_CODE_WORD WHEREY
370 $FORTH_END_CODE_WORD WHEREY
372 $FORTH_CODE_WORD GOTOXY
382 $FORTH_END_CODE_WORD GOTOXY
384 $FORTH_CODE_WORD TOVER
408 $FORTH_END_CODE_WORD TOVER
410 $FORTH_CODE_WORD TOVER?
419 $FORTH_END_CODE_WORD TOVER?
421 $FORTH_CODE_WORD TINV
431 $FORTH_END_CODE_WORD TINV
433 $FORTH_CODE_WORD TINV?
443 $FORTH_END_CODE_WORD TINV?
446 $FORTH_CODE_WORD SPACE
450 $FORTH_END_CODE_WORD SPACE
452 $FORTH_CODE_WORD EMITCR
457 $FORTH_END_CODE_WORD EMITCR
459 $FORTH_CODE_WORD SPACES
479 $FORTH_END_CODE_WORD SPACES
485 dup 0 > 0BRANCH type1
500 dup 0 > 0BRANCH xtype1
510 $FORTH_END_WORD XTYPE
513 $FORTH_WORD (.") ;; "
515 R@ COUNT dup 1+ R> + >R TYPE ;S
516 $FORTH_END_WORD (.") ;; "