[net.micro.apple] Pro-DOS calls?

wolenty@inuxd.UUCP (R Wolenty) (09/12/84)

I've noticed a statement in some Applesoft BASIC
programs running under Pro-DOS that I can't identify
in any of the documentation that I have.  An example:
	& "GOTOYX",param1,param2      or
	& "JUSTIFY","string",param
There are no files on the disk with names like "JUSTIFY" of
"GOTOYX".  Could someone enlighten me please.

			Ron Wolenty (AT&T Consumer Products)
			Indianapolis, IN

eraps1@nadc.ARPA (09/17/84)

Ron,

In response to your recent message :

>  I've noticed a statement in some Applesoft BASIC
>  programs running under Pro-DOS that I can't identify
>  in any of the documentation that I have.  An example:
>          & "GOTOYX",param1,param2      or
>	   & "JUSTIFY","string",param
>  There are no files on the disk with names like "JUSTIFY" of
>  "GOTOYX".  Could someone enlighten me please.
>
>			Ron Wolenty (AT&T Consumer Products)
>			Indianapolis, IN

   The "&" symbol is a special Applesoft feature, which enables you
to write your own applesoft commands.  When applesoft sees the & 
command, it transfers control to the assembly language code stored
at the & command vector (I don't have a manual in front of me, so consult
your Applesoft Reference Manual for the address of the vector).  Since
many applications find it useful to use more than one special command,
an & command processor is written.  This means that the code pointed
to by the & command vector studies the input line (what follows the
& symbol, ie "GOTOYX") and jumps to the appropriate piece of code.  

   There are a fair number of "&" utility packages available, if you
wish to use this technique and want to avoid writting the command parser,
alternatively, I believe nibble published an & command handler a while back.

   If you just want to find out what those commands do, locate the code,
by tracing the & command parser, and dissasemble it from the moniter.

   Note that you could indeed do a Pro-DOS call this way, but you would
have to write your own assembly level routine to do the actual work.

						- Rob Ginn

hawk@oliven.UUCP (Rick) (09/18/84)

>   Note that you could indeed do a Pro-DOS call this way, but you would
>have to write your own assembly level routine to do the actual work.

Why not use a few POKE's and a CALL to get the Pro-DOS routine?

rick

-- 
[hplabs|zehntel|fortune|ios|tolerant|allegra|tymix]!oliveb!oliven!hawk