source: GPL/branches/uniaud32-next/drv32/startup.asm@ 660

Last change on this file since 660 was 655, checked in by Paul Smedley, 5 years ago

Code cleanups from AlexT

File size: 43.4 KB
Line 
1; $Id: startup.asm,v 1.1.1.1 2003/07/02 13:56:56 eleph Exp $
2;*
3;* 16bit entrypoints to the PDD with thunks to the 32bit functions
4;*
5;* (C) 2000-2002 InnoTek Systemberatung GmbH
6;* (C) 1998-2001 Sander van Leeuwen (sandervl@xs4all.nl)
7;*
8;* Partly based on MWDD32 (32 bits OS/2 device driver and IFS support driver)
9;* Copyright (C) 1995, 1996 Matthieu WILLM
10;*
11;* This program is free software; you can redistribute it and/or
12;* modify it under the terms of the GNU General Public License as
13;* published by the Free Software Foundation; either version 2 of
14;* the License, or (at your option) any later version.
15;*
16;* This program is distributed in the hope that it will be useful,
17;* but WITHOUT ANY WARRANTY; without even the implied warranty of
18;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;* GNU General Public License for more details.
20;*
21;* You should have received a copy of the GNU General Public
22;* License along with this program; if not, write to the Free
23;* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
24;* USA.
25;*
26
27 .386p
28
29
30 INCL_DOS equ 1
31 INCL_DOSERRORS equ 1
32 include os2.inc
33
34 include segments.inc
35 include startup.inc
36
37DATA16 segment
38 extrn DOS32FLATDS : abs ; ring 0 FLAT kernel data selector
39 public __OffFinalDS16
40 public help_header
41 public uniaud_header
42 public _MSG_TABLE16
43 public DevHelpInit
44 public fOpen
45 public InitPktSeg
46 public InitPktOff
47 public _MESSAGE_STR
48 public pddname16
49 public FileName
50 public _RM_Help0
51 public _RM_Help1
52 public _RM_Help3
53 public _RMFlags
54IFDEF DEBUG
55 public DbgU32TimerCnt
56 public DbgU32IntCnt
57ENDIF
58
59;*********************************************************************************************
60;************************* Device Driver Header **********************************************
61;*********************************************************************************************
62help_header dw OFFSET DATA16:uniaud_header ; Pointer to next driver
63 dw SEG DATA16:uniaud_header
64 dw 1000100110000000b ; Device attributes
65; ||||| +-+ ||||
66; ||||| | | |||+------------------ STDIN
67; ||||| | | ||+------------------- STDOUT
68; ||||| | | |+-------------------- NULL
69; ||||| | | +--------------------- CLOCK
70; ||||| | |
71; ||||| | +------------------------+ (001) OS/2
72; ||||| | | (010) DosDevIOCtl2 + SHUTDOWN
73; ||||| +--------------------------+ (011) Capability bit strip
74; |||||
75; ||||+----------------------------- OPEN/CLOSE (char) or Removable (blk)
76; |||+------------------------------ Sharing support
77; ||+------------------------------- IBM
78; |+-------------------------------- IDC entry point
79; +--------------------------------- char/block device driver
80
81 dw offset CODE16:help_stub_strategy ; Strategy routine entry point
82 dw 0 ; IDC routine entry point
83 db 'ALSAHLP$' ; Device name
84 db 8 dup (0) ; Reserved
85 dw 0000000000010011b ; Level 3 device driver capabilities
86; |||||
87; ||||+------------------ DosDevIOCtl2 + Shutdown
88; |||+------------------- More than 16 MB support
89; ||+-------------------- Parallel port driver
90; |+--------------------- Adapter device driver
91; +---------------------- InitComplete
92 dw 0000000000000000b
93
94uniaud_header dd -1
95 dw 1101100110000000b ; Device attributes
96; ||||| +-+ ||||
97; ||||| | | |||+------------------ STDIN
98; ||||| | | ||+------------------- STDOUT
99; ||||| | | |+-------------------- NULL
100; ||||| | | +--------------------- CLOCK
101; ||||| | |
102; ||||| | +------------------------+ (001) OS/2
103; ||||| | | (010) DosDevIOCtl2 + SHUTDOWN
104; ||||| +--------------------------+ (011) Capability bit strip
105; |||||
106; ||||+----------------------------- OPEN/CLOSE (char) or Removable (blk)
107; |||+------------------------------ Sharing support
108; ||+------------------------------- IBM
109; |+-------------------------------- IDC entry point
110; +--------------------------------- char/block device driver
111
112 dw offset CODE16:uniaud_stub_strategy ; Strategy routine entry point
113 dw offset CODE16:uniaud_stub_idc ; IDC routine entry point
114 db 'ALSA32$ ' ; Device name
115 db 8 dup (0) ; Reserved
116 dw 0000000000010011b ; Level 3 device driver capabilities
117; |||||
118; ||||+------------------ DosDevIOCtl2 + Shutdown
119; |||+------------------- More than 16 MB support
120; ||+-------------------- Parallel port driver
121; |+--------------------- Adapter device driver
122; +---------------------- InitComplete
123 dw 0000000000000000b
124
125DevHelpInit dd 0
126fOpen dd 0
127InitPktSeg dw 0
128InitPktOff dw 0
129IFDEF DEBUG
130DbgU32TimerCnt dd 0
131DbgU32IntCnt dd 0
132ENDIF
133;needed for rmcalls.lib
134_RM_Help0 dd 0
135_RM_Help1 dd 0
136_RM_Help3 dd 0
137_RMFlags dd 0
138_MESSAGE_STR db 1024 dup (0)
139_MSG_TABLE16 dw 0 ;message length
140 dw OFFSET _MESSAGE_STR ;message far pointer
141 dw SEG _MESSAGE_STR
142
143pddname16 db 'ALSA32$'
144FileName db "ALSAHLP$", 0
145ResMgr DB 52H,45H,53H,4dH,47H,52H,24H,20H
146 DB 00H
147_RMIDCTable DB 00H,00H,00H,00H,00H,00H,00H,00H
148 DB 00H,00H,00H,00H
149
150;last byte in 16 bits data segment
151__OffFinalDS16 label byte
152
153DATA16 ends
154
155CODE16 segment
156 assume cs:CODE16, ds:DATA16
157
158 public __OffFinalCS16
159
160 public help_stub_strategy
161 public uniaud_stub_strategy
162 public uniaud_stub_idc
163 public uniaud_stub_timer
164 public thunk3216_devhelp
165 public thunk3216_devhelp_modified_ds
166 extrn DOSOPEN : far
167 extrn DOSWRITE : far
168 extrn DOSCLOSE : far
169
170 ALIGN 2
171help_stub_strategy proc far
172 movzx eax, byte ptr es:[bx].reqCommand
173 cmp eax, 04h ; DosRead
174 je uniaud_stub_strategy
175
176 enter 0, 0
177 and sp, 0fffch ; align stack
178
179 pushad
180 push ds
181 push es
182 push fs
183 push gs
184
185 mov dx, DATA16
186 mov ds, dx
187
188 cmp eax, 0 ; Init
189 je short @@help_init
190 cmp eax, 0Eh ; DosClose
191 je short @@help_close
192 cmp eax, 0Dh ; DosOpen
193 jne short @@help_error
194;DosOpen:
195 cmp word ptr fOpen, 0
196 je short @@help_ret_ok ; not ours
197 push ebx ; save ebx
198 push es
199 mov word ptr fOpen, 0
200 mov ax, word ptr InitPktSeg
201 mov fs, ax ; fs:ebx = req. packet
202 xor ebx, ebx
203 mov bx, word ptr InitPktOff
204 call far ptr FLAT:STRATEGY_
205 pop es
206 pop ebx ; restore ebx ptr
207@@help_ret:
208 mov word ptr es:[bx].reqStatus, ax
209@@help_ret_error:
210 pop gs
211 pop fs
212 pop es
213 pop ds
214 popad
215
216 leave
217 ret
218
219@@help_init:
220 mov eax, dword ptr es:[bx].i_devHelp
221 mov dword ptr DevHelpInit, eax
222 mov word ptr es:[bx].o_codeend, offset __OffFinalCS16
223 mov word ptr es:[bx].o_dataend, offset __OffFinalDS16
224
225@@help_ret_ok:
226 mov ax, STDON
227 jmp short @@help_ret
228
229@@help_close:
230 call far ptr FLAT:HelpClose
231 jmp short @@help_ret_ok
232
233@@help_error:
234 mov ax, STDON + STERR + ERROR_I24_BAD_COMMAND
235 mov word ptr es:[bx].reqStatus, ax
236 jmp short @@help_ret_error
237
238help_stub_strategy endp
239
240 ALIGN 2
241uniaud_stub_strategy proc far
242 enter 0, 0
243 and sp, 0fffch ; align stack
244
245 pushad
246 push ds
247 push es
248 push fs
249 push gs
250
251 mov ax, DATA16
252 mov ds, ax
253
254 movzx eax, byte ptr es:[bx].reqCommand
255 cmp eax, 0
256 jz short @@init
257
258 push ebx
259 push es
260 mov ax, bx
261 xor ebx, ebx
262 mov bx, ax
263 mov ax, es
264 mov fs, ax ; fs:ebx = req. packet
265
266 call far ptr FLAT:STRATEGY_ ; 32 bits strategy entry point
267
268 pop es
269 pop ebx ; oude bx ptr
270 mov word ptr es:[bx].reqStatus, ax ; status code
271
272@@uniaud_ret:
273
274 pop gs
275 pop fs
276 pop es
277 pop ds
278 popad
279 leave
280 ret
281
282@@init:
283 ;
284 ; DEVICE= initialization
285 ;
286 mov word ptr InitPktSeg, es
287 mov word ptr InitPktOff, bx
288 inc word ptr fOpen
289 call device_init
290
291 mov word ptr es:[bx].reqStatus, ax ; status code (ret by device_init)
292 mov word ptr es:[bx].o_codeend, offset __OffFinalCS16
293 mov word ptr es:[bx].o_dataend, offset __OffFinalDS16
294 jmp short @@uniaud_ret
295
296init_err:
297 mov dword ptr es:[bx].i_devHelp, 0
298 jmp short @@uniaud_ret
299
300uniaud_stub_strategy endp
301
302;in: cx = cmd
303; bx = lower 16 bits of ULONG parameter
304; dx = upper 16 bits of ULONG parameter
305;return value in dx:ax
306 ALIGN 2
307uniaud_stub_idc proc far
308 enter 0, 0
309 and sp, 0fffch ; align stack
310
311 shl edx, 16
312 mov dx, bx
313 call far ptr FLAT:IDC_ ; 32 bits strategy entry point
314
315 mov dx, ax
316 shr eax, 16
317 xchg ax, dx
318
319 leave
320 retf
321uniaud_stub_idc endp
322
323 ALIGN 2
324uniaud_stub_timer proc far
325 enter 0, 0
326 and sp, 0fffch ; align stack
327
328 call far ptr FLAT:TIMER_ ; 32 bits timer entry point
329
330 leave
331 retf
332uniaud_stub_timer endp
333
334
335;;*****************************************************************************
336; device_init
337;
338; Use DosOpen to tell the 1st driver to handle init for us. We must do it this
339; way since right now our CPL is 3 and the flat code selector has DPL 0, so
340; we can't load it. In the open strategy request, CPL is 0
341;;*****************************************************************************
342 ALIGN 2
343device_init proc near
344 enter 24, 0
345 push ds
346 push es
347 push bx
348 push si
349 push di
350
351 ; bp -> old bp
352 ; bp - 2 -> FileHandle
353 ; bp - 4 -> ActionTaken
354 ; bp - 8 -> IOCTL parm (4 bytes) : union mwdd32_ioctl_init_device_parm
355 ; bp - 24 -> IOCTL data (16 bytes) : union mwdd32_ioctl_init_device_data
356
357 ;
358 ; Opens wathlp$
359 ;
360 push seg DATA16 ; seg FileName
361 push offset FileName ; ofs FileName
362 push ss ; seg &FileHandle
363 lea ax, [bp - 2]
364 push ax ; ofs &FileHandle
365 push ss ; seg &ActionTaken
366 lea ax, [bp - 4]
367 push ax ; ofs &ActionTaken
368 push dword ptr 0 ; file size
369 push 0 ; file attributes
370 push OPEN_ACTION_FAIL_IF_NEW + OPEN_ACTION_OPEN_IF_EXISTS
371 push OPEN_SHARE_DENYNONE + OPEN_ACCESS_READONLY
372 push dword ptr 0 ; reserved
373 call DOSOPEN
374 cmp ax, NO_ERROR
375 jnz short @@error
376
377
378 ;
379 ; Closes wathlp$
380 ;
381 push word ptr [bp - 2] ; FileHandle
382 call DOSCLOSE
383 cmp ax, NO_ERROR
384 jnz short @@error
385
386@@out:
387 push eax ;gemold door doswrite
388
389 push 0001H
390 push ds
391 push offset _MESSAGE_STR
392 push word ptr _MSG_TABLE16
393 push ss
394 lea dx, [bp - 2]
395 push dx
396 call DOSWRITE
397
398 pop eax
399
400 pop di
401 pop si
402 pop bx
403 pop es
404 pop ds
405 leave
406 ret
407@@error:
408 mov ax, STDON + STERR + ERROR_I24_GEN_FAILURE
409 jmp short @@out
410
411device_init endp
412
413 ALIGN 2
414;use devhlp pointer stored in 16 bits code segment
415thunk3216_devhelp:
416 push ds
417 push DATA16
418 pop ds
419 call dword ptr DevHelpInit
420 pop ds
421
422 jmp far ptr FLAT:thunk1632_devhelp
423
424 ALIGN 2
425thunk3216_devhelp_modified_ds:
426 push gs
427 push DATA16
428 pop gs
429 call dword ptr gs:DevHelpInit
430 pop gs
431 jmp far ptr FLAT:thunk1632_devhelp_modified_ds
432
433
434 ALIGN 2
435 PUBLIC _RMAllocResourceOrg
436_RMAllocResourceOrg proc far
437 enter16
438 test byte ptr _RMFlags, 01H
439 je short AllocL1
440 lea eax, [bp+6]
441 push ss
442 push ax
443 push 0008H
444 push cs
445 call near ptr _CallRM
446 mov sp,bp
447 ret16
448AllocL1: test byte ptr _RMFlags,02H
449 je short AllocL2
450 push es
451 push bx
452 les bx,dword ptr [bp+10]
453 mov word ptr es:[bx],0ffffH
454 mov word ptr es:+2H[bx],0ffffH
455 sub ax,ax
456 pop bx
457 pop es
458 ret16
459AllocL2: mov ax,0001H
460 ret16
461_RMAllocResourceOrg endp
462
463 ALIGN 2
464 PUBLIC _RMAllocResource16
465_RMAllocResource16 proc far
466 enter32
467 xor eax, eax
468 push dword ptr [bp+18]
469 push dword ptr [bp+14]
470 push dword ptr [bp+10]
471 call _RMAllocResourceOrg
472 add sp, 12
473 ret32
474_RMAllocResource16 endp
475
476 ALIGN 2
477 PUBLIC _RMModifyResourcesOrg
478_RMModifyResourcesOrg proc far
479 enter16
480 test byte ptr _RMFlags, 01H
481 je short ModifyL1
482 lea eax, [bp+6]
483 push ss
484 push ax
485 push 001bH
486 push cs
487 call near ptr _CallRM
488 mov sp,bp
489 ret16
490ModifyL1: test byte ptr _RMFlags,02H
491 je short ModifyL2
492 sub ax,ax
493 ret16
494ModifyL2: mov ax,0001H
495 ret16
496_RMModifyResourcesOrg endp
497
498 ALIGN 2
499 PUBLIC _RMModifyResources16
500_RMModifyResources16 proc far
501 enter32
502 xor eax, eax
503 push dword ptr [bp+22]
504 push word ptr [bp+18]
505 push dword ptr [bp+14]
506 push dword ptr [bp+10]
507 call _RMModifyResourcesOrg
508 add sp, 14
509 ret32
510_RMModifyResources16 endp
511
512 ALIGN 2
513 PUBLIC _RMCreateAdapterOrg
514_RMCreateAdapterOrg proc far
515 enter16
516 test byte ptr _RMFlags,01H
517 je short CreateAdL1
518 lea eax, [bp+6]
519 push ss
520 push ax
521 push 0004H
522 push cs
523 call near ptr _CallRM
524 mov sp,bp
525 ret16
526CreateAdL1: test byte ptr _RMFlags,02H
527 je short CreateAdL2
528 push es
529 push bx
530 les bx,dword ptr [bp+10]
531 mov word ptr es:[bx],0ffffH
532 mov word ptr es:+2H[bx],0ffffH
533 sub ax,ax
534 pop bx
535 pop es
536 ret16
537CreateAdL2: mov ax,0001H
538 ret16
539_RMCreateAdapterOrg endp
540
541 ALIGN 2
542 PUBLIC _RMCreateAdapter16
543_RMCreateAdapter16 proc far
544 enter32
545 xor eax, eax
546 push dword ptr [bp+26]
547 push dword ptr [bp+22]
548 push dword ptr [bp+18]
549 push dword ptr [bp+14]
550 push dword ptr [bp+10]
551 call _RMCreateAdapterOrg
552 add sp, 20
553 ret32
554_RMCreateAdapter16 endp
555
556 ALIGN 2
557 PUBLIC _RMCreateDeviceOrg
558_RMCreateDeviceOrg proc far
559 enter16
560 test byte ptr _RMFlags,01H
561 je short CreateDevL1
562 lea ax, [bp+6]
563 push ss
564 push ax
565 push 0006H
566 push cs
567 call near ptr _CallRM
568 mov sp,bp
569 ret16
570CreateDevL1: test byte ptr _RMFlags,02H
571 je short CreateDevL2
572 push es
573 push bx
574 les bx,dword ptr [bp+10]
575 mov word ptr es:[bx],0ffffH
576 mov word ptr es:+2H[bx],0ffffH
577 sub ax,ax
578 pop bx
579 pop es
580 ret16
581CreateDevL2: mov ax,0001H
582 ret16
583_RMCreateDeviceOrg endp
584
585 ALIGN 2
586 PUBLIC _RMCreateDevice16
587_RMCreateDevice16 proc far
588 enter32
589 xor eax, eax
590 push dword ptr [bp+26]
591 push dword ptr [bp+22]
592 push dword ptr [bp+18]
593 push dword ptr [bp+14]
594 push dword ptr [bp+10]
595 call _RMCreateDeviceOrg
596 add sp, 20
597 ret32
598_RMCreateDevice16 endp
599
600 ALIGN 2
601 PUBLIC _RMDestroyDeviceOrg
602_RMDestroyDeviceOrg proc far
603 enter16
604 test byte ptr _RMFlags,01H
605 je short DestroyL1
606 lea ax, [bp+6]
607 push ss
608 push ax
609 push 0007H
610 push cs
611 call near ptr _CallRM
612 mov sp,bp
613 ret16
614DestroyL1: test byte ptr _RMFlags,02H
615 je short DestroyL2
616 sub ax,ax
617 ret16
618DestroyL2: mov ax,0001H
619 ret16
620_RMDestroyDeviceOrg endp
621
622 ALIGN 2
623 PUBLIC _RMDestroyDevice16
624_RMDestroyDevice16 proc far
625 enter32
626 xor eax, eax
627 push dword ptr [bp+10]
628 call _RMDestroyDeviceOrg
629 add sp, 4
630 ret32
631_RMDestroyDevice16 endp
632
633 ALIGN 2
634 PUBLIC _RMDeallocResourceOrg
635_RMDeallocResourceOrg proc far
636 enter16
637 test byte ptr _RMFlags,01H
638 je short DeAllocL1
639 lea ax, [bp+6]
640 push ss
641 push ax
642 push 0009H
643 push cs
644 call near ptr _CallRM
645 mov sp,bp
646 ret16
647DeAllocL1: test byte ptr _RMFlags,02H
648 je short DeAllocL2
649 sub ax,ax
650 ret16
651DeAllocL2: mov ax,0001H
652 ret16
653_RMDeallocResourceOrg endp
654
655 ALIGN 2
656 PUBLIC _RMDeallocResource16
657_RMDeallocResource16 proc far
658 enter32
659 xor eax, eax
660 push dword ptr [bp+14]
661 push dword ptr [bp+10]
662 call _RMDeallocResourceOrg
663 add sp, 8
664 ret32
665_RMDeallocResource16 endp
666
667 ALIGN 2
668 PUBLIC MY_DEVHELP_ATTACHDD
669MY_DEVHELP_ATTACHDD proc near
670 push bp
671 mov bp,sp
672 push di
673 push es
674 mov ax, ds
675 mov es, ax
676 mov bx,word ptr +8H[bp]
677 mov di,word ptr +6H[bp]
678 mov dl,2aH
679 call dword ptr DevHelpInit
680 jb short L2
681 sub ax,ax
682 pop es
683 pop di
684 leave
685 ret 0004H
686L2: pop es
687 pop di
688 leave
689 ret 0004H
690MY_DEVHELP_ATTACHDD endp
691
692 ALIGN 2
693 PUBLIC _RMCreateDriverOrg
694_RMCreateDriverOrg proc far
695 enter16
696 test byte ptr _RMFlags,01H
697 je short CreateDrL4
698CreateDrL3: lea ax, [bp+6]
699 push ss
700 push ax
701 push 0002H
702 push cs
703 call near ptr _CallRM
704 add sp,0006H
705 ret16
706CreateDrL4: test byte ptr _RMFlags,02H
707 je short CreateDrL6
708CreateDrL5: push es
709 push bx
710 les bx,dword ptr [bp+10]
711 mov word ptr es:[bx],0ffffH
712 mov word ptr es:+2H[bx],0ffffH
713 sub ax,ax
714 pop bx
715 pop es
716 ret16
717CreateDrL6: mov ax, word ptr DevHelpInit + 2H
718 or ax, word ptr DevHelpInit
719 jne short CreateDrL7
720 mov ax,0008H
721 ret16
722CreateDrL7: push offset ResMgr
723 push offset _RMIDCTable
724 push cs
725 call near ptr MY_DEVHELP_ATTACHDD
726 or ax,ax
727 je short CreateDrL8
728 or byte ptr _RMFlags, 02H
729 jmp short CreateDrL5
730CreateDrL8: mov ax,word ptr _RMIDCTable+4H
731 mov word ptr _RM_Help3+2H,ax
732 mov word ptr _RM_Help3,0000H
733 mov ax,word ptr _RMIDCTable+2H
734 mov word ptr _RM_Help0+2H,ax
735 mov ax,word ptr _RMIDCTable+6H
736 mov word ptr _RM_Help0,ax
737 or byte ptr _RMFlags,05H
738 jmp short CreateDrL3
739_RMCreateDriverOrg endp
740
741 ALIGN 2
742 PUBLIC _RMCreateDriver16
743_RMCreateDriver16 proc far
744 enter32
745 xor eax, eax
746 push dword ptr [bp+14]
747 push dword ptr [bp+10]
748 call _RMCreateDriverOrg
749 add sp, 8
750 ret32
751_RMCreateDriver16 endp
752
753 ALIGN 2
754 PUBLIC _CallRM
755_CallRM proc near
756 enter 0002H,00H
757 call near ptr _GetCS
758 test al,03H
759 je short L1
760 push word ptr +0aH[bp]
761 push word ptr +8H[bp]
762 push word ptr +6H[bp]
763 call dword ptr _RM_Help3
764 add sp,0006H
765 leave
766 ret
767L1: push word ptr +6H[bp]
768 call dword ptr _RM_Help0
769 leave
770 ret
771_CallRM endp
772
773 ALIGN 2
774_GetCS proc near
775 enter 0002H,00H
776 push cs
777 pop word ptr -2H[bp]
778 mov ax,word ptr -2H[bp]
779 leave
780 ret
781_GetCS endp
782
783 ALIGN 2
784 PUBLIC _RMDestroyDriverOrg
785_RMDestroyDriverOrg proc far
786 enter16
787 test byte ptr _RMFlags,01H
788 je short DestroyDrvL1
789 lea ax, [bp+6]
790 push ss
791 push ax
792 push 0003H
793 push cs
794 call near ptr _CallRM
795 mov sp,bp
796 ret16
797DestroyDrvL1: test byte ptr _RMFlags,02H
798 je short DestroyDrvL2
799 sub ax,ax
800 ret16
801DestroyDrvL2: mov ax,0001H
802 ret16
803_RMDestroyDriverOrg endp
804
805 ALIGN 2
806 PUBLIC _RMDestroyDriver16
807_RMDestroyDriver16 proc far
808 enter32
809 xor eax, eax
810 push dword ptr [bp+10]
811 call _RMDestroyDriverOrg
812 add sp, 4
813 ret32
814_RMDestroyDriver16 endp
815
816
817 ALIGN 2
818_RMGetNodeInfoOrg proc far
819 enter16
820 test byte ptr _RMFlags,01H
821 je short GetNodeInfo_L3
822 test byte ptr _RMFlags,04H
823 je short GetNodeInfo_L1
824 lea ax,+6H[bp]
825 push ss
826 push ax
827 push 001cH
828 push cs
829 call near ptr _CallRM
830 mov sp,bp
831 ret16
832GetNodeInfo_L1: mov ax,0014H
833 ret16
834 nop
835GetNodeInfo_L2: test byte ptr _RMFlags,02H
836 je short GetNodeInfo_L3
837 mov ax,0015H
838 ret16
839GetNodeInfo_L3: mov ax,0001H
840 ret16
841_RMGetNodeInfoOrg endp
842
843 ALIGN 2
844 PUBLIC _RMGetNodeInfo16
845_RMGetNodeInfo16 proc far
846 enter32
847 xor eax, eax
848 push word ptr [bp+18] ;pushed as dword by watcom
849 push dword ptr [bp+14]
850 push dword ptr [bp+10]
851 call _RMGetNodeInfoOrg
852 add sp, 10
853 ret32
854_RMGetNodeInfo16 endp
855
856 ALIGN 2
857_RMDevIDToHandleListOrg proc far
858 enter16
859 test byte ptr _RMFlags,01H
860 je short RMDevIDToHandleList_L2
861 test byte ptr _RMFlags,04H
862 je short RMDevIDToHandleList_L1
863 lea ax,+6H[bp]
864 push ss
865 push ax
866 push 0020H
867 push cs
868 call near ptr _CallRM
869 mov sp,bp
870 ret16
871RMDevIDToHandleList_L1:
872 mov ax,0014H
873 ret16
874 nop
875RMDevIDToHandleList_L2:
876 test byte ptr _RMFlags,02H
877 je short RMDevIDToHandleList_L3
878 sub ax,ax
879 ret16
880 nop
881RMDevIDToHandleList_L3:
882 mov ax,0001H
883 ret16
884 nop
885_RMDevIDToHandleListOrg endp
886
887 ALIGN 2
888 PUBLIC _RMDevIDToHandleList16
889_RMDevIDToHandleList16 proc far
890 enter32
891 xor eax, eax
892 push dword ptr [bp+42]
893 push dword ptr [bp+38]
894 push dword ptr [bp+34]
895 push dword ptr [bp+30]
896 push dword ptr [bp+26]
897 push dword ptr [bp+22]
898 push dword ptr [bp+18]
899 push dword ptr [bp+14]
900 push dword ptr [bp+10]
901 call _RMDevIDToHandleListOrg
902 add sp, 36
903 ret32
904_RMDevIDToHandleList16 endp
905
906 ALIGN 2
907_RMHandleToResourceHandleListOrg proc far
908 enter16
909 test byte ptr _RMFlags,01H
910 je short RMHandleToResourceHandleList_L2
911 test byte ptr _RMFlags,04H
912 je short RMHandleToResourceHandleList_L1
913 lea ax,+6H[bp]
914 push ss
915 push ax
916 push 0021H
917 push cs
918 call near ptr _CallRM
919 ret16
920 nop
921RMHandleToResourceHandleList_L1:
922 mov ax,0014H
923 ret16
924 nop
925RMHandleToResourceHandleList_L2:
926 test byte ptr _RMFlags,02H
927 je short RMHandleToResourceHandleList_L3
928 sub ax,ax
929 ret16
930 nop
931RMHandleToResourceHandleList_L3:
932 mov ax,0001H
933 ret16
934 nop
935_RMHandleToResourceHandleListOrg endp
936
937 ALIGN 2
938 PUBLIC _RMHandleToResourceHandleList16
939_RMHandleToResourceHandleList16 proc far
940 enter32
941 xor eax, eax
942 push dword ptr [bp+14]
943 push dword ptr [bp+10]
944 call _RMHandleToResourceHandleListOrg
945 add sp, 8
946 ret32
947_RMHandleToResourceHandleList16 endp
948
949 ALIGN 2
950ISR00_16 proc far
951 push ebx
952 mov ebx, 0
953 call far ptr FLAT:Interrupt32
954 pop ebx
955 retf
956ISR00_16 endp
957
958 ALIGN 2
959ISR01_16 proc far
960 push ebx
961 mov ebx, 1
962 call far ptr FLAT:Interrupt32
963 pop ebx
964 retf
965ISR01_16 endp
966
967 ALIGN 2
968ISR02_16 proc far
969 push ebx
970 mov ebx, 2
971 call far ptr FLAT:Interrupt32
972 pop ebx
973 retf
974ISR02_16 endp
975
976 ALIGN 2
977ISR03_16 proc far
978 push ebx
979 mov ebx, 3
980 call far ptr FLAT:Interrupt32
981 pop ebx
982 retf
983ISR03_16 endp
984
985 ALIGN 2
986ISR04_16 proc far
987 push ebx
988 mov ebx, 4
989 call far ptr FLAT:Interrupt32
990 pop ebx
991 retf
992ISR04_16 endp
993
994 ALIGN 2
995ISR05_16 proc far
996 push ebx
997 mov ebx, 5
998 call far ptr FLAT:Interrupt32
999 pop ebx
1000 retf
1001ISR05_16 endp
1002
1003 ALIGN 2
1004ISR06_16 proc far
1005 push ebx
1006 mov ebx, 6
1007 call far ptr FLAT:Interrupt32
1008 pop ebx
1009 retf
1010ISR06_16 endp
1011
1012 ALIGN 2
1013ISR07_16 proc far
1014 push ebx
1015 mov ebx, 7
1016 call far ptr FLAT:Interrupt32
1017 pop ebx
1018 retf
1019ISR07_16 endp
1020
1021;end of 16 bits code segment
1022__OffFinalCS16 label byte
1023
1024CODE16 ends
1025
1026CODE32 segment
1027ASSUME CS:FLAT, DS:FLAT, ES:FLAT
1028
1029 public __GETDS
1030 public thunk1632_devhelp
1031 public thunk1632_devhelp_modified_ds
1032 public DevHlp
1033 public DevHlp_ModifiedDS
1034 public STRATEGY_
1035 public IDC_
1036 public TIMER_
1037 extrn ALSA_STRATEGY : near
1038 extrn ALSA_IDC : near
1039 extrn ALSA_TIMER_ : near
1040 extrn ALSA_Interrupt : near
1041 extrn _rdOffset: dword
1042
1043IFDEF KEE
1044 extrn KernThunkStackTo16 : near
1045 extrn KernThunkStackTo32 : near
1046ELSE
1047 extrn GetTKSSBase : near
1048 extrn StackAlloc : near
1049 extrn StackFree : near
1050ENDIF
1051
1052;Called by Watcom to set the DS
1053 ALIGN 4
1054__GETDS proc near
1055 push eax
1056 mov eax, DOS32FLATDS
1057 mov ds, eax
1058 pop eax
1059 ret
1060__GETDS endp
1061
1062 ALIGN 4
1063DevHelpDebug proc near
1064 int 3
1065 int 3
1066 ret
1067DevHelpDebug endp
1068
1069
1070 ALIGN 4
1071DevHlp proc near
1072 DevThunkStackTo16_Int
1073 jmp far ptr CODE16:thunk3216_devhelp
1074 ALIGN 4
1075thunk1632_devhelp:
1076 DevThunkStackTo32_Int
1077 ret
1078DevHlp endp
1079
1080 ALIGN 4
1081DevHlp_ModifiedDS proc near
1082 DevThunkStackTo16_Int
1083 jmp far ptr CODE16:thunk3216_devhelp_modified_ds
1084 ALIGN 4
1085thunk1632_devhelp_modified_ds:
1086 DevThunkStackTo32_Int
1087 ret
1088DevHlp_ModifiedDS endp
1089
1090
1091IFNDEF KEE
1092;;******************************************************************************
1093;FixSelDPL:
1094;
1095; Set DPL of DOS32FLATDS selector to 0 or else we'll get a trap D when loading
1096; it into the SS register (DPL must equal CPL when loading a selector into SS)
1097;;******************************************************************************
1098 PUBLIC FixSelDPL
1099 ALIGN 4
1100FixSelDPL proc near
1101 cmp fWrongDPL, 1
1102 jne short @@fixdpl_end
1103 cmp SelRef, 0
1104 jne short @@fixdpl_endfix
1105 push eax
1106 push ebx
1107 push edx
1108 sgdt fword ptr [gdtsave] ; access the GDT ptr
1109 mov ebx, dword ptr [gdtsave+2] ; get lin addr of GDT
1110 mov eax, ds ; build offset into table
1111 and eax, 0fffffff8h ; mask away DPL
1112 add ebx, eax ; build address
1113
1114 mov eax, dword ptr [ebx+4]
1115 mov edx, eax
1116 shr edx, 13
1117 and edx, 3
1118
1119 ;has the OS/2 kernel finally changed the DPL to 0?
1120 cmp edx, 0
1121 jne @@changedpl
1122 mov fWrongDPL, 0 ;don't bother anymore
1123 mov SelRef, 0
1124 jmp short @@endchange
1125
1126@@changedpl:
1127 mov oldDPL, eax
1128 and eax, NOT 6000h ;clear bits 5 & 6 in the high word (DPL)
1129 mov dword ptr [ebx+4], eax
1130@@endchange:
1131 pop edx
1132 pop ebx
1133 pop eax
1134@@fixdpl_endfix:
1135 inc SelRef
1136@@fixdpl_end:
1137 ret
1138FixSelDPL endp
1139;;******************************************************************************
1140; RestoreSelDPL:
1141;
1142; Restore DPL of DOS32FLATDS selector or else OS/2 kernel code running in ring 3
1143; will trap (during booting only; this sel has a DPL of 0 when PM starts up)
1144;;******************************************************************************
1145 PUBLIC RestoreSelDPL
1146 ALIGN 4
1147RestoreSelDPL proc near
1148 cmp fWrongDPL, 1
1149 jne short @@restdpl_end
1150
1151 cmp SelRef, 1
1152 jne short @@restdpl_endrest
1153 push eax
1154 push ebx
1155 sgdt fword ptr [gdtsave] ; access the GDT ptr
1156 mov ebx, dword ptr [gdtsave+2] ; get lin addr of GDT
1157 mov eax, ds ; build offset into table
1158 and eax, 0fffffff8h ; mask away DPL
1159 add ebx, eax ; build address
1160
1161 mov eax, oldDPL
1162 mov dword ptr [ebx+4], eax
1163 pop ebx
1164 pop eax
1165@@restdpl_endrest:
1166 dec SelRef
1167@@restdpl_end:
1168 ret
1169RestoreSelDPL endp
1170ENDIF
1171
1172;*******************************************************************************
1173;Copy parameters to 16 bits stack and call 16:32 IDC handler
1174;
1175; Paramters: IDC16_HANDLER pHandler
1176; ULONG cmd
1177; ULONG param1
1178; ULONG param2
1179;*******************************************************************************
1180 PUBLIC _CallPDD16
1181 ALIGN 4
1182_CallPDD16 proc near
1183 push ebp
1184 mov ebp, esp
1185 push ebx
1186
1187 lea ebx, [ebp+8]
1188 DevThunkStackTo16_Int
1189
1190 push dword ptr [ebx+16] ;param2
1191 push dword ptr [ebx+12] ;param1
1192 push dword ptr [ebx+8] ;cmd
1193 call fword ptr [ebx]
1194 add sp, 12
1195
1196 DevThunkStackTo32_Int
1197
1198 pop ebx
1199 pop ebp
1200 ret
1201_CallPDD16 endp
1202
1203;*******************************************************************************
1204;Strategy entrypoint
1205; Parameter:
1206; fs:ebx -> request packet pointer
1207;*******************************************************************************
1208 ALIGN 4
1209STRATEGY_ proc far
1210 push ds
1211 push es
1212 push fs
1213 push gs
1214 mov eax, DOS32FLATDS
1215 mov ds, eax
1216 mov es, eax
1217IFNDEF KEE
1218 ;done in init.cpp for the KEE version
1219 cmp dword ptr [intSwitchStack], 0
1220 jne stratcontinue
1221 ;get TKSSBase & intSwitchStack pointers
1222 call GetTKSSBase
1223stratcontinue:
1224ENDIF
1225 DevThunkStackTo32
1226 cmp eax, 0
1227 jne @@stackswitchfail_strat
1228 call ALSA_STRATEGY
1229 DevThunkStackTo16
1230@@stackswitchfail_strat:
1231 pop gs
1232 pop fs
1233 pop es
1234 pop ds
1235 retf
1236STRATEGY_ endp
1237
1238;*******************************************************************************
1239;IDC entrypoint
1240;
1241;in: ecx = cmd
1242; edx = ULONG parameter
1243;return value in eax
1244;*******************************************************************************
1245 ALIGN 4
1246IDC_ proc far
1247 push ds
1248 push es
1249 push fs
1250 push gs
1251 mov eax, DOS32FLATDS
1252 mov ds, eax
1253 mov es, eax
1254 DevThunkStackTo32
1255 cmp eax, 0
1256 jne @@stackswitchfail_idc
1257 call ALSA_IDC
1258 DevThunkStackTo16
1259@@stackswitchfail_idc:
1260 pop gs
1261 pop fs
1262 pop es
1263 pop ds
1264 retf
1265IDC_ endp
1266;*******************************************************************************
1267;Timer entrypoint
1268;
1269;*******************************************************************************
1270 ALIGN 4
1271TIMER_ proc far
1272 push ds
1273 push es
1274 push fs
1275 push gs
1276 mov eax, DOS32FLATDS
1277 mov ds, eax
1278 mov es, eax
1279IFDEF DEBUG
1280 add DbgU32TimerCnt, 1
1281ENDIF
1282 DevThunkStackTo32
1283 cmp eax, 0
1284 jne @@stackswitchfail_timer
1285 call ALSA_TIMER_
1286 DevThunkStackTo16
1287@@stackswitchfail_timer:
1288IFDEF DEBUG
1289 add DbgU32TimerCnt, -1
1290ENDIF
1291 pop gs
1292 pop fs
1293 pop es
1294 pop ds
1295 retf
1296TIMER_ endp
1297
1298
1299;*******************************************************************************
1300;32 bits interrupt wrapper which calls the generic interrupt handler in irq.cpp
1301;On entry:
1302; EBX = irq nr
1303;*******************************************************************************
1304 ALIGN 4
1305Interrupt32 proc far
1306 enter 0, 0
1307 and sp, 0fffch ; align stack
1308 pushad
1309 push ds
1310 push es
1311 push fs
1312 push gs
1313 mov eax, DOS32FLATDS
1314 mov ds, eax
1315 mov es, eax
1316 pushfd
1317IFDEF DEBUG
1318 add DbgU32IntCnt, 1
1319ENDIF
1320 ; At this point a cli is redundant
1321 ; we enter the interrupt handler with interrupts disabled.
1322 ;cli
1323 DevThunkStackTo32
1324 cmp eax, 0
1325 jne @@stackswitchfail_irq
1326 ;returns irq status in eax (1=handled; 0=unhandled)
1327 call ALSA_Interrupt
1328 DevThunkStackTo16
1329@@stackswitchfail_irq:
1330IFDEF DEBUG
1331 add DbgU32IntCnt, -1
1332ENDIF
1333 ;restore flags
1334 popfd
1335 cmp eax, 1
1336 je irqhandled
1337 stc ;tell OS/2 kernel we didn't handle this interrupt
1338 jmp short endofirq
1339irqhandled:
1340 clc ;tell OS/2 kernel this interrupt was ours
1341endofirq:
1342 pop gs
1343 pop fs
1344 pop es
1345 pop ds
1346 popad
1347 leave
1348 retf
1349Interrupt32 endp
1350
1351 ALIGN 4
1352HelpClose proc far
1353 push ds
1354 mov eax, DOS32FLATDS
1355 mov ds, eax
1356 mov _rdOffset, 0
1357 pop ds
1358 retf
1359HelpClose endp
1360
1361
1362;*******************************************************************************
1363;resource manager wrappers (switch stack and call 16 bits function)
1364;*******************************************************************************
1365 public _RMAllocResource
1366 public _RMModifyResources
1367 public _RMDeallocResource
1368 public _RMCreateDevice
1369 public _RMCreateAdapter
1370 public _RMCreateDriver
1371 public _RMDestroyDriver
1372 public _RMGetNodeInfo
1373 public _RMDevIDToHandleList
1374 public _RMHandleToResourceHandleList
1375
1376 ALIGN 4
1377
1378 ALIGN 4
1379_RMAllocResource proc near
1380 enterKEERM
1381 xor eax, eax
1382 push dword ptr [edi+16]
1383 push dword ptr [edi+12]
1384 push dword ptr [edi+8]
1385 call fword ptr RMAllocResource1632
1386 add sp, 12
1387 retKEERM
1388_RMAllocResource endp
1389
1390 ALIGN 4
1391_RMModifyResources proc near
1392 enterKEERM
1393 xor eax, eax
1394 push dword ptr [edi+20]
1395 push dword ptr [edi+16]
1396 push dword ptr [edi+12]
1397 push dword ptr [edi+8]
1398 call fword ptr RMModifyResources1632
1399 add sp, 16
1400 retKEERM
1401_RMModifyResources endp
1402
1403 ALIGN 4
1404_RMDeallocResource proc near
1405 enterKEERM
1406 xor eax, eax
1407 push dword ptr [edi+12]
1408 push dword ptr [edi+8]
1409 call fword ptr RMDeallocResource1632
1410 add sp, 8
1411 retKEERM
1412_RMDeallocResource endp
1413
1414 ALIGN 4
1415_RMCreateDevice proc near
1416 enterKEERM
1417 xor eax, eax
1418 push dword ptr [edi+24]
1419 push dword ptr [edi+20]
1420 push dword ptr [edi+16]
1421 push dword ptr [edi+12]
1422 push dword ptr [edi+8]
1423 call fword ptr RMCreateDevice1632
1424 add sp, 20
1425 retKEERM
1426_RMCreateDevice endp
1427
1428 ALIGN 4
1429_RMCreateAdapter proc near
1430 enterKEERM
1431 xor eax, eax
1432 push dword ptr [edi+24]
1433 push dword ptr [edi+20]
1434 push dword ptr [edi+16]
1435 push dword ptr [edi+12]
1436 push dword ptr [edi+8]
1437 call fword ptr RMCreateAdapter1632
1438 add sp, 20
1439 retKEERM
1440_RMCreateAdapter endp
1441
1442 ALIGN 4
1443_RMCreateDriver proc near
1444 enterKEERM
1445 xor eax, eax
1446 push dword ptr [edi+12]
1447 push dword ptr [edi+8]
1448 call fword ptr RMCreateDriver1632
1449 add sp, 8
1450 retKEERM
1451_RMCreateDriver endp
1452
1453 ALIGN 4
1454_RMDestroyDriver proc near
1455 enterKEERM
1456 xor eax, eax
1457 push dword ptr [edi+8]
1458 call fword ptr RMDestroyDriver1632
1459 add sp, 4
1460 ret32
1461_RMDestroyDriver endp
1462
1463 ALIGN 4
1464_RMGetNodeInfo proc near
1465 enterKEERM
1466 xor eax, eax
1467 push dword ptr [edi+16]
1468 push dword ptr [edi+12]
1469 push dword ptr [edi+8]
1470 call fword ptr RMGetNodeInfo1632
1471 add sp, 12
1472 retKEERM
1473_RMGetNodeInfo endp
1474
1475 ALIGN 4
1476_RMDevIDToHandleList proc near
1477 enterKEERM
1478 xor eax, eax
1479 push dword ptr [edi+40]
1480 push dword ptr [edi+36]
1481 push dword ptr [edi+32]
1482 push dword ptr [edi+28]
1483 push dword ptr [edi+24]
1484 push dword ptr [edi+20]
1485 push dword ptr [edi+16]
1486 push dword ptr [edi+12]
1487 push dword ptr [edi+8]
1488 call fword ptr RMDevIDToHandleList1632
1489 add sp, 36
1490 retKEERM
1491_RMDevIDToHandleList endp
1492
1493 ALIGN 4
1494_RMHandleToResourceHandleList proc near
1495 enterKEERM
1496 xor eax, eax
1497 push dword ptr [edi+12]
1498 push dword ptr [edi+8]
1499 call fword ptr RMHandleToResourceHandleList1632
1500 add sp, 8
1501 retKEERM
1502_RMHandleToResourceHandleList endp
1503
1504
1505CODE32 ends
1506
1507DATA32 segment
1508 public __OffsetFinalCS16
1509 public __OffsetFinalDS16
1510 public PDDName
1511 public _MSG_TABLE32
1512 public RMAllocResource1632
1513 public RMModifyResources1632
1514 public RMDeallocResource1632
1515 public RMCreateDevice1632
1516 public RMCreateAdapter1632
1517 public RMCreateDriver1632
1518 public RMDestroyDriver1632
1519 public RMGetNodeInfo1632
1520 public RMDevIDToHandleList1632
1521 public RMHandleToResourceHandleList1632
1522 public _TimerHandler16
1523 public _ISR00
1524 public _ISR01
1525 public _ISR02
1526 public _ISR03
1527 public _ISR04
1528 public _ISR05
1529 public _ISR06
1530 public _ISR07
1531
1532IFDEF KEE
1533 public stackbase
1534 public stacksel
1535
1536 stackbase dd 0
1537 stacksel dd 0
1538ELSE
1539 extrn intSwitchStack : dword
1540
1541 public gdtsave
1542 public fWrongDPL
1543 public oldDPL
1544 public SelRef
1545
1546 tempeax dd 0
1547 tempedx dd 0
1548 tempesi dd 0
1549 cpuflags dd 0
1550
1551 gdtsave dq 0
1552 fWrongDPL dd 1 ;DOS32FLATDS has the wrong DPL for SS
1553 SelRef dd 0
1554 oldDPL dd 0
1555
1556 fInitStack dd 0
1557ENDIF
1558
1559 __OffsetFinalCS16 dw OFFSET CODE16:__OffFinalCS16
1560 __OffsetFinalDS16 dw OFFSET DATA16:__OffFinalDS16
1561
1562 _MSG_TABLE32 dw OFFSET DATA16:_MSG_TABLE16
1563 dw SEG DATA16:_MSG_TABLE16
1564
1565;16:16 address of driver name
1566 PDDName dw OFFSET DATA16:pddname16
1567 dw SEG DATA16:pddname16
1568
1569;16:32 addresses of resource manager functions in 16 bits code segment
1570 RMAllocResource1632 dd OFFSET CODE16:_RMAllocResource16
1571 dw SEG CODE16:_RMAllocResource16
1572 dw 0
1573 RMModifyResources1632 dd OFFSET CODE16:_RMModifyResources16
1574 dw SEG CODE16:_RMModifyResources16
1575 dw 0
1576 RMDeallocResource1632 dd OFFSET CODE16:_RMDeallocResource16
1577 dw SEG CODE16:_RMDeallocResource16
1578 dw 0
1579 RMCreateDevice1632 dd OFFSET CODE16:_RMCreateDevice16
1580 dw SEG CODE16:_RMCreateDevice16
1581 dw 0
1582 RMCreateAdapter1632 dd OFFSET CODE16:_RMCreateAdapter16
1583 dw SEG CODE16:_RMCreateAdapter16
1584 dw 0
1585 RMCreateDriver1632 dd OFFSET CODE16:_RMCreateDriver16
1586 dw SEG CODE16:_RMCreateDriver16
1587 dw 0
1588 RMDestroyDriver1632 dd OFFSET CODE16:_RMDestroyDriver16
1589 dw SEG CODE16:_RMDestroyDriver16
1590 dw 0
1591 RMGetNodeInfo1632 dd OFFSET CODE16:_RMGetNodeInfo16
1592 dw SEG CODE16:_RMGetNodeInfo16
1593 dw 0
1594 RMDevIDToHandleList1632 dd OFFSET CODE16:_RMDevIDToHandleList16
1595 dw SEG CODE16:_RMDevIDToHandleList16
1596 dw 0
1597
1598 RMHandleToResourceHandleList1632 dd OFFSET CODE16:_RMHandleToResourceHandleList16
1599 dw SEG CODE16:_RMHandleToResourceHandleList16
1600 dw 0
1601
1602;16:16 address of uniaud_stub_timer
1603 _TimerHandler16 dd OFFSET CODE16:uniaud_stub_timer
1604 dw OFFSET CODE16:uniaud_stub_timer
1605
1606;16:16 addresses of interrupt dispatchers
1607 _ISR00 dw OFFSET CODE16:ISR00_16
1608 dw SEG CODE16:ISR00_16
1609 _ISR01 dw OFFSET CODE16:ISR01_16
1610 dw SEG CODE16:ISR01_16
1611 _ISR02 dw OFFSET CODE16:ISR02_16
1612 dw SEG CODE16:ISR02_16
1613 _ISR03 dw OFFSET CODE16:ISR03_16
1614 dw SEG CODE16:ISR03_16
1615 _ISR04 dw OFFSET CODE16:ISR04_16
1616 dw SEG CODE16:ISR04_16
1617 _ISR05 dw OFFSET CODE16:ISR05_16
1618 dw SEG CODE16:ISR05_16
1619 _ISR06 dw OFFSET CODE16:ISR06_16
1620 dw SEG CODE16:ISR06_16
1621 _ISR07 dw OFFSET CODE16:ISR07_16
1622 dw SEG CODE16:ISR07_16
1623DATA32 ends
1624
1625end
1626
Note: See TracBrowser for help on using the repository browser.