WARNING: This document is hand-written HTML!
Dragonsoft BASIC to Assembler 83 - The Manual
Contents:
Introduction
Thanks for downloading Dragonsoft BASIC to Assembler 83 ! Welcome to the manual and readme file of Dragonsoft BASIC to Assembler 83. This project was started on 6 December 1999. Until then, it's been a lot of work. The program is intended to convert .83P BASIC programs to Z80 assembler, which you can convert using Table Assembler. This program was made for people who haven't got many knowledge about programming Assembler. So with this program they could convert their (rather slow) BASIC programs to Assembler.
The Author
The author of Dragonsoft BASIC to Assembler 83 is Frank Schoep. I don't know if I can finish this project on my own, so there's a possibility that there are 2 authors of Dragonsoft BASIC to Assembler 83 . Until know there have been a lot of people who helped me out with questions and problems. You can contact me at the following addresses:
Please do not email me at my school email address until 11 januari 2000. This is because of some problems at my school. Instead use my email address at home. My homepage is updated regularly. Also be sure to check in time by time at www.ticalc.org.
The Welcome Screen
On the welcome screen, there's some information on Dragonsoft BASIC to Assembler 83. The only thing you can do is exit by clicking the 'Exit' button, view more information by clicking on the 'Information' button, or you can go further in the process by clicking 'Next >'.
The Information Screen
On this screen, you can view additional credits. You can also view the current version number of Dragonsoft BASIC to Assembler 83. You can go back to the original screen by clicking the 'Close' button.
The Drive And Folder Selection Screen
On this screen, you're able to specify a drive and folder in/on which the source file is located. Please make sure that you select the right drive and folder, and that the file you want to convert is in the .83P file format. By clicking 'Next >', you can specify a .83P file in the selected folder.
The File Selection Screen
On this screen, there's a listbox with all the .83P files in the selected folder. If the folder was incorrect and the wanted file is not listed (be sure to scroll down first), you can always click the '< Back' button to return to the previous screen. If you click 'Next >' a checksum will be calculated. Please wait for the program to complete this task.
The Check The File Screen
On this screen, there's information on the input file. This is a summary of all the data located in the file, except for the program itself. Please make sure that this information matches the information of the wanted file. The converting process can take a long time, so every action with a wrong file is wasted time.
The Options Screen
On this screen, you can set the options for the conversion. The first and only option, 'Make the program SOS compatible', is implemented to make the program visible in SOS by Joe Wingbermeuhle. You must specify a name for the SOS program. For this trick to work, you'll need to convert the program with DecPac83. This program can also be downloaded at www.ticalc.org. The specified menu name cannot be longer than 20 characters. This is because of the width of the screen of the TI83. When you select this option, Dragonsoft BASIC to Assembler 83 will include a directive to the name in the Z80 Assembler code.
The Output File Selection Screen
On this screen, you can select a drive, folder and filename for the output file. The output file is the file with the Z80 Assembler code. This file always has an .Z80 extension. When you click 'Next >', the program will begin converting the code. This is a lengthy process.
Cool! And Now?
Now that you've waited for a very long time, your output file is finished. You could compile it with Table Assembler, but that isn't the best thing to do, because the Assembler program will almost always crash. Dragonsoft BASIC to Assembler 83 will never contain the right functions to convert every program out there. Instead, you should take a look at the code, to learn Assembler. The included test programs, however, will be compiled at 100% accuracy. The number of functions in Dragonsoft BASIC to Assembler 83 is still increasing, so please be patient until a very good version arrives.
Limitations Of This Program
Dragonsoft BASIC to Assembler 83 uses some very simple techniques to convert the BASIC file to Z80 source code. Below is a list of all problems and limitations encountered while writing the first steps of all conversions. If you have any methods or algorithms to solve any of the problems, you are very welcome to email me. You can contact me at the email address specified below. If you have any questions and / or remarks regarding the source code of Dragonsoft BASIC to Assembler 83 , you can email me as well.
Problems To Solve - You Can Help Me
Here is a list of all problems I've encountered until now. If you know the solution to any of these problems, please email me (include the problem you've solved). The problems listed in this list are a very summarized view of the problem itself. The problems are almost all of Visual Basic(c) nature. The problems are listed from BIG to small. All BASIC statements are written in bold.
- When using BINARY acces to a .83P file, sometimes bit 72 isn't the first token of the file. I've encountered this problem with a simple test file, containing only a ClrHome statement. It then seems that the first token is at bit 70 or 71. Several other (squished) files have this behaviour, too. The first bit and token of Bill Nagel's Penguins (Great game BTW), don't correspond, too. This problem is very difficult, because all other data in the file is correct. Length of file doesn't seem to match sometimes, either.
- Another very big problem is this one: after an Output( statement, there follow 3 variables, coord Y, coord X and displayed value. These values are seperated by a comma ",". I would like to make a function in VB that reads every bit from the Output( byte to the first comma, from the 1st comma to the second, and all data from the 2nd comma. This however, is made almost impossible, because all three values can be either a function (2A+4), a fixed number (3), a variable (V), a constant (pi or e), an expr( statement (expr(Str1)). Anyone who can bring a decent solution to this problem will be credited very much. In fact, I need a method that reads bits and converts these bits to the value. In case of a fixed variable, this is not a problem (using rclvarsim), but the case of a function is giving me headaches.
- I need a way to handle statements like Repeat, For(, While. Lbl and Goto aren't a problem: these are very simple to implement in the program.
- The ASCII value of some symbols do not correspond with their on-screen values. The function nDeriv for example is 67h in BASIC language, but on the screen it results in the lower case 'a'. When a BASIC programmer wants to display characters in lower case, then sometimes he might use parts of exisiting statements to achieve his goal. In ASM, however this is not needed. The tokens for the statistic values a, b etc. aren't defined in the program-token-table of the TI83, which I have written entirely on paper. Anyone who is interested can email me for it. The whole ASCII table for on-screen tokens will be uploaded on TICALC.ORG, too.
- I don't know whether or not rclvarsym and stoother are faster than BASIC. If anyone knows if these functions are (slightly slower or faster) than BASIC, please email me.
- Can SOS programs have a name, without having a pointer to libraries?
- Would it be useful to convert BASIC-dummy tokens to ASM? I mean tokens like :, Enter and strings without store?
- Ans is sometimes used to recall a value from the memory. Should I store everything that the BASIC program changes in the TI83's memory in ASM, or only the values which are calculated, and if so, how should I accomplish this?
To contact me, you can email me at dsfs98@westbrabant.net. If you're solution is useful, you will be added to the credits list, of course.
Credits
In the first place, I would like to thank James Matthews for writing ASM GURU. This is definitely the best help file to learn Assembler. If you want to learn ASM, you should really start reading this file, because it is superb. In the second place I would like to thank several people who have helped me with writing this program. These people are Jimmy Conner and Hans Poppelaars. I like to thank Jimmy for the support and the answers to my questions. Hans is the one who helped me out with the tokens in the .83P file format. In the third place there are the people who have helped me in a indirect way, like help files etc. These people are: Hannes Edfeldt and Florent Dhordain. The email addresses of some people can be found at the paragraph Contact.
Contact
Below are the people who helped me a lot with Dragonsoft BASIC to Assembler 83 . You can click the name of the person to send an email using your default MAPI client. If I forgot to mention someone who should really get credit, please contact me to make sure that person is credited also. If your email address has changed, it is advisable to send an email to me, too.
James Matthews. | Thanks to James for his excellent Assembler Guru. This document can be considered the best guide to learning Z80 Assembler for the TI83.
|
Jimmy Conner. | Thanks to Jimmy for answering a lot of questions and doing a lot of good work for the TI community.
|
Hans Poppelaars. | Thanks to Hans for helping me with the tokens in the .83P file format.
|
Florent Dhordain. | Thanks to Florent for writing a small guide for the .83P file format.
|
Hannes Edfeldt. | Thanks to MOVAX for helping Florent out with the .83P file format (it's a shame that I can't come up with more).
|
Bobby Kubista. | Thanks to Bobby for helping me out with the required DLL's for the program.
|
F.... .. .... | A personal word of thanks.
|
This is the end of the file. You can click here to go back to the contents index.
Manual v1.0