1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-04 13:29:35 +00:00

Some small first changes for the 'atarixl' target.

This commit is contained in:
Christian Groessler 2013-05-30 02:30:19 +02:00
parent 34cf7657e8
commit 06f441e90f
2 changed files with 41 additions and 0 deletions

View File

@ -18,6 +18,7 @@
.include "zeropage.inc"
.include "atari.inc"
.include "save_area.inc"
; ------------------------------------------------------------------------
; EXE header
@ -25,6 +26,11 @@
.segment "EXEHDR"
.word $FFFF
.if .defined(__ATARIXL__)
.segment "MAINHDR"
.endif
.word __STARTUP_LOAD__
.word __ZPSAVE_LOAD__ - 1
@ -57,6 +63,8 @@ L1: lda sp,x
tsx
stx spsave
.if .not .defined(__ATARIXL__)
; Report memory usage
lda APPMHI
@ -74,6 +82,16 @@ L1: lda sp,x
sta APPMHI+1
sta sp+1 ; setup runtime stack part 2
.else
; for now... needs to use value from linker script later
lda MEMTOP
sta sp
lda MEMTOP+1
sta sp+1
.endif
; Call module constructors
jsr initlib
@ -119,6 +137,8 @@ _exit: jsr donelib ; Run module destructors
lda old_shflok
sta SHFLOK
.if .not .defined(__ATARIXL__)
; Restore APPMHI
lda appmsav
@ -126,6 +146,23 @@ _exit: jsr donelib ; Run module destructors
lda appmsav+1
sta APPMHI+1
.else
; Atari XL target stuff...
lda PORTB_save
sta PORTB
lda MEMTOP_save
sta MEMTOP
lda MEMTOP_save+1
sta MEMTOP+1
lda APPMHI_save
sta APPMHI
lda APPMHI_save+1
sta APPMHI+1
.endif
; Copy back the zero page stuff
ldx #zpspace-1

View File

@ -40,6 +40,10 @@
.export _get_ostype
.if .defined(__ATARIXL__)
.warning "fix me!"
.endif
.proc _get_ostype
lda $fcd8