home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cdisk.zip / MMAP / MMAP.ASM < prev    next >
Assembly Source File  |  1993-04-09  |  15KB  |  940 lines

  1. ;    Static Name Aliases
  2. ;
  3.     TITLE   mmap.c
  4.     .286p
  5.     .287
  6. _TEXT    SEGMENT  WORD PUBLIC 'CODE'
  7. _TEXT    ENDS
  8. _DATA    SEGMENT  WORD PUBLIC 'DATA'
  9. _DATA    ENDS
  10. CONST    SEGMENT  WORD PUBLIC 'CONST'
  11. CONST    ENDS
  12. _BSS    SEGMENT  WORD PUBLIC 'BSS'
  13. _BSS    ENDS
  14. DGROUP    GROUP    CONST, _BSS, _DATA
  15.     ASSUME DS: DGROUP
  16.     ASSUME  SS: NOTHING
  17. PUBLIC  _cntr
  18. PUBLIC  _bus
  19. PUBLIC  _matches
  20. PUBLIC  _arguments
  21. PUBLIC  _NoMatchMsg
  22. PUBLIC  _MainMsgMCA
  23. PUBLIC  _MainMsgISA
  24. PUBLIC  _devhdr
  25. PUBLIC  _DevHlp
  26. PUBLIC  _appl_buffer
  27. PUBLIC  _p
  28. PUBLIC  _err
  29. EXTRN    __acrtused:ABS
  30. EXTRN    GETDOSVAR:NEAR
  31. EXTRN    VIRTTOLIN:NEAR
  32. EXTRN    VERIFYACCESS:NEAR
  33. EXTRN    LOCKSEG:NEAR
  34. EXTRN    UNLOCKSEG:NEAR
  35. EXTRN    PHYSTOUVIRT:NEAR
  36. EXTRN    DOSPUTMESSAGE:FAR
  37. EXTRN    GETLIDENTRY:NEAR
  38. EXTRN    FREELIDENTRY:NEAR
  39. EXTRN    ABIOSCALL:NEAR
  40. EXTRN    _STRATEGY:NEAR
  41. EXTRN    BEEP:NEAR
  42. EXTRN    ABORT:NEAR
  43. EXTRN    SEGLIMIT:NEAR
  44. EXTRN    MOVEBYTES:NEAR
  45. _BSS      SEGMENT
  46. COMM NEAR    _j:    BYTE:     2
  47. COMM NEAR    _board_address:    BYTE:     4
  48. COMM NEAR    _opencount:    BYTE:     2
  49. COMM NEAR    _savepid:    BYTE:     2
  50. COMM NEAR    _ABIOS_r_blk:    BYTE:     70
  51. COMM NEAR    _ABIOS_l_blk:    BYTE:     32
  52. COMM NEAR    _lid_blk_size:    BYTE:     2
  53. COMM NEAR    _card:     66:     9
  54. COMM NEAR    _pcard:    BYTE:     2
  55. COMM NEAR    _pos_struct:    BYTE:     6
  56. COMM NEAR    _addr_struct:    BYTE:     8
  57. COMM NEAR    _chunk1:    BYTE:     2
  58. COMM NEAR    _chunk2:    BYTE:     2
  59. COMM NEAR    _lock_seg_han:    BYTE:     4
  60. COMM NEAR    _ptr:    BYTE:     4
  61. COMM NEAR    _i:    BYTE:     2
  62. _BSS      ENDS
  63. _DATA      SEGMENT
  64. _devhdr    DD    0ffffffffH
  65.     DW    08880H
  66.     DW    _STRATEGY
  67.     DW    00H
  68.     DB    'MMAP$   '
  69.      DB    12 DUP(0)
  70.  
  71. _DevHlp    DD    00H
  72. _appl_buffer    DD    00H
  73. _p    DD    00H
  74. _err    DW    00H
  75. _cntr    DW    00H
  76. _bus    DW    00H
  77. _matches    DW    00H
  78. _arguments    DB    00H
  79.      DB    63 DUP(0)
  80.  
  81. _NoMatchMsg    DB    ' no match for selected Micro Channel card ID found.',  0dH,  0aH
  82.     DB    00H
  83. _MainMsgMCA    DB    0dH,  0aH, 'OS/2 Micro Channel memory-mapped driver installe'
  84.     DB    'd.',  0dH,  0aH,  00H
  85.     ORG    $+1
  86. _MainMsgISA    DB    0dH,  0aH, 'OS/2 ISA bus memory-mapped driver installed.',  0dH
  87.     DB    0aH,  00H
  88. _DATA      ENDS
  89. _TEXT      SEGMENT
  90.     ASSUME    CS: _TEXT
  91. ; Line 1
  92. ; Line 39
  93. ; Line 40
  94. ; Line 89
  95.     PUBLIC    _main
  96. _main    PROC NEAR
  97.     enter    8,0
  98.     push    si
  99. ;    rp = 4
  100. ;    ptr = -8
  101. ;    pptr = -6
  102. ;    liptr = -4
  103. ;    i = -12
  104. ;    addr = -16
  105. ;    in_data = -2
  106.     les    si,DWORD PTR [bp+4]    ;rp
  107. ; Line 97
  108.     mov    al,BYTE PTR es:[si+2]
  109.     sub    ah,ah
  110. ; Line 336
  111.     cmp    ax,20
  112.     ja    $SD462
  113.     shl    ax,1
  114.     xchg    ax,bx
  115.     jmp    WORD PTR cs:$L20000[bx]
  116.     nop    
  117. $L20000:
  118.         DW    $SC422
  119.         DW    $SD462
  120.         DW    $SD462
  121.         DW    $SD462
  122.         DW    $L20020
  123.         DW    $SD462
  124.         DW    $SD462
  125.         DW    $SD462
  126.         DW    $L20020
  127.         DW    $SD462
  128.         DW    $SD462
  129.         DW    $SD462
  130.         DW    $SD462
  131.         DW    $SC424
  132.         DW    $SC429
  133.         DW    $SD462
  134.         DW    $SC435
  135.         DW    $SD462
  136.         DW    $SD462
  137.         DW    $SD462
  138.         DW    $SC461
  139. ; Line 333
  140. $SD462:
  141. ; Line 334
  142. $L20020:
  143.     mov    ax,256
  144.     pop    si
  145.     leave    
  146.     ret    
  147. ; Line 99
  148. $SC422:
  149. ; Line 103
  150.     mov    ax,es
  151.     push    ax
  152.     push    si
  153.     call    _Init
  154.     add    sp,4
  155.     pop    si
  156.     leave    
  157.     ret    
  158.     nop    
  159. $SC424:
  160. ; Line 109
  161.     push    2
  162.     lea    ax,WORD PTR [bp-8]    ;ptr
  163.     push    ss
  164.     push    ax
  165.     call    GETDOSVAR
  166.     or    ax,ax
  167.     je    $JCC102
  168.     jmp    $SC461
  169. $JCC102:
  170. ; Line 114
  171.     les    si,DWORD PTR [bp-8]    ;ptr
  172.     mov    ax,WORD PTR es:[si]
  173.     mov    dx,WORD PTR es:[si+2]
  174.     mov    bx,ax
  175.     mov    WORD PTR [bp-2],dx    ;in_data
  176. ; Line 118
  177.     cmp    WORD PTR _opencount,0
  178.     jne    $I426
  179. ; Line 120
  180.     mov    WORD PTR _opencount,1
  181. ; Line 121
  182.     mov    es,dx
  183.     mov    ax,WORD PTR es:[bx]
  184.     mov    WORD PTR _savepid,ax
  185. ; Line 123
  186.     jmp    SHORT $L20020
  187.     nop    
  188. $I426:
  189. ; Line 125
  190.     mov    ax,WORD PTR _savepid
  191.     mov    es,dx
  192.     cmp    WORD PTR es:[bx],ax
  193.     je    $I428
  194. ; Line 126
  195.     mov    ax,-32000
  196.     pop    si
  197.     leave    
  198.     ret    
  199. ; Line 127
  200. $I428:
  201.     inc    WORD PTR _opencount
  202. ; Line 128
  203.     jmp    SHORT $L20020
  204. ; Line 131
  205. $SC429:
  206. ; Line 135
  207.     push    2
  208.     lea    ax,WORD PTR [bp-8]    ;ptr
  209.     push    ss
  210.     push    ax
  211.     call    GETDOSVAR
  212.     or    ax,ax
  213.     je    $JCC180
  214.     jmp    $SC461
  215. $JCC180:
  216. ; Line 148
  217.     mov    ax,WORD PTR _savepid
  218.     les    bx,DWORD PTR [bp-8]    ;ptr
  219.     les    bx,DWORD PTR es:[bx]
  220.     cmp    WORD PTR es:[bx],ax
  221.     je    $JCC197
  222.     jmp    $SC461
  223. $JCC197:
  224.     cmp    WORD PTR _opencount,0
  225.     jne    $JCC207
  226.     jmp    $SC461
  227. $JCC207:
  228. ; Line 153
  229.     push    WORD PTR _board_address+2
  230.     push    WORD PTR _board_address
  231.     push    -32768
  232.     push    2
  233.     push    ds
  234.     push    OFFSET DGROUP:_addr_struct
  235.     call    PHYSTOUVIRT
  236. ; Line 155
  237.     dec    WORD PTR _opencount
  238.     jmp    $L20020
  239.     nop    
  240. $SC435:
  241. ; Line 168
  242.     cmp    BYTE PTR es:[si+13],145
  243.     je    $JCC245
  244.     jmp    $L20020
  245. $JCC245:
  246. ; Line 171
  247.     mov    al,BYTE PTR es:[si+14]
  248.     sub    ah,ah
  249. ; Line 325
  250.     dec    ax
  251.     je    $SC441
  252.     dec    ax
  253.     je    $SC442
  254.     dec    ax
  255.     je    $SC448
  256.     dec    ax
  257.     jne    $JCC266
  258.     jmp    $SC454
  259. $JCC266:
  260.     jmp    $SC461
  261. ; Line 177
  262. $SC441:
  263. ; Line 178
  264.     mov    ax,WORD PTR _bus
  265.     or    ah,129
  266.     pop    si
  267.     leave    
  268.     ret    
  269.     nop    
  270. ; Line 184
  271. $SC442:
  272. ; Line 192
  273.     push    WORD PTR es:[si+21]
  274.     push    WORD PTR es:[si+19]
  275.     push    8
  276.     push    1
  277.     call    VERIFYACCESS
  278.     or    ax,ax
  279.     je    $I443
  280. ; Line 193
  281. $L20022:
  282.     mov    ax,-32500
  283.     pop    si
  284.     leave    
  285.     ret    
  286.     nop    
  287. ; Line 197
  288. $I443:
  289. ; Line 201
  290.     mov    es,WORD PTR [bp+6]
  291.     push    WORD PTR es:[si+21]
  292.     push    0
  293.     push    0
  294.     push    ds
  295.     push    OFFSET DGROUP:_lock_seg_han
  296.     call    LOCKSEG
  297.     or    ax,ax
  298.     jne    $L20022
  299. ; Line 206
  300.     push    WORD PTR _board_address+2
  301.     push    WORD PTR _board_address
  302.     push    -32768
  303.     push    1
  304.     push    ds
  305.     push    OFFSET DGROUP:_addr_struct
  306.     call    PHYSTOUVIRT
  307.     jmp    $L20023
  308.     nop    
  309. $SC448:
  310. ; Line 235
  311.     push    WORD PTR es:[si+21]
  312.     push    WORD PTR es:[si+19]
  313.     push    6
  314.     push    1
  315.     call    VERIFYACCESS
  316.     or    ax,ax
  317.     jne    $L20022
  318. ; Line 244
  319.     mov    es,WORD PTR [bp+6]
  320.     push    WORD PTR es:[si+21]
  321.     push    ax
  322.     push    ax
  323.     push    ds
  324.     push    OFFSET DGROUP:_lock_seg_han
  325.     call    LOCKSEG
  326.     or    ax,ax
  327.     jne    $L20022
  328. ; Line 252
  329.     push    WORD PTR _appl_buffer+2
  330.     push    WORD PTR _appl_buffer
  331.     push    ds
  332.     push    OFFSET DGROUP:_pos_struct
  333.     push    6
  334.     call    MOVEBYTES
  335.     or    ax,ax
  336.     jne    $L20022
  337. ; Line 255
  338.     push    WORD PTR _pos_struct+2
  339.     push    WORD PTR _pos_struct
  340.     call    _get_pos_data
  341.     add    sp,4
  342.     sub    ah,ah
  343.     mov    WORD PTR _pos_struct+4,ax
  344. ; Line 262
  345.     push    ds
  346.     push    OFFSET DGROUP:_pos_struct
  347.     push    WORD PTR _appl_buffer+2
  348.     push    WORD PTR _appl_buffer
  349.     push    6
  350.     jmp    SHORT $L20024
  351.     nop    
  352. $SC454:
  353. ; Line 287
  354.     push    WORD PTR es:[si+21]
  355.     push    WORD PTR es:[si+19]
  356.     push    8
  357.     push    1
  358.     call    VERIFYACCESS
  359.     or    ax,ax
  360.     je    $JCC469
  361.     jmp    $L20022
  362. $JCC469:
  363. ; Line 296
  364.     mov    es,WORD PTR [bp+6]
  365.     push    WORD PTR es:[si+21]
  366.     push    ax
  367.     push    ax
  368.     push    ds
  369.     push    OFFSET DGROUP:_lock_seg_han
  370.     call    LOCKSEG
  371.     or    ax,ax
  372.     je    $JCC492
  373.     jmp    $L20022
  374. $JCC492:
  375. ; Line 301
  376.     push    WORD PTR _board_address+2
  377.     push    WORD PTR _board_address
  378.     push    -32768
  379.     push    1
  380.     push    ds
  381.     push    OFFSET DGROUP:_addr_struct
  382.     call    PHYSTOUVIRT
  383.     or    ax,ax
  384.     je    $JCC519
  385.     jmp    $L20022
  386. $JCC519:
  387. ; Line 307
  388.     push    WORD PTR _addr_struct+2
  389.     push    WORD PTR _addr_struct
  390.     push    ds
  391.     push    OFFSET DGROUP:_addr_struct
  392.     call    VIRTTOLIN
  393. $L20023:
  394.     or    ax,ax
  395.     je    $JCC541
  396.     jmp    $L20022
  397. $JCC541:
  398. ; Line 315
  399.     push    ds
  400.     push    OFFSET DGROUP:_addr_struct
  401.     mov    es,WORD PTR [bp+6]
  402.     push    WORD PTR es:[si+21]
  403.     push    WORD PTR es:[si+19]
  404.     push    8
  405. $L20024:
  406.     call    MOVEBYTES
  407.     or    ax,ax
  408.     je    $JCC568
  409.     jmp    $L20022
  410. $JCC568:
  411. ; Line 320
  412.     push    WORD PTR _lock_seg_han+2
  413.     push    WORD PTR _lock_seg_han
  414.     call    UNLOCKSEG
  415.     or    ax,ax
  416.     jne    $JCC586
  417.     jmp    $L20020
  418. $JCC586:
  419.     jmp    $L20022
  420. $SC461:
  421. ; Line 329
  422.     mov    ax,-32509
  423. ; Line 337
  424.     pop    si
  425.     leave    
  426.     ret    
  427.  
  428. _main    ENDP
  429. ; Line 340
  430.     PUBLIC    _hex2bin
  431. _hex2bin    PROC NEAR
  432.     push    bp
  433.     mov    bp,sp
  434. ;    c = 4
  435. ; Line 341
  436.     cmp    BYTE PTR [bp+4],58    ;c
  437.     jge    $I465
  438. ; Line 342
  439.     mov    al,BYTE PTR [bp+4]    ;c
  440.     cbw    
  441.     sub    ax,48
  442.     leave    
  443.     ret    
  444. ; Line 343
  445. $I465:
  446. ; Line 344
  447.     mov    al,BYTE PTR [bp+4]    ;c
  448.     and    ax,223
  449.     sub    ax,55
  450. ; Line 345
  451.     leave    
  452.     ret    
  453.     nop    
  454.  
  455. _hex2bin    ENDP
  456. ; Line 348
  457.     PUBLIC    _get_POS
  458. _get_POS    PROC NEAR
  459.     enter    2,0
  460.     push    di
  461.     push    si
  462. ;    slot_num = 4
  463. ;    card_ID = 6
  464. ;    pos_regs = 10
  465. ;    register si = rc
  466. ;    register bx = i
  467. ;    lid = -2
  468. ; Line 351
  469.     push    16
  470.     push    0
  471.     push    1
  472.     lea    ax,WORD PTR [bp-2]    ;lid
  473.     push    ss
  474.     push    ax
  475.     call    GETLIDENTRY
  476.     or    ax,ax
  477.     je    $I474
  478. ; Line 352
  479. $L20025:
  480.     mov    ax,1
  481.     pop    si
  482.     pop    di
  483.     leave    
  484.     ret    
  485.     nop    
  486. ; Line 356
  487. $I474:
  488.     mov    WORD PTR _ABIOS_l_blk,32
  489. ; Line 357
  490.     mov    ax,WORD PTR [bp-2]    ;lid
  491.     mov    WORD PTR _ABIOS_l_blk+2,ax
  492. ; Line 359
  493.     mov    WORD PTR _ABIOS_l_blk+6,1
  494. ; Line 360
  495.     mov    WORD PTR _ABIOS_l_blk+12,23130
  496. ; Line 363
  497.     push    ax
  498.     sub    ax,ax
  499.     mov    WORD PTR _ABIOS_l_blk+4,ax
  500.     mov    WORD PTR _ABIOS_l_blk+14,ax
  501.     push    ax
  502.     push    ds
  503.     push    OFFSET DGROUP:_ABIOS_l_blk
  504.     call    ABIOSCALL
  505.     or    ax,ax
  506.     jne    $L20025
  507. ; Line 366
  508.     mov    ax,WORD PTR _ABIOS_l_blk+24
  509.     mov    WORD PTR _lid_blk_size,ax
  510. ; Line 370
  511.     les    bx,DWORD PTR [bp+6]    ;card_ID
  512.     mov    WORD PTR es:[bx],-1
  513. ; Line 371
  514.     sub    bx,bx
  515.     mov    di,WORD PTR [bp+10]    ;pos_regs
  516.     mov    es,WORD PTR [bp+12]
  517. $F476:
  518.     mov    si,di
  519.     add    si,bx
  520.     mov    BYTE PTR es:[si],0
  521.     inc    bx
  522.     cmp    bx,64
  523.     jb    $F476
  524. ; Line 375
  525.     mov    ax,WORD PTR _lid_blk_size
  526.     mov    WORD PTR _ABIOS_r_blk,ax
  527. ; Line 376
  528.     mov    ax,WORD PTR [bp-2]    ;lid
  529.     mov    WORD PTR _ABIOS_r_blk+2,ax
  530. ; Line 378
  531.     mov    WORD PTR _ABIOS_r_blk+6,13
  532. ; Line 379
  533.     mov    WORD PTR _ABIOS_r_blk+12,23130
  534. ; Line 382
  535.     mov    cl,BYTE PTR [bp+4]    ;slot_num
  536.     and    cl,15
  537.     mov    BYTE PTR _ABIOS_r_blk+16,cl
  538. ; Line 383
  539.     mov    cx,WORD PTR [bp+12]
  540.     mov    WORD PTR _ABIOS_r_blk+22,di
  541.     mov    WORD PTR _ABIOS_r_blk+24,cx
  542. ; Line 384
  543.     mov    WORD PTR _ABIOS_r_blk+18,-1
  544. ; Line 386
  545.     push    ax
  546.     sub    ax,ax
  547.     mov    WORD PTR _ABIOS_r_blk+4,ax
  548.     mov    WORD PTR _ABIOS_r_blk+14,ax
  549.     push    ax
  550.     push    ds
  551.     push    OFFSET DGROUP:_ABIOS_r_blk
  552.     call    ABIOSCALL
  553.     or    ax,ax
  554.     je    $I479
  555. ; Line 387
  556.     mov    si,1
  557. ; Line 388
  558.     jmp    SHORT $I480
  559. $I479:
  560. ; Line 389
  561.     mov    ax,WORD PTR _ABIOS_r_blk+18
  562.     les    bx,DWORD PTR [bp+6]    ;card_ID
  563.     mov    WORD PTR es:[bx],ax
  564. ; Line 390
  565.     sub    si,si
  566. ; Line 391
  567. $I480:
  568. ; Line 392
  569.     push    WORD PTR [bp-2]    ;lid
  570.     call    FREELIDENTRY
  571. ; Line 393
  572.     mov    ax,si
  573. ; Line 395
  574.     pop    si
  575.     pop    di
  576.     leave    
  577.     ret    
  578.     nop    
  579.  
  580. _get_POS    ENDP
  581. ; Line 398
  582.     PUBLIC    _get_pos_data
  583. _get_pos_data    PROC NEAR
  584.     enter    2,0
  585.     push    di
  586.     push    si
  587. ;    slot = 4
  588. ;    reg = 6
  589. ;    pos = -1
  590. ;    register si = cptr
  591.     mov    di,WORD PTR [bp+6]    ;reg
  592. ; Line 402
  593.     imul    si,WORD PTR [bp+4],66    ;slot
  594.     add    si,OFFSET DGROUP:_card-66
  595. ; Line 403
  596.     or    di,di
  597.     je    $L20026
  598. ; Line 406
  599.     cmp    di,1
  600.     jne    $I488
  601. ; Line 407
  602.     mov    ax,WORD PTR [si]
  603.     shr    ax,16
  604.     pop    si
  605.     pop    di
  606.     leave    
  607.     ret    
  608.     nop    
  609. $I488:
  610. ; Line 409
  611.     add    si,di
  612. $L20026:
  613.     mov    al,BYTE PTR [si]
  614. ; Line 410
  615. ; Line 411
  616.     pop    si
  617.     pop    di
  618.     leave    
  619.     ret    
  620.  
  621. _get_pos_data    ENDP
  622. ; Line 416
  623.     PUBLIC    _Init
  624. _Init    PROC NEAR
  625.     enter    12,0
  626.     push    di
  627.     push    si
  628. ;    rp = 4
  629. ;    lid = -10
  630. ;    p = -8
  631.     mov    si,WORD PTR [bp+4]    ;rp
  632. ; Line 423
  633.     mov    es,WORD PTR [bp+6]
  634.     mov    ax,WORD PTR es:[si+14]
  635.     mov    dx,WORD PTR es:[si+16]
  636.     mov    WORD PTR _DevHlp,ax
  637.     mov    WORD PTR _DevHlp+2,dx
  638. ; Line 425
  639.     push    16
  640.     push    0
  641.     push    1
  642.     lea    ax,WORD PTR [bp-10]    ;lid
  643.     push    ss
  644.     push    ax
  645.     call    GETLIDENTRY
  646.     or    ax,ax
  647.     je    $JCC931
  648.     jmp    $I494
  649. $JCC931:
  650. ; Line 426
  651.     push    WORD PTR [bp-10]    ;lid
  652.     call    FREELIDENTRY
  653. ; Line 430
  654.     mov    WORD PTR _bus,1
  655. ; Line 434
  656.     mov    WORD PTR _i,0
  657. $F495:
  658. ; Line 435
  659.     imul    ax,WORD PTR _i,66
  660.     mov    cx,ax
  661.     add    ax,OFFSET DGROUP:_card+2
  662.     push    ds
  663.     push    ax
  664.     add    cx,OFFSET DGROUP:_card
  665.     push    ds
  666.     push    cx
  667.     mov    ax,WORD PTR _i
  668.     inc    ax
  669.     push    ax
  670.     call    _get_POS
  671.     add    sp,10
  672.     inc    WORD PTR _i
  673.     cmp    WORD PTR _i,8
  674.     jbe    $F495
  675. ; Line 438
  676.     sub    ax,ax
  677.     mov    WORD PTR _matches,ax
  678.     mov    WORD PTR _i,ax
  679.     mov    WORD PTR _pcard,OFFSET DGROUP:_card
  680. $F498:
  681. ; Line 439
  682.     mov    bx,WORD PTR _pcard
  683.     cmp    WORD PTR [bx],27901
  684.     je    $L20009
  685. ; Line 438
  686.     add    WORD PTR _pcard,66
  687.     inc    WORD PTR _i
  688.     cmp    WORD PTR _i,8
  689.     jbe    $F498
  690.     jmp    SHORT $FB500
  691. $L20009:
  692. ; Line 440
  693.     mov    WORD PTR _matches,1
  694. ; Line 443
  695. $FB500:
  696. ; Line 445
  697.     cmp    WORD PTR _matches,0
  698.     jne    $I502
  699. ; Line 446
  700.     push    1
  701.     push    8
  702.     push    ds
  703.     push    OFFSET DGROUP:_devhdr+10
  704.     call    FAR PTR DOSPUTMESSAGE
  705. ; Line 447
  706.     push    1
  707.     mov    ax,OFFSET DGROUP:_NoMatchMsg
  708.     mov    dx,ax
  709.     mov    di,ax
  710.     push    ds
  711.     pop    es
  712.     mov    cx,-1
  713.     xor    ax,ax
  714.     repnz    scasb
  715.     not    cx
  716.     dec    cx
  717.     push    cx
  718.     push    ds
  719.     push    dx
  720.     call    FAR PTR DOSPUTMESSAGE
  721. ; Line 449
  722.     sub    ax,ax
  723.     mov    es,WORD PTR [bp+6]
  724.     mov    WORD PTR es:[si+14],ax
  725.     mov    WORD PTR es:[si+16],ax
  726. ; Line 450
  727.     mov    ax,-32509
  728.     pop    si
  729.     pop    di
  730.     leave    
  731.     ret    
  732.     nop    
  733. ; Line 455
  734. $I502:
  735. ; Line 456
  736.     push    4
  737.     mov    ax,WORD PTR _i
  738.     inc    ax
  739.     push    ax
  740.     mov    si,ax
  741.     call    _get_pos_data
  742.     add    sp,4
  743.     push    3
  744.     push    si
  745.     mov    WORD PTR [bp-12],ax
  746.     call    _get_pos_data
  747.     add    sp,4
  748.     and    ax,1
  749.     sub    dx,dx
  750.     mov    dh,dl
  751.     mov    dl,ah
  752.     mov    ah,al
  753.     sub    al,al
  754.     shl    ax,1
  755.     rcl    dx,1
  756.     shl    ax,1
  757.     rcl    dx,1
  758.     shl    ax,1
  759.     rcl    dx,1
  760.     shl    ax,1
  761.     rcl    dx,1
  762.     shl    ax,1
  763.     rcl    dx,1
  764.     shl    ax,1
  765.     rcl    dx,1
  766.     shl    ax,1
  767.     rcl    dx,1
  768.     mov    cl,BYTE PTR [bp-12]
  769.     sub    ch,ch
  770.     sub    bx,bx
  771.     or    dx,cx
  772.     mov    WORD PTR _board_address,ax
  773.     mov    WORD PTR _board_address+2,dx
  774. ; Line 459
  775.     jmp    $I503
  776.     nop    
  777. $I494:
  778. ; Line 464
  779.     mov    WORD PTR _bus,0
  780. ; Line 468
  781.     mov    es,WORD PTR [bp+6]
  782.     mov    ax,WORD PTR es:[si+18]
  783.     mov    dx,WORD PTR es:[si+20]
  784.     mov    cx,ax
  785.     mov    di,ax
  786.     mov    WORD PTR [bp-6],dx
  787.     mov    WORD PTR [bp-8],di    ;p
  788.     mov    es,dx
  789.     mov    bx,ax
  790.     cmp    BYTE PTR es:[bx],0
  791.     jne    $L20017
  792.     mov    si,ax
  793.     jmp    SHORT $L20007
  794.     nop    
  795. $L20017:
  796.     les    si,DWORD PTR [bp-8]    ;p
  797. $F504:
  798.     cmp    BYTE PTR es:[si],32
  799.     je    $L20007
  800.     inc    si
  801.     cmp    BYTE PTR es:[si],0
  802.     jne    $F504
  803. $L20007:
  804. ; Line 469
  805.     cmp    BYTE PTR es:[si],32
  806.     jne    $L20003
  807. $F507:
  808.     inc    si
  809.     cmp    BYTE PTR es:[si],32
  810.     je    $F507
  811. $L20003:
  812. ; Line 470
  813.     cmp    BYTE PTR es:[si],0
  814.     je    $I503
  815. ; Line 472
  816.     sub    ax,ax
  817.     mov    WORD PTR _board_address+2,ax
  818.     mov    WORD PTR _board_address,ax
  819. ; Line 473
  820.     cmp    BYTE PTR es:[si],0
  821.     je    $FB513
  822. $F511:
  823. ; Line 474
  824.     mov    es,WORD PTR [bp-6]
  825.     mov    al,BYTE PTR es:[si]
  826.     push    ax
  827.     call    _hex2bin
  828.     add    sp,2
  829.     cwd    
  830.     mov    cx,WORD PTR _board_address
  831.     mov    bx,WORD PTR _board_address+2
  832.     shl    cx,1
  833.     rcl    bx,1
  834.     shl    cx,1
  835.     rcl    bx,1
  836.     shl    cx,1
  837.     rcl    bx,1
  838.     shl    cx,1
  839.     rcl    bx,1
  840.     add    ax,cx
  841.     adc    dx,bx
  842.     mov    WORD PTR _board_address,ax
  843.     mov    WORD PTR _board_address+2,dx
  844.     mov    es,WORD PTR [bp-6]
  845.     inc    si
  846.     cmp    BYTE PTR es:[si],0
  847.     jne    $F511
  848. $FB513:
  849. ; Line 475
  850.     mov    ax,WORD PTR _board_address
  851.     mov    dx,WORD PTR _board_address+2
  852.     mov    WORD PTR _addr_struct+4,ax
  853.     mov    WORD PTR _addr_struct+6,dx
  854. ; Line 477
  855. $I503:
  856. ; Line 479
  857.     cmp    WORD PTR _bus,0
  858.     je    $I514
  859. ; Line 480
  860.     push    1
  861.     mov    ax,OFFSET DGROUP:_MainMsgMCA
  862.     jmp    SHORT $L20028
  863. $I514:
  864. ; Line 482
  865.     push    1
  866.     mov    ax,OFFSET DGROUP:_MainMsgISA
  867. $L20028:
  868.     mov    dx,ax
  869.     mov    di,ax
  870.     push    ds
  871.     pop    es
  872.     mov    cx,-1
  873.     xor    ax,ax
  874.     repnz    scasb
  875.     not    cx
  876.     dec    cx
  877.     push    cx
  878.     push    ds
  879.     push    dx
  880.     call    FAR PTR DOSPUTMESSAGE
  881. ; Line 487
  882.     push    cs
  883.     mov    ax,WORD PTR [bp+4]    ;rp
  884.     mov    dx,WORD PTR [bp+6]
  885.     add    ax,14
  886.     push    dx
  887.     push    ax
  888.     call    SEGLIMIT
  889.     or    ax,ax
  890.     jne    $I517
  891.     push    ds
  892.     mov    ax,WORD PTR [bp+4]    ;rp
  893.     mov    dx,WORD PTR [bp+6]
  894.     add    ax,16
  895.     push    dx
  896.     push    ax
  897.     call    SEGLIMIT
  898.     or    ax,ax
  899.     je    $I516
  900. $I517:
  901. ; Line 488
  902.     call    ABORT
  903. ; Line 490
  904. $I516:
  905.     push    200
  906.     push    500
  907.     call    BEEP
  908. ; Line 491
  909.     push    200
  910.     push    500
  911.     call    BEEP
  912. ; Line 492
  913.     push    250
  914.     push    500
  915.     call    BEEP
  916. ; Line 493
  917.     push    300
  918.     push    500
  919.     call    BEEP
  920. ; Line 494
  921.     push    250
  922.     push    500
  923.     call    BEEP
  924. ; Line 495
  925.     push    300
  926.     push    500
  927.     call    BEEP
  928. ; Line 497
  929.     mov    ax,256
  930. ; Line 499
  931.     pop    si
  932.     pop    di
  933.     leave    
  934.     ret    
  935.     nop    
  936.  
  937. _Init    ENDP
  938. _TEXT    ENDS
  939. END
  940.