]> git.sur5r.net Git - cc65/blob - asminc/tgi-kernel.inc
a4c55db93f43dbaca490244fc93369422596b44e
[cc65] / asminc / tgi-kernel.inc
1 ;*****************************************************************************/
2 ;*                                                                           */
3 ;*                                tgi-kernel.inc                             */
4 ;*                                                                           */
5 ;*                             TGI kernel interface                          */
6 ;*                                                                           */
7 ;*                                                                           */
8 ;*                                                                           */
9 ;* (C) 2002      Ullrich von Bassewitz                                       */
10 ;*               Wacholderweg 14                                             */
11 ;*               D-70597 Stuttgart                                           */
12 ;* EMail:        uz@musoftware.de                                            */
13 ;*                                                                           */
14 ;*                                                                           */
15 ;* This software is provided 'as-is', without any expressed or implied       */
16 ;* warranty.  In no event will the authors be held liable for any damages    */
17 ;* arising from the use of this software.                                    */
18 ;*                                                                           */
19 ;* Permission is granted to anyone to use this software for any purpose,     */
20 ;* including commercial applications, and to alter it and redistribute it    */
21 ;* freely, subject to the following restrictions:                            */
22 ;*                                                                           */
23 ;* 1. The origin of this software must not be misrepresented; you must not   */
24 ;*    claim that you wrote the original software. If you use this software   */
25 ;*    in a product, an acknowledgment in the product documentation would be  */
26 ;*    appreciated but is not required.                                       */
27 ;* 2. Altered source versions must be plainly marked as such, and must not   */
28 ;*    be misrepresented as being the original software.                      */
29 ;* 3. This notice may not be removed or altered from any source              */
30 ;*    distribution.                                                          */
31 ;*                                                                           */
32 ;*****************************************************************************/
33
34
35
36 ;------------------------------------------------------------------------------
37 ; Offsets into the driver header
38
39 TGI_HDR_ID              = 0             ; Contains 0x74, 0x67, 0x69 ("tgi")
40 TGI_HDR_VERSION         = 3             ; Interface version
41 TGI_HDR_XRES            = 4             ; X resolution
42 TGI_HDR_YRES            = 6             ; Y resolution
43 TGI_HDR_COLORCOUNT      = 8             ; Number of available colors
44 TGI_HDR_PAGECOUNT       = 9             ; Number of screens available
45 TGI_HDR_RES             = 10            ; Reserved for extensions
46
47 TGI_HDR_JUMPTAB         = 16
48 TGI_HDR_INSTALL         = TGI_HDR_JUMPTAB+0     ; INSTALL routine
49 TGI_HDR_DEINSTALL       = TGI_HDR_JUMPTAB+2     ; DEINSTALL routine
50 TGI_HDR_INIT            = TGI_HDR_JUMPTAB+4     ; INIT routine
51 TGI_HDR_DONE            = TGI_HDR_JUMPTAB+6     ; DONE routine
52 TGI_HDR_GETERROR        = TGI_HDR_JUMPTAB+8     ; GETERROR routine
53 TGI_HDR_CONTROL         = TGI_HDR_JUMPTAB+10    ; CONTROL routine
54 TGI_HDR_CLEAR           = TGI_HDR_JUMPTAB+12    ; CLEAR routine
55 TGI_HDR_SETVIEWPAGE     = TGI_HDR_JUMPTAB+14    ; SETVIEWPAGE routine
56 TGI_HDR_SETDRAWPAGE     = TGI_HDR_JUMPTAB+16    ; SETDRAWPAGE routine
57 TGI_HDR_SETCOLOR        = TGI_HDR_JUMPTAB+18    ; SETCOLOR routine
58 TGI_HDR_SETPALETTE      = TGI_HDR_JUMPTAB+20    ; SETPALETTE routine
59 TGI_HDR_GETPALETTE      = TGI_HDR_JUMPTAB+22    ; GETPALETTE routine
60 TGI_HDR_GETDEFPALETTE   = TGI_HDR_JUMPTAB+24    ; GETDEFPALETTE routine
61 TGI_HDR_SETPIXEL        = TGI_HDR_JUMPTAB+26    ; SETPIXEL routine
62 TGI_HDR_GETPIXEL        = TGI_HDR_JUMPTAB+28    ; GETPIXEL routine
63 TGI_HDR_HORLINE         = TGI_HDR_JUMPTAB+30    ; HORLINE routine
64 TGI_HDR_LINE            = TGI_HDR_JUMPTAB+32    ; LINE routine
65 TGI_HDR_BAR             = TGI_HDR_JUMPTAB+34    ; BAR routine
66 TGI_HDR_CIRCLE          = TGI_HDR_JUMPTAB+36    ; CIRCLE routine
67
68 TGI_HDR_JUMPCOUNT       = 19            ; Number of jump vectors
69
70 ;------------------------------------------------------------------------------
71 ; Variables
72
73         .global _tgi_drv                ; Pointer to driver
74         .global _tgi_error              ; Last error code
75         .global _tgi_mode               ; Graphics mode or zero
76         .global _tgi_curx               ; Current drawing cursor X
77         .global _tgi_cury               ; Current drawing cursor Y
78         .global _tgi_color              ; Current drawing color
79         .global _tgi_xres               ; X resolution of the current mode
80         .global _tgi_yres               ; Y resolution of the current mode
81         .global _tgi_colorcount         ; Number of available colors
82         .global _tgi_pagecount          ; Number of available screen pages
83
84 ;------------------------------------------------------------------------------
85 ; Driver entry points
86
87         .global tgi_install
88         .global tgi_deinstall
89         .global tgi_init
90         .global tgi_done
91         .global tgi_geterror
92         .global tgi_control
93         .global tgi_clear
94         .global tgi_setviewpage
95         .global tgi_setdrawpage
96         .global tgi_setcolor
97         .global tgi_setpalette
98         .global tgi_getpalette
99         .global tgi_getdefpalette
100         .global tgi_setpixel
101         .global tgi_getpixel
102         .global tgi_horline
103         .global tgi_line
104         .global tgi_bar
105         .global tgi_circle
106
107
108 ;------------------------------------------------------------------------------
109 ; ASM functions
110
111         .global tgi_emu_bar
112         .global tgi_getset
113         .global tgi_inv_arg
114         .global tgi_linepop
115         .global tgi_set_ptr
116
117