move macros to enable and disable the ROM into a separate include file

This commit is contained in:
Christian Groessler
2013-09-19 23:21:09 +02:00
parent 47a6390753
commit 60e97f4d96
4 changed files with 97 additions and 85 deletions

View File

@@ -0,0 +1,73 @@
;
; Macros to disable and enable the ROM on Atari XL systems.
;
; Christian Groessler, chris@groessler.org, 19-Sep-2013
;
.ifdef __ATARIXL__
USEWSYNC= 1
.if USEWSYNC
.macro wsync
sta WSYNC
.endmacro
.else
.macro wsync
.endmacro
.endif
.macro disable_rom
lda PORTB
and #$fe
wsync
sta PORTB
lda #>__CHARGEN_START__
sta CHBAS
sta CHBASE
.endmacro
.macro disable_rom_quick
lda PORTB
and #$fe
sta PORTB
lda #>__CHARGEN_START__
sta CHBAS
sta CHBASE
.endmacro
.macro disable_rom_val val
lda val
wsync
sta PORTB
lda #>__CHARGEN_START__
sta CHBAS
sta CHBASE
.endmacro
.macro enable_rom
lda PORTB
ora #1
wsync
sta PORTB
lda #$E0
sta CHBAS
sta CHBASE
.endmacro
.macro enable_rom_quick
lda PORTB
ora #1
sta PORTB
lda #$E0
sta CHBAS
sta CHBASE
.endmacro
.else ; above __ATARIXL__, below not
.macro disable_rom
.endmacro
.macro enable_rom
.endmacro
.endif