annotate defs/drivewire.d @ 2624:b8c7b7fbf3c9

Major changes: o os9defs, rbfdefs, scfdefs now os9.d, rbf.d, and scf.d o vtiodefs now broken into cocovtio.d (for coco and dragon) and atarivtio.d o systype now broken into coco.d, dragon.d and atari.d o all references to the above in other files have changed
author Boisy Pitre <boisy.pitre@nuance.com>
date Fri, 24 Feb 2012 08:51:08 -0600
parents
children a34c08cdfcb2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2624
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
1 IFNE DRIVEWIRE.D-1
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
2 DRIVEWIRE.D SET 1
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
3 ********************************************************************
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
4 * drivewire.d - DriveWire Definitions File
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
5 *
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
6 * $Id$
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
7 *
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
8 * Ed. Comments Who YY/MM/DD
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
9 * ------------------------------------------------------------------
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
10 * 1 Started BGP 03/04/03
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
11 * 2 Added DWGLOBS area BGP 09/12/27
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
12
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
13 nam drivewire.d
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
14 ttl DriveWire Definitions File
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
15
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
16 * Addresses
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
17 BBOUT equ $FF20
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
18 BBIN equ $FF22
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
19
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
20 * Opcodes
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
21 OP_NOP equ $00 No-Op
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
22 OP_RESET1 equ $FE Server Reset
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
23 OP_RESET2 equ $FF Server Reset
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
24 OP_RESET3 equ $F8 Server Reset
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
25 OP_DWINIT equ 'Z DriveWire dw3 init/OS9 boot
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
26 OP_TIME equ '# Current time requested
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
27 OP_INIT equ 'I Init routine called
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
28 OP_READ equ 'R Read one sector
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
29 OP_REREAD equ 'r Re-read one sector
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
30 OP_READEX equ 'R+128 Read one sector
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
31 OP_REREADEX equ 'r+128 Re-read one sector
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
32 OP_WRITE equ 'W Write one sector
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
33 OP_REWRIT equ 'w Re-write one sector
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
34 OP_GETSTA equ 'G GetStat routine called
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
35 OP_SETSTA equ 'S SetStat routine called
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
36 OP_TERM equ 'T Term routine called
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
37 OP_SERINIT equ 'E
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
38 OP_SERTERM equ 'E+128
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
39
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
40 * Printer opcodes
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
41 OP_PRINT equ 'P Print byte to the print buffer
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
42 OP_PRINTFLUSH equ 'F Flush the server print buffer
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
43
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
44 * Serial opcodes
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
45 OP_SERREAD equ 'C
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
46 OP_SERREADM equ 'c
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
47 OP_SERWRITE equ 'C+128
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
48 OP_SERGETSTAT equ 'D
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
49 OP_SERSETSTAT equ 'D+128
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
50
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
51 * for dw vfm
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
52 OP_VFM equ 'V+128
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
53
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
54 * WireBug opcodes (Server-initiated)
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
55 OP_WIREBUG_MODE equ 'B
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
56 * WireBug opcodes (Server-initiated)
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
57 OP_WIREBUG_READREGS equ 'R Read the CoCo's registers
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
58 OP_WIREBUG_WRITEREGS equ 'r Write the CoCo's registers
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
59 OP_WIREBUG_READMEM equ 'M Read the CoCo's memory
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
60 OP_WIREBUG_WRITEMEM equ 'm Write the CoCo's memory
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
61 OP_WIREBUG_GO equ 'G Tell CoCo to get out of WireBug mode and continue execution
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
62
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
63 * VPort opcodes (CoCo-initiated)
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
64 OP_VPORT_READ equ 'V
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
65 OP_VPORT_WRITE equ 'v
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
66
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
67 * Error definitions
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
68 E_CRC equ $F3 Same as NitrOS-9 E$CRC
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
69
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
70 * DW Globals Page Definitions (must be 256 bytes max)
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
71 DW.StatCnt equ 15
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
72 org $00
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
73 DW.StatTbl rmb DW.StatCnt page pointers for terminal device static storage
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
74 DW.VIRQPkt rmb Vi.PkSz
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
75 DW.VIRQNOP rmb 1
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
76
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
77 * SCF Multi Terminal Driver Definitions
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
78
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
79 org V.SCF ;V.SCF: free memory for driver to use
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
80 SSigID rmb 1 ;process ID for signal on data ready
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
81 SSigSg rmb 1 ;signal on data ready code
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
82 RxDatLen rmb 1 ;current length of data in Rx buffer
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
83 RxBufSiz rmb 1 ;Rx buffer size
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
84 RxBufEnd rmb 2 ;end of Rx buffer
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
85 RxBufGet rmb 2 ;Rx buffer output pointer
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
86 RxBufPut rmb 2 ;Rx buffer input pointer
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
87 RxGrab rmb 1 ;bytes to grab in multiread
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
88 RxBufPtr rmb 2 ;pointer to Rx buffer
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
89 RxBufDSz equ 256-. ;default Rx buffer gets remainder of page...
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
90 RxBuff rmb RxBufDSz ;default Rx buffer
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
91 SCFDrvMemSz equ .
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
92
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
93 ENDC
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
94