Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
davervw opened this issue Dec 25, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@davervw
Copy link
Owner

davervw commented Dec 25, 2021

example: Durexforth reported by Whammo, BASIC

@Whammo
Copy link

Whammo commented Dec 25, 2021

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

@Whammo
Copy link

Whammo commented Dec 26, 2021

A function to return the length of the log.

@Whammo
Copy link

Whammo commented Dec 26, 2021

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

@davervw
Copy link
Owner Author

davervw commented Dec 26, 2021

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.

@Whammo
Copy link

Whammo commented Dec 26, 2021

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

@davervw davervw added the bug Something isn't working label Dec 26, 2021
@Whammo
Copy link

Whammo commented Dec 26, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants