ASAPTOOL BETA version 2.01 readme


Files


asaptool.86p the regular old program
asaptool-lite.86p the program without font menu
asaptool-install.86p the program with a cool install screen[not released because of size]
asaptool-linstall.86p the program without font with install
asaptool-compressed.86p regualar program -font menus and lite86 compressed
asaptool-installcompressed.86p program -font menus and lite86 compressed (won't crash when ran)
asaptool-linstallcompressed.86p -font menus with install lite86 compressed
asaptool-litecompressed -font menus and lite86 compressed
help.86p the oncalc help file (sort of)
characters.86g examples of grayscale sprites
asaptool Beta.htm this file you're reading
exam1.86p Text menu example convert a 12-letter name to a 3x1 matrix (stored in charz) and then convert back to letters
exam2.86p Misc menu example
exam3.86p Bit menu
exam4.86p Font menu
exam5.86p Effect menu

The lite86 compressed programs are super compressed the font menus didn't work at all so I removed them grayscale does work on them (backup your programs before running the compressed programs because the compressed programs aren't 100% tested)
VERY IMPORTANT THE FILE SENT TO THE 86 MUST BE asaptool NOT IN ALL CAPS IF YOU DO GET ONE IN ALL CAPS JUST TYPE asmcomp(ASAPTOOL,asaptool) and delete ASAPTOOL
This program was created mainly for people who are trying to learn assembly language but can't seem to get it and for basic programmers who want more quality and power in their programs. This is also for people who make prototypes of their games in ti-basic and then convert them into assembly language

Installation

Asm(asaptool) Running this will delete your first custom menu slot
It doesn't say anything but goto your custom menu and you see Toolz (1st slot) and your done
You only need to install it once
Note: If you have asapXcmd delete this from your calc before installing


If the completed symbol says no then to prevent crashes I either disabled the function or not added the function
any function that has yes in the completed section is perfectly stable I've tested the program on rom versions 1.3 and 1.6 so they are sure to work on these versions. Oh yes and please be cautious with the ones that say buggy in the function description
-Text-

Name

Parameters

Completion

Description

Bytes

Character

Chr(real)

Yes

Real is changed into ASCII

32

 

String

Str(real)

Yes

real to "Real"

60

 

Value

Val("String",offset)

Yes

Tells the value of string at offset

33

 

Small Text

SmlTxt("Variable",x,y)

Yes

In small font prints value in variable SEE NOTE

99

 

-Variable-

Name

Parameters

Completion

Description

Bytes

Exist

Exist("Variable")

Yes

Tells If "Variable" Exists

29

 

Var in Var

VinV("Variable")

Buggy

Shows Variable in Variable Data In Ans

16

 

Var sto Var

VstoV("String","StoreInto")

No

Stores Value in String into Storeinto

???

 

Bytes Used

Bytes("Variable")

Yes

Tells the size of "Variable" Two Ans if "var" is a basic prgm

32

 

Delete

Delete("Variable")

Yes

Deletes any var UNDER 1279 bytes 04FFh

40

 

-Odds and Ends-

Name

Parameters

Completion

Description

Bytes

Run Off

Runoff

Yes

Turns the cursor off

13

 

Run On

Runon

Yes

Turns the cursor on

13

 

Alpha Lock

Lockon

Yes

Alpha lock on

9

 

Alpha Lock Off

Locoff

Yes

Turns off alpha lock

9

 

Invert

Invtxt

Yes

Inverts the screen

5

 

Wait

Wait(1-65535)

Yes

Waits x ms (depends on batteries)

34

 

Contrast up

Conup

Yes

Contrast up

14

 

Contrast down

Condow

Yes

Contrast Down

14

 

Contrast Num

Connum(real)

Yes

Contrast now = real(0-31)

18

 

Value contrast

Valcon

Yes

Value of contrast is stored in Ans

9

 

Apd Off

Apdoff

Yes

Turns off auto power down

5

 

Apd On

ApdOn

