mirror of
https://github.com/cc65/cc65.git
synced 2025-04-08 19:38:55 +00:00
Merge remote-tracking branch 'upstream/master' into creativision
This commit is contained in:
commit
07f840f11c
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,13 +1,9 @@
|
||||
/bin/
|
||||
/emd/
|
||||
/html/
|
||||
/info/
|
||||
/joy/
|
||||
/lib/
|
||||
/libwrk/
|
||||
/mou/
|
||||
/ser/
|
||||
/targetutil/
|
||||
/target/
|
||||
/testwrk/
|
||||
/tgi/
|
||||
/wrk/
|
||||
/cc65.zip
|
||||
|
22
Makefile
22
Makefile
@ -1,23 +1,27 @@
|
||||
.PHONY: all mostlyclean clean install zip avail unavail bin lib doc
|
||||
.PHONY: all mostlyclean clean install zip avail unavail bin lib doc samples
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
all mostlyclean clean install zip:
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
@$(MAKE) -C doc --no-print-directory $@
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
@$(MAKE) -C doc --no-print-directory $@
|
||||
@$(MAKE) -C samples --no-print-directory $@
|
||||
|
||||
avail unavail bin:
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
|
||||
lib:
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
|
||||
doc:
|
||||
@$(MAKE) -C doc --no-print-directory $@
|
||||
@$(MAKE) -C doc --no-print-directory $@
|
||||
|
||||
samples:
|
||||
@$(MAKE) -C samples --no-print-directory $@
|
||||
|
||||
%65:
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
|
||||
%:
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
|
48
asminc/apple2.mac
Normal file
48
asminc/apple2.mac
Normal file
@ -0,0 +1,48 @@
|
||||
; Convert characters to screen codes
|
||||
|
||||
; Helper macro that converts and outputs one character
|
||||
.macro _scrcode char
|
||||
.if (char < 256)
|
||||
.byte (char + 128)
|
||||
.else
|
||||
.error "scrcode: Character constant out of range"
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
.macro scrcode arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9
|
||||
|
||||
; Bail out if next argument is empty
|
||||
.if .blank (arg1)
|
||||
.exitmacro
|
||||
.endif
|
||||
|
||||
; Check for a string
|
||||
.if .match ({arg1}, "")
|
||||
|
||||
; Walk over all string chars
|
||||
.repeat .strlen (arg1), i
|
||||
_scrcode {.strat (arg1, i)}
|
||||
.endrepeat
|
||||
|
||||
; Check for a number
|
||||
.elseif .match (.left (1, {arg1}), 0)
|
||||
|
||||
; Just output the number
|
||||
_scrcode arg1
|
||||
|
||||
; Check for a character
|
||||
.elseif .match (.left (1, {arg1}), 'a')
|
||||
|
||||
; Just output the character
|
||||
_scrcode arg1
|
||||
|
||||
; Anything else is an error
|
||||
.else
|
||||
|
||||
.error "scrcode: invalid argument type"
|
||||
|
||||
.endif
|
||||
|
||||
; Call the macro recursively with the remaining args
|
||||
scrcode arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9
|
||||
.endmacro
|
@ -106,7 +106,7 @@ SIO_WRPERCOM = $4F ;write PERCOM block (XF551)
|
||||
SIO_WRITE = $50 ;write sector
|
||||
SIO_READ = $52 ;read sector
|
||||
SIO_STAT = $53 ;get status information
|
||||
SIO_VERIFY = $56 ;verify sector
|
||||
SIO_VERIFY = $56 ;verify sector
|
||||
SIO_WRITEV = $57 ;write sector with verify
|
||||
SIO_WRITETRK = $60 ;write track (Speedy)
|
||||
SIO_READTRK = $62 ;read track (Speedy)
|
||||
@ -183,6 +183,7 @@ FNTFND = 170 ;($AA) file not found
|
||||
PNTINV = 171 ;($AB) point invalid
|
||||
BADDSK = 173 ;($AD) bad disk
|
||||
INCFMT = 176 ;($B0) DOS 3: incompatible file system
|
||||
XNTBIN = 180 ;($B4) XDOS: file not binary
|
||||
|
||||
; DCB Device Bus Equates
|
||||
|
||||
@ -689,7 +690,7 @@ CASFLG = $030F ;CASSETTE MODE WHEN SET
|
||||
TIMER2 = $0310 ;2-byte final baud rate timer value
|
||||
TEMP1 = $0312 ;TEMPORARY STORAGE REGISTER
|
||||
;TEMP2 = $0314 ;##old## TEMPORARY STORAGE REGISTER
|
||||
TEMP2 = $0313 ;##1200xl## 1-byte temporary
|
||||
TEMP2 = $0313 ;##1200xl## 1-byte temporary
|
||||
PTIMOT = $0314 ;##1200xl## 1-byte printer timeout
|
||||
TEMP3 = $0315 ;TEMPORARY STORAGE REGISTER
|
||||
SAVIO = $0316 ;SAVE SERIAL IN DATA PORT
|
||||
@ -765,7 +766,7 @@ CART = $BFFC ;##rev2## 1-byte cartridge present indicator
|
||||
;0=Cart Exists
|
||||
CARTFG = $BFFD ;##rev2## 1-byte cartridge flags
|
||||
;D7 0=Not a Diagnostic Cart
|
||||
; 1=Is a Diagnostic cart and control is
|
||||
; 1=Is a Diagnostic cart and control is
|
||||
; given to cart before any OS is init.
|
||||
;D2 0=Init but Do not Start Cart
|
||||
; 1=Init and Start Cart
|
||||
@ -889,6 +890,10 @@ SETVBV_org = $E45C ;vector to set VBLANK parameters
|
||||
CIOV = $E456 ;vector to CIO
|
||||
SIOV = $E459 ;vector to SIO
|
||||
SETVBV = $E45C ;vector to set VBLANK parameters
|
||||
; aliases in order not to have to sprinkle common code with .ifdefs
|
||||
CIOV_org = CIOV
|
||||
SIOV_org = SIOV
|
||||
SETVBV_org = SETVBV
|
||||
.endif
|
||||
SYSVBV = $E45F ;vector to process immediate VBLANK
|
||||
XITVBV = $E462 ;vector to process deferred VBLANK
|
||||
@ -925,7 +930,7 @@ RADON = 0 ;INDICATES RADIANS
|
||||
DEGON = 6 ;INDICATES DEGREES
|
||||
|
||||
ASCZER = '0' ;ASCII ZERO
|
||||
COLON = $3A ;ASCII COLON
|
||||
COLON = $3A ;ASCII COLON
|
||||
CR = $9B ;SYSTEM EOL (CARRIAGE RETURN)
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
@ -997,12 +1002,38 @@ diopp_size = 5 ; size of structure
|
||||
; VALUES for dos_type
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
ATARIDOS = 0
|
||||
SPARTADOS = 1
|
||||
OSADOS = 2 ; OS/A+
|
||||
MYDOS = 3
|
||||
XDOS = 4
|
||||
SPARTADOS = 0
|
||||
OSADOS = 1 ; OS/A+
|
||||
XDOS = 2
|
||||
ATARIDOS = 3
|
||||
MYDOS = 4
|
||||
NODOS = 255
|
||||
; The DOSes with dos_type below or equal MAX_DOS_WITH_CMDLINE do support
|
||||
; command line arguments.
|
||||
MAX_DOS_WITH_CMDLINE = XDOS
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; XDOS defines (version 2.4, taken from xdos24.pdf)
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
XOPT = $070B ; XDOS options
|
||||
XCAR = $070C ; XDOS cartridge address (+ $70D)
|
||||
XPAT = $086F ; XDOS bugfix and patch number
|
||||
XVER = $0870 ; XDOS version number
|
||||
XFILE = $087D ; XDOS filename buffer
|
||||
XLINE = $0880 ; XDOS DUP input line
|
||||
XGLIN = $0871 ; get line
|
||||
XSKIP = $0874 ; skip parameter
|
||||
.ifdef __ATARIXL__
|
||||
.ifndef SHRAM_HANDLERS
|
||||
.import XMOVE_handler
|
||||
.endif
|
||||
.define XMOVE XMOVE_handler
|
||||
XMOVE_org = $0877 ; move filename
|
||||
.else
|
||||
XMOVE = $0877 ; move filename
|
||||
.endif
|
||||
XGNUM = $087A ; get number
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; End of atari.inc
|
||||
|
7
asminc/atari2600.inc
Normal file
7
asminc/atari2600.inc
Normal file
@ -0,0 +1,7 @@
|
||||
; Atari 2600 TIA & RIOT read / write registers
|
||||
;
|
||||
; Florent Flament (contact@florentflament.com), 2017
|
||||
|
||||
; TIA & RIOT registers mapping
|
||||
.include "atari2600_tia.inc"
|
||||
.include "atari2600_riot.inc"
|
20
asminc/atari2600_riot.inc
Normal file
20
asminc/atari2600_riot.inc
Normal file
@ -0,0 +1,20 @@
|
||||
; Atari 2600 RIOT read / write registers
|
||||
;
|
||||
; Source: DASM - vcs.h
|
||||
; Details available in: Stella Programmer's Guide by Steve Wright
|
||||
;
|
||||
; Florent Flament (contact@florentflament.com), 2017
|
||||
|
||||
; Read registers
|
||||
SWCHA := $0280
|
||||
SWACNT := $0281
|
||||
SWCHB := $0282
|
||||
SWBCNT := $0283
|
||||
INTIM := $0284
|
||||
TIMINT := $0285
|
||||
|
||||
; Write registers
|
||||
TIM1T := $0294
|
||||
TIM8T := $0295
|
||||
TIM64T := $0296
|
||||
T1024T := $0297
|
69
asminc/atari2600_tia.inc
Normal file
69
asminc/atari2600_tia.inc
Normal file
@ -0,0 +1,69 @@
|
||||
; Atari 2600 TIA read / write registers
|
||||
;
|
||||
; Source: DASM - vcs.h
|
||||
; Details available in: Stella Programmer's Guide by Steve Wright
|
||||
;
|
||||
; Florent Flament (contact@florentflament.com), 2017
|
||||
|
||||
; Read registers
|
||||
VSYNC := $00
|
||||
VBLANK := $01
|
||||
WSYNC := $02
|
||||
RSYNC := $03
|
||||
NUSIZ0 := $04
|
||||
NUSIZ1 := $05
|
||||
COLUP0 := $06
|
||||
COLUP1 := $07
|
||||
COLUPF := $08
|
||||
COLUBK := $09
|
||||
CTRLPF := $0A
|
||||
REFP0 := $0B
|
||||
REFP1 := $0C
|
||||
PF0 := $0D
|
||||
PF1 := $0E
|
||||
PF2 := $0F
|
||||
RESP0 := $10
|
||||
RESP1 := $11
|
||||
RESM0 := $12
|
||||
RESM1 := $13
|
||||
RESBL := $14
|
||||
AUDC0 := $15
|
||||
AUDC1 := $16
|
||||
AUDF0 := $17
|
||||
AUDF1 := $18
|
||||
AUDV0 := $19
|
||||
AUDV1 := $1A
|
||||
GRP0 := $1B
|
||||
GRP1 := $1C
|
||||
ENAM0 := $1D
|
||||
ENAM1 := $1E
|
||||
ENABL := $1F
|
||||
HMP0 := $20
|
||||
HMP1 := $21
|
||||
HMM0 := $22
|
||||
HMM1 := $23
|
||||
HMBL := $24
|
||||
VDELP0 := $25
|
||||
VDELP1 := $26
|
||||
VDELBL := $27
|
||||
RESMP0 := $28
|
||||
RESMP1 := $29
|
||||
HMOVE := $2A
|
||||
HMCLR := $2B
|
||||
CXCLR := $2C
|
||||
|
||||
; Write registers
|
||||
CXM0P := $00
|
||||
CXM1P := $01
|
||||
CXP0FB := $02
|
||||
CXP1FB := $03
|
||||
CXM0FB := $04
|
||||
CXM1FB := $05
|
||||
CXBLPF := $06
|
||||
CXPPMM := $07
|
||||
INPT0 := $08
|
||||
INPT1 := $09
|
||||
INPT2 := $0A
|
||||
INPT3 := $0B
|
||||
INPT4 := $0C
|
||||
INPT5 := $0D
|
@ -7,6 +7,8 @@ CPU_ISET_65C02 = $0010
|
||||
CPU_ISET_65816 = $0020
|
||||
CPU_ISET_SWEET16 = $0040
|
||||
CPU_ISET_HUC6280 = $0080
|
||||
;CPU_ISET_M740 = $0100 not actually implemented
|
||||
CPU_ISET_4510 = $0200
|
||||
|
||||
; CPU capabilities
|
||||
CPU_NONE = CPU_ISET_NONE
|
||||
@ -17,3 +19,4 @@ CPU_65C02 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02
|
||||
CPU_65816 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65816
|
||||
CPU_SWEET16 = CPU_ISET_SWEET16
|
||||
CPU_HUC6280 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02|CPU_ISET_HUC6280
|
||||
CPU_4510 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02|CPU_ISET_4510
|
||||
|
@ -28,6 +28,7 @@
|
||||
ESPIPE ; Illegal seek
|
||||
ERANGE ; Range error
|
||||
EBADF ; Bad file number
|
||||
ENOEXEC ; Exec format error
|
||||
EUNKNOWN ; Unknown OS specific error - must be last!
|
||||
|
||||
EMAX = EUNKNOWN ; Highest error code
|
||||
|
@ -4,7 +4,7 @@
|
||||
;
|
||||
; Reference:
|
||||
; Bastian Schick's Lynx Documentation
|
||||
; http://www.geocities.com/SiliconValley/Byte/4242/lynx/
|
||||
; http://www.geocities.ws/SiliconValley/Byte/4242/lynx/
|
||||
;
|
||||
|
||||
; ***
|
||||
|
@ -1,7 +1,7 @@
|
||||
; smc.mac
|
||||
; ca65 Macro-Pack for Self Modifying Code (SMC)
|
||||
;
|
||||
; (c) Christian Krüger, latest change: 09-Nov-2011
|
||||
; (c) Christian Krüger, latest change: 17-Jul-2016
|
||||
;
|
||||
; This software is provided 'as-is', without any expressed or implied
|
||||
; warranty. In no event will the authors be held liable for any damages
|
||||
@ -53,7 +53,7 @@ _SMCDesignator: statement
|
||||
.endmacro
|
||||
|
||||
.macro SMC_TransferOpcode label, opcode, register
|
||||
.if .paramcount = 2 .or .match ({register}, a)
|
||||
.if .paramcount = 2 .or .match ({register}, a) .or .match ({register}, )
|
||||
lda #opcode
|
||||
sta _SMCDesignator
|
||||
.elseif .match ({register}, x)
|
||||
@ -62,44 +62,52 @@ _SMCDesignator: statement
|
||||
.elseif .match ({register}, y)
|
||||
ldy #opcode
|
||||
sty _SMCDesignator
|
||||
.else
|
||||
.error "Invalid usage of macro 'SMC_TransferOpcode'"
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
.macro SMC_LoadOpcode label, register
|
||||
.if .paramcount = 1 .or .match ({register}, a)
|
||||
.if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
|
||||
lda _SMCDesignator
|
||||
.elseif .match ({register}, x)
|
||||
ldx _SMCDesignator
|
||||
.elseif .match ({register}, y)
|
||||
ldy _SMCDesignator
|
||||
.else
|
||||
.error "Invalid usage of macro 'SMC_LoadOpcode'"
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
.macro SMC_StoreOpcode label, register
|
||||
.if .paramcount = 1 .or .match ({register}, a)
|
||||
.if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
|
||||
sta _SMCDesignator
|
||||
.elseif .match ({register}, x)
|
||||
stx _SMCDesignator
|
||||
.elseif .match ({register}, y)
|
||||
sty _SMCDesignator
|
||||
.else
|
||||
.error "Invalid usage of macro 'SMC_StoreOpcode'"
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
.macro SMC_ChangeBranch label, destination, register
|
||||
.if .paramcount = 2 .or .match ({register}, a)
|
||||
lda #(destination - _SMCDesignator -2)
|
||||
.if .paramcount = 2 .or .match ({register}, a) .or .match ({register}, )
|
||||
lda #(<(destination - _SMCDesignator -2))
|
||||
sta _SMCDesignator+1
|
||||
.elseif .match ({register}, x)
|
||||
ldx #(destination - _SMCDesignator - 2)
|
||||
ldx #(<(destination - _SMCDesignator - 2))
|
||||
stx _SMCDesignator+1
|
||||
.elseif .match ({register}, y)
|
||||
ldy #(destination - _SMCDesignator - 2)
|
||||
ldy #(<(destination - _SMCDesignator - 2))
|
||||
sty _SMCDesignator+1
|
||||
.else
|
||||
.error "Invalid usage of macro 'SMC_ChangeBranch'"
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
.macro SMC_TransferValue label, value, register
|
||||
.if .paramcount = 2 .or .match ({register}, a)
|
||||
.if .paramcount = 2 .or .match ({register}, a) .or .match ({register}, )
|
||||
lda value
|
||||
sta _SMCDesignator+1
|
||||
.elseif .match ({register}, x)
|
||||
@ -108,26 +116,32 @@ _SMCDesignator: statement
|
||||
.elseif .match ({register}, y)
|
||||
ldy value
|
||||
sty _SMCDesignator+1
|
||||
.else
|
||||
.error "Invalid usage of macro 'SMC_TransferValue'"
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
.macro SMC_LoadValue label, register
|
||||
.if .paramcount = 1 .or .match ({register}, a)
|
||||
.if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
|
||||
lda _SMCDesignator+1
|
||||
.elseif .match ({register}, x)
|
||||
ldx _SMCDesignator+1
|
||||
.elseif .match ({register}, y)
|
||||
ldy _SMCDesignator+1
|
||||
.else
|
||||
.error "Invalid usage of macro 'SMC_LoadValue'"
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
.macro SMC_StoreValue label, register
|
||||
.if .paramcount = 1 .or .match ({register}, a)
|
||||
.if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
|
||||
sta _SMCDesignator+1
|
||||
.elseif .match ({register}, x)
|
||||
stx _SMCDesignator+1
|
||||
.elseif .match ({register}, y)
|
||||
sty _SMCDesignator+1
|
||||
.else
|
||||
.error "Invalid usage of macro 'SMC_StoreValue'"
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
@ -145,7 +159,7 @@ SMC_StoreValue label, register
|
||||
.endmacro
|
||||
|
||||
.macro SMC_TransferHighByte label, value, register
|
||||
.if .paramcount = 2 .or .match ({register}, a)
|
||||
.if .paramcount = 2 .or .match ({register}, a) .or .match ({register}, )
|
||||
lda value
|
||||
sta _SMCDesignator+2
|
||||
.elseif .match ({register}, x)
|
||||
@ -154,31 +168,37 @@ SMC_StoreValue label, register
|
||||
.elseif .match ({register}, y)
|
||||
ldy value
|
||||
sty _SMCDesignator+2
|
||||
.else
|
||||
.error "Invalid usage of macro 'SMC_TransferHighByte'"
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
.macro SMC_LoadHighByte label, register
|
||||
.if .paramcount = 1 .or .match ({register}, a)
|
||||
.if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
|
||||
lda _SMCDesignator+2
|
||||
.elseif .match ({register}, x)
|
||||
ldx _SMCDesignator+2
|
||||
.elseif .match ({register}, y)
|
||||
ldy _SMCDesignator+2
|
||||
.else
|
||||
.error "Invalid usage of macro 'SMC_LoadHighByte'"
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
.macro SMC_StoreHighByte label, register
|
||||
.if .paramcount = 1 .or .match ({register}, a)
|
||||
.if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
|
||||
sta _SMCDesignator+2
|
||||
.elseif .match ({register}, x)
|
||||
stx _SMCDesignator+2
|
||||
.elseif .match ({register}, y)
|
||||
sty _SMCDesignator+2
|
||||
.else
|
||||
.error "Invalid usage of macro 'SMC_StoreHighByte'"
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
.macro SMC_TransferAddressSingle label, address, register
|
||||
.if .paramcount = 2 .or .match ((register), a)
|
||||
.if .paramcount = 2 .or .match ((register), a) .or .match ({register}, )
|
||||
.if (.match (.left (1, {address}), #))
|
||||
; immediate mode
|
||||
lda #<(.right (.tcount ({address})-1, {address}))
|
||||
@ -220,6 +240,8 @@ SMC_StoreValue label, register
|
||||
ldy 1+(address)
|
||||
sty _SMCDesignator+2
|
||||
.endif
|
||||
.else
|
||||
.error "Invalid usage of macro 'SMC_TransferAddressSingle'"
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
; supervision symbols
|
||||
|
||||
; supervision 65c02s
|
||||
; in cc65 up to 2.9.1 65c02 means 65c02s
|
||||
.pc02
|
||||
; supervision 65c02s
|
||||
; in cc65 up to 2.9.1 65c02 means 65sc02
|
||||
|
||||
lcd_addr = $4000
|
||||
LCD_LINESIZE = $30
|
||||
|
@ -3,20 +3,17 @@
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0803;
|
||||
}
|
||||
SYMBOLS {
|
||||
__LOADADDR__: type = weak, value = __CODE_RUN__;
|
||||
__LOADSIZE__: type = weak, value = __BSS_RUN__ - __CODE_RUN__;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: start = $0080, size = $001A, define = yes;
|
||||
HEADER: file = %O, start = $0000, size = $0004;
|
||||
RAM: file = %O, start = %S, size = $C000 - %S;
|
||||
ZP: file = "", start = $0000, size = $00FF;
|
||||
HEADER: file = %O, start = %S - 4, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S, size = $C000 - %S;
|
||||
BSS: file = "", start = __MAIN_LAST__, size = $C000 - __MAIN_LAST__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = rw, optional = yes, define = yes;
|
||||
RODATA: load = RAM, type = ro, optional = yes;
|
||||
DATA: load = RAM, type = rw, optional = yes;
|
||||
BSS: load = RAM, type = bss, optional = yes, define = yes;
|
||||
CODE: load = MAIN, type = rw;
|
||||
RODATA: load = MAIN, type = ro, optional = yes;
|
||||
DATA: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = BSS, type = bss, optional = yes, define = yes;
|
||||
}
|
||||
|
@ -12,21 +12,18 @@ FEATURES {
|
||||
}
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
|
||||
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
||||
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
|
||||
__LOADADDR__: type = weak, value = __STARTUP_RUN__;
|
||||
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ +
|
||||
__MOVE_LAST__ - __MOVE_START__;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = $0000, size = $0004;
|
||||
RAM: file = %O, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __STACKSIZE__ - __OVERLAYSIZE__ - %S;
|
||||
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
|
||||
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = %S - 4, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __OVERLAYSIZE__ - %S;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__;
|
||||
@ -38,32 +35,32 @@ MEMORY {
|
||||
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
INIT: load = MOVE, run = RAM, type = ro, define = yes, optional = yes;
|
||||
LC: load = MOVE, run = LC, type = ro, optional = yes;
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
|
||||
OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes;
|
||||
OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes;
|
||||
OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes;
|
||||
OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes;
|
||||
OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes;
|
||||
OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes;
|
||||
OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = MAIN, type = ro, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw;
|
||||
ONCE: load = MAIN, type = ro, define = yes;
|
||||
LC: load = MAIN, run = LC, type = ro, optional = yes;
|
||||
BSS: load = BSS, type = bss, define = yes;
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
|
||||
OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes;
|
||||
OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes;
|
||||
OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes;
|
||||
OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes;
|
||||
OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes;
|
||||
OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes;
|
||||
OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -1,36 +1,33 @@
|
||||
# Configuration for ProDOS 8 system programs (without the header)
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
||||
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__LOADADDR__: type = weak, value = __STARTUP_RUN__;
|
||||
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ +
|
||||
__MOVE_LAST__ - __MOVE_START__;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: define = yes, start = $0080, size = $001A;
|
||||
RAM: file = %O, start = $2000, size = $9F00 - __STACKSIZE__;
|
||||
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
|
||||
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
MAIN: file = %O, start = $2000, size = $BF00 - $2000;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = $BF00 - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
INIT: load = MOVE, run = RAM, type = ro, define = yes, optional = yes;
|
||||
LC: load = MOVE, run = LC, type = ro, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw;
|
||||
ONCE: load = MAIN, type = ro, define = yes;
|
||||
LC: load = MAIN, run = LC, type = ro, optional = yes;
|
||||
BSS: load = BSS, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -5,39 +5,36 @@ FEATURES {
|
||||
}
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
|
||||
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
||||
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__LOADADDR__: type = weak, value = __STARTUP_RUN__;
|
||||
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ +
|
||||
__MOVE_LAST__ - __MOVE_START__;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = $0000, size = $0004;
|
||||
RAM: file = %O, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
|
||||
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
|
||||
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = %S - 4, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - %S;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
INIT: load = MOVE, run = RAM, type = ro, define = yes, optional = yes;
|
||||
LC: load = MOVE, run = LC, type = ro, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw;
|
||||
ONCE: load = MAIN, type = ro, define = yes;
|
||||
LC: load = MAIN, run = LC, type = ro, optional = yes;
|
||||
BSS: load = BSS, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -3,18 +3,17 @@
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0803;
|
||||
}
|
||||
SYMBOLS {
|
||||
__LOADADDR__: type = weak, value = __CODE_RUN__;
|
||||
__LOADSIZE__: type = weak, value = __BSS_RUN__ - __CODE_RUN__;
|
||||
}
|
||||
MEMORY {
|
||||
HEADER: file = %O, start = $0000, size = $0004;
|
||||
RAM: file = %O, start = %S, size = $C000 - %S;
|
||||
ZP: file = "", start = $0000, size = $00FF;
|
||||
HEADER: file = %O, start = %S - 4, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S, size = $C000 - %S;
|
||||
BSS: file = "", start = __MAIN_LAST__, size = $C000 - __MAIN_LAST__;
|
||||
}
|
||||
SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = rw, optional = yes, define = yes;
|
||||
RODATA: load = RAM, type = ro, optional = yes;
|
||||
DATA: load = RAM, type = rw, optional = yes;
|
||||
BSS: load = RAM, type = bss, optional = yes, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = rw;
|
||||
RODATA: load = MAIN, type = ro, optional = yes;
|
||||
DATA: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = BSS, type = bss, optional = yes, define = yes;
|
||||
}
|
||||
|
@ -12,21 +12,18 @@ FEATURES {
|
||||
}
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
|
||||
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
||||
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
|
||||
__LOADADDR__: type = weak, value = __STARTUP_RUN__;
|
||||
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ +
|
||||
__MOVE_LAST__ - __MOVE_START__;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = $0000, size = $0004;
|
||||
RAM: file = %O, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __STACKSIZE__ - __OVERLAYSIZE__ - %S;
|
||||
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
|
||||
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = %S - 4, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __OVERLAYSIZE__ - %S;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__;
|
||||
@ -38,32 +35,32 @@ MEMORY {
|
||||
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
INIT: load = MOVE, run = RAM, type = ro, define = yes, optional = yes;
|
||||
LC: load = MOVE, run = LC, type = ro, optional = yes;
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
|
||||
OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes;
|
||||
OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes;
|
||||
OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes;
|
||||
OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes;
|
||||
OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes;
|
||||
OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes;
|
||||
OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = MAIN, type = ro, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw;
|
||||
ONCE: load = MAIN, type = ro, define = yes;
|
||||
LC: load = MAIN, run = LC, type = ro, optional = yes;
|
||||
BSS: load = BSS, type = bss, define = yes;
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
|
||||
OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes;
|
||||
OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes;
|
||||
OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes;
|
||||
OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes;
|
||||
OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes;
|
||||
OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes;
|
||||
OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -1,36 +1,33 @@
|
||||
# Configuration for ProDOS 8 system programs (without the header)
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
||||
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__LOADADDR__: type = weak, value = __STARTUP_RUN__;
|
||||
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ +
|
||||
__MOVE_LAST__ - __MOVE_START__;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: define = yes, start = $0080, size = $001A;
|
||||
RAM: file = %O, start = $2000, size = $9F00 - __STACKSIZE__;
|
||||
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
|
||||
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
MAIN: file = %O, start = $2000, size = $BF00 - $2000;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = $BF00 - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
INIT: load = MOVE, run = RAM, type = ro, define = yes, optional = yes;
|
||||
LC: load = MOVE, run = LC, type = ro, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw;
|
||||
ONCE: load = MAIN, type = ro, define = yes;
|
||||
LC: load = MAIN, run = LC, type = ro, optional = yes;
|
||||
BSS: load = BSS, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -5,39 +5,36 @@ FEATURES {
|
||||
}
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
|
||||
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
||||
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__LOADADDR__: type = weak, value = __STARTUP_RUN__;
|
||||
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ +
|
||||
__MOVE_LAST__ - __MOVE_START__;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = $0000, size = $0004;
|
||||
RAM: file = %O, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
|
||||
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
|
||||
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
ZP: file = "", define = yes, start = $0080, size = $001A;
|
||||
HEADER: file = %O, start = %S - 4, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - %S;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
|
||||
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
INIT: load = MOVE, run = RAM, type = ro, define = yes, optional = yes;
|
||||
LC: load = MOVE, run = LC, type = ro, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw;
|
||||
ONCE: load = MAIN, type = ro, define = yes;
|
||||
LC: load = MAIN, run = LC, type = ro, optional = yes;
|
||||
BSS: load = BSS, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -2,29 +2,29 @@ FEATURES {
|
||||
STARTADDRESS: default = $2E00;
|
||||
}
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
__EXEHDR__: type = import;
|
||||
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
|
||||
# file header, just $FFFF
|
||||
HEADER: file = %O, start = $0000, size = $0002;
|
||||
HEADER: file = %O, start = $0000, size = $0002;
|
||||
|
||||
# "main program" load chunk
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
RAM: file = %O, define = yes, start = %S, size = $BC20 - %S;
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S, size = $BC20 - %S;
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
}
|
||||
SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||
MAINHDR: load = MAINHDR, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
RODATA: load = RAM, type = ro optional = yes;
|
||||
DATA: load = RAM, type = rw optional = yes;
|
||||
BSS: load = RAM, type = bss, define = yes, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXTZP: load = ZP, type = zp, optional = yes; # to enable modules to be able to link to C and assembler programs
|
||||
AUTOSTRT: load = TRAILER, type = ro, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXTZP: load = ZP, type = zp, optional = yes; # to enable modules to be able to link to C and assembler programs
|
||||
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||
MAINHDR: load = MAINHDR, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = rw, define = yes;
|
||||
RODATA: load = MAIN, type = ro optional = yes;
|
||||
DATA: load = MAIN, type = rw optional = yes;
|
||||
BSS: load = MAIN, type = bss, optional = yes, define = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro, optional = yes;
|
||||
}
|
||||
|
@ -10,29 +10,29 @@ SYMBOLS {
|
||||
__CARTFLAGS__: type = weak, value = $01; # see documentation for other possible values
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
RAM: file = "", define = yes, start = %S, size = __CARTSIZE__;
|
||||
ROM: file = %O, define = yes, start = $C000 - __CARTSIZE__, size = __CARTSIZE__ - 6, fill = yes, fillval = $FF;
|
||||
CARTID: file = %O, start = $BFFA, size = $0006;
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
MAIN: file = "", define = yes, start = %S, size = __CARTSIZE__;
|
||||
ROM: file = %O, define = yes, start = $C000 - __CARTSIZE__, size = __CARTSIZE__ - 6, fill = yes, fillval = $FF;
|
||||
CARTID: file = %O, start = $BFFA, size = $0006;
|
||||
}
|
||||
SEGMENTS {
|
||||
STARTUP: load = ROM, type = ro, define = yes, optional = yes;
|
||||
LOWCODE: load = ROM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = ROM, type = ro, optional = yes;
|
||||
CODE: load = ROM, type = ro, define = yes;
|
||||
RODATA: load = ROM, type = ro, optional = yes;
|
||||
DATA: load = ROM, run = RAM, type = rw, define = yes, optional = yes;
|
||||
INITBSS: load = RAM, type = bss, optional = yes;
|
||||
BSS: load = RAM, type = bss, define = yes, optional = yes;
|
||||
CARTHDR: load = CARTID, type = ro;
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
STARTUP: load = ROM, type = ro, define = yes, optional = yes;
|
||||
LOWCODE: load = ROM, type = ro, define = yes, optional = yes;
|
||||
ONCE: load = ROM, type = ro, optional = yes;
|
||||
CODE: load = ROM, type = ro, define = yes;
|
||||
RODATA: load = ROM, type = ro, optional = yes;
|
||||
DATA: load = ROM, run = MAIN, type = rw, define = yes, optional = yes;
|
||||
INIT: load = MAIN, type = bss, optional = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes, optional = yes;
|
||||
CARTHDR: load = CARTID, type = ro;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -8,27 +8,27 @@ SYMBOLS {
|
||||
_cas_hdr: type = import;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
RAM: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
MAIN: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
|
||||
}
|
||||
SEGMENTS {
|
||||
CASHDR: load = RAM, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes, optional = yes;
|
||||
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, optional = yes;
|
||||
DATA: load = RAM, type = rw, optional = yes;
|
||||
INITBSS: load = RAM, type = bss, optional = yes;
|
||||
BSS: load = RAM, type = bss, define = yes, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
CASHDR: load = MAIN, type = ro;
|
||||
STARTUP: load = MAIN, type = ro, define = yes, optional = yes;
|
||||
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro, define = yes;
|
||||
RODATA: load = MAIN, type = ro, optional = yes;
|
||||
DATA: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes, optional = yes;
|
||||
INIT: load = MAIN, type = bss, optional = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -11,48 +11,48 @@ SYMBOLS {
|
||||
__RESERVED_MEMORY__: type = weak, value = $0000;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
|
||||
# file header, just $FFFF
|
||||
HEADER: file = %O, start = $0000, size = $0002;
|
||||
HEADER: file = %O, start = $0000, size = $0002;
|
||||
|
||||
# "system check" load chunk
|
||||
SYSCHKHDR: file = %O, start = $0000, size = $0004;
|
||||
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
|
||||
SYSCHKTRL: file = %O, start = $0000, size = $0006;
|
||||
SYSCHKHDR: file = %O, start = $0000, size = $0004;
|
||||
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
|
||||
SYSCHKTRL: file = %O, start = $0000, size = $0006;
|
||||
|
||||
# "main program" load chunk
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
RAM: file = %O, define = yes, start = %S + __OVERLAYSIZE__,
|
||||
size = $BC20 - __OVERLAYSIZE__ - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S + __OVERLAYSIZE__, size = $BC20 - __OVERLAYSIZE__ - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
|
||||
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL4: file = "%O.4", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL5: file = "%O.5", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL6: file = "%O.6", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL7: file = "%O.7", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
|
||||
# overlays
|
||||
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL4: file = "%O.4", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL5: file = "%O.5", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL6: file = "%O.6", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL7: file = "%O.7", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
|
||||
SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes;
|
||||
SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes;
|
||||
MAINHDR: load = MAINHDR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss, optional = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
STARTUP: load = MAIN, type = ro, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro, define = yes;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
|
||||
@ -68,7 +68,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -10,44 +10,44 @@ SYMBOLS {
|
||||
__RESERVED_MEMORY__: type = weak, value = $0000;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
|
||||
# file header, just $FFFF
|
||||
HEADER: file = %O, start = $0000, size = $0002;
|
||||
HEADER: file = %O, start = $0000, size = $0002;
|
||||
|
||||
# "system check" load chunk
|
||||
SYSCHKHDR: file = %O, start = $0000, size = $0004;
|
||||
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
|
||||
SYSCHKTRL: file = %O, start = $0000, size = $0006;
|
||||
SYSCHKHDR: file = %O, start = $0000, size = $0004;
|
||||
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
|
||||
SYSCHKTRL: file = %O, start = $0000, size = $0006;
|
||||
|
||||
# "main program" load chunk
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
RAM: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
|
||||
SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes;
|
||||
SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes;
|
||||
MAINHDR: load = MAINHDR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss, optional = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
STARTUP: load = MAIN, type = ro, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro, define = yes;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
22
cfg/atari2600.cfg
Normal file
22
cfg/atari2600.cfg
Normal file
@ -0,0 +1,22 @@
|
||||
# Atari VCS 2600 linker configuration file for cc65
|
||||
#
|
||||
# Florent Flament (contact@florentflament.com), 2017
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0010; # 16 Bytes system stack
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
RAM: file = "", start = $0080, size = $0080 - __STACKSIZE__, define = yes;
|
||||
ROM: file = %O, start = $F000, size = $1000, fill = yes, fillval = $FF;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = RAM, type = zp;
|
||||
STARTUP: load = ROM, type = ro;
|
||||
CODE: load = ROM, type = ro;
|
||||
RODATA: load = ROM, type = ro, optional = yes;
|
||||
DATA: load = ROM, run = RAM, type = rw, optional = yes, define = yes;
|
||||
BSS: load = RAM, type = bss, optional = yes;
|
||||
VECTORS: load = ROM, type = ro, start = $FFFA;
|
||||
}
|
@ -13,9 +13,11 @@ MEMORY {
|
||||
CARTENTRY: file = %O, start = $BFFE, size = $0002;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
STARTUP: load = ROM, type = ro, define = yes, optional = yes;
|
||||
LOWCODE: load = ROM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = ROM, type = ro, optional = yes;
|
||||
ONCE: load = ROM, type = ro, optional = yes;
|
||||
CODE: load = ROM, type = ro, define = yes;
|
||||
RODATA: load = ROM, type = ro, optional = yes;
|
||||
DATA: load = ROM, run = RAM, type = rw, define = yes, optional = yes;
|
||||
@ -23,14 +25,12 @@ SEGMENTS {
|
||||
CARTNAME: load = CARTNAME, type = ro, define = yes;
|
||||
CARTYEAR: load = CARTYEAR, type = ro, define = yes;
|
||||
CARTENTRY: load = CARTENTRY, type = ro, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -6,50 +6,46 @@
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $2400;
|
||||
}
|
||||
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
|
||||
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
__EXEHDR__: type = import;
|
||||
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
|
||||
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
|
||||
# just $FFFF
|
||||
HEADER: file = %O, start = $0000, size = $0002;
|
||||
HEADER: file = %O, start = $0000, size = $0002;
|
||||
|
||||
# "system check" load chunk
|
||||
SYSCHKHDR: file = %O, start = $0000, size = $0004;
|
||||
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
|
||||
SYSCHKTRL: file = %O, start = $0000, size = $0006;
|
||||
SYSCHKHDR: file = %O, start = $0000, size = $0004;
|
||||
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
|
||||
SYSCHKTRL: file = %O, start = $0000, size = $0006;
|
||||
|
||||
# "shadow RAM preparation" load chunk
|
||||
SRPREPHDR: file = %O, start = $0000, size = $0004;
|
||||
SRPREPCHNK: file = %O, define = yes, start = %S, size = $7C20 - %S - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
|
||||
SRPREPTRL: file = %O, start = $0000, size = $0006;
|
||||
SRPREPHDR: file = %O, start = $0000, size = $0004;
|
||||
SRPREPCHNK: file = %O, define = yes, start = %S, size = $7C20 - %S - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
|
||||
SRPREPTRL: file = %O, start = $0000, size = $0006;
|
||||
|
||||
# "main program" load chunk
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
RAM: file = %O, define = yes, start = %S +
|
||||
__LOWBSS_SIZE__, size = $D000 -
|
||||
__STACKSIZE__ -
|
||||
%S -
|
||||
__LOWBSS_SIZE__;
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S + __LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __LOWBSS_SIZE__;
|
||||
|
||||
# defines entry point into program
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
|
||||
# address of relocated character generator
|
||||
CHARGEN: file = "", define = yes, start = $D800, size = $0400;
|
||||
CHARGEN: file = "", define = yes, start = $D800, size = $0400;
|
||||
|
||||
# memory beneath the ROM
|
||||
HIDDEN_RAM: file = "", define = yes, start = $DC00, size = $FFFA - $DC00;
|
||||
HIDDEN_RAM: file = "", define = yes, start = $DC00, size = $FFFA - $DC00;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
|
||||
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
|
||||
@ -64,23 +60,21 @@ SEGMENTS {
|
||||
SRPREPTRL: load = SRPREPTRL, type = ro;
|
||||
|
||||
MAINHDR: load = MAINHDR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss, optional = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
STARTUP: load = MAIN, type = ro, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro, define = yes;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -1,67 +1,62 @@
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $2400;
|
||||
}
|
||||
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
|
||||
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
__EXEHDR__: type = import;
|
||||
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
|
||||
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
|
||||
# just $FFFF
|
||||
HEADER: file = %O, start = $0000, size = $0002;
|
||||
HEADER: file = %O, start = $0000, size = $0002;
|
||||
|
||||
# "system check" load chunk
|
||||
SYSCHKHDR: file = %O, start = $0000, size = $0004;
|
||||
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
|
||||
SYSCHKTRL: file = %O, start = $0000, size = $0006;
|
||||
SYSCHKHDR: file = %O, start = $0000, size = $0004;
|
||||
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
|
||||
SYSCHKTRL: file = %O, start = $0000, size = $0006;
|
||||
|
||||
# "shadow RAM preparation" load chunk
|
||||
SRPREPHDR: file = %O, start = $0000, size = $0004;
|
||||
SRPREPCHNK: file = %O, define = yes, start = %S + __OVERLAYSIZE__, size = $7C20 - %S - __OVERLAYSIZE__ - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
|
||||
SRPREPTRL: file = %O, start = $0000, size = $0006;
|
||||
SRPREPHDR: file = %O, start = $0000, size = $0004;
|
||||
SRPREPCHNK: file = %O, define = yes, start = %S + __OVERLAYSIZE__, size = $7C20 - %S - __OVERLAYSIZE__ - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
|
||||
SRPREPTRL: file = %O, start = $0000, size = $0006;
|
||||
|
||||
# "main program" load chunk
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
RAM: file = %O, define = yes, start = %S +
|
||||
__OVERLAYSIZE__ +
|
||||
__LOWBSS_SIZE__, size = $D000 -
|
||||
__STACKSIZE__ -
|
||||
%S -
|
||||
__OVERLAYSIZE__ -
|
||||
__LOWBSS_SIZE__;
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S + __OVERLAYSIZE__ +
|
||||
__LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __OVERLAYSIZE__ - __LOWBSS_SIZE__;
|
||||
|
||||
# defines entry point into program
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
|
||||
# memory beneath the ROM preceeding the character generator
|
||||
HIDDEN_RAM2: file = "", define = yes, start = $D800, size = $0800;
|
||||
HIDDEN_RAM2: file = "", define = yes, start = $D800, size = $0800;
|
||||
|
||||
# address of relocated character generator (same addess as ROM version)
|
||||
CHARGEN: file = "", define = yes, start = $E000, size = $0400;
|
||||
CHARGEN: file = "", define = yes, start = $E000, size = $0400;
|
||||
|
||||
# memory beneath the ROM
|
||||
HIDDEN_RAM: file = "", define = yes, start = $E400, size = $FFFA - $E400;
|
||||
HIDDEN_RAM: file = "", define = yes, start = $E400, size = $FFFA - $E400;
|
||||
|
||||
# overlays
|
||||
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL4: file = "%O.4", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL5: file = "%O.5", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL6: file = "%O.6", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL7: file = "%O.7", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL4: file = "%O.4", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL5: file = "%O.5", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL6: file = "%O.6", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL7: file = "%O.7", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
|
||||
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
|
||||
@ -76,16 +71,14 @@ SEGMENTS {
|
||||
SRPREPTRL: load = SRPREPTRL, type = ro;
|
||||
|
||||
MAINHDR: load = MAINHDR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss, optional = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
STARTUP: load = MAIN, type = ro, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro, define = yes;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
@ -102,7 +95,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -1,53 +1,49 @@
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $2400;
|
||||
}
|
||||
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
|
||||
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
__EXEHDR__: type = import;
|
||||
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
|
||||
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
|
||||
# just $FFFF
|
||||
HEADER: file = %O, start = $0000, size = $0002;
|
||||
HEADER: file = %O, start = $0000, size = $0002;
|
||||
|
||||
# "system check" load chunk
|
||||
SYSCHKHDR: file = %O, start = $0000, size = $0004;
|
||||
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
|
||||
SYSCHKTRL: file = %O, start = $0000, size = $0006;
|
||||
SYSCHKHDR: file = %O, start = $0000, size = $0004;
|
||||
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
|
||||
SYSCHKTRL: file = %O, start = $0000, size = $0006;
|
||||
|
||||
# "shadow RAM preparation" load chunk
|
||||
SRPREPHDR: file = %O, start = $0000, size = $0004;
|
||||
SRPREPCHNK: file = %O, define = yes, start = %S, size = $7C20 - %S - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
|
||||
SRPREPTRL: file = %O, start = $0000, size = $0006;
|
||||
SRPREPHDR: file = %O, start = $0000, size = $0004;
|
||||
SRPREPCHNK: file = %O, define = yes, start = %S, size = $7C20 - %S - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
|
||||
SRPREPTRL: file = %O, start = $0000, size = $0006;
|
||||
|
||||
# "main program" load chunk
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
RAM: file = %O, define = yes, start = %S +
|
||||
__LOWBSS_SIZE__, size = $D000 -
|
||||
__STACKSIZE__ -
|
||||
%S -
|
||||
__LOWBSS_SIZE__;
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S + __LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __LOWBSS_SIZE__;
|
||||
|
||||
# defines entry point into program
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
|
||||
# memory beneath the ROM preceeding the character generator
|
||||
HIDDEN_RAM2: file = "", define = yes, start = $D800, size = $0800;
|
||||
HIDDEN_RAM2: file = "", define = yes, start = $D800, size = $0800;
|
||||
|
||||
# address of relocated character generator (same addess as ROM version)
|
||||
CHARGEN: file = "", define = yes, start = $E000, size = $0400;
|
||||
CHARGEN: file = "", define = yes, start = $E000, size = $0400;
|
||||
|
||||
# memory beneath the ROM
|
||||
HIDDEN_RAM: file = "", define = yes, start = $E400, size = $FFFA - $E400;
|
||||
HIDDEN_RAM: file = "", define = yes, start = $E400, size = $FFFA - $E400;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
|
||||
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
|
||||
@ -62,23 +58,21 @@ SEGMENTS {
|
||||
SRPREPTRL: load = SRPREPTRL, type = ro;
|
||||
|
||||
MAINHDR: load = MAINHDR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss, optional = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
STARTUP: load = MAIN, type = ro, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro, define = yes;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -8,30 +8,31 @@ SYMBOLS {
|
||||
__RAMEND__: type = weak, value = $9800 + $1C00 * __GRAB__;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $00E2, size = $001A;
|
||||
TAPEHDR: file = %O, type = ro, start = $0000, size = $001F;
|
||||
BASHEAD: file = %O, define = yes, start = $0501, size = $000D;
|
||||
RAM: file = %O, define = yes, start = __BASHEAD_LAST__, size = __RAMEND__ - __RAM_START__ - __STACKSIZE__;
|
||||
ZP: file = "", define = yes, start = $00E2, size = $001A;
|
||||
TAPEHDR: file = %O, type = ro, start = $0000, size = $001F;
|
||||
BASHEAD: file = %O, define = yes, start = $0501, size = $000D;
|
||||
MAIN: file = %O, define = yes, start = __BASHEAD_LAST__, size = __RAMEND__ - __MAIN_START__;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = __RAMEND__ - __STACKSIZE__ - __ONCE_RUN__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
TAPEHDR: load = TAPEHDR, type = ro;
|
||||
BASHDR: load = BASHEAD, type = ro, define = yes, optional = yes;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
DATA: load = RAM, type = rw;
|
||||
ZPSAVE1: load = RAM, type = rw, define = yes; # ZPSAVE1, ZPSAVE2 must be together
|
||||
ZPSAVE2: load = RAM, type = bss; # see "libsrc/atmos/crt0.s"
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
BASHDR: load = BASHEAD, type = ro, optional = yes;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw;
|
||||
ONCE: load = MAIN, type = ro, define = yes;
|
||||
BASTAIL: load = MAIN, type = ro, optional = yes;
|
||||
BSS: load = BSS, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
22
cfg/bbc.cfg
22
cfg/bbc.cfg
@ -2,24 +2,24 @@ SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0070, size = $0020;
|
||||
RAM: file = %O, start = $0E00, size = $7200 - __STACKSIZE__;
|
||||
ZP: file = "", define = yes, start = $0070, size = $0020;
|
||||
MAIN: file = %O, start = $0E00, size = $7200 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
STARTUP: load = MAIN, type = ro, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -9,7 +9,7 @@ MEMORY {
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A;
|
||||
LOADADDR: file = %O, start = $1BFF, size = $0002;
|
||||
HEADER: file = %O, start = $1C01, size = $000C;
|
||||
RAM: file = %O, define = yes, start = $1C0D, size = $A3F3 - __OVERLAYSIZE__ - __STACKSIZE__;
|
||||
MAIN: file = %O, define = yes, start = $1C0D, size = $A3F3 - __OVERLAYSIZE__ - __STACKSIZE__;
|
||||
OVL1ADDR: file = "%O.1", start = $BFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL1: file = "%O.1", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL2ADDR: file = "%O.2", start = $BFFE - __OVERLAYSIZE__, size = $0002;
|
||||
@ -30,17 +30,17 @@ MEMORY {
|
||||
OVL9: file = "%O.9", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = bss;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
OVL1ADDR: load = OVL1ADDR, type = ro;
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
OVL2ADDR: load = OVL2ADDR, type = ro;
|
||||
@ -64,7 +64,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
22
cfg/c128.cfg
22
cfg/c128.cfg
@ -7,26 +7,26 @@ MEMORY {
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A;
|
||||
LOADADDR: file = %O, start = $1BFF, size = $0002;
|
||||
HEADER: file = %O, start = $1C01, size = $000C;
|
||||
RAM: file = %O, define = yes, start = $1C0D, size = $A3F3 - __STACKSIZE__;
|
||||
MAIN: file = %O, define = yes, start = $1C0D, size = $A3F3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = bss;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
24
cfg/c16.cfg
24
cfg/c16.cfg
@ -7,26 +7,26 @@ MEMORY {
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A;
|
||||
LOADADDR: file = %O, start = $0FFF, size = $0002;
|
||||
HEADER: file = %O, start = $1001, size = $000C;
|
||||
RAM: file = %O, start = $100D, size = $6FF3 - __STACKSIZE__;
|
||||
MAIN: file = %O, start = $100D, size = $6FF3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = bss;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -5,16 +5,16 @@ SYMBOLS {
|
||||
__LOADADDR__: type = import;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", start = $0002, size = $001A, define = yes;
|
||||
ZP: file = "", start = $0002, size = $00FE, define = yes;
|
||||
LOADADDR: file = %O, start = %S - 2, size = $0002;
|
||||
RAM: file = %O, start = %S, size = $D000 - %S;
|
||||
MAIN: file = %O, start = %S, size = $D000 - %S;
|
||||
}
|
||||
SEGMENTS {
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = rw, optional = yes;
|
||||
RODATA: load = RAM, type = ro, optional = yes;
|
||||
DATA: load = RAM, type = rw, optional = yes;
|
||||
BSS: load = RAM, type = bss, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = rw;
|
||||
RODATA: load = MAIN, type = ro, optional = yes;
|
||||
DATA: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = MAIN, type = bss, optional = yes, define = yes;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0801;
|
||||
STARTADDRESS: default = $0801;
|
||||
}
|
||||
SYMBOLS {
|
||||
__LOADADDR__: type = import;
|
||||
@ -14,9 +14,8 @@ MEMORY {
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A;
|
||||
LOADADDR: file = %O, start = %S - 2, size = $0002;
|
||||
HEADER: file = %O, define = yes, start = %S, size = $000D;
|
||||
MAIN: file = %O, define = yes, start = __HEADER_LAST__, size = __OVERLAYSTART__ - __STACKSIZE__ - __HEADER_LAST__;
|
||||
MOVE: file = %O, start = __INITBSS_LOAD__, size = __HIMEM__ - __BSS_RUN__;
|
||||
INIT: file = "", start = __BSS_RUN__, size = __HIMEM__ - __BSS_RUN__;
|
||||
MAIN: file = %O, define = yes, start = __HEADER_LAST__, size = __HIMEM__ - __HEADER_LAST__;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = __OVERLAYSTART__ - __STACKSIZE__ - __ONCE_RUN__;
|
||||
OVL1ADDR: file = "%O.1", start = __OVERLAYSTART__ - 2, size = $0002;
|
||||
OVL1: file = "%O.1", start = __OVERLAYSTART__, size = __OVERLAYSIZE__;
|
||||
OVL2ADDR: file = "%O.2", start = __OVERLAYSTART__ - 2, size = $0002;
|
||||
@ -37,41 +36,41 @@ MEMORY {
|
||||
OVL9: file = "%O.9", start = __OVERLAYSTART__, size = __OVERLAYSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INITBSS: load = MAIN, type = bss, define = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
INIT: load = MOVE, run = INIT, type = ro, define = yes;
|
||||
OVL1ADDR: load = OVL1ADDR, type = ro;
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
OVL2ADDR: load = OVL2ADDR, type = ro;
|
||||
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
|
||||
OVL3ADDR: load = OVL3ADDR, type = ro;
|
||||
OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes;
|
||||
OVL4ADDR: load = OVL4ADDR, type = ro;
|
||||
OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes;
|
||||
OVL5ADDR: load = OVL5ADDR, type = ro;
|
||||
OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes;
|
||||
OVL6ADDR: load = OVL6ADDR, type = ro;
|
||||
OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes;
|
||||
OVL7ADDR: load = OVL7ADDR, type = ro;
|
||||
OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes;
|
||||
OVL8ADDR: load = OVL8ADDR, type = ro;
|
||||
OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes;
|
||||
OVL9ADDR: load = OVL9ADDR, type = ro;
|
||||
OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw;
|
||||
ONCE: load = MAIN, type = ro, define = yes;
|
||||
BSS: load = BSS, type = bss, define = yes;
|
||||
OVL1ADDR: load = OVL1ADDR, type = ro;
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
OVL2ADDR: load = OVL2ADDR, type = ro;
|
||||
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
|
||||
OVL3ADDR: load = OVL3ADDR, type = ro;
|
||||
OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes;
|
||||
OVL4ADDR: load = OVL4ADDR, type = ro;
|
||||
OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes;
|
||||
OVL5ADDR: load = OVL5ADDR, type = ro;
|
||||
OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes;
|
||||
OVL6ADDR: load = OVL6ADDR, type = ro;
|
||||
OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes;
|
||||
OVL7ADDR: load = OVL7ADDR, type = ro;
|
||||
OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes;
|
||||
OVL8ADDR: load = OVL8ADDR, type = ro;
|
||||
OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes;
|
||||
OVL9ADDR: load = OVL9ADDR, type = ro;
|
||||
OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
37
cfg/c64.cfg
37
cfg/c64.cfg
@ -1,5 +1,5 @@
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0801;
|
||||
STARTADDRESS: default = $0801;
|
||||
}
|
||||
SYMBOLS {
|
||||
__LOADADDR__: type = import;
|
||||
@ -8,31 +8,30 @@ SYMBOLS {
|
||||
__HIMEM__: type = weak, value = $D000;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A;
|
||||
LOADADDR: file = %O, start = %S - 2, size = $0002;
|
||||
HEADER: file = %O, define = yes, start = %S, size = $000D;
|
||||
MAIN: file = %O, define = yes, start = __HEADER_LAST__, size = __HIMEM__ - __STACKSIZE__ - __HEADER_LAST__;
|
||||
MOVE: file = %O, start = __INITBSS_LOAD__, size = __HIMEM__ - __BSS_RUN__;
|
||||
INIT: file = "", start = __BSS_RUN__, size = __HIMEM__ - __BSS_RUN__;
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A;
|
||||
LOADADDR: file = %O, start = %S - 2, size = $0002;
|
||||
HEADER: file = %O, define = yes, start = %S, size = $000D;
|
||||
MAIN: file = %O, define = yes, start = __HEADER_LAST__, size = __HIMEM__ - __HEADER_LAST__;
|
||||
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INITBSS: load = MAIN, type = bss, define = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
INIT: load = MOVE, run = INIT, type = ro, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw;
|
||||
ONCE: load = MAIN, type = ro, define = yes;
|
||||
BSS: load = BSS, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -8,30 +8,30 @@ MEMORY {
|
||||
STARTUP: file = %O, start = $00FE, size = $0102, fill = yes;
|
||||
PAGE2: file = %O, start = $0200, size = $0100, fill = yes;
|
||||
PAGE3: file = %O, start = $0300, size = $0100, fill = yes;
|
||||
RAM: file = %O, start = $0400, size = $DC00;
|
||||
MAIN: file = %O, start = $0400, size = $DC00;
|
||||
CHARRAM: file = "", define = yes, start = $E000, size = $1000;
|
||||
VIDRAM: file = "", define = yes, start = $F000, size = $0400;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = rw, define = yes;
|
||||
EXEHDR: load = HEADER, type = rw;
|
||||
STARTUP: load = STARTUP, type = rw;
|
||||
PAGE2: load = PAGE2, type = rw;
|
||||
PAGE3: load = PAGE3, type = rw;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = rw, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = bss, optional = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -7,28 +7,28 @@ MEMORY {
|
||||
STARTUP: file = %O, start = $00FE, size = $0102, fill = yes;
|
||||
PAGE2: file = %O, start = $0200, size = $0100, fill = yes;
|
||||
PAGE3: file = %O, start = $0300, size = $0100, fill = yes;
|
||||
RAM: file = %O, start = $0400, size = $FECB - __STACKSIZE__;
|
||||
MAIN: file = %O, start = $0400, size = $FECB - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = rw, define = yes;
|
||||
EXEHDR: load = HEADER, type = rw;
|
||||
STARTUP: load = STARTUP, type = rw;
|
||||
PAGE2: load = PAGE2, type = rw;
|
||||
PAGE3: load = PAGE3, type = rw;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = rw, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = bss, optional = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -1,41 +1,51 @@
|
||||
# linker config to produce simple Gamate cartridge (.bin)
|
||||
|
||||
SYMBOLS {
|
||||
__STARTUP__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0080; # 1 page stack
|
||||
__STARTUP__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0080; # 1 page stack
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
# 0000-03ff is RAM
|
||||
# FIXME: what zp range can we actually use?
|
||||
# $0a-$11 is used by IRQ/NMI, $e8 is used by NMI
|
||||
ZP: start = $0012, size = $e8 - $12;
|
||||
CPUSTACK: start = $0100, size =$100;
|
||||
RAM: start = $0200, size = $200 - __STACKSIZE__, define = yes;
|
||||
# 0000-03ff is RAM
|
||||
# FIXME: what zp range can we actually use?
|
||||
# $0a-$11 is used by IRQ/NMI, $e8 is used by NMI
|
||||
ZP: start = $0012, size = $00E8 - $0012;
|
||||
CPUSTACK: start = $0100, size = $0100;
|
||||
RAM: start = $0200, size = $0200 - __STACKSIZE__, define = yes;
|
||||
|
||||
CARTHEADER: file = %O, define = yes, start = %S, size = $0029;
|
||||
# 6000-e000 can be (Cartridge) ROM
|
||||
# WARNING: fill value must be $00 else it will no more work
|
||||
#ROM: start = $6000, size = $1000, fill = yes, fillval = $00, file = %O, define = yes;
|
||||
#ROMFILL: start = $7000, size = $7000, fill = yes, fillval = $00, file = %O, define = yes;
|
||||
# for images that have code >$6fff we must calculate the checksum!
|
||||
ROM: start = $6000 + $29, size = $8000 - $29, fill = yes, fillval = $00, file = %O, define = yes;
|
||||
CARTHEADER: file = %O, define = yes, start = %S, size = $0029;
|
||||
# 6000-e000 can be (Cartridge) ROM
|
||||
# WARNING: fill value must be $00 else it will no more work
|
||||
#ROM: start = $6000, size = $1000, fill = yes, fillval = $00, file = %O, define = yes;
|
||||
#ROMFILL: start = $7000, size = $7000, fill = yes, fillval = $00, file = %O, define = yes;
|
||||
# for images that have code >$6fff we must calculate the checksum!
|
||||
ROM: start = $6000 + $0029, size = $8000 - $0029, fill = yes, fillval = $00, file = %O, define = yes;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
APPZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
STARTUP: load = CARTHEADER, type = ro, define=yes;
|
||||
INIT: load = ROM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = ROM, type = ro, define=yes;
|
||||
RODATA: load = ROM, type = ro, define=yes;
|
||||
DATA: load = ROM, run=RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
APPZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
STARTUP: load = CARTHEADER, type = ro, define = yes;
|
||||
ONCE: load = ROM, type = ro, optional = yes;
|
||||
CODE: load = ROM, type = ro, define = yes;
|
||||
RODATA: load = ROM, type = ro, define = yes;
|
||||
DATA: load = ROM, run = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
|
||||
FEATURES {
|
||||
CONDES: segment = RODATA, type = constructor, label = __CONSTRUCTOR_TABLE__, count = __CONSTRUCTOR_COUNT__;
|
||||
CONDES: segment = RODATA, type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__;
|
||||
CONDES: segment = RODATA, type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__, import = __CALLIRQ__;
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
segment = RODATA;
|
||||
CONDES: type = interruptor,
|
||||
label = __INTERRUPTOR_TABLE__,
|
||||
count = __INTERRUPTOR_COUNT__,
|
||||
segment = RODATA,
|
||||
import = __CALLIRQ__;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ MEMORY {
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: type = zp, load = ZP;
|
||||
EXTZP: type = zp, load = ZP, optional = yes;
|
||||
EXTZP: type = zp, load = ZP, optional = yes;
|
||||
EXTBSS: type = bss, load = EXT, define = yes, optional = yes;
|
||||
FILEINFO: type = ro, load = CVT, offset = $002;
|
||||
RECORDS: type = ro, load = CVT, offset = $100, optional = yes;
|
||||
@ -40,11 +40,12 @@ SEGMENTS {
|
||||
VLIRIDX0: type = ro, load = CVT, align = $200, optional = yes;
|
||||
STARTUP: type = ro, run = VLIR0, load = CVT, align_load = $200, define = yes;
|
||||
LOWCODE: type = ro, run = VLIR0, load = CVT, optional = yes;
|
||||
INIT: type = ro, run = VLIR0, load = CVT, define = yes, optional = yes;
|
||||
ONCE: type = ro, run = VLIR0, load = CVT, optional = yes;
|
||||
CODE: type = ro, run = VLIR0, load = CVT;
|
||||
RODATA: type = ro, run = VLIR0, load = CVT;
|
||||
DATA: type = rw, run = VLIR0, load = CVT;
|
||||
BSS: type = bss, load = VLIR0, define = yes;
|
||||
INIT: type = bss, load = VLIR0, optional = yes;
|
||||
BSS: type = bss, load = VLIR0, define = yes;
|
||||
VLIRIDX1: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY1: type = ro, run = VLIR1, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX2: type = ro, load = CVT, align = $200, optional = yes;
|
||||
@ -88,7 +89,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -31,17 +31,18 @@ MEMORY {
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: type = zp, load = ZP;
|
||||
EXTZP: type = zp, load = ZP, optional = yes;
|
||||
EXTZP: type = zp, load = ZP, optional = yes;
|
||||
DIRENTRY: type = ro, load = CVT, align = $FE;
|
||||
FILEINFO: type = ro, load = CVT, align = $FE;
|
||||
RECORDS: type = ro, load = CVT, align = $FE, optional = yes;
|
||||
STARTUP: type = ro, run = VLIR0, load = CVT, align_load = $FE, define = yes;
|
||||
LOWCODE: type = ro, run = VLIR0, load = CVT, optional = yes;
|
||||
INIT: type = ro, run = VLIR0, load = CVT, define = yes, optional = yes;
|
||||
ONCE: type = ro, run = VLIR0, load = CVT, optional = yes;
|
||||
CODE: type = ro, run = VLIR0, load = CVT;
|
||||
RODATA: type = ro, run = VLIR0, load = CVT;
|
||||
DATA: type = rw, run = VLIR0, load = CVT;
|
||||
BSS: type = bss, load = VLIR0, define = yes;
|
||||
INIT: type = bss, load = VLIR0, optional = yes;
|
||||
BSS: type = bss, load = VLIR0, define = yes;
|
||||
OVERLAY1: type = ro, run = VLIR1, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY2: type = ro, run = VLIR2, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY3: type = ro, run = VLIR3, load = CVT, align_load = $FE, optional = yes;
|
||||
@ -66,7 +67,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -5,24 +5,24 @@ SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0400; # 1k stack (do typical LUnix apps. need 2k?)
|
||||
}
|
||||
MEMORY {
|
||||
ZP: start = $0080, size = $0040;
|
||||
RAM: start = %S, size = $7600 - __STACKSIZE__;
|
||||
ZP: start = $0080, size = $0040;
|
||||
MAIN: start = %S, size = $7600 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes; # Pseudo-registers
|
||||
STARTUP: load = RAM, type = ro; # First initialization code
|
||||
LOWCODE: load = RAM, type = ro, optional = yes; # Legacy from other platforms
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes; # Library initialization code
|
||||
CODE: load = RAM, type = ro; # Program
|
||||
RODATA: load = RAM, type = ro; # Literals, constants
|
||||
DATA: load = RAM, type = rw; # Initialized variables
|
||||
BSS: load = RAM, type = bss, define = yes; # Uninitialized variables
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes; # Pseudo-registers
|
||||
STARTUP: load = MAIN, type = ro; # First initialization code
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes; # Legacy from other platforms
|
||||
ONCE: load = MAIN, type = ro, optional = yes; # Library initialization code
|
||||
CODE: load = MAIN, type = ro; # Program
|
||||
RODATA: load = MAIN, type = ro; # Literals, constants
|
||||
DATA: load = MAIN, type = rw; # Initialized variables
|
||||
BSS: load = MAIN, type = bss, define = yes; # Uninitialized variables
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -1,32 +1,33 @@
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader
|
||||
__BLOCKSIZE__: type = weak, value = $0400; # cart block size
|
||||
__BANK0BLOCKSIZE__: type = weak, value = $0400; # bank 0 cart block size
|
||||
__BANK1BLOCKSIZE__: type = weak, value = $0000; # bank 1 block size
|
||||
__BLLHDR__: type = import;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0000, size = $0100;
|
||||
HEADER: file = %O, start = $0000, size = $000a;
|
||||
RAM: file = %O, define = yes, start = $0400, size = $BC38 - __STACKSIZE__;
|
||||
MAIN: file = %O, define = yes, start = $0400, size = $BC38 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
BLLHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
APPZP: load = ZP, type = zp, optional = yes;
|
||||
BLLHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = MAIN, type = ro, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, define = yes, optional = yes;
|
||||
CODE: load = MAIN, type = ro, define = yes;
|
||||
RODATA: load = MAIN, type = ro, define = yes;
|
||||
DATA: load = MAIN, type = rw, define = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -1,7 +1,8 @@
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader
|
||||
__BLOCKSIZE__: type = weak, value = $0400; # cart block size
|
||||
__BANK0BLOCKSIZE__: type = weak, value = $0400; # bank 0 cart block size
|
||||
__BANK1BLOCKSIZE__: type = weak, value = $0000; # bank 1 block size
|
||||
__EXEHDR__: type = import;
|
||||
__BOOTLDR__: type = import;
|
||||
__DEFDIR__: type = import;
|
||||
@ -11,28 +12,28 @@ MEMORY {
|
||||
HEADER: file = %O, start = $0000, size = $0040;
|
||||
BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__;
|
||||
DIR: file = %O, start = $0000, size = 8;
|
||||
RAM: file = %O, define = yes, start = $0200, size = $9E58 - __STACKSIZE__;
|
||||
MAIN: file = %O, define = yes, start = $0200, size = $9E58 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
BOOTLDR: load = BOOT, type = ro;
|
||||
DIRECTORY: load = DIR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
APPZP: load = ZP, type = zp, optional = yes;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
BOOTLDR: load = BOOT, type = ro;
|
||||
DIRECTORY: load = DIR, type = ro;
|
||||
STARTUP: load = MAIN, type = ro, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, define = yes, optional = yes;
|
||||
CODE: load = MAIN, type = ro, define = yes;
|
||||
RODATA: load = MAIN, type = ro, define = yes;
|
||||
DATA: load = MAIN, type = rw, define = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -1,7 +1,8 @@
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader
|
||||
__BLOCKSIZE__: type = weak, value = $0400; # cart block size
|
||||
__BANK0BLOCKSIZE__: type = weak, value = $0400; # bank 0 cart block size
|
||||
__BANK1BLOCKSIZE__: type = weak, value = $0000; # bank 1 block size
|
||||
__EXEHDR__: type = import;
|
||||
__BOOTLDR__: type = import;
|
||||
__DEFDIR__: type = import;
|
||||
@ -12,31 +13,31 @@ MEMORY {
|
||||
HEADER: file = %O, start = $0000, size = $0040;
|
||||
BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__;
|
||||
DIR: file = %O, start = $0000, size = 8;
|
||||
RAM: file = %O, define = yes, start = $0200, size = $BD38 - __STACKSIZE__;
|
||||
MAIN: file = %O, define = yes, start = $0200, size = $BD38 - __STACKSIZE__;
|
||||
UPLDR: file = %O, define = yes, start = $BFDC, size = $005C;
|
||||
}
|
||||
SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
BOOTLDR: load = BOOT, type = ro;
|
||||
DIRECTORY:load = DIR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
UPCODE: load = UPLDR, type = ro, define = yes;
|
||||
UPDATA: load = UPLDR, type = rw, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
APPZP: load = ZP, type = zp, optional = yes;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
BOOTLDR: load = BOOT, type = ro;
|
||||
DIRECTORY:load = DIR, type = ro;
|
||||
STARTUP: load = MAIN, type = ro, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, define = yes, optional = yes;
|
||||
CODE: load = MAIN, type = ro, define = yes;
|
||||
RODATA: load = MAIN, type = ro, define = yes;
|
||||
DATA: load = MAIN, type = rw, define = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
UPCODE: load = UPLDR, type = ro, define = yes;
|
||||
UPDATA: load = UPLDR, type = rw, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
27
cfg/lynx.cfg
27
cfg/lynx.cfg
@ -1,7 +1,8 @@
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader
|
||||
__BLOCKSIZE__: type = weak, value = 1024; # cart block size
|
||||
__BANK0BLOCKSIZE__: type = weak, value = $0400; # bank 0 cart block size
|
||||
__BANK1BLOCKSIZE__: type = weak, value = $0000; # bank 1 block size
|
||||
__EXEHDR__: type = import;
|
||||
__BOOTLDR__: type = import;
|
||||
__DEFDIR__: type = import;
|
||||
@ -11,28 +12,28 @@ MEMORY {
|
||||
HEADER: file = %O, start = $0000, size = $0040;
|
||||
BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__;
|
||||
DIR: file = %O, start = $0000, size = 8;
|
||||
RAM: file = %O, define = yes, start = $0200, size = $BE38 - __STACKSIZE__;
|
||||
MAIN: file = %O, define = yes, start = $0200, size = $BE38 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
BOOTLDR: load = BOOT, type = ro;
|
||||
DIRECTORY: load = DIR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
APPZP: load = ZP, type = zp, optional = yes;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
BOOTLDR: load = BOOT, type = ro;
|
||||
DIRECTORY: load = DIR, type = ro;
|
||||
STARTUP: load = MAIN, type = ro, define = yes;
|
||||
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, define = yes, optional = yes;
|
||||
CODE: load = MAIN, type = ro, define = yes;
|
||||
RODATA: load = MAIN, type = ro, define = yes;
|
||||
DATA: load = MAIN, type = rw, define = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -6,7 +6,7 @@ SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
HEADER: load = COMBINED, type = ro;
|
||||
INIT: load = COMBINED, type = ro, optional = yes;
|
||||
ONCE: load = COMBINED, type = ro, optional = yes;
|
||||
CODE: load = COMBINED, type = ro;
|
||||
RODATA: load = COMBINED, type = ro;
|
||||
DATA: load = COMBINED, type = rw;
|
||||
|
22
cfg/nes.cfg
22
cfg/nes.cfg
@ -12,10 +12,10 @@ MEMORY {
|
||||
# - code
|
||||
# - rodata
|
||||
# - data (load)
|
||||
ROM0: file = %O, start = $8000, size = $7FF4, fill = yes, define = yes;
|
||||
ROM0: file = %O, start = $8000, size = $7FFA, fill = yes, define = yes;
|
||||
|
||||
# Hardware Vectors at End of 2nd 8K ROM
|
||||
ROMV: file = %O, start = $FFF6, size = $000C, fill = yes;
|
||||
ROMV: file = %O, start = $FFFA, size = $0006, fill = yes;
|
||||
|
||||
# 1 8k CHR Bank
|
||||
ROM2: file = %O, start = $0000, size = $2000, fill = yes;
|
||||
@ -33,23 +33,23 @@ MEMORY {
|
||||
RAM: file = "", start = $6000, size = $2000, define = yes;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
HEADER: load = HEADER, type = ro;
|
||||
STARTUP: load = ROM0, type = ro, define = yes;
|
||||
LOWCODE: load = ROM0, type = ro, optional = yes;
|
||||
INIT: load = ROM0, type = ro, define = yes, optional = yes;
|
||||
CODE: load = ROM0, type = ro, define = yes;
|
||||
RODATA: load = ROM0, type = ro, define = yes;
|
||||
DATA: load = ROM0, run = RAM, type = rw, define = yes;
|
||||
STARTUP: load = ROM0, type = ro, define = yes;
|
||||
LOWCODE: load = ROM0, type = ro, optional = yes;
|
||||
ONCE: load = ROM0, type = ro, optional = yes;
|
||||
CODE: load = ROM0, type = ro, define = yes;
|
||||
RODATA: load = ROM0, type = ro, define = yes;
|
||||
DATA: load = ROM0, run = RAM, type = rw, define = yes;
|
||||
VECTORS: load = ROMV, type = rw;
|
||||
CHARS: load = ROM2, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
20
cfg/none.cfg
20
cfg/none.cfg
@ -2,23 +2,23 @@ SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0000, size = $0001F;
|
||||
RAM: file = %O, start = %S, size = $10000 - __STACKSIZE__;
|
||||
ZP: file = "", define = yes, start = $0000, size = $0001F;
|
||||
MAIN: file = %O, start = %S, size = $10000 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = rw;
|
||||
RODATA: load = RAM, type = rw;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = rw;
|
||||
RODATA: load = MAIN, type = rw;
|
||||
DATA: load = MAIN, type = rw;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -10,16 +10,15 @@ SYMBOLS {
|
||||
}
|
||||
MEMORY {
|
||||
# for size of ZP, see runtime/zeropage.s and c1p/extzp.s
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A + $0006;
|
||||
HEAD: file = %O, start = $0000, size = $00B6;
|
||||
RAM: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
|
||||
ZP: file = "", define = yes, start = $0002, size = $00FE;
|
||||
HEAD: file = %O, start = $0000, size = $00B6;
|
||||
MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
|
||||
}
|
||||
SEGMENTS {
|
||||
BOOT: load = HEAD, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = rw;
|
||||
RODATA: load = RAM, type = rw;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
BOOT: load = HEAD, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = rw;
|
||||
RODATA: load = MAIN, type = ro, optional = yes;
|
||||
DATA: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = MAIN, type = bss, optional = yes, define = yes;
|
||||
}
|
||||
|
@ -10,27 +10,27 @@ SYMBOLS {
|
||||
}
|
||||
MEMORY {
|
||||
# for size of ZP, see runtime/zeropage.s and c1p/extzp.s
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A + $0020;
|
||||
HEAD: file = %O, start = $0000, size = $00B6;
|
||||
RAM: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A + $0020;
|
||||
HEAD: file = %O, start = $0000, size = $00B6;
|
||||
MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
|
||||
}
|
||||
SEGMENTS {
|
||||
BOOT: load = HEAD, type = ro, optional = yes;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = rw;
|
||||
RODATA: load = RAM, type = rw;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
BOOT: load = HEAD, type = ro, optional = yes;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = rw;
|
||||
RODATA: load = MAIN, type = rw;
|
||||
DATA: load = MAIN, type = rw;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
38
cfg/pce.cfg
38
cfg/pce.cfg
@ -1,39 +1,39 @@
|
||||
# linker config to produce simple NEC PC-Engine cartridge (.pce)
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0300; # 3 pages stack
|
||||
__STACKSIZE__: type = weak, value = $0300; # 3 pages stack
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
# FIXME: is this correct? the first 3? bytes cant be used?
|
||||
ZP: start = $03, size = $fd, type = rw, define = yes;
|
||||
# FIXME: is this correct? the first 3? bytes cant be used?
|
||||
ZP: file = "", start = $0003, size = $00FD, type = rw, define = yes;
|
||||
|
||||
# reset-bank and hardware vectors
|
||||
ROM0: start = $e000, size = $1ff6, file = %O ,fill = yes, define = yes;
|
||||
ROMV: start = $fff6, size = $a, file = %O,fill = yes;
|
||||
# reset-bank and hardware vectors
|
||||
ROM0: file = %O, start = $E000, size = $1FF6, fill = yes, define = yes;
|
||||
ROMV: file = %O, start = $FFF6, size = $000A, fill = yes;
|
||||
|
||||
# first RAM page (also contains stack and zeropage)
|
||||
RAM: start = $2200, size = $1e00, define = yes;
|
||||
# first RAM page (also contains stack and zeropage)
|
||||
RAM: file = "", start = $2200, size = $1e00, define = yes;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
STARTUP: load = ROM0, type = ro, define = yes;
|
||||
INIT: load = ROM0, type = ro, define = yes, optional = yes;
|
||||
CODE: load = ROM0, type = ro, define = yes;
|
||||
RODATA: load = ROM0, type = ro, define = yes;
|
||||
DATA: load = ROM0, run= RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
VECTORS: load = ROMV, type = rw, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
APPZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
APPZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
STARTUP: load = ROM0, type = ro, define = yes;
|
||||
ONCE: load = ROM0, type = ro, optional = yes;
|
||||
CODE: load = ROM0, type = ro, define = yes;
|
||||
RODATA: load = ROM0, type = ro, define = yes;
|
||||
DATA: load = ROM0, run = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
VECTORS: load = ROMV, type = rw, define = yes;
|
||||
}
|
||||
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
12
cfg/pet.cfg
12
cfg/pet.cfg
@ -10,23 +10,23 @@ MEMORY {
|
||||
RAM: file = %O, start = $040D, size = $7BF3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
ONCE: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
INIT: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -7,26 +7,26 @@ MEMORY {
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A;
|
||||
LOADADDR: file = %O, start = $0FFF, size = $0002;
|
||||
HEADER: file = %O, start = $1001, size = $000C;
|
||||
RAM: file = %O, define = yes, start = $100D, size = $ECF3 - __STACKSIZE__;
|
||||
MAIN: file = %O, define = yes, start = $100D, size = $ECF3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = bss;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -3,26 +3,26 @@ SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", start = $0000, size = $001A;
|
||||
HEADER: file = %O, start = $0000, size = $0001;
|
||||
RAM: file = %O, define = yes, start = $0200, size = $FDF0 - __STACKSIZE__;
|
||||
ZP: file = "", start = $0000, size = $001A;
|
||||
HEADER: file = %O, start = $0000, size = $0001;
|
||||
MAIN: file = %O, define = yes, start = $0200, size = $FDF0 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -3,26 +3,26 @@ SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", start = $0000, size = $001A;
|
||||
HEADER: file = %O, start = $0000, size = $0001;
|
||||
RAM: file = %O, define = yes, start = $0200, size = $FDF0 - __STACKSIZE__;
|
||||
ZP: file = "", start = $0000, size = $001A;
|
||||
HEADER: file = %O, start = $0000, size = $0001;
|
||||
MAIN: file = %O, define = yes, start = $0200, size = $FDF0 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -20,8 +20,8 @@ MEMORY {
|
||||
ROM: file = %O, start = $c000, size = $4000, fill = yes, fillval = $FF;
|
||||
}
|
||||
SEGMENTS {
|
||||
LOWCODE: load = ROM, type = ro, optional = yes;
|
||||
INIT: load = ROM, type = ro, define = yes, optional = yes;
|
||||
LOWCODE: load = ROM, type = ro, optional = yes;
|
||||
ONCE: load = ROM, type = ro, optional = yes;
|
||||
CODE: load = ROM, type = ro;
|
||||
BANK1: load = BANKROM1, type = ro;
|
||||
BANK2: load = BANKROM2, type = ro;
|
||||
@ -30,8 +30,8 @@ SEGMENTS {
|
||||
BANK5: load = BANKROM5, type = ro;
|
||||
BANK6: load = BANKROM6, type = ro;
|
||||
BANK7: load = BANKROM7, type = ro;
|
||||
ZEROPAGE: load = RAM, type = bss, define = yes;
|
||||
DATA: load = RAM, type = bss, define = yes, offset = $0200;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
VECTOR: load = ROM, type = ro, offset = $3FFA;
|
||||
ZEROPAGE: load = RAM, type = bss, define = yes;
|
||||
DATA: load = RAM, type = bss, define = yes, offset = $0200;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
VECTOR: load = ROM, type = ro, offset = $3FFA;
|
||||
}
|
||||
|
@ -14,21 +14,21 @@ MEMORY {
|
||||
ROM: file = %O, start = $C000, size = $4000, fill = yes, fillval = $ff, define=yes;
|
||||
}
|
||||
SEGMENTS {
|
||||
LOWCODE: load = ROM, type = ro, optional = yes;
|
||||
INIT: load = ROM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = ROM, type = ro, define = yes;
|
||||
RODATA: load = ROM, type = ro, define = yes;
|
||||
DATA: load = ROM, run = RAM, type = rw, define = yes;
|
||||
FFF0: load = ROM, type = ro, offset = $3FF0;
|
||||
VECTOR: load = ROM, type = ro, offset = $3FFA;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
LOWCODE: load = ROM, type = ro, optional = yes;
|
||||
ONCE: load = ROM, type = ro, optional = yes;
|
||||
CODE: load = ROM, type = ro, define = yes;
|
||||
RODATA: load = ROM, type = ro, define = yes;
|
||||
DATA: load = ROM, run = RAM, type = rw, define = yes;
|
||||
FFF0: load = ROM, type = ro, offset = $3FF0;
|
||||
VECTOR: load = ROM, type = ro, offset = $3FFA;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -16,15 +16,15 @@ MEMORY {
|
||||
ROM: file = %O, start = $C000, size = $4000, fill = yes, fillval = $FF;
|
||||
}
|
||||
SEGMENTS {
|
||||
LOWCODE: load = ROM, type = ro, optional = yes;
|
||||
INIT: load = ROM, type = ro, define = yes, optional = yes;
|
||||
LOWCODE: load = ROM, type = ro, optional = yes;
|
||||
ONCE: load = ROM, type = ro, optional = yes;
|
||||
CODE: load = ROM, type = ro;
|
||||
RODATA: load = ROM, type = ro;
|
||||
BANK1: load = BANKROM1, type = ro;
|
||||
BANK2: load = BANKROM2, type = ro;
|
||||
BANK3: load = BANKROM3, type = ro;
|
||||
ZEROPAGE: load = RAM, type = bss, define = yes;
|
||||
DATA: load = RAM, type = bss, define = yes, offset = $0200;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
VECTOR: load = ROM, type = ro, offset = $3FFA;
|
||||
ZEROPAGE: load = RAM, type = bss, define = yes;
|
||||
DATA: load = RAM, type = bss, define = yes, offset = $0200;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
VECTOR: load = ROM, type = ro, offset = $3FFA;
|
||||
}
|
||||
|
@ -2,29 +2,32 @@
|
||||
# make sure the halves are mirrored in the 64kbyte cartridge image
|
||||
# or reset from code >0xc000 and switch bank to the 3rd bank
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0100; # 1 page stack
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", start = $0000, size = $0100;
|
||||
CPUSTACK: file = "", start = $0100, size = $0100;
|
||||
RAM: file = "", start = $0200, size = $1E00, define = yes;
|
||||
RAM: file = "", start = $0200, size = $1E00 - __STACKSIZE__;
|
||||
VRAM: file = "", start = $4000, size = $2000;
|
||||
ROM: file = %O, start = $8000, size = $8000, fill = yes, fillval = $FF, define = yes;
|
||||
}
|
||||
SEGMENTS {
|
||||
LOWCODE: load = ROM, type = ro, optional = yes;
|
||||
INIT: load = ROM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = ROM, type = ro, define = yes;
|
||||
RODATA: load = ROM, type = ro, define = yes;
|
||||
DATA: load = ROM, run = RAM, type = rw, define = yes;
|
||||
FFF0: load = ROM, type = ro, offset = $7FF0;
|
||||
VECTOR: load = ROM, type = ro, offset = $7FFA;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
LOWCODE: load = ROM, type = ro, optional = yes;
|
||||
ONCE: load = ROM, type = ro, optional = yes;
|
||||
CODE: load = ROM, type = ro, define = yes;
|
||||
RODATA: load = ROM, type = ro, define = yes;
|
||||
DATA: load = ROM, run = RAM, type = rw, define = yes;
|
||||
FFF0: load = ROM, type = ro, offset = $7FF0;
|
||||
VECTOR: load = ROM, type = ro, offset = $7FFA;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -9,26 +9,26 @@ MEMORY {
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A;
|
||||
LOADADDR: file = %O, start = $11FF, size = $0002;
|
||||
HEADER: file = %O, start = $1201, size = $000C;
|
||||
RAM: file = %O, define = yes, start = $120D, size = $6DF3 - __STACKSIZE__;
|
||||
MAIN: file = %O, define = yes, start = $120D, size = $6DF3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = bss;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -7,26 +7,26 @@ MEMORY {
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A;
|
||||
LOADADDR: file = %O, start = $0FFF, size = $0002;
|
||||
HEADER: file = %O, start = $1001, size = $000C;
|
||||
RAM: file = %O, define = yes, start = $100D, size = $0DF3 - __STACKSIZE__;
|
||||
MAIN: file = %O, define = yes, start = $100D, size = $0DF3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
STARTUP: load = MAIN, type = ro;
|
||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||
ONCE: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = bss;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
42
doc/Makefile
42
doc/Makefile
@ -9,11 +9,9 @@ endif
|
||||
htmldir = $(prefix)/share/doc/cc65$(DESTPACKAGE_SUFFIX)/html
|
||||
infodir = $(prefix)/share/info
|
||||
|
||||
all mostlyclean:
|
||||
|
||||
ifdef CMD_EXE
|
||||
|
||||
clean install zip doc:
|
||||
doc clean install zip:
|
||||
|
||||
else # CMD_EXE
|
||||
|
||||
@ -26,23 +24,6 @@ TOC_LEVEL = 2
|
||||
|
||||
INSTALL = install
|
||||
|
||||
clean:
|
||||
$(RM) -r ../html ../info
|
||||
|
||||
install:
|
||||
$(if $(prefix),,$(error variable `prefix' must be set))
|
||||
ifeq ($(wildcard ../html),../html)
|
||||
$(INSTALL) -d $(DESTDIR)$(htmldir)
|
||||
$(INSTALL) -m644 ../html/*.* $(DESTDIR)$(htmldir)
|
||||
endif
|
||||
ifeq ($(wildcard ../info),../info)
|
||||
$(INSTALL) -d $(DESTDIR)$(infodir)
|
||||
$(INSTALL) -m644 ../info/*.* $(DESTDIR)$(infodir)
|
||||
endif
|
||||
|
||||
zip:
|
||||
@cd .. && zip cc65 html/*.*
|
||||
|
||||
doc: html info
|
||||
|
||||
html: $(addprefix ../html/,$(SGMLS:.sgml=.html) doc.css doc.png)
|
||||
@ -61,4 +42,25 @@ info: $(addprefix ../info/,$(SGMLS:.sgml=.info))
|
||||
../info/%.info: %.sgml | ../info
|
||||
@cd ../info && linuxdoc -B info ../doc/$<
|
||||
|
||||
clean:
|
||||
$(RM) -r ../html ../info
|
||||
|
||||
install:
|
||||
$(if $(prefix),,$(error variable `prefix' must be set))
|
||||
ifeq ($(wildcard ../html),../html)
|
||||
$(INSTALL) -d $(DESTDIR)$(htmldir)
|
||||
$(INSTALL) -m0644 ../html/*.* $(DESTDIR)$(htmldir)
|
||||
endif
|
||||
ifeq ($(wildcard ../info),../info)
|
||||
$(INSTALL) -d $(DESTDIR)$(infodir)
|
||||
$(INSTALL) -m0644 ../info/*.* $(DESTDIR)$(infodir)
|
||||
endif
|
||||
|
||||
zip:
|
||||
ifneq "$(wildcard ../html)" ""
|
||||
@cd .. && zip cc65 html/*.*
|
||||
endif
|
||||
|
||||
endif # CMD_EXE
|
||||
|
||||
all mostlyclean:
|
||||
|
191
doc/apple2.sgml
191
doc/apple2.sgml
@ -75,13 +75,30 @@ However while running module constructors/destructors the Language Card is disab
|
||||
Enabling the Language Card allows to use it as additional memory for cc65
|
||||
generated code. However code is never automatically placed there. Rather code
|
||||
needs to be explicitly placed in the Language Card either per file by compiling
|
||||
with <tt/--code-name HIGHCODE/ or per function by enclosing in <tt/#pragma
|
||||
code-name (push, "HIGHCODE")/ and <tt/#pragma code-name (pop)/. In either case the
|
||||
cc65 runtime system takes care of actually moving the code into the Language
|
||||
Card.
|
||||
with <tt/--code-name LC/ or per function by enclosing in <tt/#pragma code-name
|
||||
(push, "LC")/ and <tt/#pragma code-name (pop)/. In either case the cc65 runtime
|
||||
system takes care of actually moving the code into the Language Card.
|
||||
|
||||
The amount of memory available in the Language Card for generated code depends
|
||||
on the chosen <ref id="link-configs" name="linker configuration">.
|
||||
on the <ref id="link-configs" name="linker configuration"> parameters. There are
|
||||
several usefull settings:
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag>LC address: $D400, LC size: $C00</tag>
|
||||
For plain vanilla ProDOS 8 which doesn't actually use the Language Card bank 2
|
||||
memory from $D400 to $DFFF. This is the default setting.
|
||||
|
||||
<tag>LC address: $D000, LC size: $1000</tag>
|
||||
For ProDOS 8 together with the function <tt/rebootafterexit()/. If a program
|
||||
doesn't quit to the ProDOS 8 dispatcher but rather reboots the machine after
|
||||
exit then a plain vanilla ProDOS 8 doesn't make use of the Language Card bank
|
||||
2 at all.
|
||||
|
||||
<tag>LC address: $D000, LC size: $3000</tag>
|
||||
For plain vanilla DOS 3.3 which doesn't make use of the Language Card at all.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
|
||||
@ -93,126 +110,118 @@ The apple2 package comes with additional secondary linker config files, which
|
||||
are used via <tt/-t apple2 -C <configfile>/.
|
||||
|
||||
|
||||
<sect1>default config file (<tt/apple2.cfg/)<p>
|
||||
<sect1>default config file (<tt/apple2.cfg/)<label id="apple-def-cfg"><p>
|
||||
|
||||
Default configuration optimized for a binary program running on ProDOS 8 with
|
||||
BASIC.SYSTEM. A plain vanilla ProDOS 8 doesn't actually use the Language Card
|
||||
bank 2 memory from $D400 to $DFFF.
|
||||
Default configuration for a binary program.
|
||||
|
||||
Parameters:
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/RAM:/ Main memory area</tag>
|
||||
From $803 to $95FF (35.5 KB)
|
||||
|
||||
<tag><tt/LC:/ Language Card memory area</tag>
|
||||
From $D400 to $DFFF (3 KB)
|
||||
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Variable (default: $803)
|
||||
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||
|
||||
<tag><tt/HEADER:/ Binary file header</tag>
|
||||
DOS 3.3 header (address and length)
|
||||
<tag><tt/__EXEHDR__:/ Executable file header</tag>
|
||||
Default: DOS 3.3 header (address and length). Use <tt/-D __EXEHDR__=0/ to omit
|
||||
the header.
|
||||
|
||||
</descrip><p>
|
||||
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||
stack size.
|
||||
|
||||
<tag><tt/__HIMEM__:/ Highest usable memory address presumed at link time</tag>
|
||||
Default: $9600. Use <tt/-D __HIMEM__=<addr>/ to set a different
|
||||
highest usable address.
|
||||
|
||||
<sect1><tt/apple2-dos33.cfg/<p>
|
||||
<tag><tt/__LCADDR__:/ Address of code in the Language Card</tag>
|
||||
Default: $D400. Use <tt/-D __LCADDR__=<addr>/ to set a different
|
||||
code address.
|
||||
|
||||
Configuration optimized for a binary program running on DOS 3.3. A plain
|
||||
vanilla DOS 3.3 doesn't make use of the Language Card at all.
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/RAM:/ Main memory area</tag>
|
||||
From $803 to $95FF (35.5 KB)
|
||||
|
||||
<tag><tt/LC:/ Language Card memory area</tag>
|
||||
From $D000 to $FFFF (12 KB)
|
||||
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Variable (default: $803)
|
||||
|
||||
<tag><tt/HEADER:/ Binary file header</tag>
|
||||
DOS 3.3 header (address and length)
|
||||
<tag><tt/__LCSIZE__:/ Size of code in the Language Card</tag>
|
||||
Default: $C00. Use <tt/-D __LCSIZE__=<size>/ to set a different
|
||||
code size.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
<sect1><tt/apple2-system.cfg/<label id="apple-sys-cfg"><p>
|
||||
|
||||
Configuration for a system program running on ProDOS 8.
|
||||
Configuration for a system program running on ProDOS 8 and using the memory from
|
||||
$2000 to $BEFF.
|
||||
|
||||
Parameters:
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/RAM:/ Main memory area</tag>
|
||||
From $2000 to $BEFF (39.75 KB)
|
||||
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||
stack size.
|
||||
|
||||
<tag><tt/LC:/ Language Card memory area</tag>
|
||||
From $D400 to $DFFF (3 KB)
|
||||
<tag><tt/__LCADDR__:/ Address of code in the Language Card</tag>
|
||||
Default: $D400. Use <tt/-D __LCADDR__=<addr>/ to set a different
|
||||
code address.
|
||||
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Fixed ($2000)
|
||||
|
||||
<tag><tt/HEADER:/ Binary file header</tag>
|
||||
None
|
||||
<tag><tt/__LCSIZE__:/ Size of code in the Language Card</tag>
|
||||
Default: $C00. Use <tt/-D __LCSIZE__=<size>/ to set a different
|
||||
code size.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
<sect1><tt/apple2-loader.cfg/<label id="apple-load-cfg"><p>
|
||||
<sect1><tt/apple2-overlay.cfg/<p>
|
||||
|
||||
Configuration optimized for a binary program running on ProDOS 8 without
|
||||
BASIC.SYSTEM. Intended to be used with <bf/LOADER.SYSTEM - an
|
||||
Apple ][ ProDOS 8 loader for cc65 programs/, which is available
|
||||
in the cc65 User Contributions section.
|
||||
Configuration for overlay programs with the up to nine overlays. The overlay files
|
||||
don't include the DOS 3.3 header. See <tt>samples/overlaydemo.c</tt> for more
|
||||
information on overlays.
|
||||
|
||||
A program loaded by LOADER.SYSTEM works like a ProDOS 8 system program but
|
||||
isn't tied to the start address $2000. Thus with the default start
|
||||
address $800 the main memory area is increased by 6 KB.
|
||||
Parameters:
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/RAM:/ Main memory area</tag>
|
||||
From $800 to $BEFF (45.75 KB)
|
||||
|
||||
<tag><tt/LC:/ Language Card memory area</tag>
|
||||
From $D400 to $DFFF (3 KB)
|
||||
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Variable (default: $800)
|
||||
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||
|
||||
<tag><tt/HEADER:/ Binary file header</tag>
|
||||
DOS 3.3 header (address and length)
|
||||
<tag><tt/__EXEHDR__:/ Executable file header</tag>
|
||||
Default: DOS 3.3 header (address and length). Use <tt/-D __EXEHDR__=0/ to omit
|
||||
the header.
|
||||
|
||||
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||
stack size.
|
||||
|
||||
<tag><tt/__HIMEM__:/ Highest usable memory address presumed at link time</tag>
|
||||
Default: $9600. Use <tt/-D __HIMEM__=<addr>/ to set a different
|
||||
highest usable address.
|
||||
|
||||
<tag><tt/__LCADDR__:/ Address of code in the Language Card</tag>
|
||||
Default: $D400. Use <tt/-D __LCADDR__=<addr>/ to set a different
|
||||
code address.
|
||||
|
||||
<tag><tt/__LCSIZE__:/ Size of code in the Language Card</tag>
|
||||
Default: $C00. Use <tt/-D __LCSIZE__=<size>/ to set a different
|
||||
code size.
|
||||
|
||||
<tag><tt/__OVERLAYSIZE__:/ Size of code in the overlays</tag>
|
||||
Default: $1000. Use <tt/-D __OVERLAYSIZE__=<size>/ to set a different
|
||||
code size.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
<sect1><tt/apple2-reboot.cfg/<p>
|
||||
<sect1><tt/apple2-asm.cfg/<p>
|
||||
|
||||
Configuration optimized for a binary program running on ProDOS 8 without
|
||||
BASIC.SYSTEM. Intended to be used with <bf/LOADER.SYSTEM - an
|
||||
Apple ][ ProDOS 8 loader for cc65 programs/ (see above) together
|
||||
with the function <tt/rebootafterexit()/.
|
||||
Configuration for a assembler programs which don't need a special setup.
|
||||
|
||||
If a ProDOS 8 system program doesn't quit to the ProDOS 8 dispatcher but rather
|
||||
reboots the machine after exit then a plain vanilla ProDOS 8 doesn't make use of
|
||||
the Language Card bank 2 at all.
|
||||
|
||||
This setup makes nearly 50 KB available to a cc65 program - on a 64 KB machine!
|
||||
Parameters:
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/RAM:/ Main memory area</tag>
|
||||
From $800 to $BEFF (45.75 KB)
|
||||
|
||||
<tag><tt/LC:/ Language Card memory area</tag>
|
||||
From $D000 to $DFFF (4 KB)
|
||||
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Variable (default: $800)
|
||||
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||
|
||||
<tag><tt/HEADER:/ Binary file header</tag>
|
||||
DOS 3.3 header (address and length)
|
||||
<tag><tt/__EXEHDR__:/ Executable file header</tag>
|
||||
Default: No header. Use <tt/-u __EXEHDR__ apple2.lib/ to add a DOS 3.3 header
|
||||
(address and length).
|
||||
|
||||
</descrip><p>
|
||||
|
||||
@ -230,10 +239,10 @@ range.
|
||||
|
||||
The easiest (and for really large programs in fact the only) way to have a cc65
|
||||
program use the memory from $800 to $2000 is to link it as binary
|
||||
(as opposed to system) program using the linker configuration
|
||||
<ref id="apple-load-cfg" name="apple2-loader.cfg"> with start address
|
||||
$803 and load it with the targetutil LOADER.SYSTEM. The program then works
|
||||
like a system program (i.e. quits to the ProDOS dispatcher).
|
||||
(as opposed to system) program using the default linker configuration
|
||||
<ref id="apple-def-cfg" name="apple2.cfg"> with <tt/__HIMEM__/ set to $BF00
|
||||
and load it with the LOADER.SYSTEM utility. The program then works like a system
|
||||
program (i.e. quits to the ProDOS dispatcher).
|
||||
|
||||
Using LOADER.SYSTEM is as simple as copying it to the ProDOS 8 directory of the
|
||||
program to load under name <program>.SYSTEM as a system program. For
|
||||
@ -325,8 +334,8 @@ The names in the parentheses denote the symbols to be used for static linking of
|
||||
<tag><tt/a2.hi.tgi (a2_hi_tgi)/</tag>
|
||||
This driver features a resolution of 280×192 with 8 colors and two
|
||||
hires pages. Note that programs using this driver will have to be linked
|
||||
with <tt/--start-addr $4000/ to reserve the first hires page or with
|
||||
<tt/--start-addr $6000/ to reserve both hires pages.
|
||||
with <tt/-S $4000/ to reserve the first hires page or with <tt/-S $6000/
|
||||
to reserve both hires pages.
|
||||
|
||||
The function <tt/tgi_apple2_mix()/ allows to activate 4 lines of text. The
|
||||
function doesn't clear the corresponding area at the bottom of the screen.
|
||||
@ -374,7 +383,7 @@ The names in the parentheses denote the symbols to be used for static linking of
|
||||
for an AppleMouse II Card compatible firmware. The default bounding
|
||||
box is [0..279,0..191].
|
||||
|
||||
Programs using this driver will have to be linked with <tt/--start-addr $4000/
|
||||
Programs using this driver will have to be linked with <tt/-S $4000/
|
||||
to reserve the first hires page if they are intended to run on an
|
||||
Apple ][ (in contrast to an Apple //e) because the
|
||||
AppleMouse II Card firmware writes to the hires page when initializing
|
||||
@ -440,10 +449,6 @@ BASIC.SYSTEM) there are some limitations for DOS 3.3:
|
||||
The Apple ][ has no color text mode. Therefore the functions textcolor(),
|
||||
bgcolor() and bordercolor() have no effect.
|
||||
|
||||
<tag/Cursor/
|
||||
The Apple ][ has no hardware cursor. Therefore the function cursor() has
|
||||
no effect.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
|
@ -75,13 +75,30 @@ However while running module constructors/destructors the Language Card is disab
|
||||
Enabling the Language Card allows to use it as additional memory for cc65
|
||||
generated code. However code is never automatically placed there. Rather code
|
||||
needs to be explicitly placed in the Language Card either per file by compiling
|
||||
with <tt/--code-name HIGHCODE/ or per function by enclosing in <tt/#pragma
|
||||
code-name (push, "HIGHCODE")/ and <tt/#pragma code-name (pop)/. In either case the
|
||||
cc65 runtime system takes care of actually moving the code into the Language
|
||||
Card.
|
||||
with <tt/--code-name LC/ or per function by enclosing in <tt/#pragma code-name
|
||||
(push, "LC")/ and <tt/#pragma code-name (pop)/. In either case the cc65 runtime
|
||||
system takes care of actually moving the code into the Language Card.
|
||||
|
||||
The amount of memory available in the Language Card for generated code depends
|
||||
on the chosen <ref id="link-configs" name="linker configuration">.
|
||||
on the <ref id="link-configs" name="linker configuration"> parameters. There are
|
||||
several usefull settings:
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag>LC address: $D400, LC size: $C00</tag>
|
||||
For plain vanilla ProDOS 8 which doesn't actually use the Language Card bank 2
|
||||
memory from $D400 to $DFFF. This is the default setting.
|
||||
|
||||
<tag>LC address: $D000, LC size: $1000</tag>
|
||||
For ProDOS 8 together with the function <tt/rebootafterexit()/. If a program
|
||||
doesn't quit to the ProDOS 8 dispatcher but rather reboots the machine after
|
||||
exit then a plain vanilla ProDOS 8 doesn't make use of the Language Card bank
|
||||
2 at all.
|
||||
|
||||
<tag>LC address: $D000, LC size: $3000</tag>
|
||||
For plain vanilla DOS 3.3 which doesn't make use of the Language Card at all.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
|
||||
@ -93,126 +110,118 @@ The apple2enh package comes with additional secondary linker config files, which
|
||||
are used via <tt/-t apple2enh -C <configfile>/.
|
||||
|
||||
|
||||
<sect1>default config file (<tt/apple2enh.cfg/)<p>
|
||||
<sect1>default config file (<tt/apple2enh.cfg/)<label id="apple-def-cfg"><p>
|
||||
|
||||
Default configuration optimized for a binary program running on ProDOS 8 with
|
||||
BASIC.SYSTEM. A plain vanilla ProDOS 8 doesn't actually use the Language Card
|
||||
bank 2 memory from $D400 to $DFFF.
|
||||
Default configuration for a binary program.
|
||||
|
||||
Parameters:
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/RAM:/ Main memory area</tag>
|
||||
From $803 to $95FF (35.5 KB)
|
||||
|
||||
<tag><tt/LC:/ Language Card memory area</tag>
|
||||
From $D400 to $DFFF (3 KB)
|
||||
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Variable (default: $803)
|
||||
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||
|
||||
<tag><tt/HEADER:/ Binary file header</tag>
|
||||
DOS 3.3 header (address and length)
|
||||
<tag><tt/__EXEHDR__:/ Executable file header</tag>
|
||||
Default: DOS 3.3 header (address and length). Use <tt/-D __EXEHDR__=0/ to omit
|
||||
the header.
|
||||
|
||||
</descrip><p>
|
||||
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||
stack size.
|
||||
|
||||
<tag><tt/__HIMEM__:/ Highest usable memory address presumed at link time</tag>
|
||||
Default: $9600. Use <tt/-D __HIMEM__=<addr>/ to set a different
|
||||
highest usable address.
|
||||
|
||||
<sect1><tt/apple2enh-dos33.cfg/<p>
|
||||
<tag><tt/__LCADDR__:/ Address of code in the Language Card</tag>
|
||||
Default: $D400. Use <tt/-D __LCADDR__=<addr>/ to set a different
|
||||
code address.
|
||||
|
||||
Configuration optimized for a binary program running on DOS 3.3. A plain
|
||||
vanilla DOS 3.3 doesn't make use of the Language Card at all.
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/RAM:/ Main memory area</tag>
|
||||
From $803 to $95FF (35.5 KB)
|
||||
|
||||
<tag><tt/LC:/ Language Card memory area</tag>
|
||||
From $D000 to $FFFF (12 KB)
|
||||
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Variable (default: $803)
|
||||
|
||||
<tag><tt/HEADER:/ Binary file header</tag>
|
||||
DOS 3.3 header (address and length)
|
||||
<tag><tt/__LCSIZE__:/ Size of code in the Language Card</tag>
|
||||
Default: $C00. Use <tt/-D __LCSIZE__=<size>/ to set a different
|
||||
code size.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
<sect1><tt/apple2enh-system.cfg/<label id="apple-sys-cfg"><p>
|
||||
|
||||
Configuration for a system program running on ProDOS 8.
|
||||
Configuration for a system program running on ProDOS 8 and using the memory from
|
||||
$2000 to $BEFF.
|
||||
|
||||
Parameters:
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/RAM:/ Main memory area</tag>
|
||||
From $2000 to $BEFF (39.75 KB)
|
||||
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||
stack size.
|
||||
|
||||
<tag><tt/LC:/ Language Card memory area</tag>
|
||||
From $D400 to $DFFF (3 KB)
|
||||
<tag><tt/__LCADDR__:/ Address of code in the Language Card</tag>
|
||||
Default: $D400. Use <tt/-D __LCADDR__=<addr>/ to set a different
|
||||
code address.
|
||||
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Fixed ($2000)
|
||||
|
||||
<tag><tt/HEADER:/ Binary file header</tag>
|
||||
None
|
||||
<tag><tt/__LCSIZE__:/ Size of code in the Language Card</tag>
|
||||
Default: $C00. Use <tt/-D __LCSIZE__=<size>/ to set a different
|
||||
code size.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
<sect1><tt/apple2enh-loader.cfg/<label id="apple-load-cfg"><p>
|
||||
<sect1><tt/apple2enh-overlay.cfg/<p>
|
||||
|
||||
Configuration optimized for a binary program running on ProDOS 8 without
|
||||
BASIC.SYSTEM. Intended to be used with <bf/LOADER.SYSTEM - an
|
||||
Apple ][ ProDOS 8 loader for cc65 programs/, which is available
|
||||
in the cc65 User Contributions section.
|
||||
Configuration for overlay programs with the up to nine overlays. The overlay files
|
||||
don't include the DOS 3.3 header. See <tt>samples/overlaydemo.c</tt> for more
|
||||
information on overlays.
|
||||
|
||||
A program loaded by LOADER.SYSTEM works like a ProDOS 8 system program but
|
||||
isn't tied to the start address $2000. Thus with the default start
|
||||
address $800 the main memory area is increased by 6 KB.
|
||||
Parameters:
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/RAM:/ Main memory area</tag>
|
||||
From $800 to $BEFF (45.75 KB)
|
||||
|
||||
<tag><tt/LC:/ Language Card memory area</tag>
|
||||
From $D400 to $DFFF (3 KB)
|
||||
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Variable (default: $800)
|
||||
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||
|
||||
<tag><tt/HEADER:/ Binary file header</tag>
|
||||
DOS 3.3 header (address and length)
|
||||
<tag><tt/__EXEHDR__:/ Executable file header</tag>
|
||||
Default: DOS 3.3 header (address and length). Use <tt/-D __EXEHDR__=0/ to omit
|
||||
the header.
|
||||
|
||||
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||
stack size.
|
||||
|
||||
<tag><tt/__HIMEM__:/ Highest usable memory address presumed at link time</tag>
|
||||
Default: $9600. Use <tt/-D __HIMEM__=<addr>/ to set a different
|
||||
highest usable address.
|
||||
|
||||
<tag><tt/__LCADDR__:/ Address of code in the Language Card</tag>
|
||||
Default: $D400. Use <tt/-D __LCADDR__=<addr>/ to set a different
|
||||
code address.
|
||||
|
||||
<tag><tt/__LCSIZE__:/ Size of code in the Language Card</tag>
|
||||
Default: $C00. Use <tt/-D __LCSIZE__=<size>/ to set a different
|
||||
code size.
|
||||
|
||||
<tag><tt/__OVERLAYSIZE__:/ Size of code in the overlays</tag>
|
||||
Default: $1000. Use <tt/-D __OVERLAYSIZE__=<size>/ to set a different
|
||||
code size.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
<sect1><tt/apple2enh-reboot.cfg/<p>
|
||||
<sect1><tt/apple2enh-asm.cfg/<p>
|
||||
|
||||
Configuration optimized for a binary program running on ProDOS 8 without
|
||||
BASIC.SYSTEM. Intended to be used with <bf/LOADER.SYSTEM - an
|
||||
Apple ][ ProDOS 8 loader for cc65 programs/ (see above) together
|
||||
with the function <tt/rebootafterexit()/.
|
||||
Configuration for a assembler programs which don't need a special setup.
|
||||
|
||||
If a ProDOS 8 system program doesn't quit to the ProDOS 8 dispatcher but rather
|
||||
reboots the machine after exit then a plain vanilla ProDOS 8 doesn't make use of
|
||||
the Language Card bank 2 at all.
|
||||
|
||||
This setup makes nearly 50 KB available to a cc65 program - on a 64 KB machine!
|
||||
Parameters:
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/RAM:/ Main memory area</tag>
|
||||
From $800 to $BEFF (45.75 KB)
|
||||
|
||||
<tag><tt/LC:/ Language Card memory area</tag>
|
||||
From $D000 to $DFFF (4 KB)
|
||||
|
||||
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||
Variable (default: $800)
|
||||
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||
|
||||
<tag><tt/HEADER:/ Binary file header</tag>
|
||||
DOS 3.3 header (address and length)
|
||||
<tag><tt/__EXEHDR__:/ Executable file header</tag>
|
||||
Default: No header. Use <tt/-u __EXEHDR__ apple2enh.lib/ to add a DOS 3.3 header
|
||||
(address and length).
|
||||
|
||||
</descrip><p>
|
||||
|
||||
@ -230,10 +239,10 @@ range.
|
||||
|
||||
The easiest (and for really large programs in fact the only) way to have a cc65
|
||||
program use the memory from $800 to $2000 is to link it as binary
|
||||
(as opposed to system) program using the linker configuration
|
||||
<ref id="apple-load-cfg" name="apple2enh-loader.cfg"> with start address
|
||||
$803 and load it with the targetutil LOADER.SYSTEM. The program then works
|
||||
like a system program (i.e. quits to the ProDOS dispatcher).
|
||||
(as opposed to system) program using the default linker configuration
|
||||
<ref id="apple-def-cfg" name="apple2enh.cfg"> with <tt/__HIMEM__/set to $BF00
|
||||
and load it with the LOADER.SYSTEM utility. The program then works like a system
|
||||
program (i.e. quits to the ProDOS dispatcher).
|
||||
|
||||
Using LOADER.SYSTEM is as simple as copying it to the ProDOS 8 directory of the
|
||||
program to load under name <program>.SYSTEM as a system program. For
|
||||
@ -268,7 +277,7 @@ default I/O buffer allocation basically yields the same placement of I/O buffers
|
||||
in memory the primary benefit of <tt/apple2enh-iobuf-0800.o/ is a reduction in code
|
||||
size - and thus program file size - of more than 1400 bytes.
|
||||
|
||||
Using <tt/apple2enh-iobuf-0800.o/ is as simple as placing it on the linker command
|
||||
Using <tt/apple2enh-iobuf-0800.o/ is as simple as placing it on the linker command
|
||||
line like this:
|
||||
|
||||
<tscreen><verb>
|
||||
@ -328,8 +337,8 @@ The names in the parentheses denote the symbols to be used for static linking of
|
||||
<tag><tt/a2e.hi.tgi (a2e_hi_tgi)/</tag>
|
||||
This driver features a resolution of 280×192 with 8 colors and two
|
||||
hires pages. Note that programs using this driver will have to be linked
|
||||
with <tt/--start-addr $4000/ to reserve the first hires page or with
|
||||
<tt/--start-addr $6000/ to reserve both hires pages.
|
||||
with <tt/-S $4000/ to reserve the first hires page or with <tt/-S $6000/
|
||||
to reserve both hires pages.
|
||||
|
||||
Note that the second hires page is only available if the text display is not in
|
||||
80 column mode. This can be asserted by calling <tt/videomode (VIDEOMODE_40COL);/
|
||||
@ -354,7 +363,7 @@ The names in the parentheses denote the symbols to be used for static linking of
|
||||
<tag><tt/a2e.auxmem.emd (a2e_auxmem_emd)/</tag>
|
||||
Gives access to 47.5 KB RAM (190 pages of 256 bytes each) on an Extended
|
||||
80-Column Text Card.
|
||||
|
||||
|
||||
Note that this driver doesn't check for the actual existence of the memory
|
||||
and that it doesn't check for ProDOS 8 RAM disk content!
|
||||
|
||||
@ -429,7 +438,7 @@ BASIC.SYSTEM) there are some limitations for DOS 3.3:
|
||||
'Failed to alloc interrupt' on program startup. This implicitly means that
|
||||
<tt/a2e.stdmou.mou/ and <tt/a2e.ssc.ser/ are not functional as they depend on
|
||||
interrupts.
|
||||
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
@ -441,10 +450,6 @@ BASIC.SYSTEM) there are some limitations for DOS 3.3:
|
||||
The enhanced Apple //e has no color text mode. Therefore the functions
|
||||
textcolor(), bgcolor() and bordercolor() have no effect.
|
||||
|
||||
<tag/Cursor/
|
||||
The enhanced Apple //e has no hardware cursor. Therefore the function
|
||||
cursor() has no effect.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
@ -494,7 +499,7 @@ url="ca65.html" name="assembler manual">.
|
||||
<tag/Drive ID/
|
||||
The function <url url="dio.html#s1" name="dio_open()"> has the single
|
||||
parameter <tt/device/ to identify the device to be opened. Therefore an
|
||||
Apple II slot and drive pair is mapped to that <tt/drive_id/ according
|
||||
Apple II slot and drive pair is mapped to that <tt/device/ according
|
||||
to the formula
|
||||
|
||||
<tscreen>
|
||||
|
@ -148,7 +148,7 @@ Special locations:
|
||||
($58).
|
||||
|
||||
<tag/Stack/
|
||||
The C runtime stack is located at end of the RAM memory area ($CFFF)
|
||||
The C runtime stack is located at end of the MAIN memory area ($CFFF)
|
||||
and grows downwards.
|
||||
|
||||
<tag/Heap/
|
||||
@ -229,8 +229,8 @@ for C and assembly language programs.
|
||||
The size of a cassette boot file is restricted to 32K. Larger programs
|
||||
would need to be split in more parts and the parts to be loaded manually.
|
||||
|
||||
To write the generated file to a cassette, a utility to run
|
||||
on an Atari is provided in the <tt/targetutil/ directory (<tt/w2cas.com/).
|
||||
To write the generated file to a cassette, a utility (<tt/w2cas.com/) to run
|
||||
on an Atari is provided in the <tt/util/ directory of <tt/atari/ target dir.
|
||||
|
||||
<sect1><tt/atarixl/ config files<p>
|
||||
|
||||
@ -275,6 +275,7 @@ See the <url url="funcref.html" name="function reference"> for declaration and u
|
||||
<item>_getcolor
|
||||
<item>_getdefdev
|
||||
<item>_graphics
|
||||
<item>_is_cmdline_dos
|
||||
<item>_rest_vecs
|
||||
<item>_save_vecs
|
||||
<item>_scroll
|
||||
@ -317,6 +318,58 @@ chip registers.
|
||||
</descrip><p>
|
||||
|
||||
|
||||
<sect1>Character mapping<p>
|
||||
|
||||
The Atari has two representations for characters:
|
||||
<enum>
|
||||
<item> ATASCII is character mapping which is similar to ASCII and used
|
||||
by the CIO system of the OS. This is the default mapping of cc65 when
|
||||
producing code for the atari target.
|
||||
<item> The internal/screen mapping represents the real value of the
|
||||
screen ram when showing a character.
|
||||
</enum>
|
||||
|
||||
For direct memory access (simplicity and speed) enabling the internal
|
||||
mapping can be useful. This can be achieved by including the
|
||||
"<tt/atari_screen_charmap.h/" header.
|
||||
|
||||
A word of caution: Since the <tt/0x00/ character has to be mapped in an
|
||||
incompatible way to the C-standard, the usage of string functions in
|
||||
conjunction with internal character mapped strings delivers unexpected
|
||||
results regarding the string length. The end of strings are detected where
|
||||
you may not expect them (too early or (much) too late). Internal mapped
|
||||
strings typically support the "<tt/mem...()/" functions.
|
||||
|
||||
<em>For assembler sources the macro "<tt/scrcode/" from the "<tt/atari.mac/"
|
||||
package delivers the same feature.</em>
|
||||
|
||||
You can switch back to the ATASCII mapping by including
|
||||
"<tt/atari_atascii_charmap.h/".
|
||||
|
||||
A final note: Since cc65 has currently some difficulties with string merging
|
||||
under different mappings, defining remapped strings works only flawlessly
|
||||
with static array initialization:
|
||||
|
||||
<verb>
|
||||
#include <atari\_screen\_charmap.h>
|
||||
char pcScreenMappingString[] = "Hello Atari!";
|
||||
|
||||
#include <atari_atascii_charmap.h>
|
||||
char pcAtasciiMappingString[] = "Hello Atari!";
|
||||
</verb>
|
||||
|
||||
delivers correct results, while
|
||||
|
||||
<verb>
|
||||
#include <atari_screen_charmap.h>
|
||||
char* pcScreenMappingString = "Hello Atari!";
|
||||
|
||||
#include <atari_atascii_charmap.h>
|
||||
char* pcAtasciiMappingString = "Hello Atari!";
|
||||
</verb>
|
||||
|
||||
does not.
|
||||
|
||||
|
||||
<sect>Loadable drivers<p>
|
||||
|
||||
@ -561,7 +614,7 @@ The contents of this chunk come from the SYSCHKCHNK memory area of the linker co
|
||||
<item>main program&nl;
|
||||
This load chunk is loaded at the selected program start address (default $2000) and
|
||||
contains all of the code and data of the program.&nl;
|
||||
The contents of this chunk come from the RAM memory area of the linker config file.
|
||||
The contents of this chunk come from the MAIN memory area of the linker config file.
|
||||
</enum>
|
||||
|
||||
|
||||
@ -743,7 +796,7 @@ segments should go above $7FFF.
|
||||
<p>
|
||||
The main problem is that the EXE header generated by the cc65 runtime
|
||||
lib is wrong. It defines a single load chunk with the sizes/addresses
|
||||
of the STARTUP, LOWCODE, INIT, CODE, RODATA, and DATA segments, in
|
||||
of the STARTUP, LOWCODE, ONCE, CODE, RODATA, and DATA segments, in
|
||||
fact, the whole user program (we're disregarding the "system check"
|
||||
load chunk here).
|
||||
<p>
|
||||
@ -796,7 +849,7 @@ SEGMENTS {
|
||||
NEXEHDR: load = FSTHDR, type = ro; # first load chunk
|
||||
STARTUP: load = RAMLO, type = ro, define = yes;
|
||||
LOWCODE: load = RAMLO, type = ro, define = yes, optional = yes;
|
||||
INIT: load = RAMLO, type = ro, optional = yes;
|
||||
ONCE: load = RAMLO, type = ro, optional = yes;
|
||||
CODE: load = RAMLO, type = ro, define = yes;
|
||||
|
||||
CHKHDR: load = SECHDR, type = ro; # second load chunk
|
||||
@ -808,7 +861,7 @@ SEGMENTS {
|
||||
AUTOSTRT: load = RAM, type = ro; # defines program entry point
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: segment = RODATA,
|
||||
CONDES: segment = ONCE,
|
||||
type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__;
|
||||
@ -827,7 +880,7 @@ the MAINHDR segment get discarded.
|
||||
<p>
|
||||
The newly added NEXEHDR segment defines the correct chunk header for the
|
||||
first intended load chunk. It
|
||||
puts the STARTUP, LOWCODE, INIT, and CODE segments, which are the
|
||||
puts the STARTUP, LOWCODE, ONCE, and CODE segments, which are the
|
||||
segments containing only code, into load chunk #1 (RAMLO memory area).
|
||||
<p>
|
||||
The header for the second load chunk comes from the new CHKHDR
|
||||
@ -858,7 +911,7 @@ cl65 -t atari -C split.cfg -o prog.com prog.c split.s
|
||||
<sect2>Low data and high code example<p>
|
||||
|
||||
|
||||
Goal: Put RODATA and DATA into low memory and STARTUP, LOWCODE, INIT,
|
||||
Goal: Put RODATA and DATA into low memory and STARTUP, LOWCODE, ONCE,
|
||||
CODE, BSS, ZPSAVE into high memory (split2.cfg):
|
||||
|
||||
<tscreen><verb>
|
||||
@ -893,7 +946,7 @@ SEGMENTS {
|
||||
|
||||
CHKHDR: load = SECHDR, type = ro; # second load chunk
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
INIT: load = RAM, type = ro, optional = yes;
|
||||
ONCE: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
|
||||
@ -901,7 +954,7 @@ SEGMENTS {
|
||||
AUTOSTRT: load = RAM, type = ro; # defines program entry point
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: segment = RODATA,
|
||||
CONDES: segment = ONCE,
|
||||
type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__;
|
||||
|
124
doc/atari2600.sgml
Normal file
124
doc/atari2600.sgml
Normal file
@ -0,0 +1,124 @@
|
||||
<!doctype linuxdoc system>
|
||||
|
||||
<article>
|
||||
|
||||
<title>Atari 2600 specific information for cc65
|
||||
<author>
|
||||
<url url="mailto:contact@florentflament.com" name="Florent Flament"><newline>
|
||||
<date>2017-01-11
|
||||
|
||||
<abstract>
|
||||
An overview over the Atari 2600 runtime system as it is implemented
|
||||
for the cc65 C compiler.
|
||||
</abstract>
|
||||
|
||||
<!-- Table of contents -->
|
||||
<toc>
|
||||
|
||||
<!-- Begin the document -->
|
||||
|
||||
<sect>Overview<p>
|
||||
|
||||
This file contains an overview of the Atari 2600 runtime system as it
|
||||
comes with the cc65 C compiler. It describes the memory layout, Atari
|
||||
2600 specific header files and any pitfalls specific to that platform.
|
||||
|
||||
<sect>Binary format<p>
|
||||
|
||||
The default binary output format generated by the linker for the Atari
|
||||
2600 target is a 4K cartridge image.
|
||||
|
||||
<sect>Memory layout<p>
|
||||
|
||||
cc65 generated programs with the default setup can use RAM from
|
||||
$0080 to $00FF - __STACKSIZE__, where __STACKSIZE__ is
|
||||
the size of the system stack with a default value of 16 bytes. The
|
||||
size of the system stack can be customized by defining the
|
||||
__STACKSIZE__ linker variable.
|
||||
|
||||
Special locations:
|
||||
|
||||
<descrip>
|
||||
<tag/Stack/ The C runtime stack is located at $00FF -
|
||||
__STACKSIZE__ and growing downwards.
|
||||
|
||||
<tag/Heap/ The C heap is located at $0080 and grows upwards.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
<sect>Start-up condition<p>
|
||||
|
||||
When powered-up, the Atari 2600 TIA registers contain random
|
||||
values. During the initialization phase, the start-up code needs to
|
||||
initialize the TIA registers to sound values (or else the console has
|
||||
an unpredictable behavior). In this implementation, zeros are written
|
||||
to all of TIA registers during the start-up phase.
|
||||
|
||||
Note that RIOT registers (mostly timers) are left uninitialized, as
|
||||
they don't have any consequence on the console behavior.
|
||||
|
||||
<sect>Platform specific header files<p>
|
||||
|
||||
Programs containing Atari 2600 specific code may use the
|
||||
<tt/atari2600.h/ header file.
|
||||
|
||||
The following pseudo variables declared in the <tt/atari2600.h/ header
|
||||
file allow access to the Atari 2600 TIA & RIOT chips registers.
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/TIA/</tag> The <tt/TIA/ structure allows read/write access
|
||||
to the Atari 2600 TIA chip registers. See the <tt/_tia.h/ header
|
||||
file located in the include directory for the declaration of the
|
||||
structure. Also refer to the Stella Programmer's Guide by Steve
|
||||
Wright for a detailed description of the chip and its registers.
|
||||
|
||||
<tag><tt/RIOT/</tag> The <tt/RIOT/ structure allows read/write
|
||||
access to the Atari 2600 RIOT chip registers. See the
|
||||
<tt/_riot.h/ header file located in the include directory for the
|
||||
declaration of the structure. Also refer to the Stella Programmer's
|
||||
Guide by Steve Wright for a detailed description of the chip and its
|
||||
registers.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
<sect>Loadable drivers<p>
|
||||
|
||||
There are no drivers for the Atari 2600.
|
||||
|
||||
|
||||
<sect>Limitations<p>
|
||||
|
||||
TBD
|
||||
|
||||
|
||||
<sect>Other hints<p>
|
||||
|
||||
One may write a custom linker configuration file to tune the memory
|
||||
layout of a program. See the <tt/atari2600.cfg/ file in the cfg
|
||||
directory as a starting point.
|
||||
|
||||
|
||||
<sect>License<p>
|
||||
|
||||
This software is provided 'as-is', without any expressed or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
<enum>
|
||||
<item> The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
<item> Altered source versions must be plainly marked as such, and must not
|
||||
be misrepresented as being the original software.
|
||||
<item> This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
</enum>
|
||||
|
||||
</article>
|
@ -191,11 +191,19 @@ missing on VDC, and are translated to the two colors missing from the VIC palett
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/c128-efnram.emd (c128_efnram_emd)/</tag>
|
||||
Extended memory driver for the C128 External Function RAM.
|
||||
Written and contributed by Marco van den Heuvel.
|
||||
|
||||
<tag><tt/c128-georam.emd (c128_georam_emd)/</tag>
|
||||
A driver for the GeoRam cartridge. The driver will always assume 2048 pages
|
||||
of 256 bytes each. There are no checks, so if your program knows better,
|
||||
just go ahead.
|
||||
|
||||
<tag><tt/c128-ifnram.emd (c128_ifnram_emd)/</tag>
|
||||
Extended memory driver for the C128 Internal Function RAM.
|
||||
Written and contributed by Marco van den Heuvel.
|
||||
|
||||
<tag><tt/c128-ram.emd (c128_ram_emd)/</tag>
|
||||
An extended memory driver for the RAM in page 1. The common memory area is
|
||||
excluded, so this driver supports 251 pages of 256 bytes each.
|
||||
@ -236,8 +244,9 @@ The default drivers, <tt/joy_stddrv (joy_static_stddrv)/, point to <tt/c128-stdj
|
||||
<tag><tt/c128-ptvjoy.joy (c128_ptvjoy_joy)/</tag>
|
||||
Driver for the Protovision 4-player adapter originally written by Groepaz
|
||||
for the C64, and converted for the C128 by Uz. See <url
|
||||
url="http://www.protovision-online.de/hardw/hardwstart.htm"> for prices and
|
||||
building instructions. Up to four joysticks are supported.
|
||||
url="http://www.protovision-online.de/hardw/4_player.php?language=en"
|
||||
name="Protovision shop"> for prices and building instructions. Up to four
|
||||
joysticks are supported.
|
||||
|
||||
<tag><tt/c128-stdjoy.joy (c128_stdjoy_joy)/</tag>
|
||||
Supports up to two joysticks connected to the standard joysticks ports of
|
||||
|
36
doc/c64.sgml
36
doc/c64.sgml
@ -3,8 +3,9 @@
|
||||
<article>
|
||||
|
||||
<title>Commodore 64-specific information for cc65
|
||||
<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">
|
||||
<date>2014-04-14
|
||||
<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz"><newline>
|
||||
<url url="mailto:greg.king5@verizon.net" name="Greg King">
|
||||
<date>2017-01-18
|
||||
|
||||
<abstract>
|
||||
An overview over the C64 runtime system as it is implemented for the cc65 C
|
||||
@ -235,12 +236,22 @@ structures, accessing the struct fields will access the chip registers.
|
||||
The names in the parentheses denote the symbols to be used for static linking of the drivers.
|
||||
|
||||
|
||||
<label id="graphics-drivers">
|
||||
<sect1>Graphics drivers<p>
|
||||
|
||||
<em>Note:</em> All available graphics drivers for the TGI interface will use
|
||||
the space below the I/O area and kernal ROM, so you can have hires graphics in
|
||||
the standard setup without any memory loss or need for a changed
|
||||
configuration.
|
||||
the space below the I/O area and Kernal ROM; so, you can have hires graphics in
|
||||
the standard setup without any memory loss or need for a changed configuration.
|
||||
|
||||
You can use a mouse driver at the same time that you use a TGI driver. But, if
|
||||
you want to see the default mouse pointer on the graphics screen, then you
|
||||
explicitly must link a special object file into your program. It will put the
|
||||
arrow into the "high RAM" area where the bitmaps are put. Its name is
|
||||
"<tt/c64-tgimousedata.o/". Example:
|
||||
|
||||
<tscreen><verb>
|
||||
cl65 -t c64 -o program-file main-code.c subroutines.s c64-tgimousedata.o
|
||||
</verb></tscreen>
|
||||
|
||||
<descrip>
|
||||
<tag><tt/c64-hi.tgi (c64_hi_tgi)/</tag>
|
||||
@ -251,12 +262,17 @@ configuration.
|
||||
|
||||
Note that the graphics drivers are incompatible with the
|
||||
<tt/c64-ram.emd (c64_ram_emd)/ extended memory driver and the
|
||||
<tt/c64-soft80.o/ software 80 columns conio driver.
|
||||
<tt/c64-soft80.o/ software 80-columns conio driver.
|
||||
|
||||
|
||||
<sect1>Extended memory drivers<p>
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/c64-65816.emd (c64_65816_emd)/</tag>
|
||||
Extended memory driver for 65816 (eg SCPU) based extra RAM.
|
||||
Written and contributed by Marco van den Heuvel.
|
||||
|
||||
<tag><tt/c64-c256k.emd (c64_c256k_emd)/</tag>
|
||||
A driver for the C64 256K memory expansion. This driver offers 768 pages of
|
||||
256 bytes each. Written and contributed by Marco van den Heuvel.
|
||||
@ -315,8 +331,9 @@ The default drivers, <tt/joy_stddrv (joy_static_stddrv)/, point to <tt/c64-stdjo
|
||||
|
||||
<tag><tt/c64-ptvjoy.joy (c64_ptvjoy_joy)/</tag>
|
||||
Driver for the Protovision 4-player adapter contributed by Groepaz. See
|
||||
<url url="http://www.protovision-online.de/hardw/hardwstart.htm"> for prices and
|
||||
building instructions. Up to four joysticks are supported.
|
||||
<url url="http://www.protovision-online.de/hardw/4_player.php?language=en"
|
||||
name="Protovision shop"> for prices and building instructions. Up to four
|
||||
joysticks are supported.
|
||||
|
||||
<tag><tt/c64-stdjoy.joy (c64_stdjoy_joy)/</tag>
|
||||
Supports up to two standard joysticks connected to the joysticks port of
|
||||
@ -331,6 +348,9 @@ The default drivers, <tt/joy_stddrv (joy_static_stddrv)/, point to <tt/c64-stdjo
|
||||
|
||||
<sect1>Mouse drivers<p>
|
||||
|
||||
You can use these drivers in text-mode or graphics-mode (TGI) programs. See
|
||||
the description of <ref id="graphics-drivers" name="the graphics drivers">.
|
||||
|
||||
The default drivers, <tt/mouse_stddrv (mouse_static_stddrv)/, point to <tt/c64-1351.mou (c64_1351_mou)/.
|
||||
|
||||
<descrip>
|
||||
|
116
doc/ca65.sgml
116
doc/ca65.sgml
@ -4,7 +4,7 @@
|
||||
<title>ca65 Users Guide
|
||||
<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">,<newline>
|
||||
<url url="mailto:greg.king5@verizon.net" name="Greg King">
|
||||
<date>2015-11-17
|
||||
<date>2016-06-11
|
||||
|
||||
<abstract>
|
||||
ca65 is a powerful macro assembler for the 6502, 65C02, and 65816 CPUs. It is
|
||||
@ -152,7 +152,7 @@ Here is a description of all the command line options:
|
||||
Set the default for the CPU type. The option takes a parameter, which
|
||||
may be one of
|
||||
|
||||
6502, 65SC02, 65C02, 65816, sweet16, HuC6280
|
||||
6502, 6502X, 65SC02, 65C02, 65816, sweet16, HuC6280, 4510
|
||||
|
||||
|
||||
<label id="option-create-dep">
|
||||
@ -424,8 +424,10 @@ The assembler accepts
|
||||
<tt><ref id=".PSC02" name=".PSC02"></tt> command was given).
|
||||
<item>all valid 65C02 mnemonics when in 65C02 mode (after the
|
||||
<tt><ref id=".PC02" name=".PC02"></tt> command was given).
|
||||
<item>all valid 65618 mnemonics when in 65816 mode (after the
|
||||
<item>all valid 65816 mnemonics when in 65816 mode (after the
|
||||
<tt><ref id=".P816" name=".P816"></tt> command was given).
|
||||
<item>all valid 4510 mnemonics when in 4510 mode (after the
|
||||
<tt><ref id=".P4510" name=".P4510"></tt> command was given).
|
||||
</itemize>
|
||||
|
||||
|
||||
@ -434,16 +436,16 @@ The assembler accepts
|
||||
In 65816 mode, several aliases are accepted, in addition to the official
|
||||
mnemonics:
|
||||
|
||||
<tscreen><verb>
|
||||
CPA is an alias for CMP
|
||||
DEA is an alias for DEC A
|
||||
INA is an alias for INC A
|
||||
SWA is an alias for XBA
|
||||
TAD is an alias for TCD
|
||||
TAS is an alias for TCS
|
||||
TDA is an alias for TDC
|
||||
TSA is an alias for TSC
|
||||
</verb></tscreen>
|
||||
<itemize>
|
||||
<item><tt>CPA</tt> is an alias for <tt>CMP</tt>
|
||||
<item><tt>DEA</tt> is an alias for <tt>DEC A</tt>
|
||||
<item><tt>INA</tt> is an alias for <tt>INC A</tt>
|
||||
<item><tt>SWA</tt> is an alias for <tt>XBA</tt>
|
||||
<item><tt>TAD</tt> is an alias for <tt>TCD</tt>
|
||||
<item><tt>TAS</tt> is an alias for <tt>TCS</tt>
|
||||
<item><tt>TDA</tt> is an alias for <tt>TDC</tt>
|
||||
<item><tt>TSA</tt> is an alias for <tt>TSC</tt>
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1>6502X mode<label id="6502X-mode"><p>
|
||||
@ -473,6 +475,27 @@ from the mentioned web page, for more information, see there.
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1>4510 mode<p>
|
||||
|
||||
The 4510 is a microcontroller that is the core of the Commodore C65 aka C64DX.
|
||||
It contains among other functions a slightly modified 65CE02/4502 CPU, to allow
|
||||
address mapping for 20 bits of address space (1 megabyte addressable area).
|
||||
As compared to the description of the CPU in the
|
||||
<url url="http://www.zimmers.net/anonftp/pub/cbm/c65/c65manualupdated.txt.gz"
|
||||
name="C65 System Specification">
|
||||
<url url="https://raw.githubusercontent.com/MEGA65/c65-specifications/master/c65manualupdated.txt"
|
||||
name="(updated version)"> uses these changes:
|
||||
<itemize>
|
||||
<item><tt>LDA (d,SP),Y</tt> may also be written as <tt>LDA (d,S),Y</tt>
|
||||
(matching the 65816 notataion).
|
||||
<item>All branch instruction allow now 16 bit offsets. To use a 16 bit
|
||||
branch you have to prefix these with an "L" (e.g. "<tt>LBNE</tt>" instead of
|
||||
"<tt>BNE</tt>"). This might change at a later implementation of the assembler.
|
||||
</itemize>
|
||||
For more information about the Commodore C65/C64DX and the 4510 CPU, see
|
||||
<url url="http://www.zimmers.net/anonftp/pub/cbm/c65/"> and
|
||||
<url url="https://en.wikipedia.org/wiki/Commodore_65" name="Wikipedia">.
|
||||
|
||||
|
||||
<sect1>sweet16 mode<label id="sweet16-mode"><p>
|
||||
|
||||
@ -2170,16 +2193,15 @@ Here's a list of all control commands and a description, what they do:
|
||||
<sect1><tt>.CHARMAP</tt><label id=".CHARMAP"><p>
|
||||
|
||||
Apply a custom mapping for characters. The command is followed by two
|
||||
numbers. The first one is the index of the source character (range 1..255),
|
||||
numbers. The first one is the index of the source character (range 0..255);
|
||||
the second one is the mapping (range 0..255). The mapping applies to all
|
||||
character and string constants when they generate output, and overrides a
|
||||
mapping table specified with the <tt><ref id="option-t" name="-t"></tt>
|
||||
character and string constants <em/when/ they generate output; and, overrides
|
||||
a mapping table specified with the <tt><ref id="option-t" name="-t"></tt>
|
||||
command line switch.
|
||||
|
||||
Example:
|
||||
|
||||
<tscreen><verb>
|
||||
.charmap $41, $61 ; Map 'A' to 'a'
|
||||
.charmap $41, $61 ; Map 'A' to 'a'
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
@ -2699,6 +2721,22 @@ Here's a list of all control commands and a description, what they do:
|
||||
at character is not allowed to start an identifier, even with this
|
||||
feature enabled.
|
||||
|
||||
<tag><tt>bracket_as_indirect</tt><label id="bracket_as_indirect"></tag>
|
||||
|
||||
Use <tt>[]</tt> instead of <tt>()</tt> for the indirect addressing modes.
|
||||
Example:
|
||||
|
||||
<tscreen><verb>
|
||||
lda [$82]
|
||||
lda [$82,x]
|
||||
lda [$82],y
|
||||
jmp [$fffe]
|
||||
jmp [table,x]
|
||||
</verb></tscreen>
|
||||
<em/Note:/ This should not be used in 65186 mode because it conflicts with
|
||||
the 65816 instruction syntax for far addressing. See the section covering
|
||||
<tt/<ref id="address-sizes" name="address sizes">/ for more information.
|
||||
|
||||
<tag><tt>c_comments</tt><label id="c_comments"></tag>
|
||||
|
||||
Allow C like comments using <tt>/*</tt> and <tt>*/</tt> as left and right
|
||||
@ -2974,7 +3012,7 @@ Here's a list of all control commands and a description, what they do:
|
||||
Conditional assembly: Check if there are any remaining tokens in this line,
|
||||
and evaluate to FALSE if this is the case, and to TRUE otherwise. If the
|
||||
condition is not true, further lines are not assembled until an <tt><ref
|
||||
id=".ELSE" name=".ESLE"></tt>, <tt><ref id=".ELSEIF" name=".ELSEIF"></tt> or
|
||||
id=".ELSE" name=".ELSE"></tt>, <tt><ref id=".ELSEIF" name=".ELSEIF"></tt> or
|
||||
<tt><ref id=".ENDIF" name=".ENDIF"></tt> directive.
|
||||
|
||||
This command is often used to check if a macro parameter was given. Since an
|
||||
@ -3067,6 +3105,12 @@ Here's a list of all control commands and a description, what they do:
|
||||
(see <tt><ref id=".P02" name=".P02"></tt> command).
|
||||
|
||||
|
||||
<sect1><tt>.IFP4510</tt><label id=".IFP4510"><p>
|
||||
|
||||
Conditional assembly: Check if the assembler is currently in 4510 mode
|
||||
(see <tt><ref id=".P4510" name=".P4510"></tt> command).
|
||||
|
||||
|
||||
<sect1><tt>.IFP816</tt><label id=".IFP816"><p>
|
||||
|
||||
Conditional assembly: Check if the assembler is currently in 65816 mode
|
||||
@ -3458,7 +3502,18 @@ Here's a list of all control commands and a description, what they do:
|
||||
<tt><ref id="option--cpu" name="--cpu"></tt> command line option.
|
||||
|
||||
See: <tt><ref id=".PC02" name=".PC02"></tt>, <tt><ref id=".PSC02"
|
||||
name=".PSC02"></tt> and <tt><ref id=".P816" name=".P816"></tt>
|
||||
name=".PSC02"></tt>, <tt><ref id=".P816" name=".P816"></tt> and
|
||||
<tt><ref id=".P4510" name=".P4510"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.P4510</tt><label id=".P4510"><p>
|
||||
|
||||
Enable the 4510 instruction set. This is a superset of the 65C02 and
|
||||
6502 instruction sets.
|
||||
|
||||
See: <tt><ref id=".P02" name=".P02"></tt>, <tt><ref id=".PSC02"
|
||||
name=".PSC02"></tt>, <tt><ref id=".PC02" name=".PC02"></tt> and
|
||||
<tt><ref id=".P816" name=".P816"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.P816</tt><label id=".P816"><p>
|
||||
@ -3467,7 +3522,8 @@ Here's a list of all control commands and a description, what they do:
|
||||
6502 instruction sets.
|
||||
|
||||
See: <tt><ref id=".P02" name=".P02"></tt>, <tt><ref id=".PSC02"
|
||||
name=".PSC02"></tt> and <tt><ref id=".PC02" name=".PC02"></tt>
|
||||
name=".PSC02"></tt>, <tt><ref id=".PC02" name=".PC02"></tt> and
|
||||
<tt><ref id=".P4510" name=".P4510"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.PAGELEN, .PAGELENGTH</tt><label id=".PAGELENGTH"><p>
|
||||
@ -3495,7 +3551,8 @@ Here's a list of all control commands and a description, what they do:
|
||||
6502 and 65SC02 instructions.
|
||||
|
||||
See: <tt><ref id=".P02" name=".P02"></tt>, <tt><ref id=".PSC02"
|
||||
name=".PSC02"></tt> and <tt><ref id=".P816" name=".P816"></tt>
|
||||
name=".PSC02"></tt>, <tt><ref id=".P816" name=".P816"></tt> and
|
||||
<tt><ref id=".P4510" name=".P4510"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.POPCPU</tt><label id=".POPCPU"><p>
|
||||
@ -3568,7 +3625,8 @@ Here's a list of all control commands and a description, what they do:
|
||||
6502 instructions.
|
||||
|
||||
See: <tt><ref id=".P02" name=".P02"></tt>, <tt><ref id=".PC02"
|
||||
name=".PC02"></tt> and <tt><ref id=".P816" name=".P816"></tt>
|
||||
name=".PC02"></tt>, <tt><ref id=".P816" name=".P816"></tt> and
|
||||
<tt><ref id=".P4510" name=".P4510"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.PUSHCPU</tt><label id=".PUSHCPU"><p>
|
||||
@ -3760,7 +3818,7 @@ Here's a list of all control commands and a description, what they do:
|
||||
Switch the CPU instruction set. The command is followed by a string that
|
||||
specifies the CPU. Possible values are those that can also be supplied to
|
||||
the <tt><ref id="option--cpu" name="--cpu"></tt> command line option,
|
||||
namely: 6502, 6502X, 65SC02, 65C02, 65816 and HuC6280.
|
||||
namely: 6502, 6502X, 65SC02, 65C02, 65816, 4510 and HuC6280.
|
||||
|
||||
See: <tt><ref id=".CPU" name=".CPU"></tt>,
|
||||
<tt><ref id=".IFP02" name=".IFP02"></tt>,
|
||||
@ -3769,6 +3827,7 @@ Here's a list of all control commands and a description, what they do:
|
||||
<tt><ref id=".IFPSC02" name=".IFPSC02"></tt>,
|
||||
<tt><ref id=".P02" name=".P02"></tt>,
|
||||
<tt><ref id=".P816" name=".P816"></tt>,
|
||||
<tt><ref id=".P4510" name=".P4510"></tt>,
|
||||
<tt><ref id=".PC02" name=".PC02"></tt>,
|
||||
<tt><ref id=".PSC02" name=".PSC02"></tt>
|
||||
|
||||
@ -4434,6 +4493,12 @@ The package defines the following macros:
|
||||
|
||||
|
||||
|
||||
<sect1><tt>.MACPACK apple2</tt><p>
|
||||
|
||||
This macro package defines a macro named <tt/scrcode/. It takes a string
|
||||
as argument and places this string into memory translated into screen codes.
|
||||
|
||||
|
||||
<sect1><tt>.MACPACK atari</tt><p>
|
||||
|
||||
This macro package defines a macro named <tt/scrcode/. It takes a string
|
||||
@ -4459,6 +4524,7 @@ each supported CPU a constant similar to
|
||||
CPU_65816
|
||||
CPU_SWEET16
|
||||
CPU_HUC6280
|
||||
CPU_4510
|
||||
</verb></tscreen>
|
||||
|
||||
is defined. These constants may be used to determine the exact type of the
|
||||
@ -4472,6 +4538,7 @@ another constant is defined:
|
||||
CPU_ISET_65816
|
||||
CPU_ISET_SWEET16
|
||||
CPU_ISET_HUC6280
|
||||
CPU_ISET_4510
|
||||
</verb></tscreen>
|
||||
|
||||
The value read from the <tt/<ref id=".CPU" name=".CPU">/ pseudo variable may
|
||||
@ -4516,6 +4583,7 @@ compiler, depending on the target system selected:
|
||||
<itemize>
|
||||
<item><tt/__APPLE2__/ - Target system is <tt/apple2/ or <tt/apple2enh/
|
||||
<item><tt/__APPLE2ENH__/ - Target system is <tt/apple2enh/
|
||||
<item><tt/__ATARI2600__/ - Target system is <tt/atari2600/
|
||||
<item><tt/__ATARI5200__/ - Target system is <tt/atari5200/
|
||||
<item><tt/__ATARI__/ - Target system is <tt/atari/ or <tt/atarixl/
|
||||
<item><tt/__ATARIXL__/ - Target system is <tt/atarixl/
|
||||
|
140
doc/cc65-intern.sgml
Normal file
140
doc/cc65-intern.sgml
Normal file
@ -0,0 +1,140 @@
|
||||
<!doctype linuxdoc system>
|
||||
|
||||
<article>
|
||||
<title>cc65 internals
|
||||
<author><url url="mailto:bbbradsmith@users.noreply.github.com" name="Brad Smith">
|
||||
<date>2016-02-27
|
||||
|
||||
<abstract>
|
||||
Internal details of cc65 code generation,
|
||||
such as calling assembly functions from C.
|
||||
</abstract>
|
||||
|
||||
<!-- Table of contents -->
|
||||
<toc>
|
||||
|
||||
<!-- Begin the document -->
|
||||
|
||||
|
||||
|
||||
<sect>Calling assembly functions from C<p>
|
||||
|
||||
<sect1>Calling conventions<p>
|
||||
|
||||
There are two calling conventions used in cc65:
|
||||
|
||||
<itemize>
|
||||
<item><tt/cdecl/ - passes all parameters on the C-stack.
|
||||
<p>
|
||||
<item><tt/fastcall/ - passes the rightmost parameter in
|
||||
registers <tt>A/X/sreg</tt> and all others on the C-stack.
|
||||
<p>
|
||||
</itemize>
|
||||
|
||||
The default convention is <tt/fastcall/, but this can be changed with
|
||||
the <tt/--all-cdecl/ command line option. If a convention is specified in
|
||||
the function's declaration, that convention will be used instead.
|
||||
Variadic functions will always use <tt/cdecl/ convention.
|
||||
|
||||
If the <tt/--standard/ command line option is used,
|
||||
the <tt/cdecl/ and <tt/fastcall/ keywords will not be available.
|
||||
The standard compliant variations <tt/__cdecl__/ and <tt/__fastcall__/ are always available.
|
||||
|
||||
If a function has a prototype, parameters are pushed to the C-stack as their respective types
|
||||
(i.e. a <tt/char/ parameter will push 1 byte), but if a function has no prototype, default
|
||||
promotions will apply. This means that with no prototype, <tt/char/ will be promoted
|
||||
to <tt/int/ and be pushed as 2 bytes. K & R style function prototypes may be used,
|
||||
but they will function the same as if no prototype was used.
|
||||
|
||||
<sect1>Prologue, before the function call<p>
|
||||
|
||||
If the function is declared as fastcall, the rightmost argument will be loaded into
|
||||
the <tt>A/X/sreg</tt> registers:
|
||||
|
||||
<itemize>
|
||||
<item><tt/A/ - 8-bit parameter, or low byte of larger types<p>
|
||||
<item><tt/X/ - 16-bit high byte, or second byte of 32-bits<p>
|
||||
<item><tt/sreg/ - Zeropage pseudo-register including high 2 bytes of 32-bit parameter<p>
|
||||
</itemize>
|
||||
|
||||
All other parameters will be pushed to the C-stack from left to right.
|
||||
The rightmost parameter will have the lowest address on the stack,
|
||||
and multi-byte parameters will have their least significant byte at the lower address.
|
||||
|
||||
The <tt/sp/ pseudo-register is a zeropage pointer to the base of the C-stack.
|
||||
If the function has no prototype or is variadic
|
||||
the <tt/Y/ register will contain the number of bytes pushed to the stack for this function.
|
||||
|
||||
Example:
|
||||
<tscreen><verb>
|
||||
// C prototype
|
||||
void cdecl foo(unsigned bar, unsigned char baz);
|
||||
|
||||
; C-stack layout within the function:
|
||||
;
|
||||
; +------------------+
|
||||
; | High byte of bar |
|
||||
; Offset 2 ->+------------------+
|
||||
; | Low byte of bar |
|
||||
; Offset 1 ->+------------------+
|
||||
; | baz |
|
||||
; Offset 0 ->+------------------+
|
||||
|
||||
; Example code for accessing bar. The variable is in A/X after this code snippet:
|
||||
;
|
||||
ldy #2 ; Offset of high byte of bar
|
||||
lda (sp),y ; High byte now in A
|
||||
tax ; High byte now in X
|
||||
dey ; Offset of low byte of bar
|
||||
lda (sp),y ; Low byte now in A
|
||||
</verb></tscreen>
|
||||
|
||||
<sect1>Epilogue, after the function call<p>
|
||||
|
||||
<sect2>Return requirements<p>
|
||||
|
||||
If the function has a return value, it will appear in the <tt>A/X/sreg</tt> registers.
|
||||
|
||||
Functions with an 8-bit return value (<tt/char/ or <tt/unsigned char/) are expected
|
||||
to promote this value to a 16-bit integer on return, and store the high byte in <tt/X/.
|
||||
The compiler will depend on the promoted value in some cases (e.g. implicit conversion to <tt/int/),
|
||||
and failure to return the high byte in <tt/X/ will cause unexpected errors.
|
||||
This problem does not apply to the <tt/sreg/ pseudo-register, which is only
|
||||
used if the return type is 32-bit.
|
||||
|
||||
If the function has a void return type, the compiler will not depend on the result
|
||||
of <tt>A/X/sreg</tt>, so these may be clobbered by the function.
|
||||
|
||||
The C-stack pointer <tt/sp/ must be restored by the function to its value before the
|
||||
function call prologue. It may pop all of its parameters from the C-stack
|
||||
(e.g. using the <tt/runtime/ function <tt/popa/),
|
||||
or it could adjust <tt/sp/ directly.
|
||||
If the function has no prototype, or is variadic the <tt/Y/ register contains the
|
||||
number of bytes pushed to the stack on entry, which may be added to <tt/sp/ to restore its original state.
|
||||
|
||||
The internal pseudo-register <tt/regbank/ must not be changed by the function.
|
||||
|
||||
<sect2>Clobbered state<p>
|
||||
|
||||
The <tt/Y/ register may be clobbered by the function.
|
||||
The compiler will not depend on its state after a function call.
|
||||
|
||||
The <tt>A/X/sreg</tt> registers may be clobbered if any of them
|
||||
are not used by the return value (see above).
|
||||
|
||||
Many of the internal pseudo-registers used by cc65 are available for
|
||||
free use by any function called by C, and do not need to be preserved.
|
||||
Note that if another C function is called from your assembly function,
|
||||
it may clobber any of these itself:
|
||||
|
||||
<itemize>
|
||||
<item><tt>tmp1 .. tmp4</tt><p>
|
||||
<item><tt>ptr1 .. ptr4</tt><p>
|
||||
<item><tt>regsave</tt><p>
|
||||
<item><tt>sreg</tt> (if unused by return)<p>
|
||||
</itemize>
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
177
doc/cc65.sgml
177
doc/cc65.sgml
@ -2,8 +2,9 @@
|
||||
|
||||
<article>
|
||||
<title>cc65 Users Guide
|
||||
<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">
|
||||
<date>2015-05-26
|
||||
<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">,<newline>
|
||||
<url url="mailto:gregdk@users.sf.net" name="Greg King">
|
||||
<date>2016-06-11
|
||||
|
||||
<abstract>
|
||||
cc65 is a C compiler for 6502 targets. It supports several 6502 based home
|
||||
@ -15,7 +16,6 @@ computers like the Commodore and Atari machines, but it is easily retargetable.
|
||||
|
||||
<!-- Begin the document -->
|
||||
|
||||
|
||||
<sect>Overview<p>
|
||||
|
||||
cc65 was originally a C compiler for the Atari 8-bit machines written by
|
||||
@ -478,15 +478,15 @@ Here is a description of all the command line options:
|
||||
|
||||
|
||||
<label id="option-W">
|
||||
<tag><tt>-W name[,name]</tt></tag>
|
||||
<tag><tt>-W name[,name,...]</tt></tag>
|
||||
|
||||
This option allows to control warnings generated by the compiler. It is
|
||||
followed by a comma separated list of warnings that should be enabled or
|
||||
followed by a comma-separated list of warnings that should be enabled or
|
||||
disabled. To disable a warning, its name is prefixed by a minus sign. If
|
||||
no such prefix exists, or the name is prefixed by a plus sign, the warning
|
||||
is enabled.
|
||||
|
||||
The following warning names are currently recognized:
|
||||
The following warning names currently are recognized:
|
||||
<descrip>
|
||||
<tag><tt/const-comparison/</tag>
|
||||
Warn if the result of a comparison is constant.
|
||||
@ -494,10 +494,13 @@ Here is a description of all the command line options:
|
||||
Treat all warnings as errors.
|
||||
<tag><tt/no-effect/</tag>
|
||||
Warn about statements that don't have an effect.
|
||||
<tag><tt/remap-zero/</tag>
|
||||
Warn about a <tt/<ref id="pragma-charmap" name="#pragma charmap()">/
|
||||
that changes a character's code number from/to 0x00.
|
||||
<tag><tt/struct-param/</tag>
|
||||
Warn when passing structs by value.
|
||||
<tag><tt/unknown-pragma/</tag>
|
||||
Warn about known #pragmas.
|
||||
Warn about #pragmas that aren't recognized by cc65.
|
||||
<tag><tt/unused-label/</tag>
|
||||
Warn about unused labels.
|
||||
<tag><tt/unused-param/</tag>
|
||||
@ -506,11 +509,11 @@ Here is a description of all the command line options:
|
||||
Warn about unused variables.
|
||||
</descrip>
|
||||
|
||||
The full list of available warning names may be retrieved by using the
|
||||
The full list of available warning names can be retrieved by using the
|
||||
option <tt><ref id="option-list-warnings" name="--list-warnings"></tt>.
|
||||
|
||||
You may also use <tt><ref id="pragma-warn" name="#pragma warn"></tt> to
|
||||
control this setting for smaller pieces of code from within your code.
|
||||
You may use also <tt><ref id="pragma-warn" name="#pragma warn"></tt> to
|
||||
control this setting, for smaller pieces of code, from within your sources.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
@ -564,7 +567,7 @@ and the one defined by the ISO standard:
|
||||
that you must not mix pointers to those functions with pointers to
|
||||
user-written, cdecl functions (the calling conventions are incompatible).
|
||||
<p>
|
||||
<item> The <tt/volatile/ keyword doesn't have an effect. This is not as bad
|
||||
<item> The <tt/volatile/ keyword has almost no effect. That is not as bad
|
||||
as it sounds, since the 6502 has so few registers that it isn't
|
||||
possible to keep values in registers anyway.
|
||||
<p>
|
||||
@ -586,14 +589,14 @@ This cc65 version has some extensions to the ISO C standard.
|
||||
file. The syntax is
|
||||
|
||||
<tscreen><verb>
|
||||
asm (<string literal>[, optional parameters]) ;
|
||||
asm [optional volatile] (<string literal>[, optional parameters]) ;
|
||||
</verb></tscreen>
|
||||
or
|
||||
<tscreen><verb>
|
||||
__asm__ (<string literal>[, optional parameters]) ;
|
||||
__asm__ [optional volatile] (<string literal>[, optional parameters]) ;
|
||||
</verb></tscreen>
|
||||
|
||||
The first form is in the user namespace and is disabled if the <tt/-A/
|
||||
The first form is in the user namespace; and, is disabled if the <tt/-A/
|
||||
switch is given.
|
||||
|
||||
There is a whole section covering inline assembler statements,
|
||||
@ -735,6 +738,7 @@ This cc65 version has some extensions to the ISO C standard.
|
||||
<p>
|
||||
|
||||
|
||||
|
||||
<sect>Predefined macros<p>
|
||||
|
||||
The compiler defines several macros at startup:
|
||||
@ -748,6 +752,10 @@ The compiler defines several macros at startup:
|
||||
|
||||
This macro is defined if the target is the enhanced Apple //e (-t apple2enh).
|
||||
|
||||
<tag><tt>__ATARI2600__</tt></tag>
|
||||
|
||||
This macro is defined if the target is the Atari 2600 game console.
|
||||
|
||||
<tag><tt>__ATARI5200__</tt></tag>
|
||||
|
||||
This macro is defined if the target is the Atari 5200 game console.
|
||||
@ -930,34 +938,38 @@ parameter with the <tt/#pragma/.
|
||||
<sect1><tt>#pragma charmap (<index>, <code>)</tt><label id="pragma-charmap"><p>
|
||||
|
||||
Each literal string and each literal character in the source is translated
|
||||
by use of a translation table. This translation table is preset when the
|
||||
compiler is started depending on the target system, for example to map
|
||||
ISO-8859-1 characters into PETSCII if the target is a commodore machine.
|
||||
by use of a translation table. That translation table is preset when the
|
||||
compiler is started, depending on the target system; for example, to map
|
||||
ISO-8859-1 characters into PETSCII if the target is a Commodore machine.
|
||||
|
||||
This pragma allows to change entries in the translation table, so the
|
||||
translation for individual characters, or even the complete table may be
|
||||
adjusted.
|
||||
adjusted. Both arguments are assumed to be unsigned characters with a valid
|
||||
range of 0-255.
|
||||
|
||||
Both arguments are assumed to be unsigned characters with a valid range of
|
||||
1-255.
|
||||
|
||||
Beware of two pitfalls:
|
||||
|
||||
<itemize>
|
||||
<item>The character index is actually the code of the character in the
|
||||
C source, so character mappings do always depend on the source
|
||||
character set. This means that <tt/#pragma charmap/ is not
|
||||
portable -- it depends on the build environment.
|
||||
<item>While it is possible to use character literals as indices, the
|
||||
result may be somewhat unexpected, since character literals are
|
||||
itself translated. For this reason I would suggest to avoid
|
||||
character literals and use numeric character codes instead.
|
||||
</itemize>
|
||||
Beware of some pitfalls:
|
||||
<itemize>
|
||||
<item>The character index is actually the code of the character in the
|
||||
C source; so, character mappings do always depend on the source
|
||||
character set. That means that <tt/#pragma charmap()/ is not
|
||||
portable -- it depends on the build environment.
|
||||
<item>While it is possible to use character literals as indices, the
|
||||
result may be somewhat unexpected, since character literals are
|
||||
themselves translated. For that reason, I would suggest to avoid
|
||||
character literals, and use numeric character codes instead.
|
||||
<item>It is risky to change index <tt/0x00/, because string functions depend
|
||||
on it. If it is changed, then the <tt/'\0'/ at the end of string
|
||||
literals will become non-zero. Functions that are used on those
|
||||
literals won't stop at the end of them. cc65 will warn you if you do
|
||||
change that code number. You can turn off that <tt/remap-zero/ warning
|
||||
if you are certain that you know what you are doing (see <tt/<ref
|
||||
id="pragma-warn" name="#pragma warn()">/).
|
||||
</itemize>
|
||||
|
||||
Example:
|
||||
<tscreen><verb>
|
||||
/* Use a space wherever an 'a' occurs in ISO-8859-1 source */
|
||||
#pragma charmap (0x61, 0x20);
|
||||
/* Use a space wherever an 'a' occurs in ISO-8859-1 source */
|
||||
#pragma charmap (0x61, 0x20);
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
@ -1128,7 +1140,7 @@ parameter with the <tt/#pragma/.
|
||||
|
||||
Switch compiler warnings on or off. "name" is the name of a warning (see the
|
||||
<tt/<ref name="-W" id="option-W">/ compiler option for a list). The name is
|
||||
either followed by "pop", which restores the last pushed state, or by "on" or
|
||||
followed either by "pop", which restores the last pushed state, or by "on" or
|
||||
"off", optionally preceeded by "push" to push the current state before
|
||||
changing it.
|
||||
|
||||
@ -1143,6 +1155,7 @@ parameter with the <tt/#pragma/.
|
||||
#pragma warn (unused-param, pop)
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1><tt>#pragma writable-strings ([push,] on|off)</tt><label id="pragma-writable-strings"><p>
|
||||
|
||||
Changes the storage location of string literals. For historical reasons,
|
||||
@ -1224,39 +1237,44 @@ The compiler allows to insert assembler statements into the output file. The
|
||||
syntax is
|
||||
|
||||
<tscreen><verb>
|
||||
asm (<string literal>[, optional parameters]) ;
|
||||
asm [optional volatile] (<string literal>[, optional parameters]) ;
|
||||
</verb></tscreen>
|
||||
or
|
||||
<tscreen><verb>
|
||||
__asm__ (<string literal>[, optional parameters]) ;
|
||||
__asm__ [optional volatile] (<string literal>[, optional parameters]) ;
|
||||
</verb></tscreen>
|
||||
<p>
|
||||
|
||||
The first form is in the user namespace and is disabled by <tt><ref
|
||||
The first form is in the user namespace; and, is disabled by <tt><ref
|
||||
id="option--standard" name="--standard"></tt> if the argument is not <tt/cc65/.
|
||||
|
||||
The asm statement may be used inside a function and on global file level. An
|
||||
inline assembler statement is a primary expression, so it may also be used as
|
||||
part of an expression. Please note however that the result of an expression
|
||||
containing just an inline assembler statement is always of type <tt/void/.
|
||||
The <tt/asm/ statement can be used only inside a function. Please note that
|
||||
the result of an inline assembler expression is always of type <tt/void/.
|
||||
|
||||
The contents of the string literal are preparsed by the compiler and inserted
|
||||
into the generated assembly output, so that the can be further processed by
|
||||
the backend and especially the optimizer. For this reason, the compiler does
|
||||
only allow regular 6502 opcodes to be used with the inline assembler. Pseudo
|
||||
instructions (like <tt/.import/, <tt/.byte/ and so on) are <em/not/ allowed,
|
||||
The contents of the string literal are preparsed by the compiler; and, inserted
|
||||
into the generated assembly output, so that it can be processed further by
|
||||
the backend -- and, especially the optimizer. For that reason, the compiler does
|
||||
allow only regular 6502 opcodes to be used with the inline assembler. Pseudo
|
||||
instructions (like <tt/.import/, <tt/.byte/, and so on) are <em/not/ allowed,
|
||||
even if the ca65 assembler (which is used to translate the generated assembler
|
||||
code) would accept them. The builtin inline assembler is not a replacement for
|
||||
the full blown macro assembler which comes with the compiler.
|
||||
code) would accept them. The built-in inline assembler is not a replacement for
|
||||
the full-blown macro assembler which comes with the compiler.
|
||||
|
||||
Note: Inline assembler statements are subject to all optimizations done by the
|
||||
compiler. There is currently no way to protect an inline assembler statement
|
||||
from being moved or removed completely by the optimizer. If in doubt, check
|
||||
the generated assembler output, or disable optimizations.
|
||||
compiler. There currently is no way to protect an inline assembler statement
|
||||
-- alone -- from being moved or removed completely by the optimizer. If in
|
||||
doubt, check the generated assembler output; or, disable optimizations (for
|
||||
that function).
|
||||
|
||||
As a shortcut, you can put the <tt/volatile/ qualifier in your <tt/asm/
|
||||
statements. It will disable optimization for the functions in which those
|
||||
<tt/asm volatile/ statements sit. The effect is the same as though you put
|
||||
</#pragma optimize(push, off)/ above those functions, and </#pragma
|
||||
optimize(pop)/ below those functions.
|
||||
|
||||
The string literal may contain format specifiers from the following list. For
|
||||
each format specifier, an argument is expected which is inserted instead of
|
||||
the format specifier before passing the assembly code line to the backend.
|
||||
the format specifier, before passing the assembly code line to the backend.
|
||||
|
||||
<itemize>
|
||||
<item><tt/%b/ - Numerical 8-bit value
|
||||
@ -1269,33 +1287,33 @@ the format specifier before passing the assembly code line to the backend.
|
||||
<item><tt/%%/ - The % sign itself
|
||||
</itemize><p>
|
||||
|
||||
Using these format specifiers, you can access C <tt/#defines/, variables or
|
||||
Using those format specifiers, you can access C <tt/#defines/, variables, or
|
||||
similar stuff from the inline assembler. For example, to load the value of
|
||||
a C <tt/#define/ into the Y register, one would use
|
||||
a C <tt/#define/ into the Y index register, one would use
|
||||
|
||||
<tscreen><verb>
|
||||
#define OFFS 23
|
||||
__asm__ ("ldy #%b", OFFS);
|
||||
#define OFFS 23
|
||||
__asm__ ("ldy #%b", OFFS);
|
||||
</verb></tscreen>
|
||||
|
||||
Or, to access a struct member of a static variable:
|
||||
|
||||
<tscreen><verb>
|
||||
typedef struct {
|
||||
unsigned char x;
|
||||
unsigned char y;
|
||||
unsigned char color;
|
||||
} pixel_t;
|
||||
static pixel_t pixel;
|
||||
__asm__ ("ldy #%b", offsetof(pixel_t, color));
|
||||
__asm__ ("lda %v,y", pixel);
|
||||
typedef struct {
|
||||
unsigned char x;
|
||||
unsigned char y;
|
||||
unsigned char color;
|
||||
} pixel_t;
|
||||
static pixel_t pixel;
|
||||
__asm__ ("ldy #%b", offsetof(pixel_t, color));
|
||||
__asm__ ("lda %v,y", pixel);
|
||||
</verb></tscreen>
|
||||
<p>
|
||||
The next example shows how to use global variables to exchange data between C
|
||||
an assembler and how to handle assembler jumps:
|
||||
and assembler; and, how to handle assembler jumps:
|
||||
|
||||
<tscreen><verb>
|
||||
unsigned char globalSubA, globalSubB, globalSubResult;
|
||||
static unsigned char globalSubA, globalSubB, globalSubResult;
|
||||
|
||||
/* return a-b, return 255 if b>a */
|
||||
unsigned char sub (unsigned char a, unsigned char b)
|
||||
@ -1314,19 +1332,19 @@ an assembler and how to handle assembler jumps:
|
||||
</verb></tscreen>
|
||||
<p>
|
||||
|
||||
Arrays can also be accessed:
|
||||
Arrays also can be accessed:
|
||||
|
||||
<tscreen><verb>
|
||||
unsigned char globalSquareTable[] = {
|
||||
static const unsigned char globalSquareTable[] = {
|
||||
0, 1, 4, 9, 16, 25, 36, 49, 64, 81,
|
||||
100, 121, 144, 169, 196, 225
|
||||
};
|
||||
unsigned char globalSquareA, globalSquareResult;
|
||||
static unsigned char globalSquareA, globalSquareResult;
|
||||
|
||||
/* return a*a for a<16, else 255 */
|
||||
unsigned char square (unsigned char a)
|
||||
{
|
||||
if (a>15){
|
||||
if (a > 15) {
|
||||
return 255;
|
||||
}
|
||||
globalSquareA = a;
|
||||
@ -1339,28 +1357,30 @@ Arrays can also be accessed:
|
||||
<p>
|
||||
|
||||
Note: Do not embed the assembler labels that are used as names of global
|
||||
variables or functions into your asm statements. Code like this
|
||||
variables or functions into your <tt/asm/ statements. Code such as this:
|
||||
|
||||
<tscreen><verb>
|
||||
int foo;
|
||||
int bar () { return 1; }
|
||||
__asm__ ("lda _foo"); /* DON'T DO THAT! */
|
||||
int bar (void) { return 1; }
|
||||
...
|
||||
__asm__ ("lda _foo"); /* DON'T DO THAT! */
|
||||
...
|
||||
__asm__ ("jsr _bar"); /* DON'T DO THAT EITHER! */
|
||||
</verb></tscreen>
|
||||
<p>
|
||||
|
||||
may stop working if the way, the compiler generates these names is changed in
|
||||
a future version. Instead use the format specifiers from the table above:
|
||||
might stop working if the way that the compiler generates those names is changed in
|
||||
a future version. Instead, use the format specifiers from the table above:
|
||||
|
||||
<tscreen><verb>
|
||||
__asm__ ("lda %v", foo); /* OK */
|
||||
__asm__ ("lda %v", foo); /* OK */
|
||||
...
|
||||
__asm__ ("jsr %v", bar); /* OK */
|
||||
</verb></tscreen>
|
||||
<p>
|
||||
|
||||
|
||||
|
||||
<sect>Implementation-defined behavior<p>
|
||||
|
||||
This section describes the behavior of cc65 when the standard describes the
|
||||
@ -1434,4 +1454,3 @@ freely, subject to the following restrictions:
|
||||
</enum>
|
||||
|
||||
</article>
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
<!doctype linuxdoc system> <!-- -*- text-mode -*- -->
|
||||
|
||||
<article>
|
||||
<title>chrcvt Users Guide
|
||||
<title>chrcvt65 Users Guide
|
||||
<author><url url="mailto:polluks@sdf.lonestar.org" name="Stefan A. Haubenthal">
|
||||
<date>2013-02-10
|
||||
|
||||
<abstract>
|
||||
chrcvt is the vector font converter. It is able to convert a foreign font into
|
||||
chrcvt65 is the vector font converter. It is able to convert a foreign font into
|
||||
the native format.
|
||||
</abstract>
|
||||
|
||||
@ -18,7 +18,7 @@ the native format.
|
||||
|
||||
<sect>Overview<p>
|
||||
|
||||
chrcvt is a vector font converter. It is able to convert a "BGI Stroked
|
||||
chrcvt65 is a vector font converter. It is able to convert a "BGI Stroked
|
||||
Font" to a compact TGI native vector font. See the function <url
|
||||
url="funcref.html#tgi_load_vectorfont" name="tgi_load_vectorfont"> for usage.
|
||||
|
||||
@ -26,7 +26,7 @@ url="funcref.html#tgi_load_vectorfont" name="tgi_load_vectorfont"> for usage.
|
||||
|
||||
<sect>Usage<p>
|
||||
|
||||
The chrcvt utility converts the font of one Borland file to its cc65 equivalent.
|
||||
The chrcvt65 utility converts the font of one Borland file to its cc65 equivalent.
|
||||
|
||||
|
||||
<sect1>Command line option overview<p>
|
||||
@ -35,7 +35,7 @@ The program may be called as follows:
|
||||
|
||||
<tscreen><verb>
|
||||
---------------------------------------------------------------------------
|
||||
Usage: chrcvt [options] file [options] [file]
|
||||
Usage: chrcvt65 [options] file [options] [file]
|
||||
Short options:
|
||||
-h Help (this text)
|
||||
-v Be more verbose
|
||||
@ -80,7 +80,7 @@ in TCH format to a new file.
|
||||
|
||||
Example output for the command
|
||||
<tscreen><verb>
|
||||
chrcvt --verbose LITT.CHR
|
||||
chrcvt65 --verbose LITT.CHR
|
||||
</verb></tscreen>
|
||||
<tscreen><verb>
|
||||
BGI Stroked Font V1.1 - Aug 12, 1991
|
||||
@ -91,7 +91,7 @@ Copyright (c) 1987,1988 Borland International
|
||||
|
||||
<sect>Copyright<p>
|
||||
|
||||
chrcvt is (C) Copyright 2009, Ullrich von Bassewitz. For usage of the
|
||||
chrcvt65 is (C) Copyright 2009, Ullrich von Bassewitz. For usage of the
|
||||
binaries and/or sources the following conditions apply:
|
||||
|
||||
This software is provided 'as-is', without any expressed or implied
|
@ -62,6 +62,7 @@ Short options:
|
||||
-V Print the version number
|
||||
-W name[,...] Supress compiler warnings
|
||||
-Wa options Pass options to the assembler
|
||||
-Wc options Pass options to the compiler
|
||||
-Wl options Pass options to the linker
|
||||
|
||||
Long options:
|
||||
@ -103,6 +104,7 @@ Long options:
|
||||
--o65-model model Override the o65 model
|
||||
--obj file Link this object file
|
||||
--obj-path path Specify an object file search path
|
||||
--print-target-path Print the target file path
|
||||
--register-space b Set space available for register variables
|
||||
--register-vars Enable register variables
|
||||
--rodata-name seg Set the name of the RODATA segment
|
||||
@ -154,6 +156,14 @@ There are a few remaining options that control the behaviour of cl65:
|
||||
shouldn't use -o when more than one output file is created.
|
||||
|
||||
|
||||
<tag><tt>--print-target-path</tt></tag>
|
||||
|
||||
This option prints the absolute path of the target file directory and exits
|
||||
then. It is supposed to be used with shell backquotes or the GNU make shell
|
||||
function. This way you can write build scripts or Makefiles accessing target
|
||||
files without any assumption about the cc65 installation path.
|
||||
|
||||
|
||||
<tag><tt>-t sys, --target sys</tt></tag>
|
||||
|
||||
The default for this option is different from the compiler and linker in the
|
||||
@ -162,6 +172,7 @@ There are a few remaining options that control the behaviour of cl65:
|
||||
the C64 as a target system by default. This was chosen since most people
|
||||
seem to use cc65 to develop for the C64.
|
||||
|
||||
|
||||
<tag><tt>-Wa options, --asm-args options</tt></tag>
|
||||
|
||||
Pass options directly to the assembler. This may be used to pass options
|
||||
@ -172,6 +183,7 @@ There are a few remaining options that control the behaviour of cl65:
|
||||
if cl65 supports an option by itself, do not pass this option to the
|
||||
assembler by means of the <tt/-Wa/ switch.
|
||||
|
||||
|
||||
<tag><tt>-Wc options, --cc-args options</tt></tag>
|
||||
|
||||
Pass options directly to the compiler. This may be used to pass options
|
||||
@ -182,6 +194,7 @@ There are a few remaining options that control the behaviour of cl65:
|
||||
if cl65 supports an option by itself, do not pass this option to the
|
||||
compiler by means of the <tt/-Wc/ switch.
|
||||
|
||||
|
||||
<tag><tt>-Wl options, --ld-args options</tt></tag>
|
||||
|
||||
Pass options directly to the linker. This may be used to pass options that
|
||||
@ -192,7 +205,7 @@ There are a few remaining options that control the behaviour of cl65:
|
||||
supports an option by itself, do not pass this option to the linker by means
|
||||
of the <tt/-Wl/ switch.
|
||||
|
||||
</descrip>
|
||||
</descrip>
|
||||
|
||||
|
||||
|
||||
@ -304,4 +317,3 @@ freely, subject to the following restrictions:
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
@ -78,15 +78,15 @@ vectors at the proper memory locations. The segment definition is:
|
||||
|
||||
<tscreen><code>
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
DATA: load = ROM, type = rw, define = yes, run = RAM;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
HEAP: load = RAM, type = bss, optional = yes;
|
||||
STARTUP: load = ROM, type = ro;
|
||||
INIT: load = ROM, type = ro, optional = yes;
|
||||
CODE: load = ROM, type = ro;
|
||||
RODATA: load = ROM, type = ro;
|
||||
VECTORS: load = ROM, type = ro, start = $FFFA;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
DATA: load = ROM, type = rw, define = yes, run = RAM;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
HEAP: load = RAM, type = bss, optional = yes;
|
||||
STARTUP: load = ROM, type = ro;
|
||||
ONCE: load = ROM, type = ro, optional = yes;
|
||||
CODE: load = ROM, type = ro;
|
||||
RODATA: load = ROM, type = ro;
|
||||
VECTORS: load = ROM, type = ro, start = $FFFA;
|
||||
}
|
||||
</code></tscreen>
|
||||
|
||||
@ -97,7 +97,7 @@ The meaning of each of these segments is as follows.
|
||||
<p><tt> BSS: </tt>Uninitialized data stored in RAM (used for variable storage)
|
||||
<p><tt> HEAP: </tt>Uninitialized C-level heap storage in RAM, optional
|
||||
<p><tt> STARTUP: </tt>The program initialization code, stored in ROM
|
||||
<p><tt> INIT: </tt>The code needed to initialize the system, stored in ROM
|
||||
<p><tt> ONCE: </tt>The code run once to initialize the system, stored in ROM
|
||||
<p><tt> CODE: </tt>The program code, stored in ROM
|
||||
<p><tt> RODATA: </tt>Initialized data that cannot be modified by the program, stored in ROM
|
||||
<p><tt> VECTORS: </tt>The interrupt vector table, stored in ROM at location $FFFA
|
||||
|
@ -114,10 +114,12 @@ Here is a description of all the command line options:
|
||||
<item>65sc02
|
||||
<item>65c02
|
||||
<item>huc6280
|
||||
<item>4510
|
||||
</itemize>
|
||||
|
||||
6502x is for the NMOS 6502 with unofficial opcodes. huc6280 is the CPU of
|
||||
the PC engine. Support for the 65816 currently is not available.
|
||||
the PC engine. 4510 is the CPU of the Commodore C65. Support for the 65816
|
||||
currently is not available.
|
||||
|
||||
|
||||
<label id="option--formfeeds">
|
||||
@ -239,6 +241,11 @@ disassembler may be told to recognize either the 65SC02 or 65C02 CPUs. The
|
||||
latter understands the same opcodes as the former, plus 16 additional bit
|
||||
manipulation and bit test-and-branch commands.
|
||||
|
||||
When disassembling 4510 code, due to handling of 16-bit wide branches, da65
|
||||
can produce output that can not be re-assembled, when one or more of those
|
||||
branches point outside of the disassembled memory. This can happen when text
|
||||
or binary data is processed.
|
||||
|
||||
While there is some code for the 65816 in the sources, it is currently
|
||||
unsupported.
|
||||
|
||||
|
155
doc/funcref.sgml
155
doc/funcref.sgml
@ -3,7 +3,7 @@
|
||||
<article>
|
||||
<title>cc65 function reference
|
||||
<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">
|
||||
<date>2015-07-21
|
||||
<date>2016-08-07
|
||||
|
||||
<abstract>
|
||||
cc65 is a C compiler for 6502 based systems. This function reference describes
|
||||
@ -98,6 +98,7 @@ function.
|
||||
<!-- <item><ref id="_getcolor" name="_getcolor"> -->
|
||||
<!-- <item><ref id="_getdefdev" name="_getdefdev"> -->
|
||||
<!-- <item><ref id="_graphics" name="_graphics"> -->
|
||||
<item><ref id="_is_cmdline_dos" name="_is_cmdline_dos">
|
||||
<!-- <item><ref id="_rest_vecs" name="_rest_vecs"> -->
|
||||
<!-- <item><ref id="_save_vecs" name="_save_vecs"> -->
|
||||
<!-- <item><ref id="_scroll" name="_scroll"> -->
|
||||
@ -168,8 +169,11 @@ function.
|
||||
<item><ref id="cbm_k_open" name="cbm_k_open">
|
||||
<item><ref id="cbm_k_readst" name="cbm_k_readst">
|
||||
<item><ref id="cbm_k_save" name="cbm_k_save">
|
||||
<item><ref id="cbm_k_scnkey" name="cbm_k_scnkey">
|
||||
<item><ref id="cbm_k_setlfs" name="cbm_k_setlfs">
|
||||
<item><ref id="cbm_k_setnam" name="cbm_k_setnam">
|
||||
<item><ref id="cbm_k_talk" name="cbm_k_talk">
|
||||
<item><ref id="cbm_k_udtim" name="cbm_k_udtim">
|
||||
<item><ref id="cbm_k_unlsn" name="cbm_k_unlsn">
|
||||
<!-- <item><ref id="cbm_load" name="cbm_load"> -->
|
||||
<!-- <item><ref id="cbm_open" name="cbm_open"> -->
|
||||
@ -206,7 +210,7 @@ function.
|
||||
|
||||
<sect1><tt/cc65.h/<label id="cc65.h"><p>
|
||||
|
||||
<!-- <itemize> -->
|
||||
<itemize>
|
||||
<!-- <item><ref id="cc65_cos" name="cc65_cos"> -->
|
||||
<!-- <item><ref id="cc65_idiv32by16r16" name="cc65_idiv32by16r16"> -->
|
||||
<!-- <item><ref id="cc65_imul16x16r32" name="cc65_imul16x16r32"> -->
|
||||
@ -216,7 +220,8 @@ function.
|
||||
<!-- <item><ref id="cc65_umul16x16r32" name="cc65_umul16x16r32"> -->
|
||||
<!-- <item><ref id="cc65_umul16x8r32" name="cc65_umul16x8r32"> -->
|
||||
<!-- <item><ref id="cc65_umul8x8r16" name="cc65_umul8x8r16"> -->
|
||||
<!-- </itemize> -->
|
||||
<item><ref id="doesclrscrafterexit" name="doesclrscrafterexit">
|
||||
</itemize>
|
||||
|
||||
(incomplete)
|
||||
|
||||
@ -343,6 +348,16 @@ function.
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1><tt/gamate.h/<label id="gamate.h"><p>
|
||||
|
||||
<!-- <itemize> -->
|
||||
<!-- <item><ref id="get_tv" name="get_tv"> -->
|
||||
<!-- <item><ref id="waitvblank" name="waitvblank"> -->
|
||||
<!-- </itemize> -->
|
||||
|
||||
(incomplete)
|
||||
|
||||
|
||||
<sect1><tt/geos.h/<label id="geos.h"><p>
|
||||
|
||||
(incomplete)
|
||||
@ -429,6 +444,16 @@ url="http://www.6502.org/users/andre/o65/fileformat.html" name="the o65 format">
|
||||
It does not declare any functions.
|
||||
|
||||
|
||||
<sect1><tt/pce.h/<label id="pce.h"><p>
|
||||
|
||||
<!-- <itemize> -->
|
||||
<!-- <item><ref id="get_tv" name="get_tv"> -->
|
||||
<!-- <item><ref id="waitvblank" name="waitvblank"> -->
|
||||
<!-- </itemize> -->
|
||||
|
||||
(incomplete)
|
||||
|
||||
|
||||
<sect1><tt/peekpoke.h/<label id="peekpoke.h"><p>
|
||||
|
||||
<itemize>
|
||||
@ -439,6 +464,16 @@ It does not declare any functions.
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1><tt/pen.h/<label id="pen.h"><p>
|
||||
|
||||
<!-- <itemize> -->
|
||||
<!-- <item><ref id="pen_adjust" name="pen_adjust"> -->
|
||||
<!-- <item><ref id="pen_calibrate" name="pen_calibrate"> -->
|
||||
<!-- </itemize> -->
|
||||
|
||||
(incomplete)
|
||||
|
||||
|
||||
<sect1><tt/pet.h/<label id="pet.h"><p>
|
||||
|
||||
(incomplete)
|
||||
@ -939,6 +974,20 @@ id="malloc" name="malloc"> may still return <tt/NULL/.
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>_is_cmdline_dos<label id="_is_cmdline_dos"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Determines whether the underlying DOS supports command line arguments.
|
||||
<tag/Header/<tt/<ref id="atari.h" name="atari.h">/
|
||||
<tag/Declaration/<tt/unsigned char _is_cmdline_dos (void);/
|
||||
<tag/Description/The function returns 0 if the DOS doesn't support command line arguments.
|
||||
It returns 1 if it does.
|
||||
<tag/Availability/cc65 (<tt/atari/ and <tt/atarixl/ platforms)
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>_poserror<label id="_poserror"><p>
|
||||
|
||||
<quote>
|
||||
@ -1974,6 +2023,31 @@ only be used in presence of a prototype.
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>cbm_k_scnkey<label id="cbm_k_scnkey"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Scan the keyboard matrix.
|
||||
<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
|
||||
<tag/Declaration/<tt/void cbm_k_scnkey (void);/
|
||||
<tag/Description/This function looks at the switches in the keyboard, to see
|
||||
if any of them are being pressed. If they are, then code numbers for them are
|
||||
stored in RAM. Other functions use those numbers to input text. Normally,
|
||||
the keyboard is scanned by the Kernal's Interrupt Service Routine. But, if
|
||||
you divert the "Jiffy interrupt" to a C-code ISR, then that ISR must call this
|
||||
function, in order to provide input from the keyboard.
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
<ref id="cbm_k_getin" name="cbm_k_getin">,
|
||||
<ref id="cbm_k_udtim" name="cbm_k_udtim">,
|
||||
<ref id="cgetc" name="cgetc">,
|
||||
<!-- <ref id="getc" name="getc"> -->
|
||||
<!-- <ref id="getchar" name="getchar"> -->
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>cbm_k_setlfs<label id="cbm_k_setlfs"><p>
|
||||
|
||||
<quote>
|
||||
@ -2039,6 +2113,27 @@ only be used in presence of a prototype.
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>cbm_k_udtim<label id="cbm_k_udtim"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Update the Jiffy clock.
|
||||
<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
|
||||
<tag/Declaration/<tt/void cbm_k_udtim (void);/
|
||||
<tag/Description/This function adds one count to the Jiffy clock. That clock
|
||||
counts sixtieths of a second. It is used by the library's <tt/clock()/
|
||||
function. Normally, the Jiffy clock is updated by the Kernal's Interrupt
|
||||
Service Routine. But, if you divert the "Jiffy interrupt" to a C-code ISR,
|
||||
then that ISR must call this function, in order to keep the clock valid.
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
<ref id="cbm_k_scnkey" name="cbm_k_scnkey">,
|
||||
<ref id="clock" name="clock">
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>cbm_k_unlsn<label id="cbm_k_unlsn"><p>
|
||||
|
||||
<quote>
|
||||
@ -2118,15 +2213,18 @@ only be used in presence of a prototype.
|
||||
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
||||
<tag/Declaration/<tt/char cgetc (void);/
|
||||
<tag/Description/The function reads a character from the keyboard. If there is
|
||||
no character available, <tt/cgetc/ waits until the user presses a key. If the
|
||||
no character available, <tt/cgetc()/ waits until the user presses a key. If the
|
||||
cursor is enabled by use of the <tt/cursor/ function, a blinking cursor is
|
||||
displayed while waiting.
|
||||
<tag/Notes/<itemize>
|
||||
<item>If the system supports a keyboard buffer, <tt/cgetc/ will fetch a key
|
||||
from this buffer and wait only if the buffer is empty.
|
||||
<item>If the system supports a keyboard buffer, <tt/cgetc()/ will fetch a key
|
||||
from that buffer; and, wait only if the buffer is empty.
|
||||
<item>The keyboard must be scanned periodically, in order for this function to
|
||||
see anything that you type. (See the description of <tt/cbm_k_scnkey()/.)
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
<ref id="cbm_k_scnkey" name="cbm_k_scnkey">,
|
||||
<ref id="cursor" name="cursor">,
|
||||
<ref id="kbhit" name="kbhit">
|
||||
<tag/Example/None.
|
||||
@ -2216,16 +2314,19 @@ used in presence of a prototype.
|
||||
<tag/Header/<tt/<ref id="time.h" name="time.h">/
|
||||
<tag/Declaration/<tt/clock_t clock (void);/
|
||||
<tag/Description/The <tt/clock/ function returns an approximaton of processor
|
||||
time used by the program. The time is returned in implementation defined
|
||||
time used by the program. The time is returned in implementation-defined
|
||||
units. It can be converted to seconds by dividing by the value of the macro
|
||||
<tt/CLOCKS_PER_SEC/.
|
||||
<tag/Notes/<itemize>
|
||||
<item>Since the machines, cc65 generated programs run on, cannot run multiple
|
||||
processes, the function will actually return the time since some
|
||||
implementation defined point in the past.
|
||||
<item>Since the machines that cc65-generated programs run on cannot run multiple
|
||||
processes, the function actually will return the time since some
|
||||
implementation-defined point in the past.
|
||||
<item>The Jiffy clock must be "running", in order for this function to return
|
||||
changing values. (See the description of <tt/cbm_k_udtim()/.)
|
||||
</itemize>
|
||||
<tag/Availability/ISO 9899
|
||||
<tag/See also/
|
||||
<ref id="cbm_k_udtim" name="cbm_k_udtim">,
|
||||
<ref id="time" name="time">
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
@ -2552,6 +2653,40 @@ ldiv
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>doesclrscrafterexit<label id="doesclrscrafterexit"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Determines whether the screen is going to be cleared after program exit.
|
||||
<tag/Header/<tt/<ref id="cc65.h" name="cc65.h">/
|
||||
<tag/Declaration/<tt/unsigned char doesclrscrafterexit (void);/
|
||||
<tag/Description/The function returns zero if the screen won't be cleared immediately after
|
||||
program termination. It returns a non-zero value if it will.
|
||||
<tag/Notes/<itemize>
|
||||
<item>Some systems, maybe depending on configuration, immediately clear the screen
|
||||
after a program exits. Therefore it might be difficult to read
|
||||
the last messages printed by the program prior to its exit. This function can be used
|
||||
to decide if a delay or wait for a key press should be executed when then program
|
||||
exits.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/Example/<verb>
|
||||
/* Hello World */
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <cc65.h>
|
||||
int main(void)
|
||||
{
|
||||
printf("Hello World\n");
|
||||
if (doesclrscrafterexit())
|
||||
sleep(5);
|
||||
return 0;
|
||||
}
|
||||
</verb>
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>em_commit<label id="em_commit"><p>
|
||||
|
||||
<quote>
|
||||
|
@ -18,7 +18,7 @@
|
||||
<tag><htmlurl url="cc65.html" name="cc65.html"></tag>
|
||||
Describes the cc65 C compiler.
|
||||
|
||||
<tag><htmlurl url="chrcvt.html" name="chrcvt.html"></tag>
|
||||
<tag><htmlurl url="chrcvt65.html" name="chrcvt65.html"></tag>
|
||||
Describes the vector font converter.
|
||||
|
||||
<tag><htmlurl url="cl65.html" name="cl65.html"></tag>
|
||||
@ -31,7 +31,7 @@
|
||||
Describes the da65 6502/65C02 disassembler.
|
||||
|
||||
<tag><htmlurl url="grc65.html" name="grc65.html"></tag>
|
||||
Describes the GEOS resource compiler (grc65).
|
||||
Describes the GEOS resource compiler.
|
||||
|
||||
<tag><htmlurl url="ld65.html" name="ld65.html"></tag>
|
||||
Describes the ld65 linker.
|
||||
@ -58,6 +58,9 @@
|
||||
|
||||
<tag><htmlurl url="coding.html" name="coding.html"></tag>
|
||||
Contains hints on creating the most effective code with cc65.
|
||||
|
||||
<tag><htmlurl url="cc65-intern.html" name="cc65-intern.html"></tag>
|
||||
Describes internal details of cc65, such as calling conventions.
|
||||
|
||||
<tag><htmlurl url="using-make.html" name="using-make.html"></tag>
|
||||
Build programs, using the GNU Make utility.
|
||||
@ -113,6 +116,9 @@
|
||||
<tag><htmlurl url="atari.html" name="atari.html"></tag>
|
||||
Topics specific to the Atari 8-bit machines.
|
||||
|
||||
<tag><htmlurl url="atari2600.html" name="atari2600.html"></tag>
|
||||
Topics specific to the Atari 2600 Game Console.
|
||||
|
||||
<tag><htmlurl url="atari5200.html" name="atari5200.html"></tag>
|
||||
Topics specific to the Atari 5200 Game Console.
|
||||
|
||||
|
@ -335,6 +335,35 @@ your harddrive directly.
|
||||
to the DOS menu. Your C program should wait for a keypress if you want to see
|
||||
any output.
|
||||
|
||||
<sect2>Stella<p>
|
||||
Available at <url
|
||||
url="http://stella.sourceforge.net">:
|
||||
|
||||
Stella is a multi-platform Atari 2600 VCS emulator. The latest version
|
||||
is available on the emulator's website. It is also available through
|
||||
the package manager of most Linux distributions (Fedora, Ubuntu, ..).
|
||||
|
||||
Compile the Atari 2600 sample with
|
||||
|
||||
<tscreen><verb>
|
||||
make SYS=atari2600 samples
|
||||
</verb></tscreen>
|
||||
|
||||
Then execute it with
|
||||
|
||||
<tscreen><verb>
|
||||
stella samples/atari2600hello
|
||||
</verb></tscreen>
|
||||
|
||||
<sect2>Harmony Cartridge<p>
|
||||
Available at <url
|
||||
url="http://harmony.atariage.com/Site/Harmony.html">:
|
||||
|
||||
The Harmony Cartridge allows running any Atari 2600 binary on real
|
||||
hardware. The binary must be copied on an SD card, to be inserted in
|
||||
the Harmony Cartridge. It can then be inserted on an Atari 2600
|
||||
console, and run any binary on the SD card.
|
||||
|
||||
|
||||
<sect1>Atmos
|
||||
|
||||
|
@ -156,6 +156,7 @@ Here is a description of all of the command-line options:
|
||||
<item>module
|
||||
<item>apple2
|
||||
<item>apple2enh
|
||||
<item>atari2600
|
||||
<item>atari
|
||||
<item>atarixl
|
||||
<item>atmos
|
||||
@ -1032,11 +1033,11 @@ The builtin config files do contain segments that have a special meaning for
|
||||
the compiler and the libraries that come with it. If you replace the builtin
|
||||
config files, you will need the following information.
|
||||
|
||||
<sect1>INIT<p>
|
||||
<sect1>ONCE<p>
|
||||
|
||||
The INIT segment is used for initialization code that may be reused once
|
||||
The ONCE segment is used for initialization code run only once before
|
||||
execution reaches main() - provided that the program runs in RAM. You
|
||||
may for example add the INIT segment to the heap in really memory
|
||||
may for example add the ONCE segment to the heap in really memory
|
||||
constrained systems.
|
||||
|
||||
<sect1>LOWCODE<p>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<title>PC-Engine (TurboGrafx) System specific information for cc65
|
||||
<author>
|
||||
<url url="mailto:groepaz@gmx.net" name="Groepaz/Hitmen">
|
||||
<date>2015-07-14
|
||||
<date>2016-09-29
|
||||
|
||||
<abstract>
|
||||
An overview over the PCE runtime system as it is implemented for the
|
||||
@ -179,7 +179,7 @@ some useful resources on PCE coding:
|
||||
<itemize>
|
||||
<item><url url="http://blog.blockos.org/?tag=pc-engine">
|
||||
<item><url url="http://pcedev.blockos.org/viewforum.php?f=5">
|
||||
<item><url url="http://www.romhacking.net/?page=documents&category=&platform=4&:game=&author=&perpage=20&level=&title=&desc=&docsearch=Go">
|
||||
<item><url url="http://www.romhacking.net/?page=documents&platform=4">
|
||||
<item><url url="http://archaicpixels.com/Main_Page">
|
||||
|
||||
<item><url url="http://www.magicengine.com/mkit/doc.html">
|
||||
|
@ -155,8 +155,9 @@ The default drivers, <tt/joy_stddrv (joy_static_stddrv)/, point to <tt/pet-stdjo
|
||||
|
||||
<tag><tt/pet-ptvjoy.joy (pet_ptvjoy_joy)/</tag>
|
||||
Driver for the Protovision 4-player adapter contributed by Groepaz. See
|
||||
<url url="http://www.protovision-online.de/hardw/hardwstart.htm"> for prices and
|
||||
building instructions. Up to two joysticks are supported.
|
||||
<url url="http://www.protovision-online.de/hardw/4_player.php?language=en"
|
||||
name="Protovision shop"> for prices and building instructions. Up to two
|
||||
joysticks are supported.
|
||||
|
||||
<tag><tt/pet-stdjoy.joy (pet_stdjoy_joy)/</tag>
|
||||
Driver for the standard PET userport joystick.
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<title>sim65 Users Guide
|
||||
<author><url url="mailto:polluks@sdf.lonestar.org" name="Stefan A. Haubenthal">
|
||||
<date>2016-01-05
|
||||
<date>2016-07-05
|
||||
|
||||
<abstract>
|
||||
sim65 is a simulator for 6502 and 65C02 CPUs. It allows to test target
|
||||
@ -31,12 +31,14 @@ The simulator is called as follows:
|
||||
Usage: sim65 [options] file [arguments]
|
||||
Short options:
|
||||
-h Help (this text)
|
||||
-c Print amount of executed CPU cycles
|
||||
-v Increase verbosity
|
||||
-V Print the simulator version number
|
||||
-x <num> Exit simulator after <num> cycles
|
||||
|
||||
Long options:
|
||||
--help Help (this text)
|
||||
--cycles Print amount of executed CPU cycles
|
||||
--verbose Increase verbosity
|
||||
--version Print the simulator version number
|
||||
</verb></tscreen>
|
||||
@ -53,6 +55,13 @@ Here is a description of all the command line options:
|
||||
Print the short option summary shown above.
|
||||
|
||||
|
||||
<tag><tt>-c, --cycles</tt></tag>
|
||||
|
||||
Print the number of executed CPU cycles when the program terminates.
|
||||
The cycles for the final "<tt>jmp exit</tt>" are not included in this
|
||||
count.
|
||||
|
||||
|
||||
<tag><tt>-v, --verbose</tt></tag>
|
||||
|
||||
Increase the simulator verbosity.
|
||||
|
@ -49,6 +49,7 @@ Short options:
|
||||
|
||||
Long options:
|
||||
--convert-to fmt[,attrlist] Convert into target format
|
||||
--dump-palette Dump palette as table
|
||||
--help Help (this text)
|
||||
--list-conversions List all possible conversions
|
||||
--pop Restore the original loaded image
|
||||
@ -76,6 +77,12 @@ attribute lists see <ref id="attr-lists" name="below">.
|
||||
see section <ref id="conversions" name="Conversions">.
|
||||
|
||||
|
||||
<label id="option--dump-palette">
|
||||
<tag><tt>--dump-palette</tt></tag>
|
||||
|
||||
Dump palette as table.
|
||||
|
||||
|
||||
<label id="option--help">
|
||||
<tag><tt>-h, --help</tt></tag>
|
||||
|
||||
|
@ -161,8 +161,9 @@ The default drivers, <tt/joy_stddrv (joy_static_stddrv)/, point to <tt/vic20-std
|
||||
|
||||
<tag><tt/vic20-ptvjoy.joy (vic20_ptvjoy_joy)/</tag>
|
||||
Driver for the Protovision 4-player adapter contributed by Groepaz. See
|
||||
<url url="http://www.protovision-online.de/hardw/hardwstart.htm"> for prices and
|
||||
building instructions. Up to three joysticks are supported.
|
||||
<url url="http://www.protovision-online.de/hardw/4_player.php?language=en"
|
||||
name="Protovision shop"> for prices and building instructions. Up to three
|
||||
joysticks are supported.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
@ -50,6 +50,7 @@ typedef unsigned size_t;
|
||||
#define CPU_6502 0
|
||||
#define CPU_65C02 1
|
||||
#define CPU_65816 2
|
||||
#define CPU_4510 3
|
||||
|
||||
unsigned char getcpu (void);
|
||||
/* Detect the CPU the program is running on */
|
||||
|
26
include/_riot.h
Normal file
26
include/_riot.h
Normal file
@ -0,0 +1,26 @@
|
||||
/*****************************************************************************/
|
||||
/* */
|
||||
/* Atari VCS 2600 RIOT registers addresses */
|
||||
/* */
|
||||
/* Source: DASM - vcs.h */
|
||||
/* */
|
||||
/* Florent Flament (contact@florentflament.com), 2017 */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
/* RIOT registers */
|
||||
struct __riot {
|
||||
unsigned char swcha;
|
||||
unsigned char swacnt;
|
||||
unsigned char swchb;
|
||||
unsigned char swbcnt;
|
||||
unsigned char intim;
|
||||
unsigned char timint;
|
||||
|
||||
unsigned char unused[14];
|
||||
|
||||
unsigned char tim1t;
|
||||
unsigned char tim8t;
|
||||
unsigned char tim64t;
|
||||
unsigned char t1024t;
|
||||
};
|
100
include/_tia.h
Normal file
100
include/_tia.h
Normal file
@ -0,0 +1,100 @@
|
||||
/*****************************************************************************/
|
||||
/* */
|
||||
/* Atari VCS 2600 TIA registers addresses */
|
||||
/* */
|
||||
/* Source: DASM - vcs.h */
|
||||
/* */
|
||||
/* Florent Flament (contact@florentflament.com), 2017 */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
/* TIA write / read registers */
|
||||
struct __tia {
|
||||
union {
|
||||
unsigned char vsync;
|
||||
unsigned char cxm0p;
|
||||
};
|
||||
union {
|
||||
unsigned char vblank;
|
||||
unsigned char cxm1p;
|
||||
};
|
||||
union {
|
||||
unsigned char wsync;
|
||||
unsigned char cxp0fb;
|
||||
};
|
||||
union {
|
||||
unsigned char rsync;
|
||||
unsigned char cxp1fb;
|
||||
};
|
||||
union {
|
||||
unsigned char nusiz0;
|
||||
unsigned char cxm0fb;
|
||||
};
|
||||
union {
|
||||
unsigned char nusiz1;
|
||||
unsigned char cxm1fb;
|
||||
};
|
||||
union {
|
||||
unsigned char colup0;
|
||||
unsigned char cxblpf;
|
||||
};
|
||||
union {
|
||||
unsigned char colup1;
|
||||
unsigned char cxppmm;
|
||||
};
|
||||
union {
|
||||
unsigned char colupf;
|
||||
unsigned char inpt0;
|
||||
};
|
||||
union {
|
||||
unsigned char colubk;
|
||||
unsigned char inpt1;
|
||||
};
|
||||
union {
|
||||
unsigned char ctrlpf;
|
||||
unsigned char inpt2;
|
||||
};
|
||||
union {
|
||||
unsigned char refp0;
|
||||
unsigned char inpt3;
|
||||
};
|
||||
union {
|
||||
unsigned char refp1;
|
||||
unsigned char inpt4;
|
||||
};
|
||||
union {
|
||||
unsigned char pf0;
|
||||
unsigned char inpt5;
|
||||
};
|
||||
unsigned char pf1;
|
||||
unsigned char pf2;
|
||||
unsigned char resp0;
|
||||
unsigned char resp1;
|
||||
unsigned char resm0;
|
||||
unsigned char resm1;
|
||||
unsigned char resbl;
|
||||
unsigned char audc0;
|
||||
unsigned char audc1;
|
||||
unsigned char audf0;
|
||||
unsigned char audf1;
|
||||
unsigned char audv0;
|
||||
unsigned char audv1;
|
||||
unsigned char grp0;
|
||||
unsigned char grp1;
|
||||
unsigned char enam0;
|
||||
unsigned char enam1;
|
||||
unsigned char enabl;
|
||||
unsigned char hmp0;
|
||||
unsigned char hmp1;
|
||||
unsigned char hmm0;
|
||||
unsigned char hmm1;
|
||||
unsigned char hmbl;
|
||||
unsigned char vdelp0;
|
||||
unsigned char vdelp1;
|
||||
unsigned char vdelbl;
|
||||
unsigned char resmp0;
|
||||
unsigned char resmp1;
|
||||
unsigned char hmove;
|
||||
unsigned char hmclr;
|
||||
unsigned char cxclr;
|
||||
};
|
@ -161,11 +161,12 @@ extern void __fastcall__ _scroll (signed char numlines);
|
||||
/* numlines < 0 scrolls down */
|
||||
|
||||
/* misc. functions */
|
||||
extern unsigned char get_ostype(void); /* get ROM version */
|
||||
extern unsigned char get_tv(void); /* get TV system */
|
||||
extern void _save_vecs(void); /* save system vectors */
|
||||
extern void _rest_vecs(void); /* restore system vectors */
|
||||
extern char *_getdefdev(void); /* get default floppy device */
|
||||
extern unsigned char get_ostype(void); /* get ROM version */
|
||||
extern unsigned char get_tv(void); /* get TV system */
|
||||
extern void _save_vecs(void); /* save system vectors */
|
||||
extern void _rest_vecs(void); /* restore system vectors */
|
||||
extern char *_getdefdev(void); /* get default floppy device */
|
||||
extern unsigned char _is_cmdline_dos(void); /* does DOS support command lines */
|
||||
|
||||
/* global variables */
|
||||
extern unsigned char _dos_type; /* the DOS flavour */
|
||||
@ -261,11 +262,11 @@ extern void atrx15p2_tgi[];
|
||||
#define AT_PAL 1
|
||||
|
||||
/* valid _dos_type values */
|
||||
#define ATARIDOS 0
|
||||
#define SPARTADOS 1
|
||||
#define OSADOS 2
|
||||
#define MYDOS 3
|
||||
#define XDOS 4
|
||||
#define SPARTADOS 0
|
||||
#define OSADOS 1
|
||||
#define XDOS 2
|
||||
#define ATARIDOS 3
|
||||
#define MYDOS 4
|
||||
#define NODOS 255
|
||||
|
||||
/* Define hardware */
|
||||
|
26
include/atari2600.h
Normal file
26
include/atari2600.h
Normal file
@ -0,0 +1,26 @@
|
||||
/*****************************************************************************/
|
||||
/* */
|
||||
/* Atari VCS 2600 TIA & RIOT registers addresses */
|
||||
/* */
|
||||
/* Source: DASM Version 1.05 - vcs.h */
|
||||
/* */
|
||||
/* Florent Flament (contact@florentflament.com), 2017 */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifndef _ATARI2600_H
|
||||
#define _ATARI2600_H
|
||||
|
||||
/* Check for errors */
|
||||
#if !defined(__ATARI2600__)
|
||||
# error This module may only be used when compiling for the Atari 2600!
|
||||
#endif
|
||||
|
||||
#include <_tia.h>
|
||||
#define TIA (*(struct __tia*)0x0000)
|
||||
|
||||
#include <_riot.h>
|
||||
#define RIOT (*(struct __riot*)0x0280)
|
||||
|
||||
/* End of atari2600.h */
|
||||
#endif /* #ifndef _ATARI2600_H */
|
304
include/atari_atascii_charmap.h
Normal file
304
include/atari_atascii_charmap.h
Normal file
@ -0,0 +1,304 @@
|
||||
/*****************************************************************************/
|
||||
/* */
|
||||
/* atari_atascii_charmap.h */
|
||||
/* */
|
||||
/* Atari system standard string mapping (ISO-8859-1 -> AtASCII) */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2016 Christian Krueger */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
/* warranty. In no event will the authors be held liable for any damages */
|
||||
/* arising from the use of this software. */
|
||||
/* */
|
||||
/* Permission is granted to anyone to use this software for any purpose, */
|
||||
/* including commercial applications, and to alter it and redistribute it */
|
||||
/* freely, subject to the following restrictions: */
|
||||
/* */
|
||||
/* 1. The origin of this software must not be misrepresented; you must not */
|
||||
/* claim that you wrote the original software. If you use this software */
|
||||
/* in a product, an acknowledgment in the product documentation would be */
|
||||
/* appreciated but is not required. */
|
||||
/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||
/* be misrepresented as being the original software. */
|
||||
/* 3. This notice may not be removed or altered from any source */
|
||||
/* distribution. */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
/* No include guard here! Multiple use in one file may be intentional. */
|
||||
|
||||
#pragma charmap (0x00, 0x00)
|
||||
#pragma charmap (0x01, 0x01)
|
||||
#pragma charmap (0x02, 0x02)
|
||||
#pragma charmap (0x03, 0x03)
|
||||
#pragma charmap (0x04, 0x04)
|
||||
#pragma charmap (0x05, 0x05)
|
||||
#pragma charmap (0x06, 0x06)
|
||||
#pragma charmap (0x07, 0xFD)
|
||||
#pragma charmap (0x08, 0x08)
|
||||
#pragma charmap (0x09, 0x7F)
|
||||
#pragma charmap (0x0A, 0x9B)
|
||||
#pragma charmap (0x0B, 0x0B)
|
||||
#pragma charmap (0x0C, 0x7D)
|
||||
#pragma charmap (0x0D, 0x0D)
|
||||
#pragma charmap (0x0E, 0x0E)
|
||||
#pragma charmap (0x0F, 0x0F)
|
||||
|
||||
#pragma charmap (0x10, 0x10)
|
||||
#pragma charmap (0x11, 0x11)
|
||||
#pragma charmap (0x12, 0x12)
|
||||
#pragma charmap (0x13, 0x13)
|
||||
#pragma charmap (0x14, 0x14)
|
||||
#pragma charmap (0x15, 0x15)
|
||||
#pragma charmap (0x16, 0x16)
|
||||
#pragma charmap (0x17, 0x17)
|
||||
#pragma charmap (0x18, 0x18)
|
||||
#pragma charmap (0x19, 0x19)
|
||||
#pragma charmap (0x1A, 0x1A)
|
||||
#pragma charmap (0x1B, 0x1B)
|
||||
#pragma charmap (0x1C, 0x1C)
|
||||
#pragma charmap (0x1D, 0x1D)
|
||||
#pragma charmap (0x1E, 0x1E)
|
||||
#pragma charmap (0x1F, 0x1F)
|
||||
|
||||
#pragma charmap (0x20, 0x20)
|
||||
#pragma charmap (0x21, 0x21)
|
||||
#pragma charmap (0x22, 0x22)
|
||||
#pragma charmap (0x23, 0x23)
|
||||
#pragma charmap (0x24, 0x24)
|
||||
#pragma charmap (0x25, 0x25)
|
||||
#pragma charmap (0x26, 0x26)
|
||||
#pragma charmap (0x27, 0x27)
|
||||
#pragma charmap (0x28, 0x28)
|
||||
#pragma charmap (0x29, 0x29)
|
||||
#pragma charmap (0x2A, 0x2A)
|
||||
#pragma charmap (0x2B, 0x2B)
|
||||
#pragma charmap (0x2C, 0x2C)
|
||||
#pragma charmap (0x2D, 0x2D)
|
||||
#pragma charmap (0x2E, 0x2E)
|
||||
#pragma charmap (0x2F, 0x2F)
|
||||
|
||||
#pragma charmap (0x30, 0x30)
|
||||
#pragma charmap (0x31, 0x31)
|
||||
#pragma charmap (0x32, 0x32)
|
||||
#pragma charmap (0x33, 0x33)
|
||||
#pragma charmap (0x34, 0x34)
|
||||
#pragma charmap (0x35, 0x35)
|
||||
#pragma charmap (0x36, 0x36)
|
||||
#pragma charmap (0x37, 0x37)
|
||||
#pragma charmap (0x38, 0x38)
|
||||
#pragma charmap (0x39, 0x39)
|
||||
#pragma charmap (0x3A, 0x3A)
|
||||
#pragma charmap (0x3B, 0x3B)
|
||||
#pragma charmap (0x3C, 0x3C)
|
||||
#pragma charmap (0x3D, 0x3D)
|
||||
#pragma charmap (0x3E, 0x3E)
|
||||
#pragma charmap (0x3F, 0x3F)
|
||||
|
||||
#pragma charmap (0x40, 0x40)
|
||||
#pragma charmap (0x41, 0x41)
|
||||
#pragma charmap (0x42, 0x42)
|
||||
#pragma charmap (0x43, 0x43)
|
||||
#pragma charmap (0x44, 0x44)
|
||||
#pragma charmap (0x45, 0x45)
|
||||
#pragma charmap (0x46, 0x46)
|
||||
#pragma charmap (0x47, 0x47)
|
||||
#pragma charmap (0x48, 0x48)
|
||||
#pragma charmap (0x49, 0x49)
|
||||
#pragma charmap (0x4A, 0x4A)
|
||||
#pragma charmap (0x4B, 0x4B)
|
||||
#pragma charmap (0x4C, 0x4C)
|
||||
#pragma charmap (0x4D, 0x4D)
|
||||
#pragma charmap (0x4E, 0x4E)
|
||||
#pragma charmap (0x4F, 0x4F)
|
||||
|
||||
#pragma charmap (0x50, 0x50)
|
||||
#pragma charmap (0x51, 0x51)
|
||||
#pragma charmap (0x52, 0x52)
|
||||
#pragma charmap (0x53, 0x53)
|
||||
#pragma charmap (0x54, 0x54)
|
||||
#pragma charmap (0x55, 0x55)
|
||||
#pragma charmap (0x56, 0x56)
|
||||
#pragma charmap (0x57, 0x57)
|
||||
#pragma charmap (0x58, 0x58)
|
||||
#pragma charmap (0x59, 0x59)
|
||||
#pragma charmap (0x5A, 0x5A)
|
||||
#pragma charmap (0x5B, 0x5B)
|
||||
#pragma charmap (0x5C, 0x5C)
|
||||
#pragma charmap (0x5D, 0x5D)
|
||||
#pragma charmap (0x5E, 0x5E)
|
||||
#pragma charmap (0x5F, 0x5F)
|
||||
|
||||
#pragma charmap (0x60, 0x60)
|
||||
#pragma charmap (0x61, 0x61)
|
||||
#pragma charmap (0x62, 0x62)
|
||||
#pragma charmap (0x63, 0x63)
|
||||
#pragma charmap (0x64, 0x64)
|
||||
#pragma charmap (0x65, 0x65)
|
||||
#pragma charmap (0x66, 0x66)
|
||||
#pragma charmap (0x67, 0x67)
|
||||
#pragma charmap (0x68, 0x68)
|
||||
#pragma charmap (0x69, 0x69)
|
||||
#pragma charmap (0x6A, 0x6A)
|
||||
#pragma charmap (0x6B, 0x6B)
|
||||
#pragma charmap (0x6C, 0x6C)
|
||||
#pragma charmap (0x6D, 0x6D)
|
||||
#pragma charmap (0x6E, 0x6E)
|
||||
#pragma charmap (0x6F, 0x6F)
|
||||
|
||||
#pragma charmap (0x70, 0x70)
|
||||
#pragma charmap (0x71, 0x71)
|
||||
#pragma charmap (0x72, 0x72)
|
||||
#pragma charmap (0x73, 0x73)
|
||||
#pragma charmap (0x74, 0x74)
|
||||
#pragma charmap (0x75, 0x75)
|
||||
#pragma charmap (0x76, 0x76)
|
||||
#pragma charmap (0x77, 0x77)
|
||||
#pragma charmap (0x78, 0x78)
|
||||
#pragma charmap (0x79, 0x79)
|
||||
#pragma charmap (0x7A, 0x7A)
|
||||
#pragma charmap (0x7B, 0x7B)
|
||||
#pragma charmap (0x7C, 0x7C)
|
||||
#pragma charmap (0x7D, 0x7D)
|
||||
#pragma charmap (0x7E, 0x7E)
|
||||
#pragma charmap (0x7F, 0x7F)
|
||||
|
||||
#pragma charmap (0x80, 0x80)
|
||||
#pragma charmap (0x81, 0x81)
|
||||
#pragma charmap (0x82, 0x82)
|
||||
#pragma charmap (0x83, 0x83)
|
||||
#pragma charmap (0x84, 0x84)
|
||||
#pragma charmap (0x85, 0x85)
|
||||
#pragma charmap (0x86, 0x86)
|
||||
#pragma charmap (0x87, 0x87)
|
||||
#pragma charmap (0x88, 0x88)
|
||||
#pragma charmap (0x89, 0x89)
|
||||
#pragma charmap (0x8A, 0x8A)
|
||||
#pragma charmap (0x8B, 0x8B)
|
||||
#pragma charmap (0x8C, 0x8C)
|
||||
#pragma charmap (0x8D, 0x8D)
|
||||
#pragma charmap (0x8E, 0x8E)
|
||||
#pragma charmap (0x8F, 0x8F)
|
||||
|
||||
#pragma charmap (0x90, 0x90)
|
||||
#pragma charmap (0x91, 0x91)
|
||||
#pragma charmap (0x92, 0x92)
|
||||
#pragma charmap (0x93, 0x93)
|
||||
#pragma charmap (0x94, 0x94)
|
||||
#pragma charmap (0x95, 0x95)
|
||||
#pragma charmap (0x96, 0x96)
|
||||
#pragma charmap (0x97, 0x97)
|
||||
#pragma charmap (0x98, 0x98)
|
||||
#pragma charmap (0x99, 0x99)
|
||||
#pragma charmap (0x9A, 0x9A)
|
||||
#pragma charmap (0x9B, 0x9B)
|
||||
#pragma charmap (0x9C, 0x9C)
|
||||
#pragma charmap (0x9D, 0x9D)
|
||||
#pragma charmap (0x9E, 0x9E)
|
||||
#pragma charmap (0x9F, 0x9F)
|
||||
|
||||
#pragma charmap (0xA0, 0xA0)
|
||||
#pragma charmap (0xA1, 0xA1)
|
||||
#pragma charmap (0xA2, 0xA2)
|
||||
#pragma charmap (0xA3, 0xA3)
|
||||
#pragma charmap (0xA4, 0xA4)
|
||||
#pragma charmap (0xA5, 0xA5)
|
||||
#pragma charmap (0xA6, 0xA6)
|
||||
#pragma charmap (0xA7, 0xA7)
|
||||
#pragma charmap (0xA8, 0xA8)
|
||||
#pragma charmap (0xA9, 0xA9)
|
||||
#pragma charmap (0xAA, 0xAA)
|
||||
#pragma charmap (0xAB, 0xAB)
|
||||
#pragma charmap (0xAC, 0xAC)
|
||||
#pragma charmap (0xAD, 0xAD)
|
||||
#pragma charmap (0xAE, 0xAE)
|
||||
#pragma charmap (0xAF, 0xAF)
|
||||
|
||||
#pragma charmap (0xB0, 0xB0)
|
||||
#pragma charmap (0xB1, 0xB1)
|
||||
#pragma charmap (0xB2, 0xB2)
|
||||
#pragma charmap (0xB3, 0xB3)
|
||||
#pragma charmap (0xB4, 0xB4)
|
||||
#pragma charmap (0xB5, 0xB5)
|
||||
#pragma charmap (0xB6, 0xB6)
|
||||
#pragma charmap (0xB7, 0xB7)
|
||||
#pragma charmap (0xB8, 0xB8)
|
||||
#pragma charmap (0xB9, 0xB9)
|
||||
#pragma charmap (0xBA, 0xBA)
|
||||
#pragma charmap (0xBB, 0xBB)
|
||||
#pragma charmap (0xBC, 0xBC)
|
||||
#pragma charmap (0xBD, 0xBD)
|
||||
#pragma charmap (0xBE, 0xBE)
|
||||
#pragma charmap (0xBF, 0xBF)
|
||||
|
||||
#pragma charmap (0xC0, 0xC0)
|
||||
#pragma charmap (0xC1, 0xC1)
|
||||
#pragma charmap (0xC2, 0xC2)
|
||||
#pragma charmap (0xC3, 0xC3)
|
||||
#pragma charmap (0xC4, 0xC4)
|
||||
#pragma charmap (0xC5, 0xC5)
|
||||
#pragma charmap (0xC6, 0xC6)
|
||||
#pragma charmap (0xC7, 0xC7)
|
||||
#pragma charmap (0xC8, 0xC8)
|
||||
#pragma charmap (0xC9, 0xC9)
|
||||
#pragma charmap (0xCA, 0xCA)
|
||||
#pragma charmap (0xCB, 0xCB)
|
||||
#pragma charmap (0xCC, 0xCC)
|
||||
#pragma charmap (0xCD, 0xCD)
|
||||
#pragma charmap (0xCE, 0xCE)
|
||||
#pragma charmap (0xCF, 0xCF)
|
||||
|
||||
#pragma charmap (0xD0, 0xD0)
|
||||
#pragma charmap (0xD1, 0xD1)
|
||||
#pragma charmap (0xD2, 0xD2)
|
||||
#pragma charmap (0xD3, 0xD3)
|
||||
#pragma charmap (0xD4, 0xD4)
|
||||
#pragma charmap (0xD5, 0xD5)
|
||||
#pragma charmap (0xD6, 0xD6)
|
||||
#pragma charmap (0xD7, 0xD7)
|
||||
#pragma charmap (0xD8, 0xD8)
|
||||
#pragma charmap (0xD9, 0xD9)
|
||||
#pragma charmap (0xDA, 0xDA)
|
||||
#pragma charmap (0xDB, 0xDB)
|
||||
#pragma charmap (0xDC, 0xDC)
|
||||
#pragma charmap (0xDD, 0xDD)
|
||||
#pragma charmap (0xDE, 0xDE)
|
||||
#pragma charmap (0xDF, 0xDF)
|
||||
|
||||
#pragma charmap (0xE0, 0xE0)
|
||||
#pragma charmap (0xE1, 0xE1)
|
||||
#pragma charmap (0xE2, 0xE2)
|
||||
#pragma charmap (0xE3, 0xE3)
|
||||
#pragma charmap (0xE4, 0xE4)
|
||||
#pragma charmap (0xE5, 0xE5)
|
||||
#pragma charmap (0xE6, 0xE6)
|
||||
#pragma charmap (0xE7, 0xE7)
|
||||
#pragma charmap (0xE8, 0xE8)
|
||||
#pragma charmap (0xE9, 0xE9)
|
||||
#pragma charmap (0xEA, 0xEA)
|
||||
#pragma charmap (0xEB, 0xEB)
|
||||
#pragma charmap (0xEC, 0xEC)
|
||||
#pragma charmap (0xED, 0xED)
|
||||
#pragma charmap (0xEE, 0xEE)
|
||||
#pragma charmap (0xEF, 0xEF)
|
||||
|
||||
#pragma charmap (0xF0, 0xF0)
|
||||
#pragma charmap (0xF1, 0xF1)
|
||||
#pragma charmap (0xF2, 0xF2)
|
||||
#pragma charmap (0xF3, 0xF3)
|
||||
#pragma charmap (0xF4, 0xF4)
|
||||
#pragma charmap (0xF5, 0xF5)
|
||||
#pragma charmap (0xF6, 0xF6)
|
||||
#pragma charmap (0xF7, 0xF7)
|
||||
#pragma charmap (0xF8, 0xF8)
|
||||
#pragma charmap (0xF9, 0xF9)
|
||||
#pragma charmap (0xFA, 0xFA)
|
||||
#pragma charmap (0xFB, 0xFB)
|
||||
#pragma charmap (0xFC, 0xFC)
|
||||
#pragma charmap (0xFD, 0xFD)
|
||||
#pragma charmap (0xFE, 0xFE)
|
||||
#pragma charmap (0xFF, 0xFF)
|
||||
|
310
include/atari_screen_charmap.h
Normal file
310
include/atari_screen_charmap.h
Normal file
@ -0,0 +1,310 @@
|
||||
/*****************************************************************************/
|
||||
/* */
|
||||
/* atari_screen_charmap.h */
|
||||
/* */
|
||||
/* Atari system internal string mapping (ISO-8859-1 -> Internal/Screen-Code) */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2016 Christian Krueger */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
/* warranty. In no event will the authors be held liable for any damages */
|
||||
/* arising from the use of this software. */
|
||||
/* */
|
||||
/* Permission is granted to anyone to use this software for any purpose, */
|
||||
/* including commercial applications, and to alter it and redistribute it */
|
||||
/* freely, subject to the following restrictions: */
|
||||
/* */
|
||||
/* 1. The origin of this software must not be misrepresented; you must not */
|
||||
/* claim that you wrote the original software. If you use this software */
|
||||
/* in a product, an acknowledgment in the product documentation would be */
|
||||
/* appreciated but is not required. */
|
||||
/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||
/* be misrepresented as being the original software. */
|
||||
/* 3. This notice may not be removed or altered from any source */
|
||||
/* distribution. */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
/* No include guard here! Multiple use in one file may be intentional. */
|
||||
|
||||
#pragma warn (remap-zero, push, off)
|
||||
#pragma charmap (0x00, 0x40)
|
||||
#pragma warn (remap-zero, pop)
|
||||
|
||||
#pragma charmap (0x01, 0x41)
|
||||
#pragma charmap (0x02, 0x42)
|
||||
#pragma charmap (0x03, 0x43)
|
||||
#pragma charmap (0x04, 0x44)
|
||||
#pragma charmap (0x05, 0x45)
|
||||
#pragma charmap (0x06, 0x46)
|
||||
#pragma charmap (0x07, 0xFD)
|
||||
#pragma charmap (0x08, 0x48)
|
||||
#pragma charmap (0x09, 0x7F)
|
||||
#pragma charmap (0x0A, 0xDB)
|
||||
#pragma charmap (0x0B, 0x4B)
|
||||
#pragma charmap (0x0C, 0x7D)
|
||||
#pragma charmap (0x0D, 0x4D)
|
||||
#pragma charmap (0x0E, 0x4E)
|
||||
#pragma charmap (0x0F, 0x4F)
|
||||
|
||||
#pragma charmap (0x10, 0x50)
|
||||
#pragma charmap (0x11, 0x51)
|
||||
#pragma charmap (0x12, 0x52)
|
||||
#pragma charmap (0x13, 0x53)
|
||||
#pragma charmap (0x14, 0x54)
|
||||
#pragma charmap (0x15, 0x55)
|
||||
#pragma charmap (0x16, 0x56)
|
||||
#pragma charmap (0x17, 0x57)
|
||||
#pragma charmap (0x18, 0x58)
|
||||
#pragma charmap (0x19, 0x59)
|
||||
#pragma charmap (0x1A, 0x5A)
|
||||
#pragma charmap (0x1B, 0x5B)
|
||||
#pragma charmap (0x1C, 0x5C)
|
||||
#pragma charmap (0x1D, 0x5D)
|
||||
#pragma charmap (0x1E, 0x5E)
|
||||
#pragma charmap (0x1F, 0x5F)
|
||||
|
||||
#pragma warn (remap-zero, push, off)
|
||||
#pragma charmap (0x20, 0x00)
|
||||
#pragma warn (remap-zero, pop)
|
||||
|
||||
#pragma charmap (0x21, 0x01)
|
||||
#pragma charmap (0x22, 0x02)
|
||||
#pragma charmap (0x23, 0x03)
|
||||
#pragma charmap (0x24, 0x04)
|
||||
#pragma charmap (0x25, 0x05)
|
||||
#pragma charmap (0x26, 0x06)
|
||||
#pragma charmap (0x27, 0x07)
|
||||
#pragma charmap (0x28, 0x08)
|
||||
#pragma charmap (0x29, 0x09)
|
||||
#pragma charmap (0x2A, 0x0A)
|
||||
#pragma charmap (0x2B, 0x0B)
|
||||
#pragma charmap (0x2C, 0x0C)
|
||||
#pragma charmap (0x2D, 0x0D)
|
||||
#pragma charmap (0x2E, 0x0E)
|
||||
#pragma charmap (0x2F, 0x0F)
|
||||
|
||||
#pragma charmap (0x30, 0x10)
|
||||
#pragma charmap (0x31, 0x11)
|
||||
#pragma charmap (0x32, 0x12)
|
||||
#pragma charmap (0x33, 0x13)
|
||||
#pragma charmap (0x34, 0x14)
|
||||
#pragma charmap (0x35, 0x15)
|
||||
#pragma charmap (0x36, 0x16)
|
||||
#pragma charmap (0x37, 0x17)
|
||||
#pragma charmap (0x38, 0x18)
|
||||
#pragma charmap (0x39, 0x19)
|
||||
#pragma charmap (0x3A, 0x1A)
|
||||
#pragma charmap (0x3B, 0x1B)
|
||||
#pragma charmap (0x3C, 0x1C)
|
||||
#pragma charmap (0x3D, 0x1D)
|
||||
#pragma charmap (0x3E, 0x1E)
|
||||
#pragma charmap (0x3F, 0x1F)
|
||||
|
||||
#pragma charmap (0x40, 0x20)
|
||||
#pragma charmap (0x41, 0x21)
|
||||
#pragma charmap (0x42, 0x22)
|
||||
#pragma charmap (0x43, 0x23)
|
||||
#pragma charmap (0x44, 0x24)
|
||||
#pragma charmap (0x45, 0x25)
|
||||
#pragma charmap (0x46, 0x26)
|
||||
#pragma charmap (0x47, 0x27)
|
||||
#pragma charmap (0x48, 0x28)
|
||||
#pragma charmap (0x49, 0x29)
|
||||
#pragma charmap (0x4A, 0x2A)
|
||||
#pragma charmap (0x4B, 0x2B)
|
||||
#pragma charmap (0x4C, 0x2C)
|
||||
#pragma charmap (0x4D, 0x2D)
|
||||
#pragma charmap (0x4E, 0x2E)
|
||||
#pragma charmap (0x4F, 0x2F)
|
||||
|
||||
#pragma charmap (0x50, 0x30)
|
||||
#pragma charmap (0x51, 0x31)
|
||||
#pragma charmap (0x52, 0x32)
|
||||
#pragma charmap (0x53, 0x33)
|
||||
#pragma charmap (0x54, 0x34)
|
||||
#pragma charmap (0x55, 0x35)
|
||||
#pragma charmap (0x56, 0x36)
|
||||
#pragma charmap (0x57, 0x37)
|
||||
#pragma charmap (0x58, 0x38)
|
||||
#pragma charmap (0x59, 0x39)
|
||||
#pragma charmap (0x5A, 0x3A)
|
||||
#pragma charmap (0x5B, 0x3B)
|
||||
#pragma charmap (0x5C, 0x3C)
|
||||
#pragma charmap (0x5D, 0x3D)
|
||||
#pragma charmap (0x5E, 0x3E)
|
||||
#pragma charmap (0x5F, 0x3F)
|
||||
|
||||
#pragma charmap (0x60, 0x60)
|
||||
#pragma charmap (0x61, 0x61)
|
||||
#pragma charmap (0x62, 0x62)
|
||||
#pragma charmap (0x63, 0x63)
|
||||
#pragma charmap (0x64, 0x64)
|
||||
#pragma charmap (0x65, 0x65)
|
||||
#pragma charmap (0x66, 0x66)
|
||||
#pragma charmap (0x67, 0x67)
|
||||
#pragma charmap (0x68, 0x68)
|
||||
#pragma charmap (0x69, 0x69)
|
||||
#pragma charmap (0x6A, 0x6A)
|
||||
#pragma charmap (0x6B, 0x6B)
|
||||
#pragma charmap (0x6C, 0x6C)
|
||||
#pragma charmap (0x6D, 0x6D)
|
||||
#pragma charmap (0x6E, 0x6E)
|
||||
#pragma charmap (0x6F, 0x6F)
|
||||
|
||||
#pragma charmap (0x70, 0x70)
|
||||
#pragma charmap (0x71, 0x71)
|
||||
#pragma charmap (0x72, 0x72)
|
||||
#pragma charmap (0x73, 0x73)
|
||||
#pragma charmap (0x74, 0x74)
|
||||
#pragma charmap (0x75, 0x75)
|
||||
#pragma charmap (0x76, 0x76)
|
||||
#pragma charmap (0x77, 0x77)
|
||||
#pragma charmap (0x78, 0x78)
|
||||
#pragma charmap (0x79, 0x79)
|
||||
#pragma charmap (0x7A, 0x7A)
|
||||
#pragma charmap (0x7B, 0x7B)
|
||||
#pragma charmap (0x7C, 0x7C)
|
||||
#pragma charmap (0x7D, 0x7D)
|
||||
#pragma charmap (0x7E, 0x7E)
|
||||
#pragma charmap (0x7F, 0x7F)
|
||||
|
||||
#pragma charmap (0x80, 0xC0)
|
||||
#pragma charmap (0x81, 0xC1)
|
||||
#pragma charmap (0x82, 0xC2)
|
||||
#pragma charmap (0x83, 0xC3)
|
||||
#pragma charmap (0x84, 0xC4)
|
||||
#pragma charmap (0x85, 0xC5)
|
||||
#pragma charmap (0x86, 0xC6)
|
||||
#pragma charmap (0x87, 0xC7)
|
||||
#pragma charmap (0x88, 0xC8)
|
||||
#pragma charmap (0x89, 0xC9)
|
||||
#pragma charmap (0x8A, 0xCA)
|
||||
#pragma charmap (0x8B, 0xCB)
|
||||
#pragma charmap (0x8C, 0xCC)
|
||||
#pragma charmap (0x8D, 0xCD)
|
||||
#pragma charmap (0x8E, 0xCE)
|
||||
#pragma charmap (0x8F, 0xCF)
|
||||
|
||||
#pragma charmap (0x90, 0xD0)
|
||||
#pragma charmap (0x91, 0xD1)
|
||||
#pragma charmap (0x92, 0xD2)
|
||||
#pragma charmap (0x93, 0xD3)
|
||||
#pragma charmap (0x94, 0xD4)
|
||||
#pragma charmap (0x95, 0xD5)
|
||||
#pragma charmap (0x96, 0xD6)
|
||||
#pragma charmap (0x97, 0xD7)
|
||||
#pragma charmap (0x98, 0xD8)
|
||||
#pragma charmap (0x99, 0xD9)
|
||||
#pragma charmap (0x9A, 0xDA)
|
||||
#pragma charmap (0x9B, 0xDB)
|
||||
#pragma charmap (0x9C, 0xDC)
|
||||
#pragma charmap (0x9D, 0xDD)
|
||||
#pragma charmap (0x9E, 0xDE)
|
||||
#pragma charmap (0x9F, 0xDF)
|
||||
|
||||
#pragma charmap (0xA0, 0x80)
|
||||
#pragma charmap (0xA1, 0x81)
|
||||
#pragma charmap (0xA2, 0x82)
|
||||
#pragma charmap (0xA3, 0x83)
|
||||
#pragma charmap (0xA4, 0x84)
|
||||
#pragma charmap (0xA5, 0x85)
|
||||
#pragma charmap (0xA6, 0x86)
|
||||
#pragma charmap (0xA7, 0x87)
|
||||
#pragma charmap (0xA8, 0x88)
|
||||
#pragma charmap (0xA9, 0x89)
|
||||
#pragma charmap (0xAA, 0x8A)
|
||||
#pragma charmap (0xAB, 0x8B)
|
||||
#pragma charmap (0xAC, 0x8C)
|
||||
#pragma charmap (0xAD, 0x8D)
|
||||
#pragma charmap (0xAE, 0x8E)
|
||||
#pragma charmap (0xAF, 0x8F)
|
||||
|
||||
#pragma charmap (0xB0, 0x90)
|
||||
#pragma charmap (0xB1, 0x91)
|
||||
#pragma charmap (0xB2, 0x92)
|
||||
#pragma charmap (0xB3, 0x93)
|
||||
#pragma charmap (0xB4, 0x94)
|
||||
#pragma charmap (0xB5, 0x95)
|
||||
#pragma charmap (0xB6, 0x96)
|
||||
#pragma charmap (0xB7, 0x97)
|
||||
#pragma charmap (0xB8, 0x98)
|
||||
#pragma charmap (0xB9, 0x99)
|
||||
#pragma charmap (0xBA, 0x9A)
|
||||
#pragma charmap (0xBB, 0x9B)
|
||||
#pragma charmap (0xBC, 0x9C)
|
||||
#pragma charmap (0xBD, 0x9D)
|
||||
#pragma charmap (0xBE, 0x9E)
|
||||
#pragma charmap (0xBF, 0x9F)
|
||||
|
||||
#pragma charmap (0xC0, 0xA0)
|
||||
#pragma charmap (0xC1, 0xA1)
|
||||
#pragma charmap (0xC2, 0xA2)
|
||||
#pragma charmap (0xC3, 0xA3)
|
||||
#pragma charmap (0xC4, 0xA4)
|
||||
#pragma charmap (0xC5, 0xA5)
|
||||
#pragma charmap (0xC6, 0xA6)
|
||||
#pragma charmap (0xC7, 0xA7)
|
||||
#pragma charmap (0xC8, 0xA8)
|
||||
#pragma charmap (0xC9, 0xA9)
|
||||
#pragma charmap (0xCA, 0xAA)
|
||||
#pragma charmap (0xCB, 0xAB)
|
||||
#pragma charmap (0xCC, 0xAC)
|
||||
#pragma charmap (0xCD, 0xAD)
|
||||
#pragma charmap (0xCE, 0xAE)
|
||||
#pragma charmap (0xCF, 0xAF)
|
||||
|
||||
#pragma charmap (0xD0, 0xB0)
|
||||
#pragma charmap (0xD1, 0xB1)
|
||||
#pragma charmap (0xD2, 0xB2)
|
||||
#pragma charmap (0xD3, 0xB3)
|
||||
#pragma charmap (0xD4, 0xB4)
|
||||
#pragma charmap (0xD5, 0xB5)
|
||||
#pragma charmap (0xD6, 0xB6)
|
||||
#pragma charmap (0xD7, 0xB7)
|
||||
#pragma charmap (0xD8, 0xB8)
|
||||
#pragma charmap (0xD9, 0xB9)
|
||||
#pragma charmap (0xDA, 0xBA)
|
||||
#pragma charmap (0xDB, 0xBB)
|
||||
#pragma charmap (0xDC, 0xBC)
|
||||
#pragma charmap (0xDD, 0xBD)
|
||||
#pragma charmap (0xDE, 0xBE)
|
||||
#pragma charmap (0xDF, 0xBF)
|
||||
|
||||
#pragma charmap (0xE0, 0xE0)
|
||||
#pragma charmap (0xE1, 0xE1)
|
||||
#pragma charmap (0xE2, 0xE2)
|
||||
#pragma charmap (0xE3, 0xE3)
|
||||
#pragma charmap (0xE4, 0xE4)
|
||||
#pragma charmap (0xE5, 0xE5)
|
||||
#pragma charmap (0xE6, 0xE6)
|
||||
#pragma charmap (0xE7, 0xE7)
|
||||
#pragma charmap (0xE8, 0xE8)
|
||||
#pragma charmap (0xE9, 0xE9)
|
||||
#pragma charmap (0xEA, 0xEA)
|
||||
#pragma charmap (0xEB, 0xEB)
|
||||
#pragma charmap (0xEC, 0xEC)
|
||||
#pragma charmap (0xED, 0xED)
|
||||
#pragma charmap (0xEE, 0xEE)
|
||||
#pragma charmap (0xEF, 0xEF)
|
||||
|
||||
#pragma charmap (0xF0, 0xF0)
|
||||
#pragma charmap (0xF1, 0xF1)
|
||||
#pragma charmap (0xF2, 0xF2)
|
||||
#pragma charmap (0xF3, 0xF3)
|
||||
#pragma charmap (0xF4, 0xF4)
|
||||
#pragma charmap (0xF5, 0xF5)
|
||||
#pragma charmap (0xF6, 0xF6)
|
||||
#pragma charmap (0xF7, 0xF7)
|
||||
#pragma charmap (0xF8, 0xF8)
|
||||
#pragma charmap (0xF9, 0xF9)
|
||||
#pragma charmap (0xFA, 0xFA)
|
||||
#pragma charmap (0xFB, 0xFB)
|
||||
#pragma charmap (0xFC, 0xFC)
|
||||
#pragma charmap (0xFD, 0xFD)
|
||||
#pragma charmap (0xFE, 0xFE)
|
||||
#pragma charmap (0xFF, 0xFF)
|
||||
|
@ -187,10 +187,12 @@ unsigned int __fastcall__ cbm_k_load(unsigned char flag, unsigned addr);
|
||||
unsigned char cbm_k_open (void);
|
||||
unsigned char cbm_k_readst (void);
|
||||
unsigned char __fastcall__ cbm_k_save(unsigned int start, unsigned int end);
|
||||
void cbm_k_scnkey (void);
|
||||
void __fastcall__ cbm_k_setlfs (unsigned char LFN, unsigned char DEV,
|
||||
unsigned char SA);
|
||||
void __fastcall__ cbm_k_setnam (const char* Name);
|
||||
void __fastcall__ cbm_k_talk (unsigned char dev);
|
||||
void cbm_k_udtim (void);
|
||||
void cbm_k_unlsn (void);
|
||||
|
||||
|
||||
|
@ -85,6 +85,11 @@ int __fastcall__ cc65_cos (unsigned x);
|
||||
** is in 8.8 fixed point format, which means that 1.0 = $100 and -1.0 = $FF00.
|
||||
*/
|
||||
|
||||
unsigned char doesclrscrafterexit (void);
|
||||
/* Indicates whether the screen automatically be cleared after program
|
||||
** termination.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* End of cc65.h */
|
||||
|
@ -72,7 +72,8 @@ extern int _errno;
|
||||
#define ESPIPE 14 /* Illegal seek */
|
||||
#define ERANGE 15 /* Range error */
|
||||
#define EBADF 16 /* Bad file number */
|
||||
#define EUNKNOWN 17 /* Unknown OS specific error */
|
||||
#define ENOEXEC 17 /* Exec format error */
|
||||
#define EUNKNOWN 18 /* Unknown OS specific error */
|
||||
|
||||
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
ifneq ($(shell echo),)
|
||||
CMD_EXE = 1
|
||||
endif
|
||||
@ -18,6 +19,7 @@ TARGETS = apple2 \
|
||||
apple2enh \
|
||||
atari \
|
||||
atarixl \
|
||||
atari2600 \
|
||||
atari5200 \
|
||||
atmos \
|
||||
creativision \
|
||||
@ -38,13 +40,13 @@ DRVTYPES = emd \
|
||||
ser \
|
||||
tgi
|
||||
|
||||
OUTPUTDIRS := lib \
|
||||
$(DRVTYPES) \
|
||||
targetutil \
|
||||
asminc \
|
||||
cfg \
|
||||
include \
|
||||
$(subst ../,,$(filter-out $(wildcard ../include/*.*),$(wildcard ../include/*)))
|
||||
OUTPUTDIRS := lib \
|
||||
asminc \
|
||||
cfg \
|
||||
include \
|
||||
$(subst ../,,$(filter-out $(wildcard ../include/*.*),$(wildcard ../include/*)))\
|
||||
$(subst ../,,$(wildcard ../target/*/drv/*))\
|
||||
$(subst ../,,$(wildcard ../target/*/util))\
|
||||
|
||||
.PHONY: all mostlyclean clean install zip lib $(TARGETS)
|
||||
|
||||
@ -78,7 +80,7 @@ mostlyclean:
|
||||
$(call RMDIR,../libwrk)
|
||||
|
||||
clean:
|
||||
$(call RMDIR,../libwrk ../lib ../targetutil $(addprefix ../,$(DRVTYPES)))
|
||||
$(call RMDIR,../libwrk ../lib ../target)
|
||||
|
||||
ifdef CMD_EXE
|
||||
|
||||
@ -92,7 +94,7 @@ define INSTALL_recipe
|
||||
|
||||
$(if $(prefix),,$(error variable `prefix' must be set))
|
||||
$(INSTALL) -d $(DESTDIR)$(datadir)/$(dir)
|
||||
$(INSTALL) -m644 ../$(dir)/*.* $(DESTDIR)$(datadir)/$(dir)
|
||||
$(INSTALL) -m0644 ../$(dir)/*.* $(DESTDIR)$(datadir)/$(dir)
|
||||
|
||||
endef # INSTALL_recipe
|
||||
|
||||
@ -213,7 +215,7 @@ define DRVTYPE_template
|
||||
$1_SRCDIR = $$(SRCDIR)/$1
|
||||
$1_STCDIR = ../libwrk/$$(TARGET)
|
||||
$1_DYNDIR = ../libwrk/$$(TARGET)/$1
|
||||
$1_DRVDIR = ../$1
|
||||
$1_DRVDIR = ../target/$$(TARGET)/drv/$1
|
||||
|
||||
$1_SRCPAT = $$($1_SRCDIR)/$$(OBJPFX)%.s
|
||||
$1_STCPAT = $$($1_STCDIR)/$$(OBJPFX)%-$1.o
|
||||
@ -284,7 +286,7 @@ $(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../lib
|
||||
../lib/$(TARGET).lib: $(OBJS) | ../lib
|
||||
$(AR65) a $@ $?
|
||||
|
||||
../libwrk/$(TARGET) ../lib ../targetutil:
|
||||
../libwrk/$(TARGET) ../lib ../target/$(TARGET)/util:
|
||||
@$(call MKDIR,$@)
|
||||
|
||||
$(TARGET): $(EXTRA_OBJS) ../lib/$(TARGET).lib
|
||||
|
81
libsrc/apple2/_sys.s
Normal file
81
libsrc/apple2/_sys.s
Normal file
@ -0,0 +1,81 @@
|
||||
;
|
||||
; void __fastcall__ _sys (struct regs* r);
|
||||
;
|
||||
|
||||
.export __sys
|
||||
.import jmpvec
|
||||
|
||||
.include "zeropage.inc"
|
||||
|
||||
.segment "LOWCODE"
|
||||
|
||||
__sys: sta ptr1
|
||||
stx ptr1+1 ; Save the pointer to r
|
||||
|
||||
; Fetch the PC and store it into the jump vector
|
||||
ldy #5
|
||||
lda (ptr1),y
|
||||
sta jmpvec+2
|
||||
dey
|
||||
lda (ptr1),y
|
||||
sta jmpvec+1
|
||||
|
||||
; Remember the flags so we can restore them to a known state after calling the
|
||||
; routine
|
||||
php
|
||||
|
||||
; Get the flags, keep the state of bit 4 and 5 using the other flags from
|
||||
; the flags value passed by the caller. Push the new flags and push A.
|
||||
dey
|
||||
php
|
||||
pla ; Current flags -> A
|
||||
eor (ptr1),y
|
||||
and #%00110000
|
||||
eor (ptr1),y
|
||||
pha ; Push new flags value
|
||||
ldy #0
|
||||
lda (ptr1),y
|
||||
pha
|
||||
|
||||
; Get and assign X and Y
|
||||
iny
|
||||
lda (ptr1),y
|
||||
tax
|
||||
iny
|
||||
lda (ptr1),y
|
||||
tay
|
||||
|
||||
; Switch in ROM
|
||||
bit $C082
|
||||
|
||||
; Set A and the flags, call the machine code routine
|
||||
pla
|
||||
plp
|
||||
jsr jmpvec
|
||||
|
||||
; Back from the routine. Save the flags and A.
|
||||
php
|
||||
pha
|
||||
|
||||
; Switch in LC bank 2 for R/O
|
||||
bit $C080
|
||||
|
||||
; Put the register values into the regs structure
|
||||
tya
|
||||
ldy #2
|
||||
sta (ptr1),y
|
||||
dey
|
||||
txa
|
||||
sta (ptr1),y
|
||||
dey
|
||||
pla
|
||||
sta (ptr1),y
|
||||
ldy #3
|
||||
pla
|
||||
sta (ptr1),y
|
||||
|
||||
; Restore the old flags value
|
||||
plp
|
||||
|
||||
; Done
|
||||
rts
|
@ -6,12 +6,11 @@
|
||||
;
|
||||
|
||||
.export _cclearxy, _cclear
|
||||
.import popa, _gotoxy, chlinedirect
|
||||
.import gotoxy, chlinedirect
|
||||
|
||||
_cclearxy:
|
||||
pha ; Save the length
|
||||
jsr popa ; Get y
|
||||
jsr _gotoxy ; Call this one, will pop params
|
||||
jsr gotoxy ; Call this one, will pop params
|
||||
pla ; Restore the length and run into _cclear
|
||||
|
||||
_cclear:
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user