2 ; Ullrich von Bassewitz, 21.06.2002
4 ; void __fastcall__ tgi_outtext (const char* s);
5 ; /* Output text at the current graphics cursor position. */
8 .include "tgi-kernel.inc"
9 .include "tgi-vectorfont.inc"
10 .include "zeropage.inc"
15 ;----------------------------------------------------------------------------
20 ;----------------------------------------------------------------------------
25 ldy _tgi_font ; Bit or vectorfont?
28 ; Handle bitmapped font output
31 stx ptr3+1 ; Pass s in ptr3 to driver
34 pha ; Save s on stack for later
36 jsr tgi_curtoxy ; Copy curx/cury into ptr1/ptr2
37 jsr tgi_outtext ; Call the driver
42 jsr _tgi_textwidth ; Get width of text string
43 ldy _tgi_textdir ; Horizontal or vertical text?
44 beq @L1 ; Jump if horizontal
46 ; Move graphics cursor for vertical text
49 ldy #2 ; Point to _tgi_cury
51 ; Move graphics cursor for horizontal text
61 ; Handle vector font output
65 lda _tgi_vectorfont ; Do we have a vector font?
67 beq Done ; Bail out if not
69 lda text ; Save zero page variable on stack
75 stx text+1 ; Store pointer to string
77 ; Output the text string
80 lda (text),y ; Get next character from string
82 jsr _tgi_vectorchar ; Output it
88 ; Done. Restore registers and return