1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-25 22:18:27 +00:00

moved cart header into seperate file, moved nmi stub into several file, tweaked linker config

This commit is contained in:
mrdudz
2015-11-29 16:01:36 +01:00
parent 1893e24da9
commit c636675521
8 changed files with 53 additions and 50 deletions
+3 -24
View File
@@ -1,33 +1,16 @@
.export __STARTUP__ : absolute = 1 ; Mark as startup
.export Start, _exit
.import initlib, donelib, callmain
.import push0, _main, zerobss, copydata
.import IRQStub
; Linker generated symbols
.import __RAM_START__, __RAM_SIZE__
.import __ROM_START__, __ROM_SIZE__
.import __STARTUP_LOAD__,__STARTUP_RUN__, __STARTUP_SIZE__
.import __CODE_LOAD__,__CODE_RUN__, __CODE_SIZE__
.import __RODATA_LOAD__,__RODATA_RUN__, __RODATA_SIZE__
.include "zeropage.inc"
.include "gamate.inc"
.segment "STARTUP"
.word 0 ; +00 checksum from 7000-7fff (simple 8bit adds)
.byte 1, 0, 1 ; +02 flags
.byte "COPYRIGHT BIT CORPORATION", 0, $ff ; +05 copyright
; system vectors
jmp reset ; +20 reset entry
jmp nmi ; +23 nmi entry
jmp IRQStub ; +26 irq entry (135 hz)
;-------------------------------------------------------------------------------
reset:
Start:
; setup the CPU and System-IRQ
; Initialize CPU
@@ -67,12 +50,8 @@ _exit:
jsr donelib ; Run module destructors
; reset (start over)
jmp reset
jmp Start
.export initmainargs
initmainargs:
rts
;-------------------------------------------------------------------------------
nmi:
rts
+16
View File
@@ -0,0 +1,16 @@
; The following symbol is used by linker config to force the module
; to get included into the output file
.export __STARTUP__: absolute = 1
.import Start, IRQStub, NMIStub
.segment "STARTUP"
.word 0 ; +00 checksum from 7000-7fff (simple 8bit adds)
.byte 1, 0, 1 ; +02 flags
.byte "COPYRIGHT BIT CORPORATION", 0, $ff ; +05 copyright
; system vectors
jmp Start ; +20 reset entry
jmp NMIStub ; +23 nmi entry
jmp IRQStub ; +26 irq entry (135 hz)
+7
View File
@@ -0,0 +1,7 @@
;
; NMI handling (Gamate version)
;
.export NMIStub
NMIStub:
rts