mirror of
https://github.com/cc65/cc65.git
synced 2024-10-06 01:55:47 +00:00
Some small first changes for the 'atarixl' target.
This commit is contained in:
parent
34cf7657e8
commit
06f441e90f
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
.include "zeropage.inc"
|
.include "zeropage.inc"
|
||||||
.include "atari.inc"
|
.include "atari.inc"
|
||||||
|
.include "save_area.inc"
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; EXE header
|
; EXE header
|
||||||
@ -25,6 +26,11 @@
|
|||||||
.segment "EXEHDR"
|
.segment "EXEHDR"
|
||||||
|
|
||||||
.word $FFFF
|
.word $FFFF
|
||||||
|
|
||||||
|
.if .defined(__ATARIXL__)
|
||||||
|
.segment "MAINHDR"
|
||||||
|
.endif
|
||||||
|
|
||||||
.word __STARTUP_LOAD__
|
.word __STARTUP_LOAD__
|
||||||
.word __ZPSAVE_LOAD__ - 1
|
.word __ZPSAVE_LOAD__ - 1
|
||||||
|
|
||||||
@ -57,6 +63,8 @@ L1: lda sp,x
|
|||||||
tsx
|
tsx
|
||||||
stx spsave
|
stx spsave
|
||||||
|
|
||||||
|
.if .not .defined(__ATARIXL__)
|
||||||
|
|
||||||
; Report memory usage
|
; Report memory usage
|
||||||
|
|
||||||
lda APPMHI
|
lda APPMHI
|
||||||
@ -74,6 +82,16 @@ L1: lda sp,x
|
|||||||
sta APPMHI+1
|
sta APPMHI+1
|
||||||
sta sp+1 ; setup runtime stack part 2
|
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
|
; Call module constructors
|
||||||
|
|
||||||
jsr initlib
|
jsr initlib
|
||||||
@ -119,6 +137,8 @@ _exit: jsr donelib ; Run module destructors
|
|||||||
lda old_shflok
|
lda old_shflok
|
||||||
sta SHFLOK
|
sta SHFLOK
|
||||||
|
|
||||||
|
.if .not .defined(__ATARIXL__)
|
||||||
|
|
||||||
; Restore APPMHI
|
; Restore APPMHI
|
||||||
|
|
||||||
lda appmsav
|
lda appmsav
|
||||||
@ -126,6 +146,23 @@ _exit: jsr donelib ; Run module destructors
|
|||||||
lda appmsav+1
|
lda appmsav+1
|
||||||
sta APPMHI+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
|
; Copy back the zero page stuff
|
||||||
|
|
||||||
ldx #zpspace-1
|
ldx #zpspace-1
|
||||||
|
@ -40,6 +40,10 @@
|
|||||||
|
|
||||||
.export _get_ostype
|
.export _get_ostype
|
||||||
|
|
||||||
|
.if .defined(__ATARIXL__)
|
||||||
|
.warning "fix me!"
|
||||||
|
.endif
|
||||||
|
|
||||||
.proc _get_ostype
|
.proc _get_ostype
|
||||||
|
|
||||||
lda $fcd8
|
lda $fcd8
|
||||||
|
Loading…
Reference in New Issue
Block a user