This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Z80 & 68k Assembly => z80 & ez80 Assembly
Author Message
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 03 Jun 2003 12:11:37 am    Post subject:

If you want to shut down the calculator you can do this. It shuts off the LCD and sits in low power mode until you press ON again.

ld a,1
out (3),a
halt
res onInterrupt,(IY+onFlags)
ret

Make sure that interupts are enabled before running this routine.
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 03 Jun 2003 03:52:29 am    Post subject:

62_52_53_53 wrote:
is there anywhere where the format of different files can be found, or do you just have to figure it out yourself?

I do not have a link, but visit http://education.ti.com and search for the dev guide.

Download the entire PDF document, and it contains all officially documented bcalls and their usage.

It tells you about entry points such as _chkfindsym
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 03 Jun 2003 01:05:12 pm    Post subject:

go get TI-83 Plus Assembly in 28 Days from ticalc.org and it tells u all...

hope i was of service to u! Very Happy
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 03 Jun 2003 02:34:01 pm    Post subject:

I know all of it, but still, it is not complete.

Do not misunderstand me, at times, I do have to look things up such as a rom call et cetera.
Back to top
SniperOfTheNight


Advanced Member


Joined: 24 May 2003
Posts: 260

Posted: 03 Jun 2003 03:01:43 pm    Post subject:

OK, thanks for all the help. I think I'm starting to understand all this. Any more questions I have I will post here ASAP. Thanks everyone Very Happy
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 03 Jun 2003 06:16:54 pm    Post subject:

Glad we could help! A fellow programmer in need is like nature calling, well maybe not but hey, it sounded good to me! Wink
Back to top
SniperOfTheNight


Advanced Member


Joined: 24 May 2003
Posts: 260

Posted: 03 Jun 2003 08:37:41 pm    Post subject:

I hate to be a pain but....... I'm having trouble,whats new. OK,i did what Jbirk suggested and l looked up Strings in the routines thing,and here's all I saw:

String Variables: Str1 ? Str0
These variables can only be type StrngObj.
They are all spelled with two tokens followed by one zero.
The first token of the name is tVarStrng, which labels it as a string variable name. The
second token signifies which predefined string name it is, tStr1 ? tStr0.
Example: String Variable Str5
OP1 +1 +2 +3 +4 +5 +6 +7 +8
StrngObj tVarStrng tStr5 00 ? ? ? ? ?
04h AAh 04h


First ofall..i don't understand the table,second of all,if some1 does understand,or if this is the wrong thing,please tell me.


Last edited by Guest on 03 Jun 2003 08:40:18 pm; edited 1 time in total
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 03 Jun 2003 08:40:09 pm    Post subject:

you do have the right thing, but that is just the part that tells u what the variables are, u want the next tutorial i think, or is it the one after that? one of the two...
Back to top
SniperOfTheNight


Advanced Member


Joined: 24 May 2003
Posts: 260

Posted: 03 Jun 2003 08:44:12 pm    Post subject:

Well..the next part in the guide is about pictures. I'm using the sdk83pguide from Cirrus.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 03 Jun 2003 09:19:08 pm    Post subject:

Well, then, I dunno... maybe this will help!


Equation, Program, AppVar, String
Two bytes with the number of bytes. Followed by a bunch of tokens. AppVars can contain any data you want.
$09 $00
tC tA tS tI tO tSpace tS tU tX
Probably string "CASIO SUX" (9 bytes...)


Input "Did that help? [y/n] ",Str0
If Str0="y"
Then
Disp "YAY!
Else
Disp "Then I'm sure stumped...
End
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 04 Jun 2003 01:31:14 am    Post subject:

Okay, I will discuss programs sience that seems to be the last theme.

ld hl,text ;point hl to a label containing a string of data, the name
rst 20h ;Copy the string to OP1

bcall(_chkfindsym) ;look up the program

;de points to the size
;hl points to the symtable entry
;b is the flash page
;If the program does not exist, the Z flag will be set.

To check if it is in ram (unarchived) we must check to see what flash page it is on. Flash page 0 is ram.

ld a,b ;flash page to A
or a ;similar to cp 0
jr z,is_in_ram

;if not in ram, you can use bcall(_arc_unarc) and then look it up again.

Now, hl points to the symbol table we will ignore that for now.

de points to the size bytes with the lSB first.

inc de
inc de

;de will point to data.

You can use hl as the reference to the symbol table to unlock, lock, rename, et cetera.


;Data below
text:
.db "NAME",0
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 04 Jun 2003 02:41:08 pm    Post subject:

that was for programs, but it will apply the same for strings!
Back to top
SniperOfTheNight


Advanced Member


Joined: 24 May 2003
Posts: 260

Posted: 04 Jun 2003 02:41:23 pm    Post subject:

I could use that in my program. Thanks. I didn't ask that,but it still helped!
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 04 Jun 2003 02:43:44 pm    Post subject:

ohh, good! glad we can all be of service to a fellow programmer in need!
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 04 Jun 2003 02:50:21 pm    Post subject:

I just thought I'd add a little to JBirks post about programs, more in reference to the symbol table entry. The symbol table entry is written in reverse so you must dec hl to get to the nect byte of data required.

here is the order decrementing.

Objtype((1byte)$05 if unprotected,$06 if Protected)
Version (2bytes) ;means nearly nothing
Flashpage (1byte) the flash page the program is located on
Ram Address(2 bytes) location on page
length of programs name(1 byte) maximum of 8 characters
Name written backwards(1-8 bytes)

All objects have a symbol entry like this.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 04 Jun 2003 02:53:18 pm    Post subject:

isn't there some enty that was reserved for future use or something? i dunno...
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 04 Jun 2003 02:54:53 pm    Post subject:

I'm not sure what you mean by that. All entries are the same and only differ slightly in the type of object.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 04 Jun 2003 02:56:14 pm    Post subject:

ohh, it was just the second byte of the version that was reserved for future use by TI...
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 04 Jun 2003 03:55:45 pm    Post subject:

If you are interested in hiding programs, move your symbol table pointer to the first letter of the name.

Justin W told you where that is, but essentially, you move the pointer by -6 (if I remember correctly).

You can always check.

e.g.

look up a program

ld bc,-6
add hl,bc

ld a,(hl)
ld l,a
ld h,0
bcall(_disphl)

If you get a number larger than 8, you are past the name length.

A would be 65dec, B would be 66...

Now, if you wish to hide a program, subtract 40h when hl points to the first character.

The easiest way to do this is res 6,(hl)
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 04 Jun 2003 06:25:27 pm    Post subject:

that was some very good info about hidden programs... maybe i'll change my shell to display them as well! (use the symbol table, instead of _FindAlphaUp and _FindAlphaDn)
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page Previous  1, 2, 3  Next
» View previous topic :: View next topic  
Page 2 of 3 » All times are UTC - 5 Hours

 

Advertisement