From f7636fe8f2de6e457fe1c3b0a55856513dca3ef1 Mon Sep 17 00:00:00 2001 From: Olli Savia Date: Tue, 3 Jul 2018 22:47:42 +0300 Subject: [PATCH] Removed .import for std kernal entries. Added .include "cbm.inc" --- libsrc/cbm/c_acptr.s | 2 +- libsrc/cbm/c_basin.s | 2 +- libsrc/cbm/c_bsout.s | 2 +- libsrc/cbm/c_chkin.s | 3 ++- libsrc/cbm/c_ciout.s | 5 ++--- libsrc/cbm/c_ckout.s | 2 +- libsrc/cbm/c_clall.s | 2 +- libsrc/cbm/c_close.s | 6 ++---- libsrc/cbm/c_clrch.s | 2 +- libsrc/cbm/c_getin.s | 2 +- libsrc/cbm/c_iobase.s | 4 ++-- libsrc/cbm/c_listen.s | 7 +------ libsrc/cbm/c_load.s | 3 +-- libsrc/cbm/c_open.s | 2 +- libsrc/cbm/c_readst.s | 2 +- libsrc/cbm/c_save.s | 2 +- libsrc/cbm/c_scnkey.s | 2 +- libsrc/cbm/c_second.s | 6 ++---- libsrc/cbm/c_setlfs.s | 6 ++---- libsrc/cbm/c_setnam.s | 5 ++--- libsrc/cbm/c_talk.s | 9 +-------- libsrc/cbm/c_tksa.s | 6 ++---- libsrc/cbm/c_udtim.s | 2 +- libsrc/cbm/c_unlsn.s | 2 +- libsrc/cbm/c_untlk.s | 3 +-- libsrc/cbm/cbm_read.s | 1 - libsrc/cbm/cbm_write.s | 3 +-- libsrc/cbm/clock.s | 4 +--- libsrc/cbm/close.s | 7 +------ libsrc/cbm/diskcmd.s | 2 -- libsrc/cbm/filename.s | 2 +- libsrc/cbm/open.s | 2 +- libsrc/cbm/read.s | 1 - libsrc/cbm/write.s | 1 - 34 files changed, 38 insertions(+), 74 deletions(-) diff --git a/libsrc/cbm/c_acptr.s b/libsrc/cbm/c_acptr.s index 87f063a07..0c1363c8c 100644 --- a/libsrc/cbm/c_acptr.s +++ b/libsrc/cbm/c_acptr.s @@ -4,8 +4,8 @@ ; unsigned char cbm_k_acptr (void); ; + .include "cbm.inc" .export _cbm_k_acptr - .import ACPTR _cbm_k_acptr: diff --git a/libsrc/cbm/c_basin.s b/libsrc/cbm/c_basin.s index 15d7e7f5c..9e3befee0 100644 --- a/libsrc/cbm/c_basin.s +++ b/libsrc/cbm/c_basin.s @@ -4,8 +4,8 @@ ; unsigned char cbm_k_basin (void); ; + .include "cbm.inc" .export _cbm_k_basin - .import BASIN _cbm_k_basin: diff --git a/libsrc/cbm/c_bsout.s b/libsrc/cbm/c_bsout.s index 8b9f44037..043efd7d3 100644 --- a/libsrc/cbm/c_bsout.s +++ b/libsrc/cbm/c_bsout.s @@ -4,7 +4,7 @@ ; void __fastcall__ cbm_k_bsout (unsigned char C); ; + .include "cbm.inc" .export _cbm_k_bsout - .import BSOUT _cbm_k_bsout = BSOUT diff --git a/libsrc/cbm/c_chkin.s b/libsrc/cbm/c_chkin.s index 4ed8c1bff..39bc2222e 100644 --- a/libsrc/cbm/c_chkin.s +++ b/libsrc/cbm/c_chkin.s @@ -4,8 +4,9 @@ ; unsigned char __fastcall__ cbm_k_chkin (unsigned char FN); ; + .include "cbm.inc" .export _cbm_k_chkin - .import CHKIN + _cbm_k_chkin: tax diff --git a/libsrc/cbm/c_ciout.s b/libsrc/cbm/c_ciout.s index 9906e0658..5ef59c5b7 100644 --- a/libsrc/cbm/c_ciout.s +++ b/libsrc/cbm/c_ciout.s @@ -4,7 +4,6 @@ ; void __fastcall__ cbm_k_ciout (unsigned char C); ; - .import CIOUT - .export _cbm_k_ciout := CIOUT - + .include "cbm.inc" + .export _cbm_k_ciout := CIOUT diff --git a/libsrc/cbm/c_ckout.s b/libsrc/cbm/c_ckout.s index 380d7170a..9efbb7343 100644 --- a/libsrc/cbm/c_ckout.s +++ b/libsrc/cbm/c_ckout.s @@ -4,8 +4,8 @@ ; unsigned char __fastcall__ cbm_k_ckout (unsigned char FN); ; + .include "cbm.inc" .export _cbm_k_ckout - .import CKOUT _cbm_k_ckout: diff --git a/libsrc/cbm/c_clall.s b/libsrc/cbm/c_clall.s index cdd7d4ddc..1bc7bf747 100644 --- a/libsrc/cbm/c_clall.s +++ b/libsrc/cbm/c_clall.s @@ -4,5 +4,5 @@ ; void cbm_k_clall (void); ; - .import CLALL + .include "cbm.inc" .export _cbm_k_clall := CLALL diff --git a/libsrc/cbm/c_close.s b/libsrc/cbm/c_close.s index 9582baca2..db19f34c6 100644 --- a/libsrc/cbm/c_close.s +++ b/libsrc/cbm/c_close.s @@ -4,11 +4,9 @@ ; void __fastcall__ cbm_k_close (unsigned char FN); ; + .include "cbm.inc" .export _cbm_k_close - .import CLOSE _cbm_k_close: - clc + clc jmp CLOSE - - diff --git a/libsrc/cbm/c_clrch.s b/libsrc/cbm/c_clrch.s index 7c0506a1c..b0db2be4e 100644 --- a/libsrc/cbm/c_clrch.s +++ b/libsrc/cbm/c_clrch.s @@ -4,7 +4,7 @@ ; void cbm_k_clrch (void); ; + .include "cbm.inc" .export _cbm_k_clrch - .import CLRCH _cbm_k_clrch = CLRCH diff --git a/libsrc/cbm/c_getin.s b/libsrc/cbm/c_getin.s index b4cb34f76..23c1edc74 100644 --- a/libsrc/cbm/c_getin.s +++ b/libsrc/cbm/c_getin.s @@ -4,8 +4,8 @@ ; unsigned char cbm_k_getin (void); ; + .include "cbm.inc" .export _cbm_k_getin - .import GETIN _cbm_k_getin: diff --git a/libsrc/cbm/c_iobase.s b/libsrc/cbm/c_iobase.s index 254879017..58b66fd0b 100644 --- a/libsrc/cbm/c_iobase.s +++ b/libsrc/cbm/c_iobase.s @@ -4,10 +4,10 @@ ; unsigned cbm_k_iobase (void); ; + .include "cbm.inc" .export _cbm_k_iobase - .import IOBASE -_cbm_k_iobase: +_cbm_k_iobase: jsr IOBASE txa pha diff --git a/libsrc/cbm/c_listen.s b/libsrc/cbm/c_listen.s index 85ef8b7fa..38908a60b 100644 --- a/libsrc/cbm/c_listen.s +++ b/libsrc/cbm/c_listen.s @@ -4,10 +4,5 @@ ; void __fastcall__ cbm_k_listen (unsigned char dev); ; - .import LISTEN + .include "cbm.inc" .export _cbm_k_listen := LISTEN - - - - - diff --git a/libsrc/cbm/c_load.s b/libsrc/cbm/c_load.s index f2b5b0c89..c9bd55ca0 100644 --- a/libsrc/cbm/c_load.s +++ b/libsrc/cbm/c_load.s @@ -4,8 +4,8 @@ ; unsigned int __fastcall__ cbm_k_load (unsigned char flag, unsigned addr); ; + .include "cbm.inc" .export _cbm_k_load - .import LOAD .import __oserror .import popa .importzp ptr1 @@ -27,4 +27,3 @@ _cbm_k_load: tax pla rts - diff --git a/libsrc/cbm/c_open.s b/libsrc/cbm/c_open.s index 6461ffedf..63249a57f 100644 --- a/libsrc/cbm/c_open.s +++ b/libsrc/cbm/c_open.s @@ -4,8 +4,8 @@ ; unsigned char cbm_k_open (void); ; + .include "cbm.inc" .export _cbm_k_open - .import OPEN _cbm_k_open: diff --git a/libsrc/cbm/c_readst.s b/libsrc/cbm/c_readst.s index 301cd9b42..e6243cef0 100644 --- a/libsrc/cbm/c_readst.s +++ b/libsrc/cbm/c_readst.s @@ -4,8 +4,8 @@ ; unsigned char cbm_k_readst (void); ; + .include "cbm.inc" .export _cbm_k_readst - .import READST _cbm_k_readst: diff --git a/libsrc/cbm/c_save.s b/libsrc/cbm/c_save.s index 0597e9401..6d05e6344 100644 --- a/libsrc/cbm/c_save.s +++ b/libsrc/cbm/c_save.s @@ -4,8 +4,8 @@ ; unsigned char __fastcall__ cbm_k_save(unsigned int start, unsigned int end); ; + .include "cbm.inc" .export _cbm_k_save - .import SAVE .import popptr1 .importzp ptr1, tmp1 diff --git a/libsrc/cbm/c_scnkey.s b/libsrc/cbm/c_scnkey.s index cdae50e7b..38e3f4cec 100644 --- a/libsrc/cbm/c_scnkey.s +++ b/libsrc/cbm/c_scnkey.s @@ -4,5 +4,5 @@ ; void cbm_k_scnkey (void); ; - .import SCNKEY + .include "cbm.inc" .export _cbm_k_scnkey := SCNKEY diff --git a/libsrc/cbm/c_second.s b/libsrc/cbm/c_second.s index b5cc98c80..2670e1cd4 100644 --- a/libsrc/cbm/c_second.s +++ b/libsrc/cbm/c_second.s @@ -4,9 +4,7 @@ ; void __fastcall__ cbm_k_second (unsigned char addr) ; - - .import SECOND - .export _cbm_k_second + .include "cbm.inc" + .export _cbm_k_second _cbm_k_second = SECOND - diff --git a/libsrc/cbm/c_setlfs.s b/libsrc/cbm/c_setlfs.s index 00ebfae7a..b93d80c09 100644 --- a/libsrc/cbm/c_setlfs.s +++ b/libsrc/cbm/c_setlfs.s @@ -6,11 +6,11 @@ ; unsigned char SA); ; + .include "cbm.inc" .export _cbm_k_setlfs - .import SETLFS .import popa .importzp tmp1 - + _cbm_k_setlfs: sta tmp1 ; Save SA @@ -19,5 +19,3 @@ _cbm_k_setlfs: jsr popa ; Get LFN ldy tmp1 ; Get SA jmp SETLFS - - diff --git a/libsrc/cbm/c_setnam.s b/libsrc/cbm/c_setnam.s index 3249d8539..5b6b90c64 100644 --- a/libsrc/cbm/c_setnam.s +++ b/libsrc/cbm/c_setnam.s @@ -4,10 +4,10 @@ ; void __fastcall__ cbm_k_setnam (const char* Name); ; + .include "cbm.inc" .export _cbm_k_setnam - .import SETNAM .importzp ptr1 - + _cbm_k_setnam: sta ptr1 ; Store pointer to file name @@ -21,4 +21,3 @@ _cbm_k_setnam: ldx ptr1 ldy ptr1+1 jmp SETNAM - diff --git a/libsrc/cbm/c_talk.s b/libsrc/cbm/c_talk.s index ff80b3499..01ab376d1 100644 --- a/libsrc/cbm/c_talk.s +++ b/libsrc/cbm/c_talk.s @@ -4,12 +4,5 @@ ; void __fastcall__ cbm_k_talk (unsigned char dev); ; - .import TALK + .include "cbm.inc" .export _cbm_k_talk := TALK - - - - - - - diff --git a/libsrc/cbm/c_tksa.s b/libsrc/cbm/c_tksa.s index b818d7205..c59c7f5a0 100644 --- a/libsrc/cbm/c_tksa.s +++ b/libsrc/cbm/c_tksa.s @@ -4,9 +4,7 @@ ; void __fastcall__ cbm_k_tksa (unsigned char addr) ; - - .import TKSA - .export _cbm_k_tksa + .include "cbm.inc" + .export _cbm_k_tksa _cbm_k_tksa = TKSA - diff --git a/libsrc/cbm/c_udtim.s b/libsrc/cbm/c_udtim.s index b867efaba..ba12d1e35 100644 --- a/libsrc/cbm/c_udtim.s +++ b/libsrc/cbm/c_udtim.s @@ -4,5 +4,5 @@ ; void cbm_k_udtim (void); ; - .import UDTIM + .include "cbm.inc" .export _cbm_k_udtim := UDTIM diff --git a/libsrc/cbm/c_unlsn.s b/libsrc/cbm/c_unlsn.s index fd6b1b074..5a525374b 100644 --- a/libsrc/cbm/c_unlsn.s +++ b/libsrc/cbm/c_unlsn.s @@ -4,5 +4,5 @@ ; void cbm_k_unlsn (void); ; - .import UNLSN + .include "cbm.inc" .export _cbm_k_unlsn := UNLSN diff --git a/libsrc/cbm/c_untlk.s b/libsrc/cbm/c_untlk.s index 3865564cd..dfde77e3f 100644 --- a/libsrc/cbm/c_untlk.s +++ b/libsrc/cbm/c_untlk.s @@ -4,8 +4,7 @@ ; void cbm_k_untlk (void); ; + .include "cbm.inc" .export _cbm_k_untlk - .import UNTLK - _cbm_k_untlk = UNTLK diff --git a/libsrc/cbm/cbm_read.s b/libsrc/cbm/cbm_read.s index c84ff65aa..b010966a3 100644 --- a/libsrc/cbm/cbm_read.s +++ b/libsrc/cbm/cbm_read.s @@ -39,7 +39,6 @@ .include "cbm.inc" .export _cbm_read - .import CHKIN, READST, BASIN, CLRCH .importzp ptr1, ptr2, ptr3, tmp1 .import popax, popa .import __oserror diff --git a/libsrc/cbm/cbm_write.s b/libsrc/cbm/cbm_write.s index 0b709dff8..2d932d04a 100644 --- a/libsrc/cbm/cbm_write.s +++ b/libsrc/cbm/cbm_write.s @@ -31,11 +31,10 @@ .include "cbm.inc" .export _cbm_write - .import CKOUT, READST, BSOUT, CLRCH .importzp ptr1, ptr2, ptr3 .import popax, popa .import __oserror - + _cbm_write: sta ptr3 diff --git a/libsrc/cbm/clock.s b/libsrc/cbm/clock.s index ce36e3af5..0c8ba9c45 100644 --- a/libsrc/cbm/clock.s +++ b/libsrc/cbm/clock.s @@ -4,12 +4,11 @@ ; clock_t clock (void); ; + .include "cbm.inc" .export _clock - .import RDTIM .importzp sreg - .proc _clock lda #0 ; Byte 3 is always zero @@ -19,4 +18,3 @@ rts .endproc - diff --git a/libsrc/cbm/close.s b/libsrc/cbm/close.s index b43c07b57..7fc600e87 100644 --- a/libsrc/cbm/close.s +++ b/libsrc/cbm/close.s @@ -6,7 +6,6 @@ .export _close - .import CLOSE .import readdiskerror, closecmdchannel .importzp tmp2 @@ -17,7 +16,7 @@ ;-------------------------------------------------------------------------- ; _close - + .proc _close ; Check if we have a valid handle @@ -64,7 +63,3 @@ invalidfd: jmp __directerrno ; Set _errno, clear _oserror, return -1 .endproc - - - - diff --git a/libsrc/cbm/diskcmd.s b/libsrc/cbm/diskcmd.s index d090afe14..dbc15efbe 100644 --- a/libsrc/cbm/diskcmd.s +++ b/libsrc/cbm/diskcmd.s @@ -11,8 +11,6 @@ .export writediskcmd .export writefndiskcmd - .import SETLFS, SETNAM, OPEN, CLOSE, BSOUT, BASIN - .import CHKIN, CKOUT, CLRCH .import fncmd, fnlen, fnunit .importzp tmp1, ptr1 diff --git a/libsrc/cbm/filename.s b/libsrc/cbm/filename.s index a2b8aab5a..413b88d2a 100644 --- a/libsrc/cbm/filename.s +++ b/libsrc/cbm/filename.s @@ -8,11 +8,11 @@ .export fnadd, fnaddmode, fncomplete, fndefunit .export fnunit, fnlen, fnisfile, fncmd, fnbuf - .import SETNAM .import curunit, __filetype .importzp ptr1, tmp1 .include "ctype.inc" + .include "cbm.inc" ;------------------------------------------------------------------------------ diff --git a/libsrc/cbm/open.s b/libsrc/cbm/open.s index 5c97aff56..f23e97383 100644 --- a/libsrc/cbm/open.s +++ b/libsrc/cbm/open.s @@ -7,7 +7,6 @@ .export _open .destructor closeallfiles, 5 - .import SETLFS, OPEN, CLOSE .import addysp, popax .import scratch, fnparse, fnaddmode, fncomplete, fnset .import opencmdchannel, closecmdchannel, readdiskerror @@ -18,6 +17,7 @@ .include "errno.inc" .include "fcntl.inc" .include "filedes.inc" + .include "cbm.inc" ;-------------------------------------------------------------------------- diff --git a/libsrc/cbm/read.s b/libsrc/cbm/read.s index 9de4980ce..ee01596aa 100644 --- a/libsrc/cbm/read.s +++ b/libsrc/cbm/read.s @@ -8,7 +8,6 @@ .export _read .constructor initstdin - .import SETLFS, OPEN, CHKIN, BASIN, CLRCH, BSOUT, READST .import rwcommon .import popax .importzp ptr1, ptr2, ptr3, tmp1, tmp2, tmp3 diff --git a/libsrc/cbm/write.s b/libsrc/cbm/write.s index dddec0792..7a27f0044 100644 --- a/libsrc/cbm/write.s +++ b/libsrc/cbm/write.s @@ -7,7 +7,6 @@ .export _write .constructor initstdout - .import SETLFS, OPEN, CKOUT, BSOUT, READST, CLRCH .import rwcommon .importzp sp, ptr1, ptr2, ptr3 -- 2.39.5