-
Notifications
You must be signed in to change notification settings - Fork 8
/
VBEAI.INC
749 lines (574 loc) · 25.5 KB
/
VBEAI.INC
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
; /*\
;---|*|--------------------====< VESA AI Include >====--------------------
;---|*|
;---|*| Copyright (c) 1993,1994 V.E.S.A, Inc. All Rights Reserved.
;---|*|
;---|*| VBE/AI 1.0 Specification
;---|*| February 2, 1994. 1.00 release
;---|*|
;---|*| Additional Changes:
;---|*| 03/03 - Added the full list of Volume feature bit as EQUs
;---|*|
; \*/
VBEAI_VERSION equ 10h ; first VBE/AI version
; /*\
;---|*|----====< VESA Services Definitions >====----
; \*/
INTHOOK equ 0010h
; // VAI query interface functions
VESAFUNCID equ 04f13h ; function ID
VESAFUNC0 equ 0000h ; VESA Function #0 -- Validate VBE/AI presence
VESAFUNC1 equ 0001h ; VESA Function #1 -- Locate the device
VESAFUNC2 equ 0002h ; VESA Function #2 -- Query the device
VESAFUNC3 equ 0003h ; VESA Function #3 -- Open the device
VESAFUNC4 equ 0004h ; VESA Function #4 -- Close the device
VESAFUNC5 equ 0005h ; VESA Function #5 -- Driver Unload
VESAFUNC6 equ 0006h ; VESA Function #6 -- Driver Chain/Unchain
; // VAI function 2 queries
VESAQUERY1 equ 0001h ; return length of GeneralDeviceClass
VESAQUERY2 equ 0002h ; return copy of GeneralDeviceClass
VESAQUERY3 equ 0003h ; return length of Volume Info Structure
VESAQUERY4 equ 0004h ; return copy of Volume Info Structure
VESAQUERY5 equ 0005h ; return length of Volume Services Structure
VESAQUERY6 equ 0006h ; return copy of Volume Services Structure
VESAENDQUERY equ 000fh ; subfunctions 6 - 15 are reserved
; subfunctions 16+ are used by the devices
; // VAI Device types
WAVDEVICE equ 01h
MIDDEVICE equ 02h
VOLDEVICE equ 03h
;#define WAVESERVICES 0x57415653 // ascii "WAVS"
;#define MIDISERVICES 0x4D494453 // ascii "MIDS"
; /*\
;---|*|----====< Volume Services >====----
; \*/
VolumeInfo struc
;; housekeeping
viname db 4 dup(?) ;; name of the structure
vilength dd ? ;; structure length
;; hardware vendor name
viversion dd 0 ;; driver software version
vivname db 32 dup(?) ;; vendor name, etc. (ASCIIZ string)
viprod db 32 dup(?) ;; vendor product name
vichip db 32 dup(?) ;; vendor chip/hardware description
viboardid db 0 ;; installed board #
viunused db 3 dup(?) ;; unused data
vicname db 24 dup(?) ;; text name of the mixer channel
vifeatures dd ? ;; bits of features
vimin dw ? ;; minimum volume setting
vimax dw ? ;; maximum volume setting
vicross dw ? ;; attenuation/gain crossover
VolumeInfo ends
; // Volume feature bits
VOLSTEREO equ 0001h ;; Stereo Volume control available
VOLLOPASS equ 0004h ;; Low Pass Filter is available
VOLHIPASS equ 0008h ;; High Pass Filter is available
VOLPARATC equ 0010h ;; Parametric Tone Control is available
VOLSELOUT equ 0020h ;; selectable output paths
VOLAZIMUTH equ 0100h ;; Azimuth Field positioning supported
VOLPHIMUTH equ 0200h ;; Phi Field positioning supported
VOLMASTER equ 80000000h ;; Master Volume device
; // VOL device check messages
VOLFILTERRANGE equ 0011h
VOLFILTERSETTING equ 0012h
VOLFILTERCURRENT equ 0013h
VOLTONERANGE equ 0014h
VOLTONESETTING equ 0015h
VOLTONECURRENT equ 0016h
VOLPATH equ 0017h
VOLGETIOADDRESS equ 0018h
VOLOEMSTARTINGDC equ 0080h ;; vendors can add DevChks above 0x80
; /*\
;---|*|----====< Volume services Structure >====----
; \*/
VolumeService struc
;; housekeeping
vsname db 4 dup(?) ;; name of the structure
vslength dd ? ;; structure length
vsfuture db 16 dup(?) ;; 16 bytes for future expansion
vsDeviceCheck dd ? ;; device check
vsSetVolume dd ? ;; set vol to an absolute setting
vsSetFieldVol dd ? ;; set 3D volume
vsToneControl dd ? ;;
vsFilterControl dd ? ;;
vsOutputPath dd ? ;;
vsResetChannel dd ? ;;
vsGetLastError dd ? ;;
VolumeService ends
; // VOL SetVolume message
VOL_USERSETTING equ 01h ;; User master volume setting
VOL_APPSETTING equ 02h ;; application master volume setting
; // VOL error message
VOL_NOSUPPORT equ 01h ;; unsupported feature/function
VOL_BADVALUE equ 02h ;; out of range parameter value
VOL_HWFAILURE equ 80h ;; vendors specific errors
; /*\
;---|*|----====< WAVE Info Structure >====----
; \*/
WAVEInfo struc
;; housekeeping
winame db 4 dup(?) ;; name of the structure
wilength dd ? ;; structure length
;; hardware vendor name
wiversion dd 0 ;; driver software version
wivname db 32 dup(?) ;; vendor name, etc. (ASCIIZ string)
wiprod db 32 dup(?) ;; vendor product name
wichip db 32 dup(?) ;; vendor chip/hardware description
wiboardid db 0 ;; installed board #
wiunused db 3 dup(?) ;; unused data
;; device specific information
wifeatures dd ? ;; feature bits
widevpref dw ? ;; user determined preference field
wimemreq dw ? ;; memory required for driver use.
witimerticks dw ? ;; # of timer tick callbacks per second
wiChannels dw ? ;; 1 = mono, 2 = stereo. Stereo is
;; assumed to be interleaved data.
wiSampleSize dw ? ;; Bit field of max sample sizes
WAVEInfo ends
; // WAVE feature bit definitions
WAVEMP8K equ 00000001h ;; 8000hz Mono Playback.
WAVEMR8K equ 00000002h ;; 8000hz Mono Record.
WAVESR8K equ 00000004h ;; 8000hz Stereo Record.
WAVESP8K equ 00000008h ;; 8000hz Stereo Playback.
WAVEFD8K equ 00000010h ;; 8000hz Full Duplex Play/Record.
WAVEMP11K equ 00000020h ;; 11025hz Mono Playback.
WAVEMR11K equ 00000040h ;; 11025hz Mono Record.
WAVESR11K equ 00000080h ;; 11025hz Stereo Record.
WAVESP11K equ 00000100h ;; 11025hz Stereo Playback.
WAVEFD11K equ 00000200h ;; 11025hz Full Duplex Play/Record.
WAVEMP22K equ 00000400h ;; 22050hz Mono Playback.
WAVEMR22K equ 00000800h ;; 22050hz Mono Record.
WAVESR22K equ 00001000h ;; 22050hz Stereo Record.
WAVESP22K equ 00002000h ;; 22050hz Stereo Playback.
WAVEFD22K equ 00004000h ;; 22050hz Full Duplex Play/Record.
WAVEMP44K equ 00008000h ;; 44100hz Mono Playback.
WAVEMR44K equ 00010000h ;; 44100hz Mono Record.
WAVESR44K equ 00020000h ;; 44100hz Stereo Record.
WAVESP44K equ 00040000h ;; 44100hz Stereo Playback.
WAVEFD44K equ 00080000h ;; 44100hz Full Duplex Play/Record.
WAVEPREPARE equ 08000000h ;; driver must pre handle the data
WAVEVARIPMONO equ 10000000h ;; Variable Sample mono playback
WAVEVARIPSTER equ 20000000h ;; Variable Sample stereo playback
WAVEVARIRMONO equ 40000000h ;; Variable Sample mono record
WAVEVARIRSTER equ 80000000h ;; Variable Sample stereo record
; // WAVE device check messages
WAVECOMPRESSION equ 11h
WAVEDRIVERSTATE equ 12h
WAVEGETCURRENTPOS equ 13h
WAVESAMPLERATE equ 14h
WAVESETPREFERENCE equ 15h
WAVEGETDMAIRQ equ 16h
WAVEGETIOADDRESS equ 17h
WAVEGETMEMADDRESS equ 18h
WAVEGETMEMFREE equ 19h
WAVEFULLDUPLEX equ 1Ah
WAVEGETBLOCKSIZE equ 1Bh
WAVEGETPCMFORMAT equ 1Ch
WAVEENAPCMFORMAT equ 1Dh
WAVEOEMSTARTINGDC equ 80h ;; vendors can add DevChks above 0x80
; // types of compression
WAVEIMAPLAY equ 01h
WAVEALAWPLAY equ 02h
WAVEULAWPLAY equ 03h
WAVEIMARECORD equ 11h
WAVEALAWRECORD equ 12h
WAVEULAWRECORD equ 13h
; // sample data sizes
WAVE08BITPLAY equ 01h
WAVE16BITPLAY equ 02h
WAVE08BITREC equ 10h
WAVE16BITREC equ 20h
; /*\
;---|*|----====< WAVE Audio Services >====----
; \*/
; ;; The following is a description of the contents of the WAVE Audio
; ;; Services. For the most part, this structure is read-only to
; ;; the application. The only two fields the application can write
; ;; are the callback fields.
WAVEService struc
;; housekeeping
wsname db 4 dup(?) ;; name of the structure
wslength dd ? ;; structure length
wsfuture db 16 dup(?) ;; 16 bytes for future expansion
;; device driver supplied function
wsDeviceCheck dd ? ;;
wsPCMInfo dd ? ;;
wsPlayBlock dd ? ;;
wsPlayCont dd ? ;;
wsRecordBlock dd ? ;;
wsRecordCont dd ? ;;
wsPauseIO dd ? ;;
wsResumeIO dd ? ;;
wsStopIO dd ? ;;
wsWavePrepare dd ? ;;
wsWaveRegister dd ? ;;
wsGetLastError dd ? ;;
wsTimerTick dd ? ;;
;; device driver run-information time data
wsApplPSyncCB dd ? ;; play filled in by the app
wsApplRSyncCB dd ? ;; rec filled in by the app
WAVEService ends
;; error messages
WAV_NOSUPPORT equ 1h ;; unsupported feature/function
WAV_BADSAMPLERATE equ 2h
WAV_BADBLOCKLENGTH equ 3h
WAV_BADBLOCKADDR equ 4h
WAV_BADLOSTIRQ equ 5h ;; app. missed an IRQ
WAV_BADPCMDATA equ 6h ;; don't understand the PCM size/format
WAV_HWFAILURE equ 80h ;; vendors specific errors
; /*\
;---|*|----====< MIDI Info Structure >====----
; \*/
MIDIInfo struc
;; housekeeping
miname db 4 dup(?) ;; name of the struc
milength dd ? ;; structure length
;; hardware vendor name
miversion dd 0 ;; driver software version
mivname db 32 dup(?) ;; vendor name, etc. (ASCIIZ string)
miprod db 32 dup(?) ;; vendor product name
michip db 32 dup(?) ;; vendor chip/hardware description
miboardid db 0 ;; installed board #
miunused db 3 dup(?) ;; unused data
milibrary db 14 dup(?) ;; the patch library name. file name
;; Feature list
mifeatures dd ? ;; feature bits
midevpref dw ? ;; user determined preference field
mimemreq dw ? ;; memory required for driver use
mitimerticks dw ? ;; # of timer tick callbacks per second
miactivetones dw ? ;; max # of tones (voices, partials)
MIDIInfo ends
; // MIDI feature bits
MIDIFRESVD1 equ 0001h ;; reserved for GM extensions
MIDIFRESVD2 equ 0002h ;; reserved for GM extensions
MIDIFRESVD3 equ 0004h ;; reserved for GM extensions
MIDIFRESVD4 equ 0008h ;; reserved for GM extensions
MIDIFXMITR equ 0010h ;; Transmitter/Receiver only.
MIDIFPRELD equ 0020h ;; Patches preloaded.
MIDIFTIMEST equ 0040h ;; MIDI receive has time stamp.
MIDIINTR equ 0100h ;; MIDI interrupt driven input supported
MIDIPOLL equ 0200h ;; MIDI polled input supported
MIDIREMOTELD equ 0400h ;; MIDI remote patches supported
; // MIDI device check messages
MIDITONES equ 11h ;; return available tones
MIDIPATCHTYPE equ 12h ;; return TRUE/FALSE if patch is understood
MIDISETPREFERENCE equ 13h ;; set the preference
MIDIVOICESTEAL equ 14h ;; allow/disallow voice stealing
MIDIGETFIFOSIZES equ 15h
MIDIGETDMAIRQ equ 16h
MIDIGETIOADDRESS equ 17h
MIDIGETMEMADDRESS equ 18h
MIDIGETMEMFREE equ 19h
MIDIOEMSTARTINGDC equ 80h ;; vendors can add DevChks above 0x80
; // MIDI Registered Patch Types
MIDI_PATCH_OPL2 equ 10h
MIDI_PATCH_OPL3 equ 11h
; /*\
;---|*|----====< Synthesizer Audio Services Structure >====----
; \*/
;; Synthesizer Services Structure
MIDIService struc
;; housekeeping
msname db 4 dup(?) ;; name of the struc
mslength dd ? ;; structure length
;; runtime data
mspatches dw 16 dup(?) ;; patches loaded table bit field
msfuture db 16 dup(?) ;; 16 bytes for future expansion
;; device driver supplied function
msDeviceCheck dd ? ;;
msGlobalReset dd ? ;;
msMIDImsg dd ? ;;
msPollMIDI dd ? ;;
msPreLoadPatch dd ? ;;
msUnloadPatch dd ? ;;
msTimerTick dd ? ;;
msGetLastError dd ? ;;
;; application supplied functions
msApplFreeCB dd ? ;; Patch Block free cb
msApplMIDIIn dd ? ;; MIDI byte avail.
MIDIService ends
MID_NOSUPPORT equ 1h ;; unsupported feature/function
MID_UNKNOWNPATCH equ 2h ;; unknown patch type
MID_ALLTONESUSED equ 3h ;; all tones are used
MID_BADMIDIMSG equ 4h ;; messages are out of sync
MID_PATCHINCOMP equ 5h ;; an incoming patch was incomplete
MID_PATCHINFULL equ 6h ;; an incoming patch couldn't be stored
MID_BADLOSTIRQ equ 7h ;; had to drop an incoming byte
MID_PATCHINFAIL equ 8h ;; driver is failing a patch download
MID_HWFAILURE equ 80h ;; vendors specific errors
; /*\
;---|*|----====< General Device Class structure for all devices >====----
; \*/
; ;; When a device is queried via function #1, it will return the
; ;; following structure. The entire structure contents are read-only
; ;; for the application. There are no fields that the application
; ;; may modify.
gdcpad = SIZE MIDIInfo
if (SIZE VolumeInfo) GT (SIZE MIDIInfo)
gdcpad = SIZE VolumeInfo
endif
if (SIZE WAVEInfo) GT (SIZE MIDIInfo)
gdcpad = SIZE WAVEInfo
endif
GeneralDeviceClass struc
;; housekeeping...
gdcname db 4 dup(?) ;; name of the struc
gdclength dd ? ;; structure length
;; generalities...
gdcclassid dw ? ;; type of device
gdvbever dw ? ;; version of VESA driver support
;; unions follow...
gdcu db gdcpad dup(?);; version of VESA driver support
GeneralDeviceClass ends
wiunion equ <gdcvesaver+2>
miunion equ <gdcvesaver+2>
viunion equ <gdcvesaver+2>
;;
;; patch file format structures
;;
RIFFhdr struc
rifftype db 4 dup(0);; structure type holds "RIFF"
riffrcount dd 0 ;; length of the RIFF block
RIFFhdr ends
VAILhdr struc
vailtype db 4 dup(0);; structure type holds "vail"
vailpcount dd 0 ;; count of patches in the file
VAILhdr ends
ZSTRhdr struc
zstrtype db 4 dup(0);; structure type holds "ZSTR"
zstrtlen dd 0 ;; length of text following this field
ZSTRhdr ends
VAIPhdr struc
vaiptype db 4 dup(0);; structure type holds "vaip"
vaiplen dd 0 ;; VBE/AI Patch data table
VAIPhdr ends
VAIIhdr struc
vaiitype db 4 dup(0);; structure type holds "vaii", index
vaiilen dd 0 ;; vaii structure length
vailpoffset dd 0 ;; holds offset to "vaid" from "vaip"
vailvaidln dd 0 ;; holds length of the corresponding patch
VAIIhdr ends
VAIDhdr struc
vaidtype db 4 dup(0);; structure type holds "vaid"
vaidlen dd ? ;; holds length of this patch
VAIDhdr ends
; /*\
;---|*|----====< PC Hardware specific Definitions >====----
; \*/
; Interrupt Controller #1 Port Addresses and Interrupt Masks
IRQ1MASKREG EQU 021h ;; 8259 mask register
IRQ1ACKREG EQU 020h ;; 8259 INT acknowledge register
INT0MSK EQU 00000001B ;; interrupt 0 mask
INT1MSK EQU 00000010B ;; interrupt 1 mask
INT2MSK EQU 00000100B ;; interrupt 2 mask
INT3MSK EQU 00001000B ;; interrupt 3 mask
INT4MSK EQU 00010000B ;; interrupt 4 mask
INT5MSK EQU 00100000B ;; interrupt 5 mask
INT6MSK EQU 01000000B ;; interrupt 6 mask
INT7MSK EQU 10000000B ;; interrupt 7 mask
; Interrupt Controller #2 Port Addresses and Interrupt Masks
IRQ2MASKREG EQU 0A1h ;; 8259 mask register
IRQ2ACKREG EQU 0A0h ;; 8259 INT acknowledge register
INT8MSK EQU 00000001B ;; interrupt 8 mask
INT9MSK EQU 00000010B ;; interrupt 9 mask
INTAMSK EQU 00000100B ;; interrupt A mask
INTBMSK EQU 00001000B ;; interrupt B mask
INTCMSK EQU 00010000B ;; interrupt C mask
INTDMSK EQU 00100000B ;; interrupt D mask
INTEMSK EQU 01000000B ;; interrupt E mask
INTFMSK EQU 10000000B ;; interrupt F mask
EOI EQU 020h ;; non specific end of interrupt
; dma controller #1 port addresses
DMAC0ADDR EQU 000h ;; DMA channel 0 Base & Current Address
DMAC0COUNT EQU 001h ;; DMA channel 0 Base & Current Count
DMAC1ADDR EQU 002h ;; DMA channel 1 Base & Current Address
DMAC1COUNT EQU 003h ;; DMA channel 1 Base & Current Count
DMAC2ADDR EQU 004h ;; DMA channel 2 Base & Current Address
DMAC2COUNT EQU 005h ;; DMA channel 2 Base & Current Count
DMAC3ADDR EQU 006h ;; DMA channel 3 Base & Current Address
DMAC3COUNT EQU 007h ;; DMA channel 3 Base & Current Count
DMA2C4ADDR EQU 0C0h ;; DMA channel 4 Base & Current Address
DMA2C4COUNT EQU 0C2h ;; DMA channel 4 Base & Current Count
DMA2C5ADDR EQU 0C4h ;; DMA channel 5 Base & Current Address
DMA2C5COUNT EQU 0C6h ;; DMA channel 5 Base & Current Count
DMA2C6ADDR EQU 0C8h ;; DMA channel 6 Base & Current Address
DMA2C6COUNT EQU 0CAh ;; DMA channel 6 Base & Current Count
DMA2C7ADDR EQU 0CCh ;; DMA channel 7 Base & Current Address
DMA2C7COUNT EQU 0CEh ;; DMA channel 7 Base & Current Count
DMARDSTAT EQU 008h ;; DMA read status
DMAWRCNTRL EQU 008h ;; DMA write command register
DMAWREQ EQU 009h ;; DMA write request register
DMAWRSMR EQU 00Ah ;; DMA write single mask register
DMAWRMODE EQU 00Bh ;; DMA write mode register
DMACLEAR EQU 00Ch ;; DMA clear low/high flip-flop
DMARDTEMP EQU 00Dh ;; DMA read temp register
DMAWRCLR EQU 00Dh ;; DMA write master clear
DMACLRMSK EQU 00Eh ;; DMA clear mask register
DMAWRALL EQU 00Fh ;; DMA write all mask register bits
DMA2RDSTAT EQU 0D0h ;; DMA read status
DMA2WRCNTRL EQU 0D0h ;; DMA write command register
DMA2WREQ EQU 0D2h ;; DMA write request register
DMA2WRSMR EQU 0D4h ;; DMA write single mask register
DMA2WRMODE EQU 0D6h ;; DMA write mode register
DMA2CLEAR EQU 0D8h ;; DMA clear low/high flip-flop
DMA2RDTEMP EQU 0DAh ;; DMA read temp register
DMA2WRCLR EQU 0DAh ;; DMA write master clear
DMA2CLRMSK EQU 0DCh ;; DMA clear mask register
DMA2WRALL EQU 0DEh ;; DMA write all mask register bits
CH0PAGEREG EQU 087h ;; Channel 0 Page Register
CH1PAGEREG EQU 083h ;; Channel 1 Page Register
CH2PAGEREG EQU 081h ;; Channel 2 Page Register
CH3PAGEREG EQU 082h ;; Channel 3 Page Register
CH5PAGEREG EQU 08Bh ;; Channel 5 Page Register
CH6PAGEREG EQU 089h ;; Channel 6 Page Register
CH7PAGEREG EQU 08Ah ;; Channel 7 Page Register
SYSSPKRTMR EQU 00042h ;; System Speaker Timer Address
SYSTMRCTLR EQU 00043h ;; System Timer Control Register
SYSSPKRREG EQU 00061h ;; System Speaker Register
JOYSTICK EQU 00201h ;; Joystick Register
; /*\
;---|*|----====< Assember Miscellaneous Definitions >====----
; \*/
TRUE equ -1
FALSE equ 0
wptr equ <word ptr>
bptr equ <byte ptr>
dptr equ <dword ptr>
; PUSHA stack frame, plus ES & DS
regwset struc
_regDS dw ?
_regES dw ?
_regDI dw ?
_regSI dw ?
_regBP dw ?
_regSP dw ?
_regBX dw ?
_regDX dw ?
_regCX dw ?
_regAX dw ?
regwset ends
; stack frame accesses
_DI equ <word ptr [bp+_regDI]>
_SI equ <word ptr [bp+_regSI]>
_BP equ <word ptr [bp+_regBP]>
_SP equ <word ptr [bp+_regSP]>
_BX equ <word ptr [bp+_regBX]>
_BL equ <byte ptr [bp+_regBX]>
_BH equ <byte ptr [bp+_regBX+1]>
_DX equ <word ptr [bp+_regDX]>
_DL equ <byte ptr [bp+_regDX]>
_DH equ <byte ptr [bp+_regDX+1]>
_CX equ <word ptr [bp+_regCX]>
_CL equ <byte ptr [bp+_regCX]>
_CH equ <byte ptr [bp+_regCX+1]>
_AX equ <word ptr [bp+_regAX]>
_AL equ <byte ptr [bp+_regAX]>
_AH equ <byte ptr [bp+_regAX+1]>
if @codesize
@ret equ 4
FFAR equ <far>
if1
%out compiling LARGE code segments
endif
else
@ret equ 2
FFAR equ <near>
if1
%out compiling SMALL code segments
endif
endif
if @datasize
@ptr equ 4
if1
%out compiling LARGE data segments
endif
else
@ptr equ 2
if1
%out compiling SMALL data segments
endif
endif
@farret equ 4
@nearret equ 2
@farptr equ 4
@nearptr equ 2
;
; NEAR branches
;
jjnz macro addr
LOCAL jjmp
jz jjmp
jmp addr
jjmp:
endm
jjz macro addr
LOCAL jjmp
jnz jjmp
jmp addr
jjmp:
endm
jjc macro addr
LOCAL jjmp
jnc jjmp
jmp addr
jjmp:
endm
jjnc macro addr
LOCAL jjmp
jc jjmp
jmp addr
jjmp:
endm
jjb macro addr
LOCAL jjmp
jae jjmp
jmp addr
jjmp:
endm
jjbe macro addr
LOCAL jjmp
ja jjmp
jmp addr
jjmp:
endm
jjl macro addr
LOCAL jjmp
jge jjmp
jmp addr
jjmp:
endm
jjle macro addr
LOCAL jjmp
jg jjmp
jmp addr
jjmp:
endm
jjge macro addr
LOCAL jjmp
jl jjmp
jmp addr
jjmp:
endm
jjg macro addr
LOCAL jjmp
jle jjmp
jmp addr
jjmp:
endm
jja macro addr
LOCAL jjmp
jbe jjmp
jmp addr
jjmp:
endm
breakpoint macro
if DEBUG
if1
%out Take this Out
endif
int 3
endif
endm
; /*\
;---|*| end of DRIVER.INC
; \*/