]> git.sur5r.net Git - cc65/commitdiff
poor man's _toascii routine, contributed by Fatih Aygun
authorcpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 23 Nov 2009 21:35:33 +0000 (21:35 +0000)
committercpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 23 Nov 2009 21:35:33 +0000 (21:35 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4477 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atari/Makefile
libsrc/atari/toascii.s [new file with mode: 0644]

index 95ca16229fced6ac7ab5bd263cb10b14f7a19eac..3b11f0f2fcf6794ce4b6620f604d442b6855e6c6 100644 (file)
@@ -108,6 +108,7 @@ OBJS =      _scrsize.o      \
        sysrmdir.o      \
        systime.o       \
        sysuname.o      \
+       toascii.o       \
        tgi_mode_table.o\
        tvtype.o        \
        ucase_fn.o      \
diff --git a/libsrc/atari/toascii.s b/libsrc/atari/toascii.s
new file mode 100644 (file)
index 0000000..328f1f4
--- /dev/null
@@ -0,0 +1,19 @@
+;
+; unsigned char __fastcall__ toascii (unsigned char c);
+; /* Convert a target specific character to ascii */
+;
+
+.export _toascii
+
+.proc _toascii
+
+; Clear the inverse video bit
+       and     #$7F
+
+; X must be zero on return
+       ldx     #0
+
+; Done!
+       rts
+
+.endproc