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

PUTBASIC and ! or pling command does not tokenise correctly onto disk. #64

Closed
mikroman opened this issue Oct 26, 2021 · 11 comments
Closed

Comments

@mikroman
Copy link

No description provided.

@ZornsLemma
Copy link
Collaborator

Hi mikroman,

Which version of beebasm are you using? I'm not aware of any changes in this area recently but it might be worth trying a version built from the proposed-updates branch (https://github.com/stardot/beebasm/tree/proposed-updates) and/or the lhs-token-fix branch (https://github.com/stardot/beebasm/tree/ZornsLemma/lhs-token-fix).

Do you have a test case which shows the problem? ! does seem to tokenise correctly in at least some cases (e.g. https://github.com/stardot/beebasm/blob/ZornsLemma/lhs-token-fix/test/3-directives/basiclhstoken.bas). If you can attach a test case to this issue I'll see if I can work out what's going wrong.

Cheers.

Steve

@mikroman
Copy link
Author

Premature with this issue. I have just realized that it does work. I have found that some BASIC programs seem to behave oddly when encountered and fail. I have to find the two programs that fail and the two that work. I will get back to you.

@mikroman
Copy link
Author

mikroman commented Oct 27, 2021

In one case I replaced the pling with four "POKES" instead. The program worked correctly from then on. so....
Version 4.17 btw

@mikroman
Copy link
Author

mikroman commented Oct 28, 2021

Example #1
PLANET1.txt
Line 910 !&80=TIME EORRND
was replaced by
920 ?&80=206
930 ?&81=173
940 ?&82=2
950 ?&83=45

Because one of the four: the pling, time or eor or rnd is not functioning correctly.

@ZornsLemma
Copy link
Collaborator

Thanks, I can reproduce that failure with v1.09. I think you are being hit by #45, which is fixed on the proposed-updates branch.

There is a similar BASIC tokenisation bug (#63) which I recently fixed on the ZornsLemma/lhs-token-fix branch - that includes all the proposed-updates changes as well, so that's probably your best bet at this point.

Please give one of those branches a try and let me know how you get on. I've tried both of them and they both tokenise your line 910 correctly.

@mikroman
Copy link
Author

Wow, thanks for your effort. Greatly appreciated. I will look and test some more.

@mikroman
Copy link
Author

That branch requires a build of the program which I'm not set up to do. My C is definitely not sharp. I could use an executable if you could make that possible.

@ZornsLemma
Copy link
Collaborator

ZornsLemma commented Oct 28, 2021

I'm assume you're looking for a Windows executable? Unfortunately I don't use that myself so I can't help. If you post over on the beebasm thread at stardot someone else will probably be able to help out though. (I'm guessing you're mikroman_3526 over there?)

(If you're on Linux on x86-64 I can build you an executable, but I suspect that's no help.)

@mikroman
Copy link
Author

mikroman commented Oct 29, 2021

OK. No prob. I did find some help in that area
I am happy to report that I resolved my issue.
This line needed a space between the (?&276b and MOD16)
370 PROCADJUST(1,(?&276B MOD16)+10*(?&276B DIV16),2,"SHIPS PER GAME",99,1,1):?&276B=EVAL("&"+STR$(R%))

@mikroman
Copy link
Author

I'm assume you're looking for a Windows executable? Unfortunately I don't use that myself so I can't help. If you post over on the beebasm thread at stardot someone else will probably be able to help out though. (I'm guessing you're mikroman_3526 over there?)

(If you're on Linux on x86-64 I can build you an executable, but I suspect that's no help.)

I am mikroman_3526

@ZornsLemma
Copy link
Collaborator

ZornsLemma commented Oct 29, 2021

Thanks, I'm glad it worked!

I think the need for a space before "MOD" is a bug; I don't know how easy it will be to fix (I haven't even tried yet; I half hope someone else will take a look before I get round to it :-) ) but I've raised #65 for this anyway so it doesn't get forgotten.

If you're happy the "pling" issue is fixed, please close this issue.

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

No branches or pull requests

2 participants