From 807b55862d7f51a8d1106a501d4be82d9c15e9de Mon Sep 17 00:00:00 2001 From: jede Date: Sat, 28 Oct 2017 00:37:47 +0200 Subject: [PATCH] Now mkdir is working --- asminc/telestrat.inc | 1 + libsrc/telestrat/oserror.s | 17 +++++++++++++++++ libsrc/telestrat/sysmkdir.s | 30 ++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 libsrc/telestrat/oserror.s create mode 100644 libsrc/telestrat/sysmkdir.s diff --git a/asminc/telestrat.inc b/asminc/telestrat.inc index 737c4b6ae..cb28919c2 100644 --- a/asminc/telestrat.inc +++ b/asminc/telestrat.inc @@ -171,6 +171,7 @@ XSOUND = $44 XMUSIC = $45 XZAP = $46 XSHOOT = $47 +XMKDIR = $4B ; create a folder. Only available in telemon 3.x XSOUT = $67 ; send A register to RS232, available in telemon 2.4 & 3.x XHRSSE = $8C ; set hires position cursor XDRAWA = $8D ; draw a line diff --git a/libsrc/telestrat/oserror.s b/libsrc/telestrat/oserror.s new file mode 100644 index 000000000..e3b9e619a --- /dev/null +++ b/libsrc/telestrat/oserror.s @@ -0,0 +1,17 @@ +; +; Jede, 2017-10-27 +; +; int __fastcall__ _osmaperrno (unsigned char oserror); +; /* Map a system specific error into a system independent code */ +; + + .include "errno.inc" + .export __osmaperrno + +.proc __osmaperrno + + lda #EUNKNOWN + rts + +.endproc diff --git a/libsrc/telestrat/sysmkdir.s b/libsrc/telestrat/sysmkdir.s new file mode 100644 index 000000000..26d97c4b0 --- /dev/null +++ b/libsrc/telestrat/sysmkdir.s @@ -0,0 +1,30 @@ +; +; Jede (jede@oric.org), 2017-10-27 +; +; unsigned char _sysmkdir (const char* name, ...); +; + + .export __sysmkdir + .import addysp, popax + + .include "telestrat.inc" + .include "zeropage.inc" + + +__sysmkdir: + ; Throw away all parameters except the name + dey + dey + jsr addysp + + ; Get name + jsr popax + + ; Call telemon primitive + + BRK_TELEMON(XMKDIR) + + rts + + +