c64-io_monitor icon indicating copy to clipboard operation
c64-io_monitor copied to clipboard

Don't reset to normal bank, and copy BASIC from ROM to RAM if already swapped out

Open davervw opened this issue 3 years ago • 6 comments

example: Durexforth reported by Whammo, BASIC

davervw avatar Dec 25 '21 07:12 davervw

An explicit method to set the memory bounds of the log.

Whammo avatar Dec 25 '21 21:12 Whammo

A function to return the length of the log.

Whammo avatar Dec 26 '21 04:12 Whammo

Durexforth takes care of it's own banking- on QUIT or run/stop restore it goes bank 6

Whammo avatar Dec 26 '21 05:12 Whammo

Good ideas, and thanks for the info on own banking -- sounds like it has its own NMI handler so control doesn't got back to BASIC. Makes sense.

davervw avatar Dec 26 '21 06:12 davervw

I upgraded the NMI handler to deal with rs232, and run/stop restore in this manner. :-)

Whammo avatar Dec 26 '21 06:12 Whammo

SYS is in the Kernal ROM so we hi-jacked it for Durexforth, and preserved the zero page for the register load/read.

( Calls Basic/Kernal routines.
  Uses ar/xr/yr/sr for register I/O. )
$30c value ar $30d value xr
$30e value yr $30f value sr
.C:2440  B5 3B       LDA $3B,X ; lsb from top of stack
.C:2442  85 14       STA $14      ; sys pointer
.C:2444  B5 73       LDA $73,X ; msb
.C:2446  85 15       STA $15   ; sys pointer
.C:2448  8A          TXA
.C:2449  48          PHA ; save forth stack pointer
.C:244a  20 30 E1    JSR $E130  ; sys call
.C:244d  68          PLA ; restore forth stack pointer
.C:244e  AA          TAX
.C:244f  E8          INX ; drop address from stack
.C:2450  60          RTS

Whammo avatar Dec 26 '21 08:12 Whammo