Yes

Auto power down on

5

 

-Bit-

Name

Parameters

Completion

Description

Bytes

Left Shift

LShift(Real)

Yes

shifts the bits in real to left

8

 

Right Shift

RShift(Real)

Yes

shifts the bits in real to right

8

 

Left Rotate

LRot(real)

Yes

rotates the bits in real to left

7

 

Right Rotate

RRot(real)

Yes

rotates the bits in real to right

7

 

Mirror

Mirror(real)

Yes

mirrors the bits in real

12+routine

 

-Sprite-

Name

Parameters

Completion

Description

Bytes

Put Sprite

Putspr(8x8spr,x,y)

Yes

8x8 sprite @ (x,y) max (15,7)

28+routine

 

Put non-aligned

Putnas(8x8spr,x,y)

Yes

8x8 non-aligned sprite @(x,y) max (119,55)

28+routine

 

Put clipped

Putcls(8x8spr,x,y)

Yes

8x8 clipped sprite @(x,y) max (127,63)

28+routine

 

Put mirrored

Putmir(8x8spr,x,y)

Yes

8x8 mirrored aligned sprite @(x,y) max (15,7)

28+routine

 

Put masked

Putmsk(8x8spr,x,y)

Yes

8x8 (or)ed sprite to LCD

28+routine

 

Clear Graph

ClrGrh

Yes

Clears Graph screen when in grayscale

13

 

Peek @ x,y

Peek([1,2],x,y)

Yes

Peeks at 1=video 2=graph at x,y max[15,63]

110

 

Poke num @x,y

Poke([1,2],Real,x,y)

Yes

Pokes real at 1 or 2 at x,y max [15,63]

125

 

Open Gray

OGray

Yes

Opens Grayscale

75

 

Close Gray

CGray

Yes

Closes Grayscale

77

 

Put Graph align

Putgrh(8x8spr,x,y)

Yes

8x8 aligned sprite to graphscreen

29+routine

 

Put Graph clipped

Putgrn(8x8spr,x,y)

Yes

8x8 to graphscreen clipped

28

 

-Effect-

Name

Parameters

Completion

Description

Bytes

Sound

Sound(real)

Yes

Sound

32

 

Wipe Left

Wipel

Yes

Wipe Left effect

26

 

Wipe Right

Wiper

Yes

Wipe Right Effect

32

 

Out In

Outin

Yes

Out In Effect

59

 

Corner

Corner

Yes

Corner Effect

159

 

Fade In

