LZ: my test results
[Prev][Next][Index][Thread]
LZ: my test results
-
Subject: LZ: my test results
-
From: Peter Cordes <pcomp@ntsource.com>
-
Date: Tue, 27 Aug 1996 23:44:17 -0500
-
In-Reply-To: <>
here are my test results to the which is smaller test i said i was going
to run.
Size of TI-BASIC program = 163 bytes
Size of assembler equiv. = 155 bytes
Here is the TI-BASIC version of the program: File Name is: ABCDEFGH
ClLCD
Lbl A
getKy \store\ A
If A==24
Outpt(1,1,"LEFT "
If A==25
Outpt(1,1,"UP "
If A==26
Outpt(1,1,"RIGHT"
If A==34
Outpt(1,1,"DOWN "
If A==22
Stop
Goto A
(My TI-BASIC ascii conversion is not correct sorry for the inconvience
but \store\ is the key right above ON)
Here is the Assembler version of the same program: File Name is:
abcdefgh
#include "ti-85.h"
st = $80DF
.org 0
.db " ",0 ;make this a NUL string and the program will be 1 byte
smaller
ROM_CALL(CLEARLCD)
mpr:
call GET_KEY
cp K_LEFT
CALL_Z(dle)
cp K_UP
CALL_Z(dup)
cp K_RIGHT
CALL_Z(dri)
cp K_DOWN
CALL_Z(ddo)
cp K_EXIT
ret z
jr mpr
dle:
ld de,le
ld (st),de
JUMP_(dst)
dup:
ld de,up
ld (st),de
JUMP_(dst)
dri:
ld de,ri
ld (st),de
JUMP_(dst)
ddo:
ld de,do
ld (st),de
JUMP_(dst)
dst:
ld a, 0
ld (CURSOR_ROW),a
ld a, 0
ld (CURSOR_COL),a
ld de,(PROGRAM_ADDR)
ld hl,(st)
add hl,de
ROM_CALL(D_ZT_STR)
ret
do: .db "DOWN ",0
ri: .db "RIGHT",0
le: .db "LEFT ",0
up: .db "UP ",0
.end
you can even check these results yourself. by the way if an assembler
program is optimized fully(which mine is) the file size will MOST LIKELY
be smaller but i can not say for sure. Also note that the file size for
the TI-BASIC version is the size of the file AFTER tokenzation(is that
spelled correctly).
PCoMP
Visit Maximus Productions home page at: http://www.ntsource.com/~pcomp