[mod.amiga] Undocumented Functions

page@ulowell.UUCP (07/23/86)

In the recent 'maps' that appeared in mod.amiga.sources, I noticed
that there were some functions that are listed under the ##private
section.  They are listed below.

What are their functions?  Obviously, since they are private, they
should be considered non-public!  However, I think that there may
be times that they could be useful to have, with the understanding
that they may go away at any time .. would anyone in the know like
to share some light on the subject?

..Bob

##base _GfxBase
GelsFuncE()
GelsFuncF()

##base _DOSBase
GetPacket(wait)(D1)
QueuePacket(packet)(D1)

##base _SysBase
##private
*------ special functions ---------------------------------------------
Supervisor()
ExitIntr()
Schedule()
Reschedule()
Switch()
Dispatch()
Exception()
*------ new functions:
RawIOInit()
RawMayGetChar()
RawPutChar(char)(d0)
RawDoFmt()(A0/A1/A2/A3)

hamilton@uxc.CSO.UIUC.EDU (07/27/86)

[ A few days ago I asked what the undocumented functions do.  Here
is the first response, from Wayne Hamilton.  Not surprisingly,
the folks at Commodore and Amiga have been silent on this.  --Bob]

>##base _GfxBase
>GelsFuncE()
>GelsFuncF()

	can't help you with these.

>##base _DOSBase
>GetPacket(wait)(D1)
>QueuePacket(packet)(D1)

	these are WEIRD, even for BCPL.  i have disassembled the dos.library
code, and the functions pointed at by these vectors don't seem to have anything
at all to do with packets.  one of them looks like a "clear memory" utility
(like, "bzero(ptr, count)".

>##base _SysBase
>##private
>*------ special functions ---------------------------------------------
>Supervisor()
>ExitIntr()
>Schedule()
>Reschedule()
>Switch()
>Dispatch()
>Exception()

	these aren't simple.  i'm still trying to figure them out, along
with the rest of the exec task handling stuff.

>*------ new functions:
>RawIOInit()
>RawMayGetChar()
>RawPutChar(char)(d0)
>RawDoFmt()(A0/A1/A2/A3)

	i tried to use these for some debugging, but something went
wrong.  likely it was my fault, tho.  RawIOInit() seems to initialize
the serial port for 9600 baud i/o;  RawMayGetChar() looks at the serial
port data register and returns -1 if there's no data there, and reads
and returns the byte there otherwise.  RawPutChar(c) sends 'c' out the
port.  it uses busy-waiting if the port is still busy from a previous
put.  it also seems to check for ^S coming in, but it looks funny.
	RawDoFmt(fmt,arglistptr,byteout,byteoutarg)
		char *fmt;
		char **arglistptr;
		void (*byteout)();
		long byteoutarg;
the way i've got it figured, 'fmt' and 'arglistptr' work like the
corresponding args to unix's _doprnt().  'byteout' is called each
time there's a formatted byte ready for "output" (in d0), including
the NUL byte that terminates 'fmt' (handy!).  none of the formatting
routines reference register a3, so i assume it's either 1) a mistake
in the template, or 2) available for indirect communication between
your code that calls RawDoFmt() and your byteout().  obvious example
would be a stream or buffer pointer.

	wayne hamilton
	U of Il and US Army Corps of Engineers CERL
UUCP:	{ihnp4,pur-ee,convex}!uiucdcs!uiucuxc!hamilton
ARPA:	hamilton%uiucuxc@a.cs.uiuc.edu	USMail:	Box 476, Urbana, IL 61801
CSNET:	hamilton%uiucuxc@uiuc.csnet	Phone:	(217)333-8703