1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-29 10:29:30 +00:00

Added atmos and new c16 target

git-svn-id: svn://svn.cc65.org/cc65/trunk@1580 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2002-11-22 02:31:12 +00:00
parent 133887acbd
commit 3274257528
4 changed files with 85 additions and 12 deletions

View File

@ -200,14 +200,16 @@ Here is a description of all the command line options:
<itemize>
<item>none
<item>apple2
<item>atari
<item>atmos
<item>c16 (works also for the c116 with memory up to 32K)
<item>c64
<item>c128
<item>plus4
<item>cbm510 (CBM-II series with 40 column video)
<item>cbm610 (all CBM-II II computers with 80 column video)
<item>pet (all CBM PET systems except the 2001)
<item>apple2
<item>geos
</itemize>
@ -516,6 +518,10 @@ The compiler defines several macros at startup:
This macro is defined if the target system is one of the CBM targets.
<tag><tt>__C16__</tt></tag>
This macro is defined if the target is the c16 (-t c16).
<tag><tt>__C64__</tt></tag>
This macro is defined if the target is the c64 (-t c64).

View File

@ -114,6 +114,15 @@ Supported systems at this time are: C64, C128, Plus/4, CBM 500, CBM 600/700,
the newer PET machines (not 2001), Atari 8bit, and the Apple ][ (thanks to
Kevin Ruland, who did the port).
C16: Works with unexpanded or memory expanded C16 and C116 machines.
However, a maximum of 32KB from the total memory is used. The Plus/4
target supports up to 64K of memory, but has a small code overhead
because of the banking routines involved. Apart from this additional
overhead, the Plus/4 target and the C16 target are the same. 16K
machines (unexpanded C16) have 12K of memory for C programs available,
machines with 32K or more have 28K available. The actual amount of
memory is auto detected.
C64: The program runs in a memory configuration, where only the kernal ROM
is enabled. The text screen is expected at the usual place ($400), so
50K of memory are available to the program.
@ -128,8 +137,8 @@ Plus/4: Unfortunately, the Plus/4 is not able to disable only part of it's
free memory is reduced to 12K).
CBM 500:
The C program runs in bank #0 and has a total of 48K memory available.
This is less than what is available on its bigger brothers (CBM
The C program runs in bank #0 and has a total of 48K memory available.
This is less than what is available on its bigger brothers (CBM
600/700) because the character data and video RAM is placed in the
execution bank (#0) to allow the use of sprites.
@ -179,10 +188,7 @@ assembler file.
Example, insert a break instruction into the code:
asm ("\t.byte\t$00")
Note: The \t in the string is replaced by the tab character, as in all other
strings.
asm ("brk")
Beware: Be careful when inserting inline code since this may collide with
the work of the optimizer.
@ -201,7 +207,9 @@ functions results and pass parameters.
This feature is useful with inline assembly and macros. For example, a macro
that reads a CRTC register may be written like this:
#define wr(idx) (__AX__=(idx), \
asm("\tsta\t$2000\n\tlda\t$2000\n\tldx\t#$00"), \
#define wr(idx) (__AX__=(idx), \
asm ("sta $2000"), \
asm ("lda $2000"), \
asm ("ldx #$00"), \
__AX__)

View File

@ -118,14 +118,16 @@ Here is a description of all the command line options:
<itemize>
<item>none
<item>apple2
<item>atari
<item>atmos
<item>c16 (works also for the c116 with memory up to 32K)
<item>c64
<item>c128
<item>plus4
<item>cbm510 (CBM-II series with 40 column video)
<item>cbm610 (all CBM series-II computers with 80 column video)
<item>pet (all CBM PET systems except the 2001)
<item>apple2
<item>geos
</itemize>
@ -785,6 +787,62 @@ types:
}
</verb></tscreen>
<tag><tt>atmos</tt></tag>
<tscreen><verb>
MEMORY {
ZP: start = $02, size = $1A, type = rw, define = yes;
RAM: start = $0600, size = $9200, define = yes, file = %O;
}
SEGMENTS {
CODE: load = RAM, type = wprot;
RODATA: load = RAM, type = wprot;
DATA: load = RAM, type = rw;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
}
FEATURES {
CONDES: segment = RODATA,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = RODATA,
type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__;
}
SYMBOLS {
__STACKSIZE__ = $800; # 2K stack
}
</verb></tscreen>
<tag><tt>c16</tt></tag>
<tscreen><verb>
MEMORY {
ZP: start = $02, size = $1A, type = rw;
RAM: start = $0fff, size = $7001, file = %O;
}
SEGMENTS {
CODE: load = RAM, type = wprot;
RODATA: load = RAM, type = wprot;
DATA: load = RAM, type = rw;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
}
FEATURES {
CONDES: segment = RODATA,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = RODATA,
type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__;
}
SYMBOLS {
__STACKSIZE__ = $800; # 2K stack
}
</verb></tscreen>
<tag><tt>c64</tt></tag>
<tscreen><verb>
MEMORY {
@ -802,7 +860,7 @@ types:
CONDES: segment = RODATA,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = RODATA,
type = destructor,
label = __DESTRUCTOR_TABLE__,
@ -829,7 +887,7 @@ types:
FEATURES {
CONDES: segment = RODATA,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = RODATA,
type = destructor,

View File

@ -168,6 +168,7 @@ portable. conio implementations exist for the following targets:
<itemize>
<item>atari
<item>c16 (works also for the c116 with up to 32K memory)
<item>c64
<item>c128
<item>plus4