From: cuz Date: Sun, 7 Jul 2002 11:12:41 +0000 (+0000) Subject: Add tgi_horline X-Git-Tag: V2.12.0~2288 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e2f95ebca50cf7e7a9f6dd70128698b343ea194b;p=cc65 Add tgi_horline git-svn-id: svn://svn.cc65.org/cc65/trunk@1336 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/asminc/tgi-kernel.inc b/asminc/tgi-kernel.inc index da96603c2..a4c55db93 100644 --- a/asminc/tgi-kernel.inc +++ b/asminc/tgi-kernel.inc @@ -42,8 +42,7 @@ TGI_HDR_XRES = 4 ; X resolution TGI_HDR_YRES = 6 ; Y resolution TGI_HDR_COLORCOUNT = 8 ; Number of available colors TGI_HDR_PAGECOUNT = 9 ; Number of screens available -TGI_HDR_ERROR = 10 ; Error code -TGI_HDR_RES = 11 ; Reserved for extensions +TGI_HDR_RES = 10 ; Reserved for extensions TGI_HDR_JUMPTAB = 16 TGI_HDR_INSTALL = TGI_HDR_JUMPTAB+0 ; INSTALL routine @@ -61,11 +60,12 @@ TGI_HDR_GETPALETTE = TGI_HDR_JUMPTAB+22 ; GETPALETTE routine TGI_HDR_GETDEFPALETTE = TGI_HDR_JUMPTAB+24 ; GETDEFPALETTE routine TGI_HDR_SETPIXEL = TGI_HDR_JUMPTAB+26 ; SETPIXEL routine TGI_HDR_GETPIXEL = TGI_HDR_JUMPTAB+28 ; GETPIXEL routine -TGI_HDR_LINE = TGI_HDR_JUMPTAB+30 ; LINE routine -TGI_HDR_BAR = TGI_HDR_JUMPTAB+32 ; BAR routine -TGI_HDR_CIRCLE = TGI_HDR_JUMPTAB+34 ; CIRCLE routine +TGI_HDR_HORLINE = TGI_HDR_JUMPTAB+30 ; HORLINE routine +TGI_HDR_LINE = TGI_HDR_JUMPTAB+32 ; LINE routine +TGI_HDR_BAR = TGI_HDR_JUMPTAB+34 ; BAR routine +TGI_HDR_CIRCLE = TGI_HDR_JUMPTAB+36 ; CIRCLE routine -TGI_HDR_JUMPCOUNT = 18 ; Number of jump vectors +TGI_HDR_JUMPCOUNT = 19 ; Number of jump vectors ;------------------------------------------------------------------------------ ; Variables @@ -99,6 +99,7 @@ TGI_HDR_JUMPCOUNT = 18 ; Number of jump vectors .global tgi_getdefpalette .global tgi_setpixel .global tgi_getpixel + .global tgi_horline .global tgi_line .global tgi_bar .global tgi_circle @@ -113,3 +114,4 @@ TGI_HDR_JUMPCOUNT = 18 ; Number of jump vectors .global tgi_linepop .global tgi_set_ptr + diff --git a/include/tgi/tgi-kernel.h b/include/tgi/tgi-kernel.h index de9f6041a..6111c06d7 100644 --- a/include/tgi/tgi-kernel.h +++ b/include/tgi/tgi-kernel.h @@ -56,8 +56,7 @@ typedef struct { unsigned yres; /* Y resolution */ unsigned char colorcount; /* Number of available colors */ unsigned char pagecount; /* Number of screens available */ - unsigned char error; /* Error code */ - unsigned char res[5]; /* Reserved for extensions */ + unsigned char res[6]; /* Reserved for extensions */ /* Jump vectors. Note that these are not C callable */ void* install; /* INSTALL routine */ @@ -75,6 +74,7 @@ typedef struct { void* getdefpalette; /* GETDEFPALETTE routine */ void* setpixel; /* SETPIXEL routine */ void* getpixel; /* GETPIXEL routine */ + void* horline; /* HORLINE routine */ void* line; /* LINE routine */ void* bar; /* BAR routine */ void* circle; /* CIRCLE routine */ @@ -116,4 +116,4 @@ void __fastcall__ tgi_setup (void); - + diff --git a/libsrc/tgi/tgi-kernel.s b/libsrc/tgi/tgi-kernel.s index 80592faa5..acc46c08b 100644 --- a/libsrc/tgi/tgi-kernel.s +++ b/libsrc/tgi/tgi-kernel.s @@ -47,6 +47,7 @@ tgi_getpalette: jmp $0000 tgi_getdefpalette: jmp $0000 tgi_setpixel: jmp $0000 tgi_getpixel: jmp $0000 +tgi_horline: jmp $0000 tgi_line: jmp $0000 tgi_bar: jmp $0000 tgi_circle: jmp $0000 diff --git a/libsrc/tgi/tgi_emu_bar.s b/libsrc/tgi/tgi_emu_bar.s index 6af7cc336..048f10bee 100644 --- a/libsrc/tgi/tgi_emu_bar.s +++ b/libsrc/tgi/tgi_emu_bar.s @@ -32,7 +32,7 @@ tgi_emu_bar: lda ptr1+1 sta X1+1 -@L1: jsr tgi_line +@L1: jsr tgi_horline lda Y1 cmp Y2 @@ -47,10 +47,8 @@ tgi_emu_bar: @L3: lda Y1 sta ptr2 - sta ptr4 lda Y1+1 sta ptr2+1 - sta ptr4+1 lda X1 sta ptr1