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

More o65 definitions

git-svn-id: svn://svn.cc65.org/cc65/trunk@1934 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2003-02-07 11:03:12 +00:00
parent b8ab2e23e4
commit 3f45fe8bd6
2 changed files with 28 additions and 1 deletions

View File

@ -54,6 +54,14 @@ O65_HDR_ZLEN = 22 ; Size of zp segment
O65_HDR_STACK = 24 ; Stacksize needed
O65_HDR_SIZE = 26 ; Size of header structure
; Marker, magic and version number
O65_MARKER_0 = $01
O65_MARKER_1 = $00
O65_MAGIC_0 = $6F ; 'o'
O65_MAGIC_1 = $36 ; '6'
O65_MAGIC_2 = $35 ; '5'
O65_VERSION = $00
; Defines for the mode word
O65_CPU_65816 = $8000 ; Executable is for 65816
O65_CPU_6502 = $0000 ; Executable is for the 6502
@ -81,6 +89,9 @@ O65_ALIGN_4 = $0002 ; Align longwords
O65_ALIGN_256 = $0003 ; Align pages (256 bytes)
O65_ALIGN_MASK = $0003 ; Mask to extract alignment
; The mode word as generated by the ld65 linker
O65_MODE_CC65 = O65_CPU_6502 | O65_RELOC_BYTE | O65_SIZE_16BIT | O65_FTYPE_EXE | O65_ADDR_SIMPLE | O65_ALIGN_1
; Relocation type codes
O65_RTYPE_WORD = $80
O65_RTYPE_HIGH = $40

View File

@ -52,7 +52,7 @@
typedef unsigned o65_size;
/* Define a structure that defines the o65 file header */
/* Structure that defines the o65 file header */
typedef struct o65_header o65_header;
struct o65_header {
char marker[2]; /* Non-C64 marker */
@ -72,6 +72,14 @@ struct o65_header {
/* Marker, magic and version number */
#define O65_MARKER_0 0x01
#define O65_MARKER_1 0x00
#define O65_MAGIC_0 0x6F /* 'o' */
#define O65_MAGIC_1 0x36 /* '6' */
#define O65_MAGIC_2 0x35 /* '5' */
#define O65_VERSION 0x00
/* Defines for the mode word */
#define O65_CPU_65816 0x8000 /* Executable is for 65816 */
#define O65_CPU_6502 0x0000 /* Executable is for the 6502 */
@ -99,6 +107,14 @@ struct o65_header {
#define O65_ALIGN_256 0x0003 /* Align pages (256 bytes) */
#define O65_ALIGN_MASK 0x0003 /* Mask to extract alignment */
/* The mode word as generated by the ld65 linker */
#define O65_MODE_CC65 (O65_CPU_6502 | \
O65_RELOC_BYTE | \
O65_SIZE_16BIT | \
O65_FTYPE_EXE | \
O65_ADDR_SIMPLE | \
O65_ALIGN_1)
/* The four o65 segment types. */
#define O65_SEG_UNDEF 0x00
#define O65_SEG_ABS 0x01