This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 483
/
GIOTBL.ASM
126 lines (102 loc) · 3 KB
/
GIOTBL.ASM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
; [ This translation created 10-Feb-83 by Version 4.3 ]
.RADIX 8 ; To be safe
CSEG SEGMENT PUBLIC 'CODESG'
ASSUME CS:CSEG
INCLUDE OEM.H
TITLE GIOTBL - Device Name Table, Dispatch Table Address Tables
; Initialization and Termination Dispatch Tables
COMMENT *
--------- --- ---- -- ---------
COPYRIGHT (C) 1982 BY MICROSOFT
--------- --- ---- -- ---------
*
INCLUDE GIO86U
.SALL
INCLUDE MSDOSU ;MSDOS Constant Definitions
IF CPM86
INCLUDE CPM86U ;CPM86 Constant Definitions
ENDIF
.RADIX 10
CPM86=0 ;CPM86
;Device Switches
PUBLIC _DVTBL,_DVPTR,_DVINI,_DVTRM,$_NDEV
EXTRN DSKDSP:NEAR
EXTRN KYBDSP:NEAR,KYBINI:NEAR,KYBTRM:NEAR
EXTRN SCNDSP:NEAR,SCNINI:NEAR,SCNTRM:NEAR
EXTRN LPTDSP:NEAR,LPTINI:NEAR,LPTTRM:NEAR
EXTRN COMDSP:NEAR,COMINI:NEAR,COMTRM:NEAR
EXTRN CONDSP:NEAR,_RET:NEAR
PAGE
SUBTTL Device name table
;*****************************************************************
;*** ***
;*** Note: ***
;*** When adding additional devices, be sure to update ***
;*** OEMRAM to add device control blocks if necessary. ***
;*** Change $1STSD and $LSTSD if necessary. Change NMCOMT ***
;*** in switch file if adding COM device. ***
;*** ***
;******************************************************************
NDEV MACRO NAM,DSPADR,INIADR,TRMADR,N
DEV NAM&N,DSPADR,INIADR,TRMADR
ENDM
NAMES MACRO
DEV KYBD,KYBDSP,KYBINI,KYBTRM ;Keyboard
DEV SCRN,SCNDSP,SCNINI,SCNTRM ;Crt
DEV CONS,CONDSP,_RET,_RET ;Raw-I/O Crt (Esc Sequences)
NLPT=0
REPT NMLPT
NLPT=NLPT+1
NDEV LPT,LPTDSP,LPTINI,LPTTRM,%NLPT ;Line printer
ENDM
NCAS=0
REPT GWCASS
NCAS=NCAS+1
NDEV CAS,CASDSP,CASINI,CASTRM,%NCAS ;Line printer
ENDM
NCOM=0
REPT NMCOMT
NCOM=NCOM+1
NDEV COM,COMDSP,COMINI,COMTRM,%NCOM ;COM channel NCOM
ENDM
ENDM
;Generate DEVTBL ( text followed by device # )
;
NUM=377O
DEV MACRO NAM,DSPADR,INIADR,TRMADR
PUBLIC $_&NAM
$_&NAM=NUM
DB "&NAM&"
DB OFFSET NUM
NUM=NUM-1
ENDM
_DVTBL:
NAMES
DB 0 ;0 ends table
$_NDEV=377O-NUM ;number of non-disk Devices
;Generate DEVPTR ( Addresses of dispatch tables )
;
DEV MACRO NAM,DSPADR,INIADR,TRMADR
DW OFFSET DSPADR
ENDM
_DVPTR:
DW (DSKDSP) ;1st entry in dispatch table is Disk Dispatch table
NAMES ;then 1 entry for each device
;Generate Initialization Dispatch table
;
DEV MACRO NAM,DSPADR,INIADR,TRMADR
DW OFFSET INIADR
ENDM
_DVINI:
NAMES ;address of initialization routine for each device
;Generate Termination Dispatch table
;
DEV MACRO NAM,DSPADR,INIADR,TRMADR
DW OFFSET TRMADR
ENDM
_DVTRM:
NAMES ;address of termination routine for each device
CSEG ENDS
END