[Coco] C and BASIC09 (Auto-discard notification)

Dave Kelly daveekelly at earthlink.net
Sun May 16 21:28:08 EDT 2004


Dennis Bathory-Kitsz wrote:
>>
>>Here's a link to online OS9 manuals.  I hope one of them has what you're 
>>looking for:
>>http://www.ab.com/manuals/abs/

The manuals referenced above are for 0SK, the 68000 series chips.
Here is the Getstat parameters from the tech manual for the 6809 chip.

Getstats and Setstats
Reads and changes device's operating parameters

Entry Conditions:
	U = address of the devices memory area
	Y = address of the path descriptor
	A = status code

Exit Conditions:
	B = error code (if any)
	CC = carry set on error

Additional Information:
	Get/set the device's operation parameters ( status ) as specified for 
the Get Status and Set Status system calls. Getsta and Setsta are wild 
card calls.

	It might be necessary to examine or change the register stack that 
contains the values of the 6809 register at the time of the call. The 
address of the register stack is in PD.RGS, which is located in the path 
descriptor. You can use the following offsets to access any value in the 
register stack.

	Rel.
Reg	Addr	Size	6809 Reg.
R$CC	$00	1	Condition Code Reg.
R$D	$01	2	Register D
R$A	$01	1	Register A
R$B	$02	1	Register B
R$DP	$03	1	Register DP
R$X	$04	2	Register X
R$Y	$06	2	Register Y
R$U	$08	2	Register U
R$PC	$0A	2	Program Counter

	Register D overlays Registers A and B
#...........................................#
You will want to know about

SS.KySns
(Function code $27). Returns key down status.

Entry Conditions:
	A = path number
	B = $27
Exit Conditions:
	A = keyboard scan information

Additional Information:
	Accumulator A returns with a bit pattern representing eight keys. With 
each keyboard scan , OS9 updates this bit pattern. A set bit (1) 
indicates that a key was pressed since the last scan. A clear bit (0) 
indicates that a key was not pressed. Definitions for the bits are as 
follows:
Bit	Key
0	Shift
1	Ctrl or clear
2	alt of @
3	up error
4	down arror
5	left arror
6	right arrow
7	space bar

The bits can be masked with the following equates:
SHIFTBIT	equ	%00000001
CNTRLBIT	equ	%00000010
ALTERBIT	equ	%00000100
UPBIT		equ	%00001000
DOWNBIT		equ	%00010000
LEFTBIT		equ	%00100000
RIGHTBIT	equ	%01000000
SPACEBIT	equ	%10000000

The support module for this call is CC3IO

Snip here
Hope this helps
Dave






More information about the Coco mailing list