Squish

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

squish.gif

Filename

Squish

Summary

Compiles an asm program written in ASCII and stores the hex version

Authors

Pat Milheron

Site URL

Ticalc.org URL

http://www.ticalc.org/archives/files/fileinfo/10/1042.html

Release Date

June 15, 1997

Compatibility

TI-83

Language

Assembly

Squish and Zasmload are used for writing assembly programs for the TI-83 graphing calculator. They were written by Pat Milheron, one of the leader developers who wrote the ROM code for the TI-83.

Nostub assembly programs on the TI-83 are normally twice the size that they should be, as there is no AsmComp( command available like there is on the TI-83+.

The TI83 equivalent of Asm(PROGNAME is
:Send(9prgmPROGNAME
The TI83 equivalent of AsmComp(PROGNAME is
:"PROGNAME
:Send(9prgmSQUISH
The TI83 equivalent of Asm(SQUISHEDPROGNAME is
:"PROGNAME
:Send(9prgmZASMLOAD

Taken from http://www.ticalc.org/archives/oldmail/assembly-83/1998_August/msg00142.html

ok this is a complicated subject so prepare yourself. first and foremost
you must understand "SQUISH" and "ZASMLOAD".

SQUISHED PROGRAMS


when you compile a program using tasm.exe and link it using 83lnk.exe it
produces an .83p file. this file contains z80 opcodes in hexadecimal.
that means that 1 opcode is made up of 2 characters (or bytes). ex:

"C9" is the z80 opcode for "ret". if you type this into your calculator
you are actually entering 2 bytes, the character 'C' and the character
'9'.

on the other hand if you compile a program using tasm.exe and link it
using devpac83.com it produces a "squished" .83p file. ex:

"C9" is the z80 opcode for "ret". if you send a this squished program to
your calculator, instead of it being the 2 characters 'C' and '9' it is
the byte C9.

what does this mean to you? think of it like this… if you send a "non
squished" program to your to your calculator each byte takes up 2 bytes.
but if you send a "squished" program to your calculator each byte takes
up one byte. that means that "squished" data is exactly half the size of
it's "un squished" counterpart (this is of course excluding the size of
the program's symbol table entry).

USING DEVPAC83


there are 2 ways to "squish" a program. the first, and easiest way, is
to use devpac83.exe. to use devpac83 follow these steps:

1) get devpac83.exe from http://www.ticalc.org/pub/dos/asm/devpac83.zip

2) unzip devpac83.exe into the same directory as tasm.

3) in this same directory create a new batch file named zasm.bat, and
copy this into it.

@echo off
tasm -t80 -b -i %1.z80 %1.bin
if errorlevel 1 goto ERR
devpac83 %1
echo.
goto XIT
:ERR
echo.
echo Hey, something is wrong here!
echo.
:XIT
del %1.lst
del %1.bin

if you prefer a .asm extension for your source files, change the ".z80"
on line 2 to ".asm".

4) compile your programs by typing

zasm [progname]

where [progname] is the name of your source file minus the extension.
the output is a squished .83p file. this file must be sent to your
calculator using a link, it cannot be typed in.

USING SQUISH


the second way to squish a program is to use squish.83p. to use squish
follow these steps:

1) get squish.83p from
http://www.ticalc.org/pub/83/asm/programs/squish.zip

2) unzip squish anywhere you want.

3) after you compile your program, send it to your calculator.

4) send squish.83p to your calculator.

5) create a new program named anything you want and type this into it:

"[progname]
Send(9prgmSQUISH

where [progname] is the name of your program.

6) run this program to squish your program.

RUNNING SQUISHED PROGRAMS


now that you have your squished program on your calculator you can run
it. this is where zasmload comes in handy. to run your newly squished
program follow these steps:

1) create a new program with a name relevant to your program. a common
convention is to name this program whatever you want, and name the
squished program the same thing, but with a leading "Z". ex:

CAPTURE
ZCAPTURE

2) in this new program type

"[progname]
Send(9prgmZASMLOAD

where [progname] is the name of your squished program

3) run this new program just like you would any other basic program

HOW ZASMLOAD WORKS


to have an even better understanding you should also know how zasmload
works. when you run a non squished program on the ti-83 you type
Send(9prgmSOMEPROG. when you hit enter the program is squished and
written to the location 9327h. the only difference between this and
using squish.83p is that every time you run SOMPROG it has to be
squished, unlike using squish.83p which is permanent. having your
program squished saves time and space.

every time you run a squished program using zasmload, zasmload has to be
squished and copied to 9327h. squishing zasmload is very quick though,
because is it such a small program. after zasmload is squished and
copied it looks up your program. it then copies your already squished
data to 9327h and executes it.

Product Screenshot

product-screenshot.jpg
(Screenshot of Product)

Significance of Product

  • Why product was important to TI community
  • Any controversy or interesting circumstances surrounding product
  • Awards won, fond memories that people have

Documentation

  • How to use the product
  • Can copy the author's readme file (if available)

Development History

  • A chronological overview of the product's development

Miscellaneous

Related Products