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

Starting to get MBASIC.com to work #51

Merged
merged 11 commits into from
Apr 28, 2024
Merged

Starting to get MBASIC.com to work #51

merged 11 commits into from
Apr 28, 2024

Conversation

skx
Copy link
Owner

@skx skx commented Apr 27, 2024

This pull-request allows MBASIC.COM to launch and run :)

Once complete it will close #49, and as part of the implementation changes introduced in this pull-request #50 will also be closed.

There are two main changes to get MBASIC running, and that is largely because it is not a "well-behaved" application:

  • We setup fake entrypoints in the zero-page.
    • This ensures that the various RST XXX instructions will ultimately jump to our handlers.
    • This is necessary because mbasic is not well-behaved, and doesn't invoke CP/M functions via call 0x0005.
  • We implemented the aux I/O routines.
    • The output routine attempts to convert vt52/adm3a to ANSI

This pull-request, as-is, works well enough to launch and operate mbasic however there are some spurious output characters that need to be eliminated..

skx added 7 commits April 27, 2024 09:47
This pull-request allows MBASIC.COM to launch and run :)

There are two main changes here:

* We setup fake entrypoints in the zero-page.
  * Such that RST XXX instructions will jump to our handlers.
  * This is done via a fake "OUT 0xFF, N"
* We implemented the aux I/O routines.
  * The output routine attempts to convert vt52/adm3a to ANSI
  * However even with this in place we see stray characters.

NOTE: "LIST" and "PRINT" are blocked, and require you to press RETURN.
      This will be addressed soon.
@skx
Copy link
Owner Author

skx commented Apr 27, 2024

OK current state:

  • tastybasic works.
  • mbasic works
    • BUT it produces spurious output characters.

I can either fix the spurious output, and merge this. Or I can say "works - merge", and later fix it up.

The work to add the io/ package has resolve #50 though. I think.

@skx
Copy link
Owner Author

skx commented Apr 27, 2024

So previously I said:

BUT it produces spurious output characters.

All the code uses A_READ and A_WRITE for its functionality, however the spurious characters are coming from calls to C_WRITE - which should not be happening.

Since it is "illadvised" to mix AUX and CON functions I think I just disable the C_WRITE call after A_READ or A_WRITE have been used. Needs to be tested.

Unless something is wrong in my indirection, via OUT, I think this is a weird issue to see. Seems like the cause is easy to understand, but the reason? Bug? Unexpected thing I'm missing?

@skx skx merged commit 72f0da9 into master Apr 28, 2024
2 checks passed
@skx skx deleted the 49-mbasic branch April 28, 2024 03:50
@skx skx mentioned this pull request Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MBASIC.com binary does not work
1 participant