2 ; Oliver Schmidt, 10.03.2004
4 ; void __fastcall__ textframexy (unsigned char x, unsigned char y,
5 ; unsigned char width, unsigned char height,
6 ; unsigned char style);
7 ; void __fastcall__ textframe (unsigned char width, unsigned char height,
8 ; unsigned char style);
12 .export _textframexy, _textframe
13 .import popa, pusha, _gotoxy
14 .import chlinedirect, cvlinedirect
16 .include "zeropage.inc"
31 phx ; Save character display mode
33 stx INVFLG ; Set normal character display mode
50 bpl :+ ; Relative to left edge?
56 bpl :+ ; Relative to top?
59 jsr _gotoxy ; Call this one, will pop params
62 lsr ; Get bit 0 (vline) into carry
73 next: plx ; Restore index
79 sta INVFLG ; Restore character display mode
84 ; 2 styles with 4 lines each make up 8 entries per table
85 ; - even entry numbers mean horizontal lines
86 ; - odd entry numbers mean vertical lines
88 ; x offset for the line starting point
89 ; - a positive value means relative to the frame left edge
90 ; - a negative value menas relative to the frame right edge
91 XOFFS: .byte 0, 0, 0, <-2, 1, 0, 1, <-2
93 ; y offset for the line starting point
94 ; - a positive value means relative to the frame top
95 ; - a negative value menas relative to the frame bottom
96 YOFFS: .byte 0, 1, <-2, 1, 0, 0, <-2, 0
98 ; length of the line relative to the frame size
99 ; - a negative value for hlines means shorter than the width
100 ; - a negative value for vlines menas shorter than the height
101 LENGTH: .byte 0, <-2, 0, <-2, <-2, 0, <-2, 0
103 ; character to use for drawing the line
104 ; - hibit set means normal printable character
105 ; - hibit clear means MouseText character
106 CHAR: .byte '_'|$80, '_', 'L', 'Z', 'L', 'Z', '_'|$80, '_'
108 .endif ; __APPLE2ENH__