BobApplegate
Experienced Member
Over the past few weeks I have been working a lot with the Microsoft 6502 BASIC from pagetable:
https://www.pagetable.com/?p=46
The KIM-1 version (kb9) works perfectly as-is, but as I started to expand the code, all sorts of weird things began happening and I’m wondering if anyone else has experienced similar things.
In general, I found that adding more code seems to break some integer/floating point functionality. My first change was to add about 100 bytes to the SAVE/LOAD logic and then doing a LIST would show some line numbers as floating point rather than integers. The line numbers are stored as 16 bit integers, but doing a LIST would sometimes print weird line numbers like 9.97694 rather than 10.
The other oddity is adding a new keyword broken things like interpretation of floating point numbers such as “FOR X=1 to 10 STEP .5” would always return X as the value 1.
The “source code” has been reformatted quite a few times and isn’t the original Microsoft code. Even the “original” code has comments saying it has been reformatted. The intent of the code on pagetable is to reproduce the binary image of multiple versions of 6502 BASIC, which it does nicely. However, it’s not true source and seems to have errors that only appear if changes are made.
Has anyone else looked into these problems are maybe solved some? I figured I’d ask before digging into the code more than I already have.
Bob
https://www.pagetable.com/?p=46
The KIM-1 version (kb9) works perfectly as-is, but as I started to expand the code, all sorts of weird things began happening and I’m wondering if anyone else has experienced similar things.
In general, I found that adding more code seems to break some integer/floating point functionality. My first change was to add about 100 bytes to the SAVE/LOAD logic and then doing a LIST would show some line numbers as floating point rather than integers. The line numbers are stored as 16 bit integers, but doing a LIST would sometimes print weird line numbers like 9.97694 rather than 10.
The other oddity is adding a new keyword broken things like interpretation of floating point numbers such as “FOR X=1 to 10 STEP .5” would always return X as the value 1.
The “source code” has been reformatted quite a few times and isn’t the original Microsoft code. Even the “original” code has comments saying it has been reformatted. The intent of the code on pagetable is to reproduce the binary image of multiple versions of 6502 BASIC, which it does nicely. However, it’s not true source and seems to have errors that only appear if changes are made.
Has anyone else looked into these problems are maybe solved some? I figured I’d ask before digging into the code more than I already have.
Bob