[Blindapple] running Textalker conditionally

Jayson Smith jaybird at bluegrasspals.com
Fri Oct 11 20:42:16 EDT 2013


Hi,

If you're going to do serious programming and need to get down and dirty 
with machine internals, you really need to get acquainted with 
hexadecimal. That's how I'll be giving this information, as it's what I 
know.

The Apple II uses routines in ROM to handle input from the keyboard and 
output to the screen. Each of these routines jumps through what's called 
a vector. A vector is a location in RAM with an address stored there. 
This address is the location of the program to execute. So for example, 
if I remember correctly, the output routine jumps through a vector at 
$0036. Whatever address is stored at $0036 and $0037 is where the system 
will continue execution. The least significant byte is stored first, so 
an address of $c600 would be stored as first $00, then $c6. Anyway, as 
the system first comes when you turn it on, that vector is set up to 
jump right back into the ROM routine. However, DOS modifies it when it 
loads, so it can intercept DOS commands input by the user and output by 
programs. Textalker also hijacks the output vector at $0036 so it can 
speak text as it is printed to the screen. I don't know if Textalker 
hooks into the input vector at $0038, but it might. So in Applesoft, the 
peek of 54 and 55 should get you the output vector location, and 56 and 
57 the input vector location. That'll probably tell you if Textalker's 
running.
Hope that helps.
Jayson

On 10/11/2013 8:57 AM, Kyle wrote:
> OK, here's a geeky question for anyone who has done any Apple//e
> programming. I want to run Textalker if and only if an Echo is present
> in the computer. I know this can be done, because the Talking Writer
> disk will only work if an Echo is present, and I can of course study
> this code. But here's the real kicker. If an Echo is indeed present, I
> want to run Textalker if and only if it isn't already running. Is there
> a peek value I can get that will definitely tell the program that
> Textalker is/is not running, no matter Textalker's version? I guess I
> could scan the entirety of RAM looking for the string "textalker," but
> this would seem to be overkill. Also, I am aware that textalker.blind
> stores its code in a different area in memory, so there may be multiple
> peek values to retrieve. This is fine just as long as I don't have to
> read everything.
>
> Yeah, I was quite the geek on these things lol. I didn't just play the
> games, the Apple //e was the first computer I used for programming, and
> if a game didn't do what I wanted it to do, and if it was written in
> Applesoft BASIC, I "fixed" the game so that it would do what I wanted it
> to do. Strangely though, I am only now beginning to understand a bit
> about how the whole memory addressing thing works as I mess around with
> analysing a bit about how DOS works. As a side note, the DOS Boss book
> is available online, and is a great little resource for all this stuff,
> not to mention that the entirety of the DOS Boss utility is written in
> Applesoft BASIC. Beagle Bros really did a great job with source code and
> documentation. Too bad it can't teach me how to find out if Textalker is
> running. They do make all this stuff a ton easier to find out in Linux
> <smiles>.
> ~Kyle
> http://kyle.tk/



More information about the BlindApple mailing list