1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 04:30:10 +00:00

Removed .import for std kernal entries. Added .include "cbm.inc"

This commit is contained in:
Olli Savia 2018-07-03 22:47:42 +03:00
parent 032a3877e0
commit f7636fe8f2
34 changed files with 38 additions and 74 deletions

View File

@ -4,8 +4,8 @@
; unsigned char cbm_k_acptr (void);
;
.include "cbm.inc"
.export _cbm_k_acptr
.import ACPTR
_cbm_k_acptr:

View File

@ -4,8 +4,8 @@
; unsigned char cbm_k_basin (void);
;
.include "cbm.inc"
.export _cbm_k_basin
.import BASIN
_cbm_k_basin:

View File

@ -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

View File

@ -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

View File

@ -4,7 +4,6 @@
; void __fastcall__ cbm_k_ciout (unsigned char C);
;
.import CIOUT
.include "cbm.inc"
.export _cbm_k_ciout := CIOUT

View File

@ -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:

View File

@ -4,5 +4,5 @@
; void cbm_k_clall (void);
;
.import CLALL
.include "cbm.inc"
.export _cbm_k_clall := CLALL

View File

@ -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

View File

@ -4,7 +4,7 @@
; void cbm_k_clrch (void);
;
.include "cbm.inc"
.export _cbm_k_clrch
.import CLRCH
_cbm_k_clrch = CLRCH

View File

@ -4,8 +4,8 @@
; unsigned char cbm_k_getin (void);
;
.include "cbm.inc"
.export _cbm_k_getin
.import GETIN
_cbm_k_getin:

View File

@ -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

View File

@ -4,10 +4,5 @@
; void __fastcall__ cbm_k_listen (unsigned char dev);
;
.import LISTEN
.include "cbm.inc"
.export _cbm_k_listen := LISTEN

View File

@ -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

View File

@ -4,8 +4,8 @@
; unsigned char cbm_k_open (void);
;
.include "cbm.inc"
.export _cbm_k_open
.import OPEN
_cbm_k_open:

View File

@ -4,8 +4,8 @@
; unsigned char cbm_k_readst (void);
;
.include "cbm.inc"
.export _cbm_k_readst
.import READST
_cbm_k_readst:

View File

@ -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

View File

@ -4,5 +4,5 @@
; void cbm_k_scnkey (void);
;
.import SCNKEY
.include "cbm.inc"
.export _cbm_k_scnkey := SCNKEY

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -4,12 +4,5 @@
; void __fastcall__ cbm_k_talk (unsigned char dev);
;
.import TALK
.include "cbm.inc"
.export _cbm_k_talk := TALK

View File

@ -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

View File

@ -4,5 +4,5 @@
; void cbm_k_udtim (void);
;
.import UDTIM
.include "cbm.inc"
.export _cbm_k_udtim := UDTIM

View File

@ -4,5 +4,5 @@
; void cbm_k_unlsn (void);
;
.import UNLSN
.include "cbm.inc"
.export _cbm_k_unlsn := UNLSN

View File

@ -4,8 +4,7 @@
; void cbm_k_untlk (void);
;
.include "cbm.inc"
.export _cbm_k_untlk
.import UNTLK
_cbm_k_untlk = UNTLK

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"
;------------------------------------------------------------------------------

View File

@ -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"
;--------------------------------------------------------------------------

View File

@ -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

View File

@ -7,7 +7,6 @@
.export _write
.constructor initstdout
.import SETLFS, OPEN, CKOUT, BSOUT, READST, CLRCH
.import rwcommon
.importzp sp, ptr1, ptr2, ptr3