TGI Implementation

git-svn-id: svn://svn.cc65.org/cc65/trunk@1312 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2002-06-21 13:28:51 +00:00
parent e50b24d46a
commit f82ac8a91c
7 changed files with 97 additions and 5 deletions

View File

@@ -6,6 +6,9 @@
.include "tgi-kernel.inc"
.importzp ptr1
;----------------------------------------------------------------------------
; Variables
@@ -13,10 +16,11 @@
_tgi_drv: .res 2 ; Pointer to driver
_tgi_error: .res 1 ; Last error code
_tgi_mode: .res 1 ; Graphics mode or zero
.data
; Jump table for the driver functions.
tgi_install: jmp $0000
@@ -52,11 +56,14 @@ tgi_setup:
lda (ptr1),y
sta tgi_install,x
inx
cpx #(TGI_HDR_JMPCOUNT*3)
cpx #(TGI_HDR_JUMPCOUNT*3)
bne @L1
; Initialize variables
lda #$00
sta _tgi_error
sta _tgi_mode
jsr tgi_install ; Call driver install routine