summaryrefslogtreecommitdiff
path: root/system/shard-x86-at/7/src/DEVICE.ASM
blob: 0800a6772e6a5ae21545166db478637e9b6ea337 (plain)
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
;***************************************************************************
;*======= Copyright (C) 1985,86 Martin Schoenbeck, Spenge =================*
;*                                                                         *
;*   Macros zur Definition von devicetypecontrolblocks und                 *
;*   bestimmten channelcontrolblock Eintraegen                             *
;*                                                                         *
;***************************************************************************
 .xlist

actualdevice = 0

device macro type
     if1
     ifdef type
     .printx * device type doppelt definiert *
     endif
     endif
actualdevice = actualdevice+1
type = actualdevice
 
     endm

routine macro code,execut
     db code
     dw offset execut
     endm

dtcbroutines macro type
     ifidn <type>,<blockin>
      buildlabel blockin_,%actualdevice
     else
     ifidn <type>,<blockout>
      buildlabel blockout_,%actualdevice
     else
     ifidn <type>,<iocontrol>
      buildlabel iocontrol_,%actualdevice
     else
     ifidn <type>,<control32>
      buildlabel control32_,%actualdevice
     else
      .printx * unbekannter routinentyp: '&type' in dctbroutine *
     endif
     endif
     endif
     endif
     endm

dtcbparams macro output,typ
     buildlabel paramstart_,%actualdevice
     dw offset output
     dbbp blockin_,%actualdevice
     dbbp blockout_,%actualdevice
     dbbp iocontrol_,%actualdevice
     dbbp control32_,%actualdevice
dtcbentry devtype
     db typ
     endm

dtcbentry macro entry
     xequat entry,%actualdevice
     endm

dwb macro first,second
     dw offset first&second
     endm

dbbp macro first,second
     db first&second-paramstart_&second
     endm

xequat macro entry,dev
entry = $-paramstart_&dev
     endm

buildlabel macro first,second
first&second:
     endm

startccb macro name,kanal
name:
actccb = $
ccbentry channel_no
     db kanal
     endm

ccbentry macro entry
entry = $-actccb
     endm

 .list