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

fix MOS format for testing using ugly hack. Bumped to 3.03.06mosfix1 #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BeeRed
Copy link

@BeeRed BeeRed commented Nov 14, 2022

Together with a friend we developed something for KIM1 using sbasm because we had trouble to create the MOS-file.
When uploading MOS format files to KIM1 it was not responding after transfer complete.
After changing the last line of the generated MOS-file manually the transfer was successful.
Then I changed sbasm to generate a MOS-file which is accepted from KIM1.
It maybe not the best way to implement this but this ugly hack works.

@sbprojects
Copy link
Owner

@BeeRed
Thanks for your patch. I'm happy it works for you. I will have to clean up the code a bit though. Your patch ignores the code/eeprom targets for instance.

I have a few questions:
The first question is about the checksum of the last line. The second link you mention states that the last line doesn't have a checksum, but instead repeats the record counter. By pure coincidence these two values can be the same (for short programs). My question is, does the KIM really require a checksum, or is it indeed a repeat of the record counter?

Is the XOFF character really necessary? It is not mentioned in the second link.

You haven't mentioned the 6 NULL bytes after each record. I assume they are not required? Perhaps they were there to slow down the communication to allow the teletype to keep up with the communication.

@sbprojects
Copy link
Owner

sbprojects commented Dec 2, 2022

@BeeRed
I have officially implemented a fix for the MOS end of file record for the KIM-1. The version of the latest release is now V3.03.07. You can read my comment on the matter on https://www.sbprojects.net/sbasm/directives.php?directive=tf at the end of the page.

@BeeRed
Copy link
Author

BeeRed commented Dec 13, 2022

KIM is processing the last record beginning with ";00" as all other records. (but it will stop reading records)
It will compute the checksum for next 2 bytes which is the number of records (normally the address)
because of zero data it go to the end and compare the next 2 bytes which is the expected checksum.
Depending on the result "ERR KIM" or "KIM" is sent to the terminal.

XOFF is not expected/checked
The 6 NULL bytes are not expected/checked but if included it will not hurt
because if a line is successfully processed ANY char is dropped/ignored until next ";" is seen.

The send to paper tape function will send out $0a, $0, $0, $0, $0, $0, $0 after checksum
think you are right this is to give old mechanical teletype some more time ant the end of the line.

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.

2 participants