A82: Re: Pointers and shells


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

A82: Re: Pointers and shells



>I was reading up about assembly and how the shells are made and I learned
>that somehow a line of calculations or something is a pointer to the ram.
>Anyway, could someone clarify this for me. Also if this is true, then

The TI8x calcs uses the same rutine for inputting in all the "applications"
in the calc and for input funcions in basic. To handle the differences in
the different places it uses an input handler, which is a function which
based on the keys pressed finds out what to do (like go to the graph screen
when you press GRAPH).The call to the input handler is based on two memory
location, one which holds the number of the rompage and one which contains a
pointer to the function. So when ever a key is pressed, it calls the
function pointed to by these vars. So what the shells does is that they
change these pointers so that they become the input handler, so when you
press a key they are called.
>wouldn't a line of code in a program contain a pointer to a different place
>in the RAM?? For example doing this in TI-Basic would contain a pointer to

Yes. Actually other places in the RAM has been found all ready, but they are
not as useful. Like the input handlers the system also implements other
function in the same way, and these could be used instead of the input
handler. Another possible solution is to overwrite the addr in the
errorhandler buffer (which tells the system what addr to call when an error
occurs). So there are lots of ways to call an asm program, however no one
has tried to use the other methods yet.
>the location of program abc in the ram
>:prgmABC
>Could this pointer be ajusted so that it would execute the assembly
>thingy-bober? This would be very cool because it would do two things.
prgm is a token (just  byte), and ABC is just a normal string. When the TI82
executes the program it will first read the token, and because it is prgm it
will call the function which starts another program. The function will then
read the string, search the VAT for it, and start running it. So this can
not be used to run assembly.
>1) eliminate the "PRESS ENTER" before a shell, or program, is executed
>and
This might be possible to do anyway. If yet another variable is used to
start the shell it should be possible to remove this. The quesion is if
people want to eliminate this when we will need an extra ver to do it.
>2) make it possible to interlace TI-Basic and Asm programs like the 83.
>Just wondering if it is possible, because I have no where near the
>programming knowledge to try and do something like that.:-)
>
Ash programs can be started using the prgm command, but as all other ams
programs you will see "PRESS ENTER" before it starts. If it where
eliminated, i see no problem in mixing asm and basic.

Dines

BTW I hope you understud the part about how shells are implemented, if not
just ask :)


Follow-Ups: