We're going to recognize and identify the parts of a program.
Look at the format of an Asm program, just follow along. Just to let you know a ; (semicolon) means anything on that line is a remark. Remarks are used to make comments in a program. Remarks are not read by the assembler or calculator. A note when writing Asm programs, indentaions are required, they help the TASM assembler read the program so it can understand.
#define B_CALL(xxxx) rst 28h \ .dw xxxx ;THE HEADER #define B_JUMP(xxxx) call 50h \ .dw xxxx ; ; ; ;DEFINES AND EQUATES(Part of the HEADER) ; ; ; .org 9D95h ;THE PROGRAM START ; ; ;THE BODY ; ; .end ;THE END END
There is not much to know about this section except that it goes into every Asm program you write. what you should know about this section is that it defines the two macros b_Call and bjump. These macros call ROM calls. If you use an include file, this section is not nessesary. In the headers I will be using, I will name the B_Call macro "bcall" because it is easier to type. You may name it anything you want as long as it is defined in the HEADER or include file.
This section allows you to define each call you use in your program. Again, if you use an include file and know that the commands you are using are covered in there, you do not have to define them again. To incorporate an include file to define calls, type in #include "XXX.inc". Where XXX is the name of the include file. An include file is a file that has ROM calls or routines defined in them. The #include statement just saves you time by copying the contents of the include file to the program.
This tells the calculator where to start running the program in memory. With the TI-83 Plus, the program always starts at the address 9D95h.
The body of the program is where you write the calls and functions (routines) you want the program to do. It can be as long as you want. You must call each call or function using the bcall(xxxx) statement. Where xxxx is the command you wish to run. Make sure you define each ROM call in the Defines and Equates section when you use them in your program. Or make sure that the specific ROM call is in the include file if you are using one.
Simply stated. The END of the program. This must always be at the end of every program. Don't change anything in this section, all you need is the .end and END.Tutorial 4