FadeI(time,[0 or 1]

Yes

Fade In from White(0) or black(1)

102

 

Fade Out

FadeO(time,[0 or 1]

Yes

Fade Out to white(0) or black(1)

90

 

Special Invert

Invert(real)

Yes

Special invert useful for effects

27

 

-Font-

Name

Parameters

Completion

Description

Bytes

Normal Font

Znorm

Yes

Undo any font changes

5

 

Bold Font

ZBold

Yes

changes the font into BOLD

769

 

Italic font

ZItal

Yes

changes the font into ITALICS

769

 

Small Font

ZSmall

Yes

changes font into tiny

849

 


Ideas

got any ideas for new functions or is a function here completely useless(I need a very good reason) then email me tricksterbomber@aol.com

Notes


Wait is a better alternative to using:
For(A,1,500)
End

Vinv


This will help with external levels for basic programs to use, use it like this
InpSt "Tell me the variable data",VAR
VinV(VAR) (will display mess but it works)
ClLCD (Where this function gets buggy it messes with the screen for some strange reason)
Disp Ans "The Answer is in the ans variable"
now you can manipulate the data
VinV looks for the variable and
then gets the data in the variable
and then tells what's in the variable

SmlTxt


In order to use SmlTxt you must store a string ending with Chr(0)[IMPORTANT!!!] into a variable

Example
"This is great"+Chr(0) /-/ variable
Then you find where you want to put it
x can range from 0 to 127
y can range from 0 to 63
Now you can use SmlTxt
SmlTxt("variable",x,y)
smltxt automatically wraps when it reaches the edge of the screen
but when it reaches the bottom of the screen it will stop
maximum length of "variable" can be 505-2-2-1=500 characters, but about 341 characters+(31 chopped characters) can fit on the screen at once
without the null char (Character 0) at the end when you use
Smltxt you will get jumbled mess and it would go on forever except for the 500 character limit

Sprites
basics of sprites
a sprite is a repeatedly used small image
11111111b in decimal 255
10000001b in decimal 129
10100101b in decimal 165
10000001b in decimal 129
10100101b in decimal 165
10111101b in decimal 189
10000001b in decimal 129
11111111b in decimal 255

To input this into the 86 we would Either
A)Putspr(255,129,155,129,155,189,129,255,0,0)
B)Putspr(11111111b,10000001b,10100101b,10000001b,10100101b,10111101b,10000001b,11111111b,0,0)
C)Putspr(FFh,81h,A5h,81h,A5h,BDh,81h,FFh,0,0)
D)Hex:Putspr(FF,81,A5,81,A5,BD,81,FF,0,0)
Or even E)
Poke(1,255,0,0
Poke(1,129,0,1
Poke(1,155,0,2
Poke(1,129,0,3
Poke(1,155,0,4
Poke(1,189,0,5
Poke(1,129,0,6
Poke(1,255,0,7
(B) and (E) seem the least practical way to draw this sprite
(A) is good but you would have to convert binary to decimal and it is long boring work
(B) would cost more memory
(C) is great it is easier to convert binary to hexadecimal and less memory
but D is better becuase you don't have to specify the base in each argument
and the bigger the sprite the more memory is saved
(E) too many commands and memory is wasted
In memory

Program A 56 bytes tokenized 80 bytes
Program B 103 bytes tokenized 127 bytes
Program C 55 bytes tokenized 79 bytes
Program D 50 bytes tokenized 72 bytes
Program E 132 bytes tokenized 235 bytes!

GRAYSCALE
A grayscale sprite
LCD-Dark Graph-Light Combined
00000000 00000000 00000000
00111010 00111010 00000000
01000101 01111111 00000000
10100001 11011111 00000000
10000001 11111111 00000000
01000101 01111111 00000000
00111010 00111010 00000000
00000000 00000000 00000000

The LCD portion is shown two thirds of the time while
the Graph portion is only shown 1/3 of the time
The calculator fools our eyes into thinking were seeing four colors

To do this on the 86
OGray
Putspr(0,58,69,161,129,69,58,0,[x],[y])
Putgrh(0,58,127,223,255,127,58,0,[x],[y])
Pause
CGray

Rules for Grayscale
1)When you want to clear the screen(fully) use
ClLCD
ClrGrh (ClDrw will not work)

Bit operations
(better than the ones on the 86 the 86 use 16 bits)


LShift(0,255)
Input |Output
00000001 00000010
00100000 01000000
10000000 00000000
01010111 10101110
11111111 11111110

RShift(0,255)
Input |Output
00000001 00000000
00100000 00010000
10000000 01000000
01010111 00101011
11111111 01111111

LRot(0,255)
Input |Output
00000001 00000010
00100000 01000000
10000000 00000001
01010111 10101110
11111111 11111111

RRot(1,255)
Input |Output
00000001 10000000
00100000 00010000
10000000 01000000
01010111 10101011
11111111 11111111

Mirror(0,255)
Input |Output
00000001 10000000
00100000 00000100
10000000 00000001
01010111 11101010
11111111 11111111
When you use rotR rotL shftR and shftL on the 86 the answer is in terms of 1 word (2 bytes) so
rotR 1b = 1000000000000000b = -65536

Delete("var") ENABLED now :)
You may now delete any variable under 1279 bytes
Why 1279?
1279 is hex is 04FF
the domain for memory has been restricted to any number under 0500 hex
1) This command is useful for installation programs
prgm install
Install the variables blah blah blah
Main program <-- run the main program>

prgm Main Program
If Exist("install")==1
Delete("install"
Main Program's execution

2)If you delete the program while in the program the program ends automatically
3)don't try to delete any variable over 1279
4)and don't try to delete a variable over 10000 bytes <- dimension error?>
5)Delete's outpts (In Ans)
a) 1 if variable deleted (under 1279)
b) 0 if variable not deleted (over 1279)
c) Error? (over 10000 bytes)

