CC=$(CC) \
AS=$(AS) \
CFLAGS="-Osir -g -T -t apple2 -I../../include" \
- AFLAGS="-t apple2" \
+ AFLAGS="-t apple2 -I../../asminc" \
$(MAKE) -C $$i || exit 1; \
done
mv apple2/crt0.o apple2.o
CC=$(CC) \
AS=$(AS) \
CFLAGS="-Osir -g -T -t atari -I../../include" \
- AFLAGS="-t atari" \
+ AFLAGS="-t atari -I../../asminc" \
$(MAKE) -C $$i || exit 1; \
done
mv atari/crt0.o atari.o
CC=$(CC) \
AS=$(AS) \
CFLAGS="-Osir -g -T -t c64 -I../../include" \
- AFLAGS="-t c64" \
+ AFLAGS="-t c64 -I../../asminc" \
$(MAKE) -C $$i || exit 1; \
done
mv c64/crt0.o c64.o
CC=$(CC) \
AS=$(AS) \
CFLAGS="-Osir -g -T -t c128 -I../../include" \
- AFLAGS="-t c128" \
+ AFLAGS="-t c128 -I../../asminc" \
$(MAKE) -C $$i || exit 1; \
done
mv c128/crt0.o c128.o
CC=$(CC) \
AS=$(AS) \
CFLAGS="-Osir -g -T -t cbm510 -I../../include" \
- AFLAGS="-t cbm510" \
+ AFLAGS="-t cbm510 -I../../asminc" \
$(MAKE) -C $$i || exit 1; \
done
mv cbm510/crt0.o cbm510.o
CC=$(CC) \
AS=$(AS) \
CFLAGS="-Osir -g -T -t cbm610 -I../../include" \
- AFLAGS="-t cbm610" \
+ AFLAGS="-t cbm610 -I../../asminc" \
$(MAKE) -C $$i || exit 1; \
done
mv cbm610/crt0.o cbm610.o
AS=../$(AS) \
AR=../$(AR) \
CFLAGS="-Osir -g -T -t geos -I../../../include" \
- AFLAGS="-t geos" \
+ AFLAGS="-t geos -I../../../asminc" \
$(MAKE) -C geos || exit 1
for i in common runtime; do \
CC=$(CC) \
AS=$(AS) \
AR=$(AR) \
CFLAGS="-Osir -g -T -t geos -I../../include" \
- AFLAGS="-t geos" \
+ AFLAGS="-t geos -I../../asminc" \
$(MAKE) -C $$i || exit 1; \
done
for i in common runtime; do \
CC=$(CC) \
AS=$(AS) \
CFLAGS="-Osir -g -T -t pet -I../../include" \
- AFLAGS="-t pet" \
+ AFLAGS="-t pet -I../../asminc" \
$(MAKE) -C $$i || exit 1; \
done
mv pet/crt0.o pet.o
CC=$(CC) \
AS=$(AS) \
CFLAGS="-Osir -g -T -t plus4 -I../../include" \
- AFLAGS="-t plus4" \
+ AFLAGS="-t plus4 -I../../asminc" \
$(MAKE) -C $$i || exit 1; \
done
mv plus4/crt0.o plus4.o
+
.import __CODE_LOAD__, __BSS_LOAD__
.include "atari.inc"
- .include "../common/_file.inc"
+ .include "_file.inc"
; ------------------------------------------------------------------------
; Define and export the ZP variables for the runtime
.importzp tmp1,tmp2,tmp3
.include "atari.inc"
- .include "../common/errno.inc"
+ .include "errno.inc"
.code
.import incsp6,__errno,__oserror
.importzp sreg
.include "atari.inc"
- .include "../common/errno.inc"
+ .include "errno.inc"
.proc _lseek
;
.include "atari.inc"
- .include "../common/fmode.inc"
- .include "../common/errno.inc"
+ .include "fmode.inc"
+ .include "errno.inc"
.export _open
.import clriocb
.import fddecusage,newfd
; int __fastcall__ _osmaperrno (unsigned char oserror);
;
- .include "../common/errno.inc"
+ .include "errno.inc"
.export __osmaperrno
.proc __osmaperrno
.endproc
.rodata
-
+
maptable:
.byte EINTR ;BRKABT = 128 ;($80) BREAK key abort
.byte EBUSY ;PRVOPN = 129 ;($81) IOCB already open error
;
.include "atari.inc"
- .include "../common/errno.inc"
+ .include "errno.inc"
.import findfreeiocb,incsp2,__do_oserror
.import popax,__oserror,__seterrno
.importzp tmp1
.export _rs232_put, _rs232_pause, _rs232_unpause, _rs232_status
.include "atari.inc"
- .include "../common/errno.inc"
- .include "../common/rs232.inc"
+ .include "errno.inc"
+ .include "rs232.inc"
.rodata
; expects parameters (int fd,void *buf,int count)
;
.include "atari.inc"
- .include "../common/errno.inc"
+ .include "errno.inc"
.importzp tmp2,tmp3
.import incsp6,ldax0sp,ldaxysp
.import __errno,__oserror
.import fdtoiocb
-
+
.export __rwsetup
__rwsetup:
-
+
ldy #5
jsr ldaxysp ; get fd
jsr fdtoiocb ; convert to iocb
ldx #$FF ; indicate error + clear ZF
rts
-
+
;
; this routine updates errno. do a JMP here right after calling
; CIOV. we expect status in Y.
.export __do_oserror,__seterrno,__inviocb
__do_oserror:
sty __oserror ; save os dependent error code
-retminus:
+retminus:
lda #$FF
tax ; return -1
rts
.export _rs232_put, _rs232_pause, _rs232_unpause, _rs232_status
.include "c128.inc"
- .include "../common/rs232.inc"
+ .include "rs232.inc"
NmiExit = $ff33 ;exit address for nmi
.export _rs232_put, _rs232_pause, _rs232_unpause, _rs232_status
.include "c64.inc"
- .include "../common/rs232.inc"
+ .include "rs232.inc"
NmiExit = $febc ;exit address for nmi
;
.export __osmaperrno
- .include "../common/errno.inc"
+ .include "errno.inc"
.code
+++ /dev/null
-;
-; _file.inc
-;
-; (C) Copyright 2002 Ullrich von Bassewitz (uz@cc65.org)
-;
-
-; Assembler include file that makes the constants and structures in _file.h
-; available for asm code.
-
-; Struct _FILE offsets and size
-_FILE_f_fd = $00
-_FILE_f_flags = $01
-_FILE_size = $02
-
-; Flags field
-_FCLOSED = $00
-_FOPEN = $01
-_FEOF = $02
-_FERROR = $04
-_FPUSHBACK = $08
-
-; Maximum number of open files (size of table)
-FOPEN_MAX = 8
-
-; File table
-.global __filetab
-
+++ /dev/null
-;
-; Definitions for the character type tables
-;
-; Ullrich von Bassewitz, 08.09.2001
-;
-
-; Make the __ctype table an exported/imported symbol
-
- .global __ctype
-
-; Define bitmapped constants for the table entries
-
-CT_LOWER = $01 ; 0 - Lower case char
-CT_UPPER = $02 ; 1 - Upper case char
-CT_DIGIT = $04 ; 2 - Numeric digit
-CT_XDIGIT = $08 ; 3 - Hex digit (both, lower and upper)
-CT_CTRL = $10 ; 4 - Control character
-CT_SPACE = $20 ; 5 - The space character itself
-CT_OTHER_WS = $40 ; 6 - Other whitespace ('\f', '\n', '\r', '\t' and '\v')
-CT_SPACE_TAB = $80 ; 7 - Space or tab character
-
-; Combined stuff
-CT_ALNUM = (CT_LOWER | CT_UPPER | CT_DIGIT)
-CT_ALPHA = (CT_LOWER | CT_UPPER)
-CT_CTRL_SPACE = (CT_CTRL | CT_SPACE)
-CT_NOT_PUNCT = (CT_SPACE | CT_CTRL | CT_DIGIT | CT_UPPER | CT_LOWER)
-
-
+++ /dev/null
-;
-; Ullrich von Bassewitz, 16.05.2000
-;
-
-; Error codes, must match the values in the C headers
-
-ENOENT = 1 ; No such file or directory
-ENOMEM = 2 ; Out of memory
-EACCES = 3 ; Permission denied
-ENODEV = 4 ; No such device
-EMFILE = 5 ; Too many open files
-EBUSY = 6 ; Device or resource busy
-EINVAL = 7 ; Invalid argument
-ENOSPC = 8 ; No space left on device
-EEXIST = 9 ; File exists
-EAGAIN = 10 ; Try again
-EIO = 11 ; I/O error
-EINTR = 12 ; Interrupted system call
-ENOSYS = 13 ; Function not implemented
-ESPIPE = 14 ; Illegal seek
-EUNKNOWN = 15 ; Unknown OS specific error - must be last!
-
-EMAX = 15 ; Highest error code
-
+++ /dev/null
-;
-; Ullrich von Bassewitz, 05.06.1999
-;
-
-; File mode constants, must match the values in the C headers
-
-
-O_RDONLY = $01
-O_WRONLY = $02
-O_RDWR = $03
-O_CREAT = $04
-O_TRUNC = $10
-O_APPEND = $20
-
-
+++ /dev/null
-;
-; rs232.inc
-;
-; (C) Copyright 2002 Ullrich von Bassewitz (uz@cc65.org)
-;
-
-; Assembler include file that makes the constants and structures from rs232.h
-; available for asm code.
-
-
-
-; Error codes returned by all functions
-RS_ERR_OK = $00 ; Not an error - relax
-RS_ERR_NOT_INITIALIZED = $01 ; Module not initialized
-RS_ERR_BAUD_TOO_FAST = $02 ; Cannot handle baud rate
-RS_ERR_BAUD_NOT_AVAIL = $03 ; Baud rate not available
-RS_ERR_NO_DATA = $04 ; Nothing to read
-RS_ERR_OVERFLOW = $05 ; No room in send buffer
-
-
-
;
.export __osmaperrno
- .include "../../common/errno.inc"
+ .include "errno.inc"
.include "../inc/const.inc"
.code