+---------------------------------+
|   Doors CS Internal Libraries   |
+---------------------------------+
|   (c) 2004-2005 Kerm Martian    |
+---------------------------------+

________________________________________________________________________
iVersion ($91A7+3*0) [Joe Wingbermuehle]
 ---------
Input: 	Nothing
Output:	hl	=Ion version				(should be 1.6)
		a  	=Ion compatibility number		
		d	=Library compatibility		(should be 0)
		e	=number of libraries
Destroys:	a		de	hl
________________________________________________________________________
iRandom ($91A7+3*1) [Joe Wingbermuehle]
 ---------
Input: 	b	=Upper bound (0=<rand<b)
Output:	a	=Random integer between 0 and b
		b	=0
Destroys:	af	b
________________________________________________________________________
iPutSprite ($91A7+3*2) [Joe Wingbermuehle]
 ---------
Input: 	b	=Sprite height in pixels
		a  	=X coordinate in [0,95]
		l	=Y coordinate in [0,56]
		ix	=Pointer to sprite
Output:	Sprite XORed to PlotsScreen
		ix	=Pointer to next sprite
Destroys:	af	bc	de	hl	ix
________________________________________________________________________
iLargeSprite  ($91A7+3*3) [Joe Wingbermuehle]
 ---------
Input: 	b	=Sprite height in pixels
		c	=Sprite width in bytes (pixel width/8)
		a  	=X coordinate in [0,95]
		l	=Y coordinate in [0,56]
		ix	=Pointer to sprite
Output:	Sprite XORed to PlotsScreen
		ix	=Pointer to next sprite
Destroys:	af	bc	de	hl	ix	af’
________________________________________________________________________
iGetPixel ($91A7+3*4) [Joe Wingbermuehle]
 ---------
Input: 	a  	=X coordinate in [0,95]
		l	=Y coordinate in [0,63]
Output:	a	=Pixel mask
		hl	=PlotsScreen offset
Destroys:	af	bc	de	hl
________________________________________________________________________
iFastCopy ($91A7+3*5) [Joe Wingbermuehle]
 ---------
Input: 	Nothing
Output:	PlotsScreen copied to screen (faster than _grbufcpy_v)
Destroys:	af	bc	de	hl
________________________________________________________________________
iDetect ($91A7+3*6) [Joe Wingbermuehle]
 ---------
Input: 	hl	=Place to begin VAT search
		ix	=Pointer to zero-terminated variable name
Output:	de	=One byte past place stopped
		hl	=Points to program data
		z flag	=Set if unsuccessful (nz)
			=Reset if successful (z)
Destroys:	af	bc	de	hl
________________________________________________________________________
iDeCompress ($91A7+3*7) [Joe Wingbermuehle]
 ---------
Input: 	hl	=Pointer to compressed data
		de	=Pointer to memory location to load decompressed data
		b	=Length of compressed data (bytes)
		c	=Compression factor {1,3,15}
Output:	data decompressed from hl to de for b bytes
		hl	=Points to first byte after compressed data
Destroys:	af	bc	de	hl
________________________________________________________________________
SmallWindow ($91A7+3*8) [Kerm Martian]
 ---------
Input: 	Nothing
Output:	Small window drawn to PlotsScreen
Destroys:	af	bc	de	hl
________________________________________________________________________
SmallWindowErase ($91A7+3*9) [Kerm Martian]
 ---------
Input: 	Nothing
Output:	Erases area in small window, but leaves rest of plotsscreen alone,
		including the title bar.
Destroys:	af	bc	de	hl
________________________________________________________________________
LargeWindow ($91A7+3*10) [Kerm Martian]
 ---------
Input: 	Nothing
Output:	Large window drawn to PlotsScreen
Destroys:	af	bc	de	hl
________________________________________________________________________
LargeWindowErase ($91A7+3*11) [Kerm Martian]
 ---------
Input: 	Nothing
Output:	Erases area in large window in Plotsscreen (not the title bar)
Destroys:	af	bc	de	hl
________________________________________________________________________
PlaySound ($91A7+3*12) [Kerm Martian]
 ---------
Input: 	hl	=note frequency
		de	=note duration
		Program must reset link port and disable interrupts first
Output:	        Sound played over link port
		Program must reset link port and enable interrupts
Destroys:	af	bc	de	hl
________________________________________________________________________
VDispHL ($91A7+3*13) [Kerm Martian]
 ---------
Input: 	hl	=2-byte number
Output:	hl displayed (up to 5 digits) at (Pencol,Penrow)
Destroys:	af			hl		op1	op2
________________________________________________________________________
Pause ($91A7+3*14) [Kerm Martian]
 ---------
Input: 	Nothing
Output:	Waits for a keypress, then returns the key _getk style to Op1
Destroys:	af
________________________________________________________________________