f***@hotmail.com
2018-01-16 05:51:39 UTC
Hello All!
I'm having trouble turning on and off the 80-column firmware within my machine language programs. The ProDOS 8 tech ref suggests this will work to turn the firmware off...
LDA #$15 ;Character that turns off video firmware
JSR $C300 ;Print it to the video firmware
It doesn't work. $C300 will start 80-column mode but disconnects ProDOS and messes up some vectors so that TRACE is on when you return to applesoft.
OK, so lets pass it to the command buffer instead...
ORG $1000
LDA #$D0
STA $200
LDA #$D2
STA $201
LDA #$A3
STA $202
LDA #$B3
STA $203
LDA #$8D
STA $204
JSR $BE03 ; DOSCMD "PR#3<Return>"
It doesn't work.
I looked at some other programs like Bitsy Bye and noticed they don't do any calls to ProDOS and just hit some softswitches during their init routines (to turn things off).
STA $C00C ; Turn off 80-column Display
STA $C000 ; Turn off AUX memory mode
JSR $FE93 ; F8ROM:SETVID
JSR $FE89 ; F8ROM:SETKBD
JSR $FB2F ; Set TEXT mode
JSR $FC58 ; Clear screen (HOME)
OK seems good but doesn't exit cleanly back to BASIC unless I call PR#3 before running my ML routine. The initial $c300 call messes up the vectors.
I would like to start 80 col in ML, run my program, and then have it exit cleanly back to BASIC in 40 column mode. What am I doing wrong here?
Frank
I'm having trouble turning on and off the 80-column firmware within my machine language programs. The ProDOS 8 tech ref suggests this will work to turn the firmware off...
LDA #$15 ;Character that turns off video firmware
JSR $C300 ;Print it to the video firmware
It doesn't work. $C300 will start 80-column mode but disconnects ProDOS and messes up some vectors so that TRACE is on when you return to applesoft.
OK, so lets pass it to the command buffer instead...
ORG $1000
LDA #$D0
STA $200
LDA #$D2
STA $201
LDA #$A3
STA $202
LDA #$B3
STA $203
LDA #$8D
STA $204
JSR $BE03 ; DOSCMD "PR#3<Return>"
It doesn't work.
I looked at some other programs like Bitsy Bye and noticed they don't do any calls to ProDOS and just hit some softswitches during their init routines (to turn things off).
STA $C00C ; Turn off 80-column Display
STA $C000 ; Turn off AUX memory mode
JSR $FE93 ; F8ROM:SETVID
JSR $FE89 ; F8ROM:SETKBD
JSR $FB2F ; Set TEXT mode
JSR $FC58 ; Clear screen (HOME)
OK seems good but doesn't exit cleanly back to BASIC unless I call PR#3 before running my ML routine. The initial $c300 call messes up the vectors.
I would like to start 80 col in ML, run my program, and then have it exit cleanly back to BASIC in 40 column mode. What am I doing wrong here?
Frank