TI-86 Assembly

This article is under construction and needs to be completed. You can help by expanding it.

Taken from http://www.ti.com/calc/docs/86assembly.htm

Assembly ('ASM') programming that is built into the TI-86 is very different from the syntax that was experimented with on the TI-83. The TI-86 system design is also much more complicated than that of the TI-83. For those reasons, the documentation will be more complex for TI to generate. This document is an attempt to give those TI users with some Z80 ASM programming experience to have some fun as soon as possible. The information provided here may not be enough for an ASM programmer who has not already written any programs for use on either the TI-83 or the TI-85. A more detailed document will be generated in the future.

There are 3 commands on the TI-86 that deal with ASM programming:

ASMPRGM
ASM(
ASMCOMP(

These are located on the CATALOG menu screen.

ASM programs are entered into the TI-86 as Programs, like the TI-83.

The TI-86 requires that the first command in an ASM program be ASMPRGM. Starting on the next line is the object code.

NO OTHER SYNTAX IS REQUIRED.

There is no required 'End' command or 'Size' bytes like the TI-83.

Example:

:ASMPRGM
:CD824A
:210300
:220FC0
:215BD7
:CD374A
:CD5F4A
:C9
:48656C6C6F20576F726C6400
;
;
; Below is the source code for the above object
; code
;
;
org _asm_exec_ram
;
call _clrscrn
ld hl,3
ld (_currow),hl ; row 3 col 0
ld hl,hello_world
call _puts ; write the msg
call _newline ; move down a line
ret ; return from prog
;
hello_world:
db 'Hello World',0

TO RUN THIS PROGRAM DO: ASM(progname)
progname = NAME OF THE PROGRAM

ASMCOMP( is a command that converts an ASM program from 'ASCII' storage to 'HEX' storage and marks the program as protected.

This command will cut the storage needed for an ASM program in half. It is similar to the program 'SQUISH' for the TI-83.

You only need this for large programs.

syntax: ASMCOMP(prog1,prog2)

prog1 = name of 'ASCII' type ASMPRGM
prog2 = outputted 'hex' version of prog1.

You execute these programs with the ASM( command also.

An include file with some needed equates follows. Most of these are similar to the TI-83's:

ti86asm.inc
ti86math.inc
floating point math entry points
ti86ops.inc
support routines for the OP1-OP6 registers
ti86abs.inc
absolute address system support routines

Again, the information above is intended for experienced TI ASM programmers - more detailed information will follow.