Bytes("var")

If Bytes("program")==size of prgm
Then
Execute commands
Else
Disp "Program has been modified"
Stop
End
for this to work program must be tokenized (ran once and not opened)
place size of program in
tokenize the program again
place size of program in
every letter in an untokeinzed basic program is 1byte


Invert
what ever value you load into this will invert the screen
255 inverts all 0 inverts none
67 inverts like this
0100001101000011010000110100001101000011010000110100001101000011010000110100001101000011
0100001101000011010000110100001101000011010000110100001101000011010000110100001101000011
0100001101000011010000110100001101000011010000110100001101000011010000110100001101000011
try using it for nifty effects
like 1,2,4,8,16,32,64,128,255,255 ClLCD
use it many times for a checkboard effect


Credits

Function

Corresponding Assembly Routine

Putspr

GridPutSprite

putnas

the PutSprite routine by Dux Gregis

putcls

PutSpriteClip Routine

putmir

Mirror routine + GridPutSprite

putmsk

GridPutSprite that or's it on the LCD

putgrh

GridPutSprite that draws to Graph hl=CA00

putgrn

PutSpriteClip

ClrGrh

Written myself

Peek

Mine

Poke

Also Mine

Ogray

Mine

Cgray

Mine

Bit Menu

Mine

Bold and Italic Font

Jimi Malcolm

Small Font

Mine

Revert to normal font

Mine

Sound

Mine

Fade In and Out

Mine

Invert

Mine

Wipe L & R, Outin, and Corner

Levi Lansing

Misc Menu

Mine

Variable Menu

Mine

Text Menu

Mine





Drawbacks of using this program
Don't use TiGraph link feature of protecting basic programs <-- you have bytes("var")>
Don't transfer any files using any of fucntions that are tokenized (In Tigraph link you'll see Prtscrn and nothing else)
Any by any means don't do both of these at the same time (the program will be mangled will all sorts of weird things and will become uneditable
and you will have to start by stratch all over again)


History

version 1.00 4/2/05 6441 bytes
released for the first time 53 functions


version 1.01 4/4/05 6421 bytes
programs created with this version are somewhat compatible with 1.0
fixed OGray clearing screen when used -20 bytes
included info on bytes("var")
included drawbacks section
rereleased yathzv2 using asaptool with grayscale dice

version 2.0 4/11-13/05 5947 bytes
programs created with this version might not be compatible with previous versions
four different types of this program were released
asaptool 5947 bytes
asaptool-lite 3561 bytes
asaptool-install 7515 bytes (program crashed calculator when ran twice so not released)
asaptool-linstall 5036 bytes
help.86p 1959 bytes
examples.86g 6491 bytes (about)
characters.86g 6190 bytes (about)
FadeI and FadeO takes two arguments and can now fade to black
SmlTxt now works but the string must end with the null character
VinV now works (sort of) when used the output is in the Ans variable not the screen
5 example programs one for each menu except sprite
Optimized my code -562 bytes(about)

Version 2.01 (high chance of compatibility in version 2.0)
used lite compression on all four editions

 

Version 2.01 and a half
NOTHING:(
Addressed issue of the program name being in all caps

predicted for next version 2.1
optimize code even more (*hopefully* enough to get the program down to 5000 bytes)
VstoV will work
improve help.86p
exam6.86p the sprite menu example
work on Delete() function

all functions (except mirror) under bit menu will take two arguments (1-255,number of times)
anything else will be the same