The basic structure of an assembly program consists of a header, body, data, and end. The header contains the references to include files. These files contan code to address memory on the calculator. You can call predefined subroutines from these that allow you to perform operations and shorten code. The stardard layout is descibed below. This program will not visibly do anything, so it would be useless to compile it. Semicolons denote a comment and can be left in a source file. A standard header would be as follows:
.NOLIST				;Tells TASM not to process lines as code

#include "ti83plus.inc" ;inserts standard Romcalls
#include "mirage.inc" ;inserts MirageOS Romcalls
.LIST ;Resumes processing
.org 9D95h ;tells processor(program counter) to begin program
The body is what contains the code for your program. A simple body would contain:
	ld a,5			;stores value of 5 into the accumulator

ld hl,str1 ;stores address of str1 into hl
ret ;returns to TI Operating System
The data section would include all string values. Here is str1:
str1:

.db "hello world",0 ;stores "hello world" into a zero terminating string
The end is always two lines:
.end				;tells TASM to end

END ;safety in case tasm skips the first line
As review, in this section you saw two new commands:
	ld [register],[value]		loads value into register

ret returns to operating system
You can find any of these commands in the reference section on the left."
Make your own free website on Tripod.com