-
Notifications
You must be signed in to change notification settings - Fork 20
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
Unsupported Commands from other Atari Basics #31
Comments
Hi!
Thanks!. I think we could write a documentation "porting Atari BASIC programs", that explains the lack of GOTO/GOSUB and how to re-arrange your programs. I'm not very good at writing (specially in English), so any help is welcomed! Have Fun! |
Many of the programs I am looking to convert were written in the original Atari Basic, or later ported to Turbo Basic XL, OSS Basic XL / XE. Written before the conventions of Structured Programming became wide spread. Atari Basic does not have ELSE, ENDIF, DO LOOP, WHILE WEND, REPEAT UNTIL. |
Yes, thank you for your that! |
Here is what I done so far for documenting conversion to Fast Basic. |
Hi!
Thanks! I will add the text to the Wiki. |
Hi!
Added to https://github.com/dmsc/fastbasic/wiki/Converting-to-FastBasic Thanks! |
Most illuminating, but it reads like a Chinglish product manual. Could use some editing. |
dmsc, I will be in a position with time to spare so as to be able to help with the manual, wiki, etc. in the very near future. |
Thanks! I think anyone can edit the wiki now. Have Fun! |
Need to update with some of my more recent findings. One is when passing values with a USR call. The first byte that indicates to # of bytes pushed onto the stack is no long present. The values are in reverse order also. Was this intentional? It gets even more a problem when I ported to CC65 and use the C-Stack "sp" pointer to get the values. All the fun we have with using different languages. |
Hi!
Yes, this makes the parser a lot simpler - it does not need to count arguments - and also allows to directly call OS functions, you can USR to CIOV for example after writing all the values in the IOCB, or call SIOV with all the parameters. About the order, I think that Atari BASIC passes the parameters in the same order as FastBASIC.
Don't use stack parameters with CC65 functions, it is slow and produces a lot more code. It is only needed if the function is recursive. It is much easier to simply define the function as "fastcall", so the argument is placed in the registers A/X, and if you need extra parameters, you can pass them in static variables. Have Fun! |
I see a few commands were removed from Atari Basic. If code is being ported over, there should be a list of in unsupported commands and functions. I see GOTO, GOSUB, and ON (variable) (GOTO GOSUB EXEC) no longer supported. I know the. ON statement can be done with block if. (Or RTS assembly trick).
I am attempting to take a few of my old Atari Basic Games, port over to Fast Basic, and provide as open source samples for help others learn the language.
The text was updated successfully, but these errors were encountered: