]> git.sur5r.net Git - cc65/commitdiff
Added get_ostype.s
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 12 Aug 2003 17:48:31 +0000 (17:48 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 12 Aug 2003 17:48:31 +0000 (17:48 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2290 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/apple2/Makefile
libsrc/apple2/get_ostype.s [new file with mode: 0644]

index ccbe19f158b623ef59ce68de0a2fd69004e02cf7..75addc8274f5efa95364fd03c1437c533f44924e 100644 (file)
@@ -37,6 +37,7 @@ OBJS= _scrsize.o      \
        crt0.o          \
        ctype.o         \
        cvline.o        \
+        get_ostype.o    \
         getenv.o        \
         joy_stddrv.o    \
        kbhit.o         \
diff --git a/libsrc/apple2/get_ostype.s b/libsrc/apple2/get_ostype.s
new file mode 100644 (file)
index 0000000..b686cbb
--- /dev/null
@@ -0,0 +1,20 @@
+;
+; Stefan Haubenthal, Jul 12 2003
+;
+; unsigned char get_ostype(void)
+;
+; $23 ProDOS 2.0.3
+;
+
+       .export         _get_ostype
+
+.proc  _get_ostype
+
+       lda     #0
+       ldx     $bf00
+       cpx     #$4c    ; JMP opcode
+       bne     nopdos
+       lda     $bfff
+nopdos:        rts
+
+.endproc