home *** CD-ROM | disk | FTP | other *** search
/ Groovy Bytes: Behind the Moon / groovybytes.iso / GROOVY / SND_TOOL / CDMP16.ZIP / SOURCE.ZIP / SBDMA.ASM < prev    next >
Encoding:
Assembly Source File  |  1995-01-26  |  15.9 KB  |  837 lines

  1. ;[]------------------------------------------------------------------------[]
  2. ;|                                                                          |
  3. ;| (c) 1993,1994 by Marc van Shaney , aka Kaya Memisoglu                    |
  4. ;|                                                                          |
  5. ;| Dieser Assembler-Source-Code unterliegt dem Urheberrecht von Kaya        |
  6. ;| Memisoglu und darf auch nur mit seiner schriftlichen Genehmigung         |
  7. ;| in kommerziellen Programmen verwendet werden.                            |
  8. ;| Ich übernehme keinerlei Verantwortung für eventuelle Schäden,die dieses  |
  9. ;| Programm verursacht.                                                     |
  10. ;|                                                                          |
  11. ;|                                                                          |
  12. ;| 18.1.1994 Kaya Memisoglu                                                 |
  13. ;|                                                                          |
  14. ;[]------------------------------------------------------------------------[]
  15.  
  16. ; !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!
  17. ; !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!
  18. ;
  19. ; I DO NOT SAVE THE REGISTER VARIABLES SI AND DI IN THIS CODE AND IN SOME
  20. ; OTHER MODULES. SO MAKE SURE BEFORE COMPILING THIS CODE THAT THE REGISTER
  21. ; VARIABLES IN BORLAND C ARE SET TO *NONE*.
  22. ; BUT IF YOU STILL WANT TO USE THEM, YOU HAVE TO SAVE THEM BY CHANGING THIS
  23. ; CODE !!!
  24. ;
  25. ; !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!
  26. ; !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!
  27.  
  28. ;The Sound_Block structure:
  29. ;    word         Sample_rate
  30. ;    word         Sample_Size
  31. ;    byte         Bits_per_Sample
  32. ;    byte         Channels
  33. ;    10 bytes     resreved
  34.  
  35.  
  36. P386
  37. LOCALS
  38.  
  39.  
  40. Delay MACRO
  41.     push cx
  42.     push ax
  43.     push si
  44.     push ds
  45.     pushfd
  46.     cld
  47.     xor si,si
  48.     mov cx,0fffeh
  49.     rep lodsb
  50.     xor si,si
  51.     mov cx,0fffeh
  52.     rep lodsb
  53.     popfd
  54.     pop ds
  55.     pop si
  56.     pop ax
  57.     pop cx
  58.       ENDM
  59.  
  60.  
  61.  
  62. TRUE                equ   1
  63. FALSE               equ   -1
  64. SAMPLE_RATE         equ   0
  65. SAMPLE_SIZE        equ   2
  66.  
  67. DSP_Retry        equ  30h
  68. DSP_Out_DMA             equ  14h
  69. DSP_Reset_Port          equ  6
  70. DSP_Read_Port           equ  0ah
  71. DSP_Write_Port          equ  0ch
  72. DSP_Status_Port         equ  0eh
  73. SOUND_READY             equ  2
  74. SOUND_PLAYING        equ  1
  75. SOUND_RECORDING        equ  4
  76.  
  77. SOUND_CAN_PLAY        equ    1
  78. SOUND_CAN_RECORD    equ    2
  79. SOUND_CAN_STEREO    equ    4
  80. SOUND_CAN_MONO        equ    8
  81. SOUND_CAN_8BIT        equ    16
  82. SOUND_CAN_16BIT        equ    32
  83. SOUND_USES_TIMER    equ    64
  84.  
  85.  
  86.  
  87.  
  88. .MODEL USE16 LARGE
  89. .Data
  90. PUBLIC C SBDMA_Driver
  91. SBDMA_Driver dw    OFFSET drv
  92.          dw SEG DRV
  93. .Code
  94.  
  95.  
  96. drv:  DB 'Cyberdyne Driver',0,'               '  ; 32 Bytes
  97.       DB 'SOUND',0,'          '               ;16 Bytes
  98.       DB 'Sound-Blaster DMA driver       ',0  ; 32 Bytes
  99.       DW 0204h              ;Version
  100.       DW 9                  ;Anzahl der Funktionen (und damit
  101.                 ; Segmentpräfixe !!!)
  102.       DW Config_Info
  103.       DW SEG Config_Info
  104.  
  105.       DW Init_Driver
  106.       DW SEG Config_Info
  107.       DW Exit_Driver
  108.       DW SEG Config_Info
  109.       DW Play_Voice
  110.       DW SEG Config_Info
  111.       DW Stop_Voice
  112.       DW SEG Config_Info
  113.       DW Record_Voice
  114.       DW SEG Config_Info
  115.       DW Set_Play_Handler
  116.       DW SEG Config_Info
  117.       DW Set_Record_Handler
  118.       DW SEG Config_Info
  119.       DW Set_Next_Block
  120.       DW SEG Config_Info
  121.  
  122.       DD SOUND_CAN_PLAY or SOUND_CAN_MONO or SOUND_CAN_8BIT or SOUND_CAN_STEREO
  123.       DW 44000
  124.       DW 44000
  125.  
  126.  
  127. Status        DW ?
  128. Data_Adress     DD ?
  129. Data_Size       DW ?
  130.  
  131. DSP_Base        DW 220h
  132. DSP_Int         DB 0dh
  133. DSP_DMA         DB 1
  134. IntOffset       DW ?
  135. IntSegment      DW ?
  136.  
  137. Voice_Rate      DW ?
  138. Play_Handler    DD 0
  139. Record_Handler    DD 0
  140. Next_Block    DD ?
  141.  
  142. SB_Pro        DB ?
  143.  
  144. Config_Port    DW 2
  145. Config_IRQ    DW 5
  146. Config_DMA    DW 1
  147.  
  148.  
  149. HardIntAdress    DD ?
  150.  
  151.  
  152. ;=========================================================================
  153. ;====                                                                 ====
  154. ;====                                                                 ====
  155. ;====                    DMA-Routinen                                 ====
  156. ;====                                                                 ====
  157. ;====                                                                 ====
  158. ;=========================================================================
  159.  
  160.  
  161. DMA_Page_Table db 87h,83h,81h,82h
  162.  
  163. ;CX holds Data_Size
  164. ;BH holds mode
  165.  
  166. DMA_Setup PROC NEAR
  167.       xor al,al
  168.       out 0ch,al                 ;FlipFlop löschen
  169.  
  170.       mov bl,cs:[DSP_DMA]        ;BL holds DMA_Channel
  171.       mov al,bl
  172.       or al,0100b
  173.       out 0ah,al                        ;Set mask
  174.  
  175.       movzx dx,bl
  176.       shl dx,1
  177.       inc dx
  178.       mov ax,cx
  179.       dec ax
  180.       out dx,al
  181.       shr ax,8
  182.       out dx,al                         ;Set size
  183.  
  184.       mov al,bl
  185.       add al,bh
  186.       out 0bh,al            ;Set Mode
  187.  
  188.       movzx eax,word ptr cs:[Data_Adress]
  189.       movzx ecx,word ptr cs:[Data_Adress+2]
  190.       shl ecx,4
  191.       add eax,ecx
  192.       dec dx
  193.       out dx,al
  194.       shr eax,8
  195.       out dx,al
  196.       shr eax,8                ;Set Offset
  197.  
  198.       xor bh,bh                    ;BX holds DSP_DMA_Channel
  199.       mov dl,cs:[bx+OFFSET DMA_Page_Table]
  200.       out dx,al                ;Page
  201.  
  202.       mov al,cs:[DSP_DMA]               ;Clear mask
  203.       out 0ah,al
  204.       retn
  205. DMA_Setup ENDP
  206.  
  207.  
  208.  
  209.  
  210. Set_Interrupt_Flag PROC NEAR
  211.       in al,21h
  212.       movzx bx,cs:[DSP_Int]
  213.       sub bx,8
  214.       bts ax,bx
  215.       out 21h,al
  216.  
  217.       retn
  218. Set_Interrupt_Flag ENDP
  219.  
  220.  
  221.  
  222.  
  223.  
  224. Clear_Interrupt_Flag PROC NEAR
  225.       in al,21h
  226.       movzx bx,cs:[DSP_Int]
  227.       sub bx,8
  228.       btr ax,bx
  229.       out 21h,al
  230.  
  231.       retn
  232. Clear_Interrupt_Flag ENDP
  233.  
  234.  
  235.  
  236. ;=========================================================================
  237. ;====                                                                 ====
  238. ;====                                                                 ====
  239. ;====                    DSP-Routinen                                 ====
  240. ;====                                                                 ====
  241. ;====                                                                 ====
  242. ;=========================================================================
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249. DSP_Init PROC NEAR
  250.       mov dx,cs:[DSP_Base]
  251.       add dx,DSP_Reset_Port
  252.       mov al,1
  253.       out dx,al
  254.       Delay
  255.       xor al,al
  256.       out dx,al
  257.  
  258.       mov dx,cs:[DSP_Base]
  259.       add dx,DSP_Read_Port
  260.       mov cx,1000h
  261.  Schleife51:
  262.         push cx
  263.     mov dx,cs:[DSP_Base]
  264.         add dx,DSP_Status_Port
  265.         mov cx,1400h
  266.    Schleife61:
  267.          in al,dx
  268.          test al,128
  269.    loope Schleife61
  270.        mov dx,cs:[DSP_Base]
  271.        add dx,DSP_Read_Port
  272.        in al,dx
  273.        pop cx
  274.        cmp al,0aah
  275.        je OK
  276.  loopne Schleife51
  277.  
  278.       mov ax,FALSE
  279.       retn
  280.   OK:
  281.       mov ax,TRUE
  282.       retn
  283.  DSP_Init ENDP
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290. DSP_Read PROC NEAR
  291.       mov dx,cs:[DSP_Base]
  292.       add dx,DSP_Status_Port
  293.       mov cx,DSP_Retry
  294.  Schleife73:
  295.        in al,dx
  296.        test al,128
  297.  loope Schleife73
  298.       mov dx,cs:[DSP_Base]
  299.       add dx,DSP_Read_Port
  300.       in al,dx
  301.       movzx ax,al
  302.       retn
  303. DSP_Read ENDP
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310. DSP_Write PROC NEAR
  311.       ARG Value:word
  312.       push bp
  313.       mov bp,sp
  314.  
  315.       mov dx,cs:[DSP_Base]
  316.       add dx,DSP_Write_Port
  317.       mov cx,DSP_Retry
  318.  Schleife97:
  319.        in al,dx
  320.        test al,128
  321.  loopne Schleife97
  322.  
  323.       mov ax,Value
  324.       out dx,al
  325.       pop bp
  326.       retn
  327. DSP_Write ENDP
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336. DSP_WriteM MACRO value
  337.     LOCAL @L1
  338.     mov cx,DSP_Retry
  339.  @L1:
  340.     in al,dx
  341.     test al,128
  342.  loopne @L1
  343.     mov al,value
  344.     out dx,al
  345.        ENDM
  346.  
  347.  
  348.  
  349.  
  350. ;Rate in BX
  351. Init_Voice MACRO
  352.       LOCAL @NoProCommand
  353.       mov cs:[Voice_Rate],bx
  354.       mov cs:[Status],SOUND_READY
  355.       call DSP_Write C,040h
  356.  
  357.       xor edx,edx
  358.       mov eax,1000000
  359.       movzx ebx,cs:[Voice_Rate]
  360.       div ebx
  361.       neg al
  362.  
  363.       cmp ebx,23000
  364.       jb @NoProCommand
  365.       mov cl,1
  366.  
  367.   @NoProCommand:
  368.       mov bl,al
  369.       mov cs:[SB_Pro],cl
  370.       mov dx,cs:[DSP_Base]
  371.       add dx,DSP_Write_Port
  372.       DSP_WriteM bl
  373.   ENDM
  374.  
  375.  
  376.  
  377.  
  378.  
  379. DSP_Status MACRO
  380.       mov dx,cs:[DSP_Base]
  381.       add dx,DSP_Status_Port
  382.       in al,dx
  383.       add dx,DSP_Read_Port-DSP_Status_Port
  384.       in al,dx
  385.       ENDM
  386.  
  387.  
  388.  
  389.  
  390.  
  391. ;BlockGröße in BX
  392. Play_VoiceM MACRO
  393.     LOCAL @NoPro,@End_Play
  394.     mov dx,cs:[DSP_Base]
  395.     add dx,DSP_Write_Port
  396.     dec bx
  397.     cmp cs:[SB_Pro],1
  398.     jne short @NoPro
  399.     DSP_WriteM 48h
  400.     DSP_WriteM bl
  401.     DSP_WriteM bh
  402.     DSP_WriteM 91h
  403.     jmp short @End_Play
  404.  
  405.    @NoPro:
  406.     DSP_WriteM 14h
  407.     DSP_WriteM bl
  408.     DSP_WriteM bh
  409.    @End_Play:
  410. ENDM
  411.  
  412.  
  413. ;AH contains SAMPLE-BYTE
  414. Play_Byte MACRO
  415.     LOCAL @1,@2
  416.           mov dx,cs:[DSP_Base]
  417.           add dx,DSP_Write_Port
  418.           mov cx,DSP_Retry
  419.          @1: in al,dx
  420.                test al,128
  421.         loopne @1
  422.           mov al,10h
  423.           out dx,al
  424.  
  425.     @2: in al,dx
  426.                test al,128
  427.         loopne @2
  428.           mov cx,DSP_Retry
  429.           mov al,ah
  430.           out dx,al
  431.    ENDM
  432.  
  433.  
  434.  
  435. ;=========================================================================
  436. ;====                                                                 ====
  437. ;====                                                                 ====
  438. ;====                    Sound-Routinen                               ====
  439. ;====                                                                 ====
  440. ;====                                                                 ====
  441. ;=========================================================================
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453. Init_Driver PROC FAR
  454.       mov al,byte ptr cs:[Config_IRQ]
  455.       add al,8
  456.       mov cs:[DSP_Int],al
  457.       mov ah,35h
  458.       mov bx,cs:[Config_Port]
  459.       shl bx,4
  460.       add bx,200h
  461.       mov cs:[DSP_Base],bx
  462.       mov bx,cs:[Config_DMA]
  463.       mov cs:[DSP_DMA],bl
  464.  
  465.       mov al,cs:[DSP_Int]
  466.       mov ah,35h
  467.       int 21h                      ;Alten Vector ermitteln
  468.       mov cs:[IntOffset],bx
  469.       mov cs:[IntSegment],es
  470.  
  471.       movzx bx,cs:[DSP_Int]
  472.       shl bx,2
  473.       xor ax,ax
  474.       mov es,ax
  475.       mov eax,es:[bx]              ;Interrupttabelle
  476.       mov cs:[HardIntAdress],eax
  477.  
  478.       mov cs:[Play_Handler],0
  479.       mov cs:[Record_Handler],0
  480.       mov cs:[Status],0
  481.       call DSP_Init
  482.  
  483.       retf
  484. Init_Driver ENDP
  485.  
  486.  
  487.  
  488.  
  489.  
  490. Exit_Driver PROC FAR
  491.       mov ah,25h
  492.       mov al,cs:[DSP_Int]
  493.       push ds
  494.       mov ds,cs:[IntSegment]
  495.       mov dx,cs:[IntOffset]
  496.       int 21h                      ;Vector setzen
  497.       pop ds
  498.       mov ax,TRUE
  499.       retf
  500. Exit_Driver ENDP
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511. Play_Voice PROC FAR
  512.       ARG Data:dword
  513.       push bp
  514.       mov bp,sp
  515.       cli
  516.  
  517.       les si,[Data]
  518.       mov ax,es:[si+SAMPLE_SIZE]
  519.       mov cs:[Data_Size],ax
  520.       mov bx,es:[si+SAMPLE_RATE]
  521.       Init_Voice
  522.       mov eax,[Data]
  523.       add eax,10000h
  524.       mov cs:[Data_Adress],eax
  525.       or cs:[Status],SOUND_PLAYING
  526.       mov cs:[Next_Block],0
  527.  
  528.       call DSP_Write C,0d1h          ;Lautsprecher einschalten
  529.       mov bh,72
  530.       mov cx,cs:[Data_Size]
  531.       call DMA_Setup
  532.  
  533.       mov ah,25h
  534.       mov al,cs:[DSP_Int]
  535.       push ds
  536.       push cs
  537.       pop ds
  538.       mov dx,OFFSET Play_Interrupt
  539.       int 21h                        ;Vector setzen
  540.       pop ds
  541.       call Clear_Interrupt_Flag
  542.  
  543.       mov bx,cs:[Data_Size]
  544.       Play_VoiceM
  545.  
  546.       sti
  547.       pop bp
  548.       mov ax,TRUE
  549.       retf
  550. Play_Voice ENDP
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559. Stop_Voice PROC FAR
  560.       pushf
  561.       cli
  562.  
  563.       mov ah,25h
  564.       mov al,cs:[DSP_Int]
  565.       push ds
  566.       mov ds,cs:[IntSegment]
  567.       mov dx,cs:[IntOffset]
  568.       int 21h                      ;Vector setzen
  569.       pop ds
  570.  
  571.       call DSP_Write C,0d0h             ;Stop !
  572.       call Set_Interrupt_Flag
  573.       call DSP_Write C,0d3h        ;Lautsprecher ausschalten
  574.  
  575.       mov bl,cs:[DSP_DMA]        ;BL holds DMA_Channel
  576.       mov al,bl
  577.       or al,0100b
  578.       out 0ah,al                        ;Set mask
  579.  
  580.       mov cs:[Data_Size],0
  581.       mov cs:[Data_Adress],0ffffffffh
  582.       and cs:[Status],0ffffh-SOUND_PLAYING-SOUND_RECORDING
  583.  
  584.       popf
  585.       mov ax,TRUE
  586.       retf
  587. Stop_Voice ENDP
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594. Record_Voice PROC FAR
  595.       ARG Data:dword,dsize:word
  596.       push bp
  597.       mov bp,sp
  598.       cli
  599.  
  600.       mov cx,[dsize]
  601.       mov cs:[Data_Size],cx         ;CX holds size
  602.       mov eax,[Data]
  603.       mov cs:[Data_Adress],eax
  604.       or cs:[Status],SOUND_RECORDING
  605.  
  606.       mov bh,84
  607.       call DMA_Setup
  608.       call DSP_Write C,0d1h          ;Lautsprecher einschalten
  609.  
  610.       mov ah,25h
  611.       mov al,cs:[DSP_Int]
  612.       push ds
  613.       push cs
  614.       pop ds
  615.       mov dx,OFFSET Record_Interrupt
  616.       int 21h                        ;Vector setzen
  617.       pop ds
  618.       call Clear_Interrupt_Flag
  619.  
  620.       call DSP_Write C,24h
  621.       call DSP_Write C,cs:[Data_Size]
  622.       call DSP_Write C,cs:[Data_Size+1]
  623.  
  624.       sti
  625.       pop bp
  626.       mov ax,TRUE
  627.       retf
  628. Record_Voice ENDP
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638. Record_Interrupt PROC FAR
  639.       pushad
  640.       push ds
  641.       push es
  642.  
  643.       DSP_Status
  644.       mov dx,20h
  645.       mov al,20h
  646.       out dx,al
  647.  
  648.       cmp cs:[Next_Block],0
  649.       je short RecNo_Next_Block
  650.       lds si,cs:[Next_Block]
  651.       mov cx,ds:[si+SAMPLE_SIZE]
  652.       dec cx
  653.       mov cs:[Data_Size],cx
  654.       mov eax,cs:[Next_Block]
  655.       mov cs:[Data_Adress],eax
  656.  
  657.       mov bh,84h
  658.       call DMA_Setup
  659.       call DSP_Write C,24h
  660.       call DSP_Write C,cs:[Data_Size]
  661.       call DSP_Write C,cs:[Data_Size+1]
  662.       mov cs:[Next_Block],0
  663.       cmp cs:[Record_Handler],0
  664.       je short RecNo_Handler            ;JE
  665.       call cs:[Record_Handler]
  666.       cmp ax,0
  667.       jl short Stop_Input
  668.  
  669.     RecNo_Handler:
  670.       pop es
  671.       pop ds
  672.       popad
  673.       iret
  674.  
  675.    RecNo_Next_Block:
  676.       cmp cs:[Record_Handler],0
  677.       je short Stop_Input            ;JE
  678.       call cs:[Record_Handler]
  679.       cmp ax,0
  680.       jl short Stop_Input
  681.  
  682.       pop es
  683.       pop ds
  684.       popad
  685.       iret
  686.  
  687.    Stop_Input:
  688.       call Stop_Voice
  689.       pop es
  690.       pop ds
  691.       popad
  692.       iret
  693. Record_Interrupt ENDP
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701. Play_Interrupt PROC FAR
  702.       pushad
  703.       push ds
  704.       push es
  705.  
  706.       DSP_Status
  707.       mov al,20h
  708.       out 20h,al
  709.       cmp cs:[Next_Block],0
  710.       je PlyNo_Next_Block
  711.       lds bx,cs:[Next_Block]
  712. ;      mov ah,ds:[bx+16]
  713. ;      Play_Byte
  714.       mov cx,ds:[bx+SAMPLE_SIZE]
  715.       mov cs:[Data_Size],cx
  716.       mov eax,cs:[Next_Block]
  717.       add eax,10000h            ;this is one paragraph
  718.       mov cs:[Data_Adress],eax
  719.       push cx
  720.       mov bh,72
  721.       call DMA_Setup
  722.       pop bx
  723.       Play_VoiceM
  724.       mov cs:[Next_Block],0
  725.       cmp cs:[Play_Handler],0
  726.       je short No_Handler
  727.       sti
  728.       call cs:[Play_Handler]
  729.       cmp ax,0
  730.       jl short Stop_Output
  731.  
  732.     No_Handler:
  733.       pop es
  734.       pop ds
  735.       popad
  736.       iret
  737.  
  738.  
  739.     PlyNo_Next_Block:
  740.       cmp cs:[Play_Handler],0
  741.       je short Stop_Output
  742.       sti
  743.       call cs:[Play_Handler]
  744.       cmp ax,0
  745.       jl short Stop_Output
  746.       pop es
  747.       pop ds
  748.       popad
  749.       iret
  750.  
  751.    Stop_Output:
  752.       call Stop_Voice
  753.       pop es
  754.       pop ds
  755.       popad
  756.       iret
  757. Play_Interrupt ENDP
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765. Set_Play_Handler PROC FAR
  766.     ARG handler:dword
  767.     push bp
  768.     mov bp,sp
  769.  
  770.     mov eax,[handler]
  771.     mov cs:[Play_Handler],eax
  772.  
  773.     pop bp
  774.     retf
  775. Set_Play_Handler ENDP
  776.  
  777.  
  778.  
  779.  
  780.  
  781. Set_Record_Handler PROC FAR
  782.     ARG handler:dword
  783.     push bp
  784.     mov bp,sp
  785.  
  786.     mov eax,[handler]
  787.     mov cs:[Play_Handler],eax
  788.  
  789.     pop bp
  790.     retf
  791. Set_Record_Handler ENDP
  792.  
  793.  
  794.  
  795.  
  796.  
  797. Set_Next_Block PROC FAR
  798.       ARG Data:dword
  799.       push bp
  800.       mov bp,sp
  801.  
  802.       mov eax,[Data]
  803.       mov cs:[Next_Block],eax
  804.  
  805.       pop bp
  806.       retf
  807. Set_Next_Block ENDP
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816. Config_Info     dd 036bea73fh
  817.         dw 3        ;Einträge
  818.  
  819.         db 2,14
  820.         dw OFFSET Config_Port
  821.         dw 0,8,1
  822.         dw 0,0,0
  823.         DB "I/O Port 2x0h",0
  824.  
  825.         db 2,10
  826.         dw OFFSET Config_IRQ
  827.         dw 1,7,1
  828.         dw 0,0,0
  829.         db "Interrupt",0
  830.  
  831.         db 2,12
  832.         dw OFFSET Config_DMA
  833.         dw 0,3,1
  834.         dw 0,0,0
  835.         db "DMA Channel",0
  836.  
  837. END