Re: A86: Personal Intro & Questions (fwd)


[Prev][Next][Index][Thread]

Re: A86: Personal Intro & Questions (fwd)




linger richard nathan wrote:
> 
> Hello All,
> 
> I'm a sophomore in Computer Engineering at the University of Illinois.
> I'm new to 86 ASM programming.  I'm about to get an 86 and am just busting at
> the seams to program it.  I've read through several books on the Z80, so I
> have a good handle on the processor.  I am just a little hazy on the TI86-
> specific info.
> 
> I've been reading through this list's archives at ticalc.org for a while
> now (several days) and haven't found _satisfactory_ answers to the following
> questions, so don't tell me to look there.  I also couldn't find any FAQ
> that answered my questions.  If I overlooked something, please give me a
> specific URL to look at for the answer.
> 
> *** User Defined Interrupts ***
>   - What Interrupt mode does the TI-OS run in? (0, 1, or 2)

TI-OS only uses mode 1.

>   - What are user defined interrupts used for?

In mode 1, if the flag 2,(iy+$23) is set, then there is a call to the
RAM address $d2fe.  We can put our own code here and it will be run with
the regular (OS) interrupt.  Also im 2 can be implemented, but this has
nothing to do with the OS.

>   - How are they implemented?

I have templates for im 1 and im 2 on my web site:

http://www.eden.rutgers.edu/~assets/ti86.htm

>   - How are the the IX-flags related to User Defined Interrupts?

They aren't.  All the flags have an iy register offset; iy is always set
to $c3e5.  iy through iy+$24 are system flags, iy+$25 through iy+$2f are
user flags (but don't use these unless you need to preserve flags
outside your program).

>   - How is the RST command related to User Defined Interrupts?

im 2 makes a call to 38h (same as rst 38h).  Other than that they aren't
related, the rst instruction just makes a call to a logical address:
00h, 0h, 10h, 18h, 20h, 28h, 30h or 38h.

> 
> ***[sqrt] routines ***:
>   - Are these Interrupts?

No they are asm programs that are called during certain ROM routines,
but only if 1) the approriate program exists 2) the corresponding system
flag is set.

>   - What are they good for?

They allow you to manipulate the registers in the middle of the ROM
routine.  For instance, if you create the program [sqrt]KEY and set bit
6 of the flag (iy+$24), then the next time _getkey is called, your
program [sqrt]KEY will be loaded into asm space and executed.  (sqrt
stands for the sqrt character)

>   - now are they implemented?

There are 8 of these sqrt programs: PARSE, CMDTOK, KEY, EXPR, EXEC,
HOME, FORM, GRF.  The calc loads the name into op1 (rst 20h) and looks
it up in the variable allocation table (rst 10h) to see if it exists and
to get the program's location if it does.
Not a whole lot is known about these programs.

> 
> *** User Defined Functions ***
>   What areas need to be changed in order to install new functions
>   like in TI's Applets that can be called from the HomeScreen or
>   a Basic program? I am specifically thinking of functions that can
>   take arguments.

Same thing as user tokens  (each function needs to have a token
associated with it in order to be parsed)

> 
> *** User Defined Types ***
>   Has anyone implemented their own variable types?  I would like to create
>   an arbitrary precision integer type (an integer that grows to sizes only
>   limited by available memory).  I saw that there were several "internal
>   use only" type bytes.  Does anyone know if assembly programmers can use
>   these for their own types?

I don't think so.  If it's possible, no one has found out about it.

> 
>   If this has been discussed in this list, I either missed it or didn't
>   quite catch all the terminology used.
> 
> *** Abbreviations and Terms ***
>   - "SLP"    / What does this stand for?

Sleep mode.  Only used on the z180.

>   - "FSP"    / What does this stand for?

_FPS = floating point stack  This is just a stack where you can store
the op registers using calls to push and pop  (rst 18h = push op1).

>   - "asap"   / Is this an acronym? Something about menus?  Not "As Soon
>                As Possible". Whether or not it is, what does it mean?

What does it mean?  You'll have to ask TI.  That's what they name the
three user slots that can fit user tokens.  Each user token (or group of
tokens) also has a designated slot in the math menu.

>   - "TSR"    / I thought that a TSR was a program that [T]erminates and
>                [S]tays [R]esident (in memory).  That doesn't seem to apply
>                to a calculator, since everything is always in the memory.
>                So what does this refer to in the context of TI-Assembly?
>   - "token"  / I thought that a token was how keywords, built-in commands
>                were represented after being parsed.  It seems like this
>                list also refers to the "type" byte of variables.  What
>                is the general definition this list uses?

It is.  Some people have been erroneously refering to it as the type of
menu, variable, etc.
But, when refering to a user token, people mean tokens in the way that
you are familiar with.  The 86 will tokenize commands added into the
asap slots, and thus we have user commands/functions.

Look at my web page for some commented source code.

> 
> *** FAQ ***
>   I think these questions (and their respective answers) could sustain
>   their own FAQ.  If people think it is a good idea, I'll compile such a
>   document after I get some answers.  If there is anyone else out there
>   maintaining a 86-Assembly FAQ, I'll just send what I end up with to them
>   so they can append it to their FAQ.
> 
> Thanks in advance for all the help this list has to offer!
> 
> Nathan Linger
> 
> ps -- Since there are so many questions in this post, please make sure
>       replies to the above questions have a subject of "Re: ___" where
>       ___ is one or more of the corresponding topics above (enclosed
>       in ***'s)


Follow-Ups: References: