]> git.sur5r.net Git - cc65/commitdiff
Added tgi_ioctl
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 14 Oct 2004 18:24:52 +0000 (18:24 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 14 Oct 2004 18:24:52 +0000 (18:24 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3252 b7a2c559-68d2-44c3-8de9-860c34a00d81

include/tgi.h
libsrc/tgi/Makefile
libsrc/tgi/tgi_ioctl.s [new file with mode: 0644]

index adda65658a4b0ca9b2a49d94fe597aeceddf6974..d43ebeecb276b19c5b4229f22c17a9471bf94434 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2002-2003 Ullrich von Bassewitz                                       */
+/* (C) 2002-2004 Ullrich von Bassewitz                                       */
 /*               Römerstrasse 52                                             */
 /*               D-70794 Filderstadt                                         */
 /* EMail:        uz@cc65.org                                                 */
@@ -209,6 +209,12 @@ void __fastcall__ tgi_outtextxy (int x, int y, const char* s);
  * the end of the text.
  */
 
+unsigned __fastcall__ tgi_ioctl (unsigned char code, unsigned val);
+/* Call the driver specific control function. What this function does for
+ * a specific code depends on the driver. The driver will set an error
+ * for unknown codes or values.
+ */
+
 
 
 /* End of tgi.h */
index 4ffea9d0131ed93887d989260403966e01df5d1f..3f13d37aeece82f3fa00b928e0b2c833d5ffe38e 100644 (file)
@@ -41,6 +41,7 @@ S_OBJS =              tgi-kernel.o            \
                 tgi_getyres.o           \
                 tgi_gotoxy.o            \
                 tgi_init.o              \
+                tgi_ioctl.o             \
                 tgi_line.o              \
                 tgi_linepop.o           \
                 tgi_lineto.o            \
diff --git a/libsrc/tgi/tgi_ioctl.s b/libsrc/tgi/tgi_ioctl.s
new file mode 100644 (file)
index 0000000..35542f3
--- /dev/null
@@ -0,0 +1,26 @@
+;
+; Ullrich von Bassewitz, 2004-10-14
+;
+; unsigned __fastcall__ tgi_ioctl (unsigned char code, unsigned val);
+; /* Call the driver specific control function. What this function does for
+;  * a specific code depends on the driver. The driver will set an error
+;  * for unknown codes or values.
+;  */
+;
+
+        .include        "tgi-kernel.inc"
+
+        .import         popa
+        .importzp       ptr1
+
+
+.proc   _tgi_ioctl
+
+        sta     ptr1
+        stx     ptr1+1          ; Save val
+        jsr     popa            ; Retrieve code
+        jmp     tgi_control     ; Call the driver
+
+.endproc
+
+