home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0000 - 0009 / ibm0000-0009 / ibm0003.tar / ibm0003 / SRCR215.ZIP / BIOS.LST < prev    next >
Encoding:
File List  |  1989-11-27  |  253.4 KB  |  6,201 lines

  1.       bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 1
  2.  
  3.   
  4.                 PAGE  59,132
  5.   
  6.                 ;██████████████████████████████████████████████████████████████████████████
  7.                 ;██                                         ██
  8.                 ;██                    BIOS                         ██
  9.                 ;██                                         ██
  10.                 ;██      Created:                                 ██
  11.                 ;██      Version:                                 ██
  12.                 ;██      Passes:    5           Analysis Options on: HQRS             ██
  13.                 ;██                                         ██
  14.                 ;██                                         ██
  15.                 ;██████████████████████████████████████████████████████████████████████████
  16.   
  17.      = 0074            video_hdw_off    equ    74h            ; (0000:0074=0F0A4h)
  18.      = 0078            disk_parm_off    equ    78h            ; (0000:0078=522h)
  19.      = 007C            graph_tbl_off    equ    7Ch            ; (0000:007C=2A00h)
  20.      = 1800            data_2e        equ    1800h            ; (0000:1800=0C3h)
  21.      = 1818            data_3e        equ    1818h            ; (0000:1818=8Ah)
  22.      = 363C            data_4e        equ    363Ch            ; (0000:363C=0)
  23.      = F045            data_10e    equ    0F045h            ; (0040:F045=0A5h)
  24.      = F047            data_11e    equ    0F047h            ; (0040:F047=0E2h)
  25.      = F049            data_12e    equ    0F049h            ; (0040:F049=0A2h)
  26.      = F04B            data_13e    equ    0F04Bh            ; (0040:F04B=4)
  27.      = F04D            data_14e    equ    0F04Dh            ; (0040:F04D=54h)
  28.      = F04F            data_15e    equ    0F04Fh            ; (0040:F04F=0A3h)
  29.      = F051            data_16e    equ    0F051h            ; (0040:F051=4)
  30.      = F053            data_17e    equ    0F053h            ; (0040:F053=5Ch)
  31.      = F055            data_18e    equ    0F055h            ; (0040:F055=0A3h)
  32.      = F057            data_19e    equ    0F057h            ; (0040:F057=1)
  33.      = F059            data_20e    equ    0F059h            ; (0040:F059=0Eh)
  34.      = F05B            data_21e    equ    0F05Bh            ; (0040:F05B=0C7h)
  35.      = F05D            data_22e    equ    0F05Dh            ; (0040:F05D=56h)
  36.      = F05F            data_23e    equ    0F05Fh            ; (0040:F05F=0FFh)
  37.      = F061            data_24e    equ    0F061h            ; (0040:F061=0C7h)
  38.      = F063            data_25e    equ    0F063h            ; (0040:F063=58h)
  39.      = 0011            data_26e    equ    11h            ; (C000:0011=31h)
  40.      = 003E            data_27e    equ    3Eh            ; (C000:003E=52h)
  41.      = 003F            data_28e    equ    3Fh            ; (C000:003F=41h)
  42.      = 0041            data_29e    equ    41h            ; (C000:0041=49h)
  43.      = 0042            data_30e    equ    42h            ; (C000:0042=53h)
  44.      = 0072            data_31e    equ    72h            ; (C000:0072=0)
  45.      = 007C            data_32e    equ    7Ch            ; (C000:007C=0)
  46.      = 007D            data_33e    equ    7Dh            ; (C000:007D=0)
  47.      = 007E            data_34e    equ    7Eh            ; (C000:007E=0)
  48.      = 007F            data_35e    equ    7Fh            ; (C000:007F=0D0h)
  49.      = 00E8            data_36e    equ    0E8h            ; (C000:00E8=0B8h)
  50.   
  51.                 ;--------------------------------------------------------------    seg_a  ----
  52.   
  53.                 seg_a        segment    at 0
  54.   
  55. 0000:0000  0189            vector_0h_off    dw    189h            ; Divide error
  56. 0000:0002  2E3B            vector_0h_seg    dw    2E3Bh
  57. 0000:0004  0C67            vector_1h_off    dw    0C67h            ; Single Step
  58. 0000:0006  0070            vector_1h_seg    dw    70h
  59. 0000:0008  01A6            vector_2h_off    dw    1A6h            ; NMI
  60.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 2
  61.  
  62. 0000:000A  0070            vector_2h_seg    dw    70h
  63. 0000:000C  0C67            vector_3h_off    dw    0C67h            ; Debug
  64. 0000:000E  0070            vector_3h_seg    dw    70h
  65. 0000:0010  0C67            vector_4h_off    dw    0C67h            ; Overflow
  66. 0000:0012  0070            vector_4h_seg    dw    70h
  67. 0000:0014  FF54            vector_5h_off    dw    0FF54h            ; Print Screen
  68. 0000:0016  F000            vector_5h_seg    dw    0F000h
  69. 0000:0018  FF33            vector_6h_off    dw    0FF33h
  70. 0000:001A  F000            vector_6h_seg    dw    0F000h
  71. 0000:001C  FF33            vector_7h_off    dw    0FF33h
  72. 0000:001E  F000            vector_7h_seg    dw    0F000h
  73. 0000:0020  022C            vector_8h_off    dw    22Ch            ; Timer Ticks
  74. 0000:0022  0070            vector_8h_seg    dw    70h
  75. 0000:0024  02A6            vector_9h_off    dw    2A6h            ; Keyboard
  76. 0000:0026  0070            vector_9h_seg    dw    70h
  77. 0000:0028  0325            vector_Ah_off    dw    325h
  78. 0000:002A  0070            vector_Ah_seg    dw    70h
  79. 0000:002C  039F            vector_Bh_off    dw    39Fh            ; Serial
  80. 0000:002E  0070            vector_Bh_seg    dw    70h
  81. 0000:0030  1496            vector_Ch_off    dw    1496h            ; Serial
  82. 0000:0032  0DBF            vector_Ch_seg    dw    0DBFh
  83. 0000:0034  0493            vector_Dh_off    dw    493h            ; Disk
  84. 0000:0036  0070            vector_Dh_seg    dw    70h
  85. 0000:0038  050D            vector_Eh_off    dw    50Dh            ; Diskette
  86. 0000:003A  0070            vector_Eh_seg    dw    70h
  87. 0000:003C  0C67            vector_Fh_off    dw    0C67h            ; Bad Interrupt
  88. 0000:003E  0070            vector_Fh_seg    dw    70h
  89. 0000:0040  17B2            vectr_10h_off    dw    17B2h            ; Video
  90. 0000:0042  0DBF            vectr_10h_seg    dw    0DBFh
  91. 0000:0044  F84D            vectr_11h_off    dw    0F84Dh            ; Equipment
  92. 0000:0046  F000            vectr_11h_seg    dw    0F000h
  93. 0000:0048  F841            vectr_12h_off    dw    0F841h            ; Memory Size
  94. 0000:004A  F000            vectr_12h_seg    dw    0F000h
  95. 0000:004C  0212            vectr_13h_off    dw    212h            ; Disk Services
  96. 0000:004E  0D11            vectr_13h_seg    dw    0D11h
  97.   
  98.                         org    400h
  99.   
  100. 0000:0400  F8 02 00 00 00 00            db    0F8h, 2, 0, 0, 0, 0
  101. 0000:0406  00 00 78 03 00 00            db    0, 0, 78h, 3, 0, 0
  102. 0000:040C  00 00 00 00 6F 52            db    0, 0, 0, 0, 6Fh, 52h
  103. 0000:0412  00 80 02 00 00 00            db    0, 80h, 2, 0, 0, 0
  104. 0000:0418  00 00 38 00 38 00            db    0, 0, 38h, 0, 38h, 0
  105. 0000:041E  72 13 0D 1C 72 13            db    72h, 13h, 0Dh, 1Ch, 72h, 13h
  106. 0000:0424  75 16 6E 31 62 30            db    75h, 16h, 6Eh, 31h, 62h, 30h
  107. 0000:042A  69 17 6F 18 73 1F            db    69h, 17h, 6Fh, 18h, 73h, 1Fh
  108. 0000:0430  70 19 0D 1C 79 15            db    70h, 19h, 0Dh, 1Ch, 79h, 15h
  109. 0000:0436  67 22 1B 01 64 20            db    67h, 22h, 1Bh, 1, 64h, 20h
  110. 0000:043C  69 17 03 50 DC 00            db    69h, 17h, 3, 50h, 0DCh, 0
  111. 0000:0442  0A 05 89 57 01 05            db    0Ah, 5, 89h, 57h, 1, 5
  112. 0000:0448  02 03 50 00 A0 10            db    2, 3, 50h, 0, 0A0h, 10h
  113. 0000:044E  00 00 4F 18 00 00            db    0, 0, 4Fh, 18h, 0, 0
  114. 0000:0454  00 00 00 00 00 00            db    0, 0, 0, 0, 0, 0
  115. 0000:045A  00 00 00 00 00 00            db    0, 0, 0, 0, 0, 0
  116. 0000:0460  00 20 00 D4 03 29            db    0, 20h, 0, 0D4h, 3, 29h
  117. 0000:0466  30 00 00 00 00 00            db    30h, 0, 0, 0, 0, 0
  118. 0000:046C  B8 CA 13 00 00 00            db    0B8h, 0CAh, 13h, 0, 0, 0
  119.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 3
  120.  
  121. 0000:0472  00 00 00 02 5B 50            db    0, 0, 0, 2, 5Bh, 50h
  122. 0000:0478  00 00 00 00 01 01            db    0, 0, 0, 0, 1, 1
  123. 0000:047E  01 01 1E 00 3E 00            db    1, 1, 1Eh, 0, 3Eh, 0
  124. 0000:0484  18 0E 00 60 F9 00            db    18h, 0Eh, 0, 60h, 0F9h, 0
  125. 0000:048A  00 93 00 00 00 01            db    0, 93h, 0, 0, 0, 1
  126. 0000:0490  74 93 00 00 00 14            db    74h, 93h, 0, 0, 0, 14h
  127. 0000:0496  00 00 00 00 00 00            db    0, 0, 0, 0, 0, 0
  128. 0000:049C  00 00 00 00 00 00            db    0, 0, 0, 0, 0, 0
  129. 0000:04A2  00 00 00 00 00 00            db    0, 0, 0, 0, 0, 0
  130. 0000:04A8  63 00 00 C0 00 00            db    63h, 0, 0, 0C0h, 0, 0
  131. 0000:04AE  00 00 00 00 00 00            db    0, 0, 0, 0, 0, 0
  132. 0000:04B4  00 00 00 00 00 00            db    0, 0, 0, 0, 0, 0
  133. 0000:04BA  00 00                db    0, 0
  134. 0000:04BC  0014[00]                db    20 dup (0)
  135.   
  136.                 seg_a        ends
  137.   
  138.   
  139.   
  140.                 ;--------------------------------------------------------------    seg_b  ----
  141.   
  142.                 seg_b        segment    at 40h
  143.   
  144.   
  145.                                         ; █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  146.                                         ; █    PRIMARY BIOS DATA AREA     █
  147.                                         ; █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  148.   
  149. 0040:0000  02F8            @rs232_port_1    dw    2F8h            ; RS-232 port addresses
  150. 0040:0002  0000            @rs232_port_2    dw    0
  151. 0040:0004  0000            @rs232_port_3    dw    0
  152. 0040:0006  0000            @rs232_port_4    dw    0
  153. 0040:0008  0378            @prn_port_1    dw    378h            ; Printer port addresses
  154. 0040:000A  0000            @prn_port_2    dw    0
  155. 0040:000C  0000            @prn_port_3    dw    0
  156. 0040:000E  0000            BIOS_data_seg    dw    0            ; Extended BIOS data (PS/2)or printer
  157.                                         ;   Printer 4 (PC,XT,AT & compatibles)
  158. 0040:0010  526F            equip_bits    dw    526Fh            ; Equipment installed info bits
  159.                                         ;  15  14  13   12   11  10   9   8
  160.                                         ;  \    /      game  \       /
  161.                                         ;  # of print  port  # of RS-232
  162.                                         ;  ports 0-3   used   ports 0-4
  163.   
  164.                                         ;  7   6    5    4    3   2   1   0
  165.                                         ;  \   /    \    /    \   / Math  |
  166.                                         ;  # of   video mode  RAM    uP  no
  167.                                         ;  disk-  at boot up  00=16K    dsk
  168.                                         ;  ettes  00=EGA      01=32K   driv
  169.                                         ;   1-4   01=CGA-40   10=48K   if 0
  170.                                         ;  if bit 10=CGA-80   11=64K
  171.                                         ;  0 = 1  11=MDA-80   (old PCs)
  172.   
  173.                                         ; Note: bit 13=modem on PC lap-tops
  174.                                         ;       bit  2=mouse on PS/2
  175.                                         ;
  176.                                         ;  xref F000:E16A, F000:F077
  177.                                         ;       F000:F3C3, F000:F852
  178.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 4
  179.  
  180. 0040:0012  00            init_test_flag    db    0            ; Initialization test
  181. 0040:0013  0280            main_ram_size    dw    280h            ; Base memory size 0-1Meg, 1K steps
  182.                                         ;  xref F000:E2E6, F000:E2FC
  183.                                         ;       F000:E34A, F000:E4CC
  184.                                         ;       F000:F846
  185. 0040:0015  0000            chan_io_size    dw    0            ; Channel i/o size
  186.   
  187.                                         ; █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  188.                                         ; █         KEYBOARD DATA         █
  189.                                         ; █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  190.   
  191. 0040:0017  00            keybd_flags_1    db    0            ; Keyboard flag bits
  192.                                         ;   7   6   5   4    3   2   1   0
  193.                                         ; ins- cap num scrl alt ctl lef rig
  194.                                         ; sert --toggles--- --shifts down--
  195.   
  196.                                         ;  xref F000:E9A7, F000:E9CE
  197.                                         ;       F000:EA14, F000:EA77
  198. 0040:0018  00            keybd_flags_2    db    0            ; Keyboard flag bits
  199.                                         ;    7     6     5     4
  200.                                         ; insert  caps  num  scroll
  201.                                         ; ------now depressed------
  202.   
  203.                                         ;    3     2     1     0
  204.                                         ;  pause  sys   left right
  205.                                         ;  lock request -alt-down-
  206.                                         ;
  207.                                         ;  xref F000:E9AB, F000:E9C6
  208.                                         ;       F000:EA56, F000:EA7B
  209.                                         ;       F000:EBFD, F000:EC07
  210.                                         ;       F000:EC31
  211. 0040:0019  00            keybd_alt_num    db    0            ; Alt & digit pad number buffr area
  212.                                         ;  xref F000:E9D8, F000:E9DF
  213.                                         ;       F000:EABD, F000:EB3B
  214.                                         ;       F000:EB8D, F000:EB99
  215.                                         ;       F000:EBA0
  216. 0040:001A  0038            keybd_q_head    dw    38h            ; Head ptr of circular key queue
  217.                                         ;   empty if head ptr = tail ptr
  218.                                         ;  xref F000:E2CE, F000:EA23
  219.                                         ;       F000:EBF0
  220. 0040:001C  0038            keybd_q_tail    dw    38h            ; Tail ptr of circular key queue
  221.                                         ;   empty if head ptr = tail ptr
  222.                                         ;  xref F000:E2D4, F000:EA1A
  223.                                         ;       F000:EA35, F000:EBF4
  224. 0040:001E  1372 1C0D 1372    keybd_queue    dw    1372h, 1C0Dh, 1372h    ; 15 key queue for keyboard
  225. 0040:0024  1675 316E 3062            dw    1675h, 316Eh, 3062h
  226. 0040:002A  1769 186F 1F73            dw    1769h, 186Fh, 1F73h
  227. 0040:0030  1970 1C0D 1579            dw    1970h, 1C0Dh, 1579h
  228. 0040:0036  2267 011B 2064            dw    2267h, 11Bh, 2064h
  229. 0040:003C  1769                    dw    1769h
  230.   
  231.                                         ; █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  232.                                         ; █          DISK DATA            █
  233.                                         ; █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  234.   
  235. 0040:003E  03            dsk_recal_stat    db    3            ;  Recalibrate floppy drive bits
  236.                                         ;     3       2       1       0
  237.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 5
  238.  
  239.                                         ;  drive-3 drive-2 drive-1 drive-0
  240.   
  241.                                         ;  bit 7 = interrupt flag
  242.                                         ;
  243.                                         ;  xref F000:EC87, F000:EEB5
  244.                                         ;       F000:EEC6, F000:EECD
  245.                                         ;       F000:EF5F
  246. 0040:003F  50            dsk_motor_stat    db    50h            ; Motor running status & disk write
  247.                                         ;  bit 7=1 disk write in progress
  248.                                         ;  bits 6&5 = drive selected 0 to 3
  249.                                         ;     3       2       1       0
  250.                                         ;  drive-3 drive-2 drive-1 drive-0
  251.                                         ;  --------- 1=motor on-----------
  252.   
  253.                                         ;  xref F000:E6D6, F000:EC68
  254.                                         ;       F000:EC78, F000:ED27
  255.                                         ;       F000:ED37, F000:ED47
  256.                                         ;       F000:ED51, F000:ED59
  257.                                         ;       F000:ED5E, F000:ED62
  258. 0040:0040  C1            dsk_motor_tmr    db    0C1h            ; Motor timer, at 0, turn off motor
  259.                                         ;  xref F000:E6CE, F000:ED1C
  260.                                         ;       F000:EDCA, F000:EEFF
  261. 0040:0041  00            dsk_ret_code    db    0            ; Controller return code
  262.                                         ;  00h = ok
  263.                                         ;  01h = bad command or parameter
  264.                                         ;  02h = can't find address mark
  265.                                         ;  03h = can't write, protected dsk
  266.                                         ;  04h = sector not found
  267.                                         ;  08h = DMA overrun
  268.                                         ;  09h = DMA attempt over 64K bound
  269.                                         ;  10h = bad CRC on disk read
  270.                                         ;  20h = controller failure
  271.                                         ;  40h = seek failure
  272.                                         ;  80h = timeout, no response
  273.   
  274.                                         ;  xref F000:EC8C, F000:ECBF
  275.                                         ;       F000:ECCC, F000:ECDB
  276.                                         ;       F000:ED13, F000:EDD4
  277.                                         ;       F000:EE92, F000:EEC1
  278.                                         ;       F000:EEEE, F000:EEF6
  279.                                         ;       F000:EFB7, F000:F823
  280. 0040:0042  0A            dsk_status_1    db    0Ah            ; Status bytes-disk controller chip
  281.                                         ;  Note: 7 info bytes returned from
  282.                                         ;  controller are saved here. Refer
  283.                                         ;  to the NEC uPD 765 chip manual
  284.                                         ;  for the specific info, depending
  285.                                         ;  on the previous command issued.
  286.                                         ;  xref F000:ECA1, F000:EE66
  287. 0040:0043  00            dsk_status_2    db    0            ;  xref F000:EE7A
  288. 0040:0044  86            dsk_status_3    db    86h
  289. 0040:0045  58            dsk_status_4    db    58h
  290. 0040:0046  01            dsk_status_5    db    1
  291. 0040:0047  05            dsk_status_6    db    5
  292. 0040:0048  02            dsk_status_7    db    2
  293.   
  294.                                         ; █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  295.                                         ; █          VIDEO DATA           █
  296.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 6
  297.  
  298.                                         ; █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  299.   
  300. 0040:0049  03            video_mode    db    3            ; Present display mode(see int 10h)
  301.                                         ;  xref F000:F0F8, F000:F17A
  302.                                         ;       F000:F243, F000:F32D
  303.                                         ;       F000:F3F2, F000:F476
  304.                                         ;       F000:F676, F000:F68A
  305.                                         ;       F000:F706, F000:F733
  306.                                         ;       F000:F742, F000:F7A9
  307.                                         ;       F000:F7B6, F000:F7BD
  308.                                         ;       F000:F7C3, F000:F7CA
  309.                                         ;       F000:F7D1
  310. 0040:004A  0050            video_columns    dw    50h            ; Number of columns
  311.                                         ;  xref F000:F346, F000:F492
  312.                                         ;       F000:F534, F000:F7AC
  313.                                         ;       F000:FFB2
  314. 0040:004C  10A0            video_buf_siz    dw    10A0h            ; Video buffer size in bytes
  315.                                         ;   Note: size may be rounded up to
  316.                                         ;   the nearest 2K boundary.  For
  317.                                         ;   example, 80x25 mode=4000 bytes,
  318.                                         ;   but value may be 4096.
  319.                                         ;  xref F000:F374
  320. 0040:004E  0000            video_segment    dw    0            ; Segment of active video memory
  321.                                         ;   MDA=0B000h, CGA=0B800h, etc.
  322.   
  323.                                         ;  xref F000:F322, F000:F361
  324.                                         ;       F000:F5B3, F000:F6F8
  325. 0040:0050  184F            vid_curs_pos0    dw    184Fh            ; Cursor position page 0
  326.                                         ;   bits 15-8=row, bits 7-0=column
  327.                                         ;  xref F000:F16A, F000:F230
  328. 0040:0052  0000            vid_curs_pos1    dw    0            ; Cursor position page 1
  329.                                         ;   bits 15-8=row, bits 7-0=column
  330. 0040:0054  0000            vid_curs_pos2    dw    0            ; Cursor position page 2
  331.                                         ;   bits 15-8=row, bits 7-0=column
  332. 0040:0056  0000            vid_curs_pos3    dw    0            ; Cursor position page 3
  333.                                         ;   bits 15-8=row, bits 7-0=column
  334. 0040:0058  0000            vid_curs_pos4    dw    0            ; Cursor position page 4
  335.                                         ;   bits 15-8=row, bits 7-0=column
  336. 0040:005A  0000            vid_curs_pos5    dw    0            ; Cursor position page 5
  337.                                         ;   bits 15-8=row, bits 7-0=column
  338. 0040:005C  0000            vid_curs_pos6    dw    0            ; Cursor position page 6
  339.                                         ;   bits 15-8=row, bits 7-0=column
  340. 0040:005E  0000            vid_curs_pos7    dw    0            ; Cursor position page 7
  341.                                         ;   bits 15-8=row, bits 7-0=column
  342.   
  343. 0040:0060  2000            vid_curs_mode    dw    2000h            ; Active cursor, start & end lines
  344.                                         ;   bits 12 to 8 for starting line
  345.                                         ;   bits 4  to 0 for ending line
  346.                                         ;  xref F000:F5C8, F000:F5F5
  347. 0040:0062  00            video_page    db    0            ; Present page
  348.                                         ;  xref F000:F357, F000:F487
  349.                                         ;       F000:F5AC, F000:F610
  350.                                         ;       F000:F7B0, F000:FF80
  351. 0040:0063  03D4            @video_port    dw    3D4h            ; Video controller base I/O address
  352.                                         ;  xref F000:F09B, F000:F5DE
  353. 0040:0065  29            video_mode_reg    db    29h            ; Hardware mode register bits
  354.                                         ;  xref F000:F589
  355.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 7
  356.  
  357. 0040:0066  30            video_color    db    30h            ; Color set in CGA modes
  358.                                         ;  xref F000:F775, F000:F799
  359.   
  360.                                         ; █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  361.                                         ; █         GENERAL DATA          █
  362.                                         ; █ Note: next 5 bytes also used  █
  363.                                         ; █    for cassette interface in  █
  364.                                         ; █    older PCs.                 █
  365.                                         ; █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  366.   
  367. 0040:0067  0000            @gen_io_ptr    dw    0            ; ROM initialization pointer
  368. 0040:0069  0000            @gen_io_seg    dw    0            ; ROM i/o segment
  369. 0040:006B  00            gen_int_occured    db    0            ; Unused interrupt occurred
  370. 0040:006C  CAE9            timer_low    dw    0CAE9h            ; Timer, low word, cnts every 55 ms
  371. 0040:006E  0013            timer_hi    dw    13h            ; Timer, high word
  372. 0040:0070  00            timer_rolled    db    0            ; Timer overflowed, non-zero when
  373.                                         ;  more than 24 hours have elapsed
  374. 0040:0071  00            keybd_break    db    0            ; Bit 7 set if break key depressed
  375.                                         ;  xref F000:EBE7
  376. 0040:0072  0000            warm_boot_flag    dw    0            ; Boot (reset) type
  377.                                         ;   1234h=warm boot, no memory test
  378.                                         ;   4321h=boot & save memory
  379.                                         ;         (PS/2 with MCA only)
  380.                                         ;  xref F000:E0F4, F000:E106
  381.                                         ;       F000:E118, F000:E2F4
  382.                                         ;       F000:E32D, F000:E377
  383.                                         ;       F000:EB74
  384.   
  385.                                         ; █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  386.                                         ; █        HARD DISK DATA         █
  387.                                         ; █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  388.   
  389. 0040:0074  00            hdsk_status_1    db    0            ; Hard disk status
  390.                                         ;  00h = ok
  391.                                         ;  01h = bad command or parameter
  392.                                         ;  02h = can't find address mark
  393.                                         ;  03h = can't write, protected dsk
  394.                                         ;  04h = sector not found
  395.                                         ;  05h = reset failure
  396.                                         ;  07h = activity failure
  397.                                         ;  08h = DMA overrun
  398.                                         ;  09h = DMA attempt over 64K bound
  399.                                         ;  0Ah = bad sector flag
  400.                                         ;  0Bh = removed bad track
  401.                                         ;  0Dh = wrong # of sectors, format
  402.                                         ;  0Eh = removed control data addr
  403.                                         ;         mark
  404.                                         ;  0Fh = out of limit DMA
  405.                                         ;         arbitration level
  406.                                         ;  10h = bad CRC or ECC, disk read
  407.                                         ;  11h = bad ECC corrected data
  408.                                         ;  20h = controller failure
  409.                                         ;  40h = seek failure
  410.                                         ;  80h = timeout, no response
  411.                                         ;  AAh = not ready
  412.                                         ;  BBh = error occurred, undefined
  413.                                         ;  CCh = write error, selected dsk
  414.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 8
  415.  
  416.                                         ;  E0h = error register = 0
  417.                                         ;  FFh = disk sense failure
  418.                                         ;
  419. 0040:0075  02            hdsk_count    db    2            ; Number of hard disk drives
  420. 0040:0076  5B            hdsk_head_ctrl    db    5Bh            ; Head control (XT only)
  421. 0040:0077  50            hdsk_ctrl_port    db    50h            ; Hard disk control port (XT only)
  422.   
  423.                                         ; █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  424.                                         ; █ I/O PORT TIMER, KEYBOARD DATA █
  425.                                         ; █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  426.   
  427. 0040:0078  00            prn_timeout_1    db    0            ; Countdown timer waits for printer
  428.                                         ;   to respond (printer 1)
  429. 0040:0079  00            prn_timeout_2    db    0            ; Countdown timer waits for printer
  430.                                         ;   to respond
  431. 0040:007A  00            prn_timeout_3    db    0
  432. 0040:007B  00            prn_timeout_4    db    0
  433. 0040:007C  01            rs232_timeout_1    db    1            ; Countdown timer waits for RS-232
  434.                                         ;   port to respond (port 1)
  435.                                         ;  xref F000:FA05
  436. 0040:007D  01            rs232_timeout_2    db    1            ; Countdown timer waits for RS-232
  437.                                         ;   port to respond
  438. 0040:007E  01            rs232_timeout_3    db    1
  439. 0040:007F  01            rs232_timeout_4    db    1
  440. 0040:0080  001E            @keybd_begin    dw    1Eh            ; Ptr to beginning of keybd queue
  441.                                         ;  xref F000:E2DA
  442. 0040:0082  003E            @keybd_end    dw    3Eh            ; Ptr to end of keyboard queue
  443.                                         ;  xref F000:E2E0
  444.   
  445.                                         ; █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  446.                                         ; █  ADVANCED VIDEO DATA, EGA/VGA █
  447.                                         ; █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  448.   
  449. 0040:0084  18            video_rows    db    18h            ; Rows of characters on display - 1
  450. 0040:0085  000E            video_pixels    dw    0Eh            ; Number of pixels per charactr * 8
  451. 0040:0087  60            video_options    db    60h            ; Display adapter options
  452.                                         ;   bit 7 = clear RAM
  453.                                         ;   bits 6,5 = memory on adapter
  454.                                         ;               00 - 64K
  455.                                         ;               01 - 128K
  456.                                         ;               10 - 192K
  457.                                         ;               11 - 256K
  458.                                         ;   bit 4 = unused
  459.                                         ;   bit 3 = 0 if EGA/VGA active
  460.                                         ;   bit 2 = wait for display enable
  461.                                         ;   bit 1 = 1 - mono monitor
  462.                                         ;         = 0 - color monoitor
  463.                                         ;   bit 0 = 0 - handle cursor, CGA
  464. 0040:0088  F9            video_switches    db    0F9h            ; Switch setting bits from adapter
  465.                                         ;   bits 7-4 = feature connector
  466.                                         ;   bits 3-0 = option switches
  467. 0040:0089  00            video_1_reservd    db    0            ; Video reserved 1, EGA/VGA control
  468.                                         ;   bit 7 = 200 line mode
  469.                                         ;   bits 6,5 = unused
  470.                                         ;   bit 4 = 400 line mode
  471.                                         ;   bit 3 = no palette load
  472.                                         ;   bit 2 = mono monitor
  473.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 9
  474.  
  475.                                         ;   bit 1 = gray scale
  476.                                         ;   bit 0 = unused
  477. 0040:008A  00            video_2_reservd    db    0            ; Video reserved 2
  478.   
  479.                                         ; █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  480.                                         ; █ OTHER FLOPPY & HARD DISK DATA █
  481.                                         ; █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  482.   
  483. 0040:008B  93            dsk_data_rate    db    93h            ; Last data rate for diskette
  484.                                         ;  bits 7 & 6 = 00 for 500K bit/sec
  485.                                         ;             = 01 for 300K bit/sec
  486.                                         ;             = 10 for 250K bit/sec
  487.                                         ;  bits 5 & 4 = step rate
  488. 0040:008C  00            hdsk_status_2    db    0            ; Hard disk status
  489. 0040:008D  00            hdsk_error    db    0            ; Hard disk error
  490. 0040:008E  00            hdsk_int_flags    db    0            ; Set for hard disk interrupt flag
  491. 0040:008F  01            hdsk_options    db    1            ; Bit 0 = 1 when using 1 controller
  492.                                         ;  card for both hard disk & floppy
  493. 0040:0090  74            hdsk0_media_st    db    74h            ; Media state for drive 0
  494. 0040:0091  93            hdsk1_media_st    db    93h            ; Media state for drive 1
  495.                                         ;     7      6      5      4
  496.                                         ;  data xfer rate  two   media
  497.                                         ;   00=500K bit/s  step  known
  498.                                         ;   01=300K bit/s
  499.                                         ;   10=250K bit/s
  500.                                         ;     3      2      1      0
  501.                                         ;  unused  -----state of drive-----
  502.                                         ;          bits floppy  drive state
  503.                                         ;          000=  360K in 360K, ?
  504.                                         ;          001=  360K in 1.2M, ?
  505.                                         ;          010=  1.2M in 1.2M, ?
  506.                                         ;          011=  360K in 360K, ok
  507.                                         ;          100=  360K in 1.2M, ok
  508.                                         ;          101=  1.2M in 1.2M, ok
  509.                                         ;          111=  state not defined
  510.   
  511. 0040:0092  00            hdsk0_start_st    db    0            ; Start state for drive 0
  512. 0040:0093  00            hdsk1_start_st    db    0            ; Start state for drive 1
  513. 0040:0094  00            hdsk0_cylinder    db    0            ; Track number for drive 0
  514. 0040:0095  14            hdsk1_cylinder    db    14h            ; Track number for drive 1
  515.   
  516.                                         ; █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  517.                                         ; █    ADVANCED KEYBOARD DATA     █
  518.                                         ; █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  519.   
  520. 0040:0096  00            keybd_flags_3    db    0            ; Special keyboard type and mode
  521.                                         ;  bit 7 Reading ID of keyboard
  522.                                         ;      6 last char is 1st ID char
  523.                                         ;      5 force num lock
  524.                                         ;      4 101/102 key keyboard
  525.                                         ;      3 right alt key down
  526.                                         ;      2 right ctrl key down
  527.                                         ;      1 E0h hidden code last
  528.                                         ;      0 E1h hidden code last
  529.                                         ;
  530. 0040:0097  00            keybd_flags_4    db    0            ; Keyboard Flags (advanced keybd)
  531.                                         ;   7      6       5     4  3 2 1 0
  532.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 10
  533.  
  534.                                         ; xmit   char   Resend  Ack   \   /
  535.                                         ; error was ID  Rec'd  Rec'd   LEDs
  536.   
  537.   
  538.                                         ; █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  539.                                         ; █  REAL-TIME CLOCK & LAN DATA   █
  540.                                         ; █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  541.   
  542. 0040:0098  0000            @timer_wait_off    dw    0            ; Ptr offset to wait done flag
  543. 0040:009A  0000            @timer_wait_seg    dw    0            ; Ptr segment to wait done flag
  544. 0040:009C  0000            timer_clk_low    dw    0            ; Timer low word, 1 microsecond clk
  545. 0040:009E  0000            timer_clk_hi    dw    0            ; Timer high word
  546. 0040:00A0  00            timer_clk_flag    db    0            ; Timer flag 00h = post acknowledgd
  547.                                         ;            01h = busy
  548.                                         ;            80h = posted
  549. 0040:00A1  00            lan_1        db    0            ; Local area network bytes (7)
  550. 0040:00A2  00            lan_2        db    0
  551. 0040:00A3  00            lan_3        db    0
  552. 0040:00A4  00            lan_4        db    0
  553. 0040:00A5  00            lan_5        db    0
  554. 0040:00A6  00            lan_6        db    0
  555. 0040:00A7  00            lan_7        db    0
  556.   
  557.                                         ; █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  558.                                         ; █   MORE ADVANCED VIDEO DATA    █
  559.                                         ; █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  560.   
  561. 0040:00A8  0063 C000        @video_sav_tbls    dd    0C0000063h        ; Pointer to a save table of more
  562.                                         ; pointers for the video system
  563.                                         ;            SAVE TABLE
  564.                                         ;  offset type    pointer to
  565.                                         ;  ────── ──── ────────────────────
  566.                                         ;    0     dd  Video parameters
  567.                                         ;    4     dd  Parms save area
  568.                                         ;    8     dd  Alpha char set
  569.                                         ;   0Ch    dd  Graphics char set
  570.                                         ;   10h    dd  2nd save ptr table
  571.                                         ;   14h    dd  reserved (0:0)
  572.                                         ;   18h    dd  reserved (0:0)
  573.                                         ;
  574.                                         ;  2ND SAVE TABLE (from ptr above)
  575.                                         ;  offset type functions & pointers
  576.                                         ;  ────── ──── ────────────────────
  577.                                         ;    0     dw  Bytes in this table
  578.                                         ;    2     dd  Combination code tbl
  579.                                         ;    6     dd  2nd alpha char set
  580.                                         ;   0Ah    dd  user palette tbl
  581.                                         ;   0Eh    dd  reserved (0:0)
  582.                                         ;   12h    dd  reserved (0:0)
  583.                                         ;   16h    dd  reserved (0:0)
  584.   
  585. 0040:00AC  0036[00]                db    54 dup (0)
  586. 0040:00E2  61 93 00 00 00 00            db    61h, 93h, 0, 0, 0, 0
  587. 0040:00E8  0003            data_6        dw    3            ;  xref F000:E181, F000:E1E4
  588. 0040:00EA  0003[0000]        data_7        dw    3 dup (0)
  589. 0040:00F0  00                    db    0
  590. 0040:00F1  00            data_8        db    0            ;  xref F000:E1A8
  591.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 11
  592.  
  593. 0040:00F2  00                    db    0
  594. 0040:00F3  00            data_9        db    0            ;  xref F000:E1B1
  595. 0040:00F4  000D[00]                db    13 dup (0)
  596.   
  597.                 seg_b        ends
  598.   
  599.   
  600.   
  601.                 ;--------------------------------------------------------------    seg_c  ----
  602.   
  603.                 seg_c        segment    at 50h
  604.   
  605. 0050:0000  00            prn_scrn_stat    db    0            ; Print screen status
  606.                                         ;    00h = Print screen ready
  607.                                         ;    01h = Print screen in progress
  608.                                         ;    FFh = Error occurred
  609. 0050:0001  00                    db    0
  610.   
  611.                 seg_c        ends
  612.   
  613.   
  614.   
  615.                 ;--------------------------------------------------------------    seg_d  ----
  616.   
  617.                 seg_d        segment    para public
  618.                         assume cs:seg_d , ds:seg_b
  619.   
  620.   
  621.                         org    0E000h
  622.   
  623. F000:E000  90 90 88 E0 26 E1            db    90h, 90h, 88h, 0E0h, 26h, 0E1h
  624. F000:E006  2E 38 32 35 39 00            db    2Eh, 38h, 32h, 35h, 39h, 0
  625.   
  626.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  627.                 ;                   SUBROUTINE
  628.                 ;
  629.                 ;         Called from:     F000:EC4F
  630.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  631.   
  632.                 sub_1        proc    near
  633. F000:E00C  51                    push    cx
  634. F000:E00D  53                    push    bx
  635. F000:E00E  56                    push    si
  636. F000:E00F  E8 001D                call    sub_2            ; (E02F)
  637. F000:E012  B9 000A                mov    cx,0Ah
  638.   
  639. F000:E015            locloop_2:                    ;  xref F000:E01B
  640. F000:E015  BE FEAD                mov    si,0FEADh
  641. F000:E018  E8 048B                call    sub_3            ; (E4A6)
  642. F000:E01B  E2 F8                loop    locloop_2        ; Loop if cx > 0
  643.   
  644. F000:E01D  5E                    pop    si
  645. F000:E01E  E8 0485                call    sub_3            ; (E4A6)
  646. F000:E021  5B                    pop    bx
  647. F000:E022  59                    pop    cx
  648. F000:E023  C3                    retn
  649.                 sub_1        endp
  650.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 12
  651.  
  652.   
  653. F000:E024  B3 01 B0 FF E6 21            db    0B3h, 1, 0B0h, 0FFh, 0E6h, 21h
  654. F000:E02A  B0 20 E6 20 CF            db    0B0h, 20h, 0E6h, 20h, 0CFh
  655.   
  656.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  657.                 ;                   SUBROUTINE
  658.                 ;
  659.                 ;         Called from:     F000:E00F, E441, E444
  660.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  661.   
  662.                 sub_2        proc    near
  663. F000:E02F  56                    push    si
  664. F000:E030  BE FEAA                mov    si,0FEAAh
  665. F000:E033  E8 0470                call    sub_3            ; (E4A6)
  666. F000:E036  5E                    pop    si
  667. F000:E037  C3                    retn
  668.                 sub_2        endp
  669.   
  670. F000:E038  0023[00]                db    35 dup (0)
  671.   
  672.   
  673.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ System Reset ▒▒▒▒▒
  674.                 ;
  675.                 ;   SYSTEM RESET
  676.                 ;
  677.                 ;      Reset the computer system.  General operation includes a    test of
  678.                 ;      of the CPU, ROM checksum, and initialization of hardware    including:
  679.                 ;
  680.                 ;         Memory system
  681.                 ;         Timer/Counter    (which is also used for RAM refresh)
  682.                 ;         Interrupt Controller(s)
  683.                 ;         DMA Controller(s)
  684.                 ;         Keyboard Controller
  685.                 ;         Video    Controller & Video RAM
  686.                 ;         Floppy Controller
  687.                 ;         Hard Disk Controller (if present)
  688.                 ;
  689.                 ;      Portions    of the hardware may also have specific tests made to
  690.                 ;      insure reliable operation.  Test failures may display error code
  691.                 ;      on the screen if    the video subsystem is operational, or generate
  692.                 ;      beeps or    LED blinks to signify the error.
  693.                 ;
  694.                 ;      Note: A soft reset uses the warm_boot_flag to skip the memory
  695.                 ;            tests. (i.e. from pressing Ctrl-Alt-Del).
  696.                 ;
  697.                 ;      The system checks for installed ROMs by searching memory    from
  698.                 ;      C000h to    the beginning of the BIOS, in 2K chunks.  ROM memory is
  699.                 ;      identified if it    starts with the word AA55h.  It is followed a one
  700.                 ;      byte field length of the ROM (divided by 512).  If ROM is found,
  701.                 ;      the BIOS    will call the ROM at an offset of 3 from the beginning.
  702.                 ;      This feature was    not supported in the earliest PC machines.
  703.                 ;
  704.                 ;      The last    task turns control over to the bootstrap loader    (assuming
  705.                 ;      the floppy controller is operational)
  706.   
  707. F000:E05B            system_reset    proc    near            ;  xref F000:EB7A, EC4C, FFF0
  708. F000:E05B  FA                    cli                ; Disable interrupts
  709.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 13
  710.  
  711. F000:E05C  B0 99                mov    al,99h
  712. F000:E05E  E6 63                out    63h,al            ; port 63h, 8255 mode reg
  713. F000:E060  33 C0                xor    ax,ax            ; Zero register
  714. F000:E062  E6 A0                out    0A0h,al            ; port 0A0h, initialize, 4 byte
  715.                                         ;  al = 0, Non-Maskable int
  716. F000:E064  E6 83                out    83h,al            ; port 83h, DMA page reg ch 1
  717. F000:E066  B0 FD                mov    al,0FDh
  718. F000:E068  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  719. F000:E06A  B0 01                mov    al,1
  720. F000:E06C  BA 03B8                mov    dx,3B8h
  721. F000:E06F  EE                    out    dx,al            ; port 3B8h, MDA video control
  722. F000:E070  FE C8                dec    al
  723. F000:E072  BA 03D8                mov    dx,3D8h
  724. F000:E075  EE                    out    dx,al            ; port 3D8h, CGA video control
  725. F000:E076  B8 F000                mov    ax,seg_d
  726. F000:E079  8E D0                mov    ss,ax
  727. F000:E07B  B0 04                mov    al,4
  728. F000:E07D  E6 08                out    8,al            ; port 8, DMA-1 command reg
  729. F000:E07F  B8 4054                mov    ax,4054h
  730. F000:E082  BA 0041                mov    dx,41h
  731. F000:E085  BC E002                mov    sp,0E002h
  732. F000:E088  B0 B6                mov    al,0B6h
  733. F000:E08A  E6 43                out    43h,al            ; port 43h, 8253 wrt timr mode
  734. F000:E08C  B0 07                mov    al,7
  735. F000:E08E  E6 42                out    42h,al            ; port 42h, 8253 timer 2 spkr
  736. F000:E090  E6 42                out    42h,al            ; port 42h, 8253 timer 2 spkr
  737. F000:E092  E4 61                in    al,61h            ; port 61h, 8255 port B, read
  738. F000:E094  0C 03                or    al,3
  739. F000:E096  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  740. F000:E098  BB E812                mov    bx,0E812h
  741. F000:E09B            loc_3:                        ;  xref F000:E0B9
  742. F000:E09B  43                    inc    bx
  743. F000:E09C  2E: 8A 07                mov    al,cs:[bx]
  744. F000:E09F  8A E0                mov    ah,al
  745. F000:E0A1  8B F0                mov    si,ax
  746. F000:E0A3  B9 0008                mov    cx,8
  747.   
  748. F000:E0A6            locloop_4:                    ;  xref F000:E0B5
  749. F000:E0A6  8B D1                mov    dx,cx
  750. F000:E0A8  4A                    dec    dx
  751. F000:E0A9  EE                    out    dx,al            ; port 7, DMA-1 bas&cnt ch 3
  752. F000:E0AA  EE                    out    dx,al            ; port 7, DMA-1 bas&cnt ch 3
  753. F000:E0AB  33 C0                xor    ax,ax            ; Zero register
  754. F000:E0AD  EC                    in    al,dx            ; port 7, DMA-1 bas&cnt ch 3
  755. F000:E0AE  86 E0                xchg    ah,al
  756. F000:E0B0  EC                    in    al,dx            ; port 7, DMA-1 bas&cnt ch 3
  757. F000:E0B1  3B F0                cmp    si,ax
  758. F000:E0B3  74 00                je    loc_5            ; Jump if equal
  759. F000:E0B5            loc_5:                        ;  xref F000:E0B3
  760. F000:E0B5  E2 EF                loop    locloop_4        ; Loop if cx > 0
  761.   
  762. F000:E0B7  0B F6                or    si,si            ; Zero ?
  763. F000:E0B9  75 E0                jnz    loc_3            ; Jump if not zero
  764. F000:E0BB  B0 FF                mov    al,0FFh
  765. F000:E0BD  E6 01                out    1,al            ; port 1, DMA-1 bas&cnt ch 0
  766. F000:E0BF  E6 01                out    1,al            ; port 1, DMA-1 bas&cnt ch 0
  767. F000:E0C1  B0 58                mov    al,58h            ; 'X'
  768.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 14
  769.  
  770. F000:E0C3  E6 0B                out    0Bh,al            ; port 0Bh, DMA-1 mode reg
  771. F000:E0C5  B0 00                mov    al,0
  772. F000:E0C7  E6 08                out    8,al            ; port 8, DMA-1 command reg
  773. F000:E0C9  E6 0A                out    0Ah,al            ; port 0Ah, DMA-1 mask reg bit
  774. F000:E0CB  B8 1254                mov    ax,1254h
  775. F000:E0CE  E6 43                out    43h,al            ; port 43h, 8253 wrt timr mode
  776. F000:E0D0  86 E0                xchg    ah,al
  777. F000:E0D2  E6 41                out    41h,al            ; port 41h, 8253 timer 1 refsh
  778. F000:E0D4  B9 0003                mov    cx,3
  779. F000:E0D7  B0 41                mov    al,41h            ; 'A'
  780.   
  781. F000:E0D9            locloop_6:                    ;  xref F000:E0DD
  782. F000:E0D9  E6 0B                out    0Bh,al            ; port 0Bh, DMA-1 mode reg
  783. F000:E0DB  FE C0                inc    al
  784. F000:E0DD  E2 FA                loop    locloop_6        ; Loop if cx > 0
  785.   
  786. F000:E0DF  B0 13                mov    al,13h
  787. F000:E0E1  E6 20                out    20h,al            ; port 20h, 8259-1 int command
  788. F000:E0E3  B0 08                mov    al,8
  789. F000:E0E5  E6 21                out    21h,al            ; port 21h, 8259-1 int comands
  790.                                         ;  al = 8, inhibit IRQ3 rs232
  791. F000:E0E7  FE C0                inc    al
  792. F000:E0E9  E6 21                out    21h,al            ; port 21h, 8259-1 int comands
  793. F000:E0EB  B0 FF                mov    al,0FFh
  794. F000:E0ED  E6 21                out    21h,al            ; port 21h, 8259-1 int comands
  795. F000:E0EF  B8 0040                mov    ax,seg_b
  796. F000:E0F2  8E D8                mov    ds,ax
  797. F000:E0F4  8B 36 0072                mov    si,warm_boot_flag    ; (0040:0072=0)
  798. F000:E0F8  2B DB                sub    bx,bx
  799. F000:E0FA  33 C0                xor    ax,ax            ; Zero register
  800. F000:E0FC  FC                    cld                ; Clear direction
  801. F000:E0FD  2B FF                sub    di,di
  802. F000:E0FF  33 C9                xor    cx,cx            ; Zero register
  803. F000:E101  8E C3                mov    es,bx
  804.   
  805. F000:E103            locloop_7:                    ;  xref F000:E104
  806. F000:E103  AA                    stosb                ; Store al to es:[di]
  807. F000:E104  E2 FD                loop    locloop_7        ; Loop if cx > 0
  808.   
  809. F000:E106  89 36 0072                mov    warm_boot_flag,si    ; (0040:0072=0)
  810. F000:E10A  E4 61                in    al,61h            ; port 61h, 8255 port B, read
  811. F000:E10C  24 FC                and    al,0FCh
  812. F000:E10E  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  813.                                         ;  al = 0, disable parity
  814. F000:E110  81 FE 1234                cmp    si,1234h
  815. F000:E114  74 20                je    loc_8            ; Jump if equal
  816. F000:E116  33 C0                xor    ax,ax            ; Zero register
  817. F000:E118  A3 0072                mov    warm_boot_flag,ax    ; (0040:0072=0)
  818. F000:E11B  8E D8                mov    ds,ax
  819. F000:E11D  BD 8080                mov    bp,8080h
  820. F000:E120  BC E004                mov    sp,0E004h
  821. F000:E123  E9 053A                jmp    loc_92            ; (E660)
  822. F000:E126  72 08 74 0C E4 61            db    72h, 8, 74h, 0Ch, 0E4h, 61h
  823. F000:E12C  0C 03 E6 61 EA 00            db    0Ch, 3, 0E6h, 61h, 0EAh, 0
  824. F000:E132  60 00 F0 F4                db    60h, 0, 0F0h, 0F4h
  825. F000:E136            loc_8:                        ;  xref F000:E114
  826. F000:E136  E4 61                in    al,61h            ; port 61h, 8255 port B, read
  827.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 15
  828.  
  829. F000:E138  0C 30                or    al,30h            ; '0'
  830. F000:E13A  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  831. F000:E13C  BB 0030                mov    bx,30h
  832. F000:E13F  8E D3                mov    ss,bx
  833. F000:E141  BC 0100                mov    sp,100h
  834. F000:E144  E8 1834                call    sub_57            ; (F97B)
  835. F000:E147  E8 03F6                call    sub_6            ; (E540)
  836. F000:E14A  2B C0                sub    ax,ax
  837. F000:E14C  E4 61                in    al,61h            ; port 61h, 8255 port B, read
  838. F000:E14E  24 F7                and    al,0F7h
  839. F000:E150  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  840.                                         ;  al = 0, disable parity
  841. F000:E152  E4 62                in    al,62h            ; port 62h, 8255 C - sw2, etc.
  842. F000:E154  24 0F                and    al,0Fh
  843. F000:E156  8A E0                mov    ah,al
  844. F000:E158  E4 61                in    al,61h            ; port 61h, 8255 port B, read
  845. F000:E15A  0C 08                or    al,8
  846. F000:E15C  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  847. F000:E15E  E4 62                in    al,62h            ; port 62h, 8255 C - sw2, etc.
  848. F000:E160  24 0F                and    al,0Fh
  849. F000:E162  B1 04                mov    cl,4
  850. F000:E164  D2 E0                shl    al,cl            ; Shift w/zeros fill
  851. F000:E166  0A C4                or    al,ah
  852. F000:E168  32 E4                xor    ah,ah            ; Zero register
  853. F000:E16A  A3 0010                mov    equip_bits,ax        ; (0040:0010=526Fh)
  854. F000:E16D  24 30                and    al,30h            ; '0'
  855. F000:E16F  86 E0                xchg    ah,al
  856. F000:E171  80 FC 10                cmp    ah,10h
  857. F000:E174  B0 01                mov    al,1
  858. F000:E176  74 09                jz    loc_9            ; Jump if zero
  859. F000:E178  80 FC 30                cmp    ah,30h            ; '0'
  860. F000:E17B  B0 00                mov    al,0
  861. F000:E17D  74 02                jz    loc_9            ; Jump if zero
  862. F000:E17F  B0 03                mov    al,3
  863. F000:E181            loc_9:                        ;  xref F000:E176, E17D
  864. F000:E181  A3 00E8                mov    data_6,ax        ; (0040:00E8=3)
  865. F000:E184  80 FC 00                cmp    ah,0
  866. F000:E187  75 03                jne    loc_10            ; Jump if not equal
  867. F000:E189  E9 009A                jmp    loc_24            ; (E226)
  868. F000:E18C            loc_10:                        ;  xref F000:E187
  869. F000:E18C  BB B800                mov    bx,0B800h
  870. F000:E18F  BA 03D8                mov    dx,3D8h
  871. F000:E192  BD 2000                mov    bp,2000h
  872. F000:E195  B5 00                mov    ch,0
  873. F000:E197  80 3E 00E9 30            cmp    byte ptr ds:[0E9h],30h    ; (0040:00E9=0) '0'
  874. F000:E19C  75 0A                jne    loc_11            ; Jump if not equal
  875. F000:E19E  B7 B0                mov    bh,0B0h
  876. F000:E1A0  BA 03B8                mov    dx,3B8h
  877. F000:E1A3  BD 0800                mov    bp,800h
  878. F000:E1A6  FE C5                inc    ch
  879. F000:E1A8            loc_11:                        ;  xref F000:E19C
  880. F000:E1A8  88 3E 00F1                mov    data_8,bh        ; (0040:00F1=0)
  881. F000:E1AC  8A CA                mov    cl,dl
  882. F000:E1AE  80 E9 04                sub    cl,4
  883. F000:E1B1  88 0E 00F3                mov    data_9,cl        ; (0040:00F3=0)
  884. F000:E1B5  32 E4                xor    ah,ah            ; Zero register
  885. F000:E1B7  CD 10                int    10h            ; Video display   ah=functn 00h
  886.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 16
  887.  
  888.                                         ;  set display mode in al
  889. F000:E1B9  8A C5                mov    al,ch
  890. F000:E1BB  EE                    out    dx,al            ; port 3B8h, MDA video control
  891. F000:E1BC  8E C3                mov    es,bx
  892. F000:E1BE  2B FF                sub    di,di
  893. F000:E1C0  8B C7                mov    ax,di
  894. F000:E1C2  8B CD                mov    cx,bp
  895. F000:E1C4  F3/ AB                rep    stosw            ; Rep when cx >0 Store ax to es:[di]
  896. F000:E1C6  1E                    push    ds
  897. F000:E1C7  8E DB                mov    ds,bx
  898. F000:E1C9  E8 0494                call    sub_12            ; (E660)
  899. F000:E1CC  1F                    pop    ds
  900. F000:E1CD  74 15                jz    loc_14            ; Jump if zero
  901. F000:E1CF  BA 0003                mov    dx,3
  902. F000:E1D2            loc_12:                        ;  xref F000:E224
  903. F000:E1D2  53                    push    bx
  904. F000:E1D3  BB 0003                mov    bx,3
  905. F000:E1D6            loc_13:                        ;  xref F000:E1DF
  906. F000:E1D6  52                    push    dx
  907. F000:E1D7  53                    push    bx
  908. F000:E1D8  E8 03A1                call    sub_7            ; (E57C)
  909. F000:E1DB  5B                    pop    bx
  910. F000:E1DC  5A                    pop    dx
  911. F000:E1DD  FE CB                dec    bl
  912. F000:E1DF  75 F5                jnz    loc_13            ; Jump if not zero
  913. F000:E1E1  5B                    pop    bx
  914. F000:E1E2  EB 45                jmp    short loc_25        ; (E229)
  915. F000:E1E4            loc_14:                        ;  xref F000:E1CD
  916. F000:E1E4  A0 00E8                mov    al,byte ptr data_6    ; (0040:00E8=3)
  917. F000:E1E7  B4 00                mov    ah,0
  918. F000:E1E9  CD 10                int    10h            ; Video display   ah=functn 00h
  919.                                         ;  set display mode in al
  920. F000:E1EB  80 3E 00E9 30            cmp    byte ptr ds:[0E9h],30h    ; (0040:00E9=0) '0'
  921. F000:E1F0  BA 03BA                mov    dx,3BAh
  922. F000:E1F3  74 03                jz    loc_15            ; Jump if zero
  923. F000:E1F5  BA 03DA                mov    dx,3DAh
  924. F000:E1F8            loc_15:                        ;  xref F000:E1F3
  925. F000:E1F8  B3 01                mov    bl,1
  926. F000:E1FA            loc_16:                        ;  xref F000:E21F
  927. F000:E1FA  81 E1 0000                and    cx,0
  928.                         nop                ;*Fixup for MASM (M)
  929.   
  930. F000:E1FE            locloop_17:                    ;  xref F000:E205
  931. F000:E1FE  EC                    in    al,dx            ; port 3DAh, CGA/EGA vid status
  932. F000:E1FF  22 C3                and    al,bl
  933. F000:E201  74 06                jz    loc_19            ; Jump if zero
  934. F000:E203  EB 00                jmp    short loc_18        ; (E205)
  935. F000:E205            loc_18:                        ;  xref F000:E203
  936. F000:E205  E2 F7                loop    locloop_17        ; Loop if cx > 0
  937.   
  938. F000:E207  EB 18                jmp    short loc_23        ; (E221)
  939. F000:E209            loc_19:                        ;  xref F000:E201
  940. F000:E209  81 E1 0000                and    cx,0
  941.                         nop                ;*Fixup for MASM (M)
  942.   
  943. F000:E20D            locloop_20:                    ;  xref F000:E214
  944. F000:E20D  EC                    in    al,dx            ; port 3DAh, CGA/EGA vid status
  945.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 17
  946.  
  947. F000:E20E  22 C3                and    al,bl
  948. F000:E210  75 06                jnz    loc_22            ; Jump if not zero
  949. F000:E212  EB 00                jmp    short loc_21        ; (E214)
  950. F000:E214            loc_21:                        ;  xref F000:E212
  951. F000:E214  E2 F7                loop    locloop_20        ; Loop if cx > 0
  952.   
  953. F000:E216  EB 09                jmp    short loc_23        ; (E221)
  954. F000:E218            loc_22:                        ;  xref F000:E210
  955. F000:E218  80 E3 01                and    bl,1
  956. F000:E21B  75 0C                jnz    loc_25            ; Jump if not zero
  957. F000:E21D  B3 08                mov    bl,8
  958. F000:E21F  EB D9                jmp    short loc_16        ; (E1FA)
  959. F000:E221            loc_23:                        ;  xref F000:E207, E216
  960. F000:E221  BA 0005                mov    dx,5
  961. F000:E224  EB AC                jmp    short loc_12        ; (E1D2)
  962. F000:E226            loc_24:                        ;  xref F000:E189
  963. F000:E226  E8 0D09                call    sub_30            ; (EF32)
  964. F000:E229            loc_25:                        ;  xref F000:E1E2, E21B
  965. F000:E229  BB C000                mov    bx,0C000h
  966. F000:E22C  BF C800                mov    di,0C800h
  967. F000:E22F  E8 02DC                call    sub_5            ; (E50E)
  968. F000:E232  A0 00E8                mov    al,ds:data_36e        ; (C000:00E8=0B8h)
  969. F000:E235  B4 00                mov    ah,0
  970. F000:E237  CD 10                int    10h            ; Video display   ah=functn 00h
  971.                                         ;  set display mode in al
  972. F000:E239  81 3E 0072 1234            cmp    word ptr ds:data_31e,1234h    ; (C000:0072=0)
  973. F000:E23F  75 03                jne    loc_26            ; Jump if not equal
  974. F000:E241  EB 07                jmp    short loc_27        ; (E24A)
  975. F000:E243  90                    db    90h
  976. F000:E244            loc_26:                        ;  xref F000:E23F
  977. F000:E244  BE F9B1                mov    si,0F9B1h
  978. F000:E247  E8 025C                call    sub_3            ; (E4A6)
  979. F000:E24A            loc_27:                        ;  xref F000:E241
  980. F000:E24A  FA                    cli                ; Disable interrupts
  981. F000:E24B  BA 0021                mov    dx,21h
  982. F000:E24E  E8 03C7                call    sub_10            ; (E618)
  983. F000:E251  75 12                jnz    loc_28            ; Jump if not zero
  984. F000:E253  FC                    cld                ; Clear direction
  985. F000:E254  33 C0                xor    ax,ax            ; Zero register
  986. F000:E256  8E C0                mov    es,ax
  987. F000:E258  BF 0024                mov    di,24h
  988. F000:E25B  B8 E024                mov    ax,0E024h
  989. F000:E25E  AB                    stosw                ; Store ax to es:[di]
  990. F000:E25F  B8 F000                mov    ax,seg_d
  991. F000:E262  AB                    stosw                ; Store ax to es:[di]
  992. F000:E263  EB 06                jmp    short loc_29        ; (E26B)
  993. F000:E265            loc_28:                        ;  xref F000:E251
  994. F000:E265  BE E006                mov    si,0E006h
  995. F000:E268  E8 09E4                call    sub_22            ; (EC4F)
  996. F000:E26B            loc_29:                        ;  xref F000:E263
  997. F000:E26B  33 C9                xor    cx,cx            ; Zero register
  998.   
  999. F000:E26D            locloop_30:                    ;  xref F000:E26D
  1000. F000:E26D  E2 FE                loop    locloop_30        ; Loop if cx > 0
  1001.   
  1002.   
  1003. F000:E26F            locloop_31:                    ;  xref F000:E26F
  1004.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 18
  1005.  
  1006. F000:E26F  E2 FE                loop    locloop_31        ; Loop if cx > 0
  1007.   
  1008. F000:E271  B8 0014                mov    ax,14h
  1009. F000:E274  BA 0040                mov    dx,seg seg_b
  1010. F000:E277  E8 03BC                call    sub_11            ; (E636)
  1011. F000:E27A  72 02                jc    loc_32            ; Jump if carry Set
  1012. F000:E27C  EB 06                jmp    short loc_33        ; (E284)
  1013. F000:E27E            loc_32:                        ;  xref F000:E27A
  1014. F000:E27E  BE F9F3                mov    si,0F9F3h
  1015. F000:E281  E8 09CB                call    sub_22            ; (EC4F)
  1016. F000:E284            loc_33:                        ;  xref F000:E27C
  1017. F000:E284  B0 FF                mov    al,0FFh
  1018. F000:E286  E6 21                out    21h,al            ; port 21h, 8259-1 int comands
  1019. F000:E288  B8 0036                mov    ax,36h
  1020. F000:E28B  E6 43                out    43h,al            ; port 43h, 8253 wrt timr mode
  1021. F000:E28D  86 E0                xchg    ah,al
  1022. F000:E28F  E6 40                out    40h,al            ; port 40h, 8253 timer 0 clock
  1023. F000:E291  E6 40                out    40h,al            ; port 40h, 8253 timer 0 clock
  1024. F000:E293  33 C9                xor    cx,cx            ; Zero register
  1025.   
  1026. F000:E295            locloop_34:                    ;  xref F000:E295
  1027. F000:E295  E2 FE                loop    locloop_34        ; Loop if cx > 0
  1028.   
  1029.   
  1030. F000:E297            locloop_35:                    ;  xref F000:E297
  1031. F000:E297  E2 FE                loop    locloop_35        ; Loop if cx > 0
  1032.   
  1033. F000:E299  81 3E 0072 1234            cmp    word ptr ds:data_31e,1234h    ; (C000:0072=0)
  1034. F000:E29F  75 0A                jne    loc_37            ; Jump if not equal
  1035. F000:E2A1  50                    push    ax
  1036. F000:E2A2  B0 14                mov    al,14h
  1037.   
  1038. F000:E2A4            locloop_36:                    ;  xref F000:E2A4, E2A8
  1039. F000:E2A4  E2 FE                loop    locloop_36        ; Loop if cx > 0
  1040.   
  1041. F000:E2A6  FE C8                dec    al
  1042. F000:E2A8  75 FA                jnz    locloop_36        ; Jump if not zero
  1043. F000:E2AA  58                    pop    ax
  1044. F000:E2AB            loc_37:                        ;  xref F000:E29F
  1045. F000:E2AB  E8 033A                call    sub_9            ; (E5E8)
  1046. F000:E2AE  E3 05                jcxz    loc_38            ; Jump if cx=0
  1047. F000:E2B0  80 FC AA                cmp    ah,0AAh
  1048. F000:E2B3  74 06                je    loc_39            ; Jump if equal
  1049. F000:E2B5            loc_38:                        ;  xref F000:E2AE
  1050. F000:E2B5  BE F9F9                mov    si,0F9F9h
  1051. F000:E2B8  E8 0994                call    sub_22            ; (EC4F)
  1052. F000:E2BB            loc_39:                        ;  xref F000:E2B3
  1053. F000:E2BB  FC                    cld                ; Clear direction
  1054. F000:E2BC  33 C0                xor    ax,ax            ; Zero register
  1055. F000:E2BE  8E C0                mov    es,ax
  1056. F000:E2C0  BF 0024                mov    di,24h
  1057. F000:E2C3  B8 E987                mov    ax,0E987h
  1058. F000:E2C6  AB                    stosw                ; Store ax to es:[di]
  1059. F000:E2C7  B8 F000                mov    ax,seg_d
  1060. F000:E2CA  AB                    stosw                ; Store ax to es:[di]
  1061. F000:E2CB  E8 16AD                call    sub_57            ; (F97B)
  1062. F000:E2CE  C7 06 001A 001E            mov    keybd_q_head,1Eh    ; (0040:001A=38h)
  1063.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 19
  1064.  
  1065. F000:E2D4  C7 06 001C 001E            mov    keybd_q_tail,1Eh    ; (0040:001C=38h)
  1066. F000:E2DA  C7 06 0080 001E            mov    @keybd_begin,1Eh    ; (0040:0080=1Eh)
  1067. F000:E2E0  C7 06 0082 003E            mov    @keybd_end,3Eh        ; (0040:0082=3Eh)
  1068. F000:E2E6  C7 06 0013 0040            mov    main_ram_size,40h    ; (0040:0013=280h)
  1069. F000:E2EC  BB 1000                mov    bx,1000h
  1070. F000:E2EF            loc_40:                        ;  xref F000:E353
  1071. F000:E2EF  FB                    sti                ; Enable interrupts
  1072. F000:E2F0  B0 FD                mov    al,0FDh
  1073. F000:E2F2  E6 21                out    21h,al            ; port 21h, 8259-1 int comands
  1074. F000:E2F4  81 3E 0072 1234            cmp    warm_boot_flag,1234h    ; (0040:0072=0)
  1075. F000:E2FA  74 10                je    loc_42            ; Jump if equal
  1076. F000:E2FC  83 3E 0013 40            cmp    main_ram_size,40h    ; (0040:0013=280h)
  1077. F000:E301  75 06                jne    loc_41            ; Jump if not equal
  1078. F000:E303  BE F014                mov    si,0F014h
  1079. F000:E306  E8 019D                call    sub_3            ; (E4A6)
  1080. F000:E309            loc_41:                        ;  xref F000:E301
  1081. F000:E309  E8 01AD                call    sub_4            ; (E4B9)
  1082. F000:E30C            loc_42:                        ;  xref F000:E2FA
  1083. F000:E30C  81 FB A000                cmp    bx,0A000h
  1084. F000:E310  74 43                je    loc_46            ; Jump if equal
  1085. F000:E312  33 FF                xor    di,di            ; Zero register
  1086. F000:E314  8B C7                mov    ax,di
  1087. F000:E316  8E C3                mov    es,bx
  1088. F000:E318  26: C7 05 55AA            mov    word ptr es:[di],55AAh
  1089. F000:E31D  EB 00                jmp    short loc_43        ; (E31F)
  1090. F000:E31F            loc_43:                        ;  xref F000:E31D
  1091. F000:E31F  26: 81 35 55AA            xor    word ptr es:[di],55AAh
  1092. F000:E324  75 2F                jnz    loc_46            ; Jump if not zero
  1093. F000:E326  FC                    cld                ; Clear direction
  1094. F000:E327  B9 4000                mov    cx,4000h
  1095.   
  1096. F000:E32A            locloop_44:                    ;  xref F000:E32B
  1097. F000:E32A  AB                    stosw                ; Store ax to es:[di]
  1098. F000:E32B  E2 FD                loop    locloop_44        ; Loop if cx > 0
  1099.   
  1100. F000:E32D  81 3E 0072 1234            cmp    warm_boot_flag,1234h    ; (0040:0072=0)
  1101. F000:E333  74 15                je    loc_45            ; Jump if equal
  1102. F000:E335  BD 40C0                mov    bp,40C0h
  1103. F000:E338  FA                    cli                ; Disable interrupts
  1104. F000:E339  B0 FF                mov    al,0FFh
  1105. F000:E33B  E6 21                out    21h,al            ; port 21h, 8259-1 int comands
  1106. F000:E33D  53                    push    bx
  1107. F000:E33E  1E                    push    ds
  1108. F000:E33F  8E DB                mov    ds,bx
  1109. F000:E341  E8 031C                call    sub_12            ; (E660)
  1110. F000:E344  1F                    pop    ds
  1111. F000:E345  5B                    pop    bx
  1112. F000:E346  72 0D                jc    loc_46            ; Jump if carry Set
  1113. F000:E348  75 0B                jnz    loc_46            ; Jump if not zero
  1114. F000:E34A            loc_45:                        ;  xref F000:E333
  1115. F000:E34A  83 06 0013 20            add    main_ram_size,20h    ; (0040:0013=280h)
  1116. F000:E34F  81 C3 0800                add    bx,800h
  1117. F000:E353  EB 9A                jmp    short loc_40        ; (E2EF)
  1118. F000:E355            loc_46:                        ;  xref F000:E310, E324, E346, E348
  1119. F000:E355  E4 61                in    al,61h            ; port 61h, 8255 port B, read
  1120. F000:E357  0C 30                or    al,30h            ; '0'
  1121. F000:E359  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  1122.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 20
  1123.  
  1124. F000:E35B  BE F9F0                mov    si,0F9F0h
  1125. F000:E35E  E8 0145                call    sub_3            ; (E4A6)
  1126. F000:E361  33 C9                xor    cx,cx            ; Zero register
  1127.   
  1128. F000:E363            locloop_47:                    ;  xref F000:E363
  1129. F000:E363  E2 FE                loop    locloop_47        ; Loop if cx > 0
  1130.   
  1131.   
  1132. F000:E365            locloop_48:                    ;  xref F000:E365
  1133. F000:E365  E2 FE                loop    locloop_48        ; Loop if cx > 0
  1134.   
  1135. F000:E367  BB C800                mov    bx,0C800h
  1136. F000:E36A  BF F600                mov    di,0F600h
  1137. F000:E36D  E8 019E                call    sub_5            ; (E50E)
  1138. F000:E370  1E                    push    ds
  1139. F000:E371  50                    push    ax
  1140. F000:E372  B8 0040                mov    ax,seg_b
  1141. F000:E375  8E D8                mov    ds,ax
  1142. F000:E377  C7 06 0072 0000            mov    warm_boot_flag,0    ; (0040:0072=0)
  1143. F000:E37D  58                    pop    ax
  1144. F000:E37E  1F                    pop    ds
  1145. F000:E37F  FB                    sti                ; Enable interrupts
  1146. F000:E380  B0 BC                mov    al,0BCh
  1147. F000:E382  E6 21                out    21h,al            ; port 21h, 8259-1 int comands
  1148. F000:E384  B4 00                mov    ah,0
  1149. F000:E386  8A D4                mov    dl,ah
  1150. F000:E388  80 0E 003F C1            or    byte ptr ds:data_28e,0C1h    ; (C000:003F=41h)
  1151. F000:E38D  CD 13                int    13h            ; Disk  dl=drive #: ah=func a0h
  1152.                                         ;  reset disk, al=return status
  1153. F000:E38F  F6 C4 FF                test    ah,0FFh
  1154. F000:E392  75 2C                jnz    loc_51            ; Jump if not zero
  1155. F000:E394  BA 03F2                mov    dx,3F2h
  1156. F000:E397  B0 1C                mov    al,1Ch
  1157. F000:E399  EE                    out    dx,al            ; port 3F2h, dsk0 contrl output
  1158. F000:E39A  33 C9                xor    cx,cx            ; Zero register
  1159.   
  1160. F000:E39C            locloop_49:                    ;  xref F000:E39C
  1161. F000:E39C  E2 FE                loop    locloop_49        ; Loop if cx > 0
  1162.   
  1163.   
  1164. F000:E39E            locloop_50:                    ;  xref F000:E39E
  1165. F000:E39E  E2 FE                loop    locloop_50        ; Loop if cx > 0
  1166.   
  1167. F000:E3A0  33 D2                xor    dx,dx            ; Zero register
  1168. F000:E3A2  B5 27                mov    ch,27h            ; '''
  1169. F000:E3A4  88 16 003E                mov    ds:data_27e,dl        ; (C000:003E=52h)
  1170. F000:E3A8  80 0E 003F 01            or    byte ptr ds:data_28e,1    ; (C000:003F=41h)
  1171. F000:E3AD  E8 14C6                call    sub_56            ; (F876)
  1172. F000:E3B0  72 0E                jc    loc_51            ; Jump if carry Set
  1173. F000:E3B2  B5 14                mov    ch,14h
  1174. F000:E3B4  E8 14BF                call    sub_56            ; (F876)
  1175. F000:E3B7  72 07                jc    loc_51            ; Jump if carry Set
  1176. F000:E3B9  B5 00                mov    ch,0
  1177. F000:E3BB  E8 14B8                call    sub_56            ; (F876)
  1178. F000:E3BE  73 06                jnc    loc_52            ; Jump if carry=0
  1179. F000:E3C0            loc_51:                        ;  xref F000:E392, E3B0, E3B7
  1180. F000:E3C0  BE F9FF                mov    si,0F9FFh
  1181.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 21
  1182.  
  1183. F000:E3C3  E8 0889                call    sub_22            ; (EC4F)
  1184. F000:E3C6            loc_52:                        ;  xref F000:E3BE
  1185. F000:E3C6  B0 0C                mov    al,0Ch
  1186. F000:E3C8  BA 03F2                mov    dx,3F2h
  1187. F000:E3CB  EE                    out    dx,al            ; port 3F2h, dsk0 contrl output
  1188. F000:E3CC  BD E817                mov    bp,0E817h
  1189. F000:E3CF  33 DB                xor    bx,bx            ; Zero register
  1190. F000:E3D1            loc_53:                        ;  xref F000:E3EF
  1191. F000:E3D1  2E: 8B 56 00                mov    dx,cs:[bp]
  1192. F000:E3D5  0B D2                or    dx,dx            ; Zero ?
  1193. F000:E3D7  74 18                jz    loc_55            ; Jump if zero
  1194. F000:E3D9  B0 55                mov    al,55h            ; 'U'
  1195. F000:E3DB  EE                    out    dx,al            ; port 3BCh, MDA printer-1 data
  1196. F000:E3DC  06                    push    es
  1197. F000:E3DD  EC                    in    al,dx            ; port 3BCh, MDA printer-1 data
  1198. F000:E3DE  07                    pop    es
  1199. F000:E3DF  3C 55                cmp    al,55h            ; 'U'
  1200. F000:E3E1  E8 0234                call    sub_10            ; (E618)
  1201. F000:E3E4  75 07                jnz    loc_54            ; Jump if not zero
  1202. F000:E3E6  89 97 0008                mov    [bx+8],dx
  1203.                         nop                ;*Fixup for MASM (M)
  1204. F000:E3EA  80 C3 02                add    bl,2
  1205. F000:E3ED            loc_54:                        ;  xref F000:E3E4
  1206. F000:E3ED  45                    inc    bp
  1207. F000:E3EE  45                    inc    bp
  1208. F000:E3EF  EB E0                jmp    short loc_53        ; (E3D1)
  1209. F000:E3F1            loc_55:                        ;  xref F000:E3D7
  1210. F000:E3F1  D0 CB                ror    bl,1            ; Rotate
  1211. F000:E3F3  D0 CB                ror    bl,1            ; Rotate
  1212. F000:E3F5  D0 CB                ror    bl,1            ; Rotate
  1213. F000:E3F7  08 1E 0011                or    ds:data_26e,bl        ; (C000:0011=31h)
  1214. F000:E3FB  BA 0201                mov    dx,201h
  1215. F000:E3FE  EC                    in    al,dx            ; port 201h
  1216. F000:E3FF  A8 0F                test    al,0Fh
  1217. F000:E401  75 05                jnz    loc_56            ; Jump if not zero
  1218. F000:E403  80 0E 0011 10            or    byte ptr ds:data_26e,10h    ; (C000:0011=31h)
  1219. F000:E408            loc_56:                        ;  xref F000:E401
  1220. F000:E408  33 DB                xor    bx,bx            ; Zero register
  1221. F000:E40A  C6 06 007C 01            mov    byte ptr ds:data_32e,1    ; (C000:007C=0)
  1222. F000:E40F  C6 06 007D 01            mov    byte ptr ds:data_33e,1    ; (C000:007D=0)
  1223. F000:E414  C6 06 007E 01            mov    byte ptr ds:data_34e,1    ; (C000:007E=0)
  1224. F000:E419  C6 06 007F 01            mov    byte ptr ds:data_35e,1    ; (C000:007F=0D0h)
  1225. F000:E41E  B9 0002                mov    cx,2
  1226. F000:E421  BA 03FA                mov    dx,3FAh
  1227.   
  1228. F000:E424            locloop_57:                    ;  xref F000:E437
  1229. F000:E424  EC                    in    al,dx            ; port 3FAh, RS232-1 int identy
  1230. F000:E425  80 EA 02                sub    dl,2
  1231. F000:E428  A8 F8                test    al,0F8h
  1232. F000:E42A  75 07                jnz    loc_58            ; Jump if not zero
  1233. F000:E42C  89 97 0000                mov    [bx+0],dx
  1234.                         nop                ;*Fixup for MASM (M)
  1235. F000:E430  80 C3 02                add    bl,2
  1236. F000:E433            loc_58:                        ;  xref F000:E42A
  1237. F000:E433  81 EA 00FE                sub    dx,0FEh
  1238. F000:E437  E2 EB                loop    locloop_57        ; Loop if cx > 0
  1239.   
  1240.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 22
  1241.  
  1242. F000:E439  08 1E 0011                or    ds:data_26e,bl        ; (C000:0011=31h)
  1243. F000:E43D  B0 80                mov    al,80h
  1244. F000:E43F  E6 A0                out    0A0h,al            ; port 0A0h, initialize, 4 byte
  1245.                                         ;  al = 80h, enable NMI
  1246. F000:E441  E8 FBEB                call    sub_2            ; (E02F)
  1247. F000:E444  E8 FBE8                call    sub_2            ; (E02F)
  1248. F000:E447  B0 BC                mov    al,0BCh
  1249. F000:E449  E6 21                out    21h,al            ; port 21h, 8259-1 int comands
  1250. F000:E44B  06                    push    es
  1251. F000:E44C  57                    push    di
  1252. F000:E44D  33 FF                xor    di,di            ; Zero register
  1253. F000:E44F  8E C7                mov    es,di
  1254. F000:E451  26: C7 45 62 F600            mov    word ptr es:[di+62h],0F600h
  1255. F000:E457  5F                    pop    di
  1256. F000:E458  07                    pop    es
  1257. F000:E459  B0 B6                mov    al,0B6h
  1258. F000:E45B  E6 43                out    43h,al            ; port 43h, 8253 wrt timr mode
  1259. F000:E45D  B0 04                mov    al,4
  1260. F000:E45F  E6 42                out    42h,al            ; port 42h, 8253 timer 2 spkr
  1261. F000:E461  E6 42                out    42h,al            ; port 42h, 8253 timer 2 spkr
  1262. F000:E463  BA 4002                mov    dx,4002h
  1263. F000:E466  E8 0113                call    sub_7            ; (E57C)
  1264. F000:E469  E4 61                in    al,61h            ; port 61h, 8255 port B, read
  1265. F000:E46B  8A E0                mov    ah,al
  1266. F000:E46D  24 F7                and    al,0F7h
  1267. F000:E46F  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  1268. F000:E471  EB 00                jmp    short loc_59        ; (E473)
  1269. F000:E473            loc_59:                        ;  xref F000:E471
  1270. F000:E473  E4 62                in    al,62h            ; port 62h, 8255 C - sw2, etc.
  1271. F000:E475  A8 01                test    al,1
  1272. F000:E477  75 03                jnz    loc_60            ; Jump if not zero
  1273. F000:E479  E9 07C8                jmp    loc_180            ; (EC44)
  1274. F000:E47C            loc_60:                        ;  xref F000:E477
  1275. F000:E47C  8A C4                mov    al,ah
  1276. F000:E47E  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  1277. F000:E480  B1 02                mov    cl,2
  1278. F000:E482            loc_61:                        ;  xref F000:E4A4
  1279. F000:E482  51                    push    cx
  1280. F000:E483  CD 19                int    19h            ; Bootstrap loader
  1281. F000:E485  59                    pop    cx
  1282. F000:E486  FE C9                dec    cl
  1283. F000:E488  75 02                jnz    loc_62            ; Jump if not zero
  1284. F000:E48A  CD 18                int    18h            ; ROM basic
  1285. F000:E48C            loc_62:                        ;  xref F000:E488
  1286. F000:E48C  51                    push    cx
  1287. F000:E48D  BE EFD7                mov    si,0EFD7h
  1288. F000:E490  E8 0013                call    sub_3            ; (E4A6)
  1289. F000:E493            loc_63:                        ;  xref F000:E497
  1290. F000:E493  B4 01                mov    ah,1
  1291. F000:E495  CD 16                int    16h            ; Keyboard i/o  ah=function 01h
  1292.                                         ;  get status, if zf=0  al=char
  1293. F000:E497  74 FA                jz    loc_63            ; Jump if zero
  1294. F000:E499  B4 00                mov    ah,0
  1295. F000:E49B  CD 16                int    16h            ; Keyboard i/o  ah=function 00h
  1296.                                         ;  get keybd char in al, ah=scan
  1297. F000:E49D  33 DB                xor    bx,bx            ; Zero register
  1298. F000:E49F  B4 0E                mov    ah,0Eh
  1299.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 23
  1300.  
  1301. F000:E4A1  CD 10                int    10h            ; Video display   ah=functn 0Eh
  1302.                                         ;  write char al, teletype mode
  1303. F000:E4A3  59                    pop    cx
  1304. F000:E4A4  EB DC                jmp    short loc_61        ; (E482)
  1305.                 system_reset    endp
  1306.   
  1307.   
  1308.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1309.                 ;                   SUBROUTINE
  1310.                 ;
  1311.                 ;         Called from:     F000:E018, E01E, E033, E247, E306, E35E, E490
  1312.                 ;                  E568, E723
  1313.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1314.   
  1315.                 sub_3        proc    near
  1316. F000:E4A6  53                    push    bx
  1317. F000:E4A7            loc_64:                        ;  xref F000:E4B5
  1318. F000:E4A7  B4 0E                mov    ah,0Eh
  1319. F000:E4A9  33 DB                xor    bx,bx            ; Zero register
  1320. F000:E4AB  2E: 8A 04                mov    al,cs:[si]
  1321. F000:E4AE  0A C0                or    al,al            ; Zero ?
  1322. F000:E4B0  74 05                jz    loc_65            ; Jump if zero
  1323. F000:E4B2  CD 10                int    10h            ; Video display   ah=functn 0Eh
  1324.                                         ;  write char al, teletype mode
  1325. F000:E4B4  46                    inc    si
  1326. F000:E4B5  EB F0                jmp    short loc_64        ; (E4A7)
  1327. F000:E4B7            loc_65:                        ;  xref F000:E4B0
  1328. F000:E4B7  5B                    pop    bx
  1329. F000:E4B8  C3                    retn
  1330.                 sub_3        endp
  1331.   
  1332.   
  1333.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1334.                 ;                   SUBROUTINE
  1335.                 ;
  1336.                 ;         Called from:     F000:E309
  1337.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1338.   
  1339.                 sub_4        proc    near
  1340. F000:E4B9  56                    push    si
  1341. F000:E4BA  52                    push    dx
  1342. F000:E4BB  51                    push    cx
  1343. F000:E4BC  53                    push    bx
  1344. F000:E4BD  50                    push    ax
  1345. F000:E4BE  33 DB                xor    bx,bx            ; Zero register
  1346. F000:E4C0  B4 03                mov    ah,3
  1347. F000:E4C2  CD 10                int    10h            ; Video display   ah=functn 03h
  1348.                                         ;  get cursor loc in dx, mode cx
  1349. F000:E4C4  33 DB                xor    bx,bx            ; Zero register
  1350. F000:E4C6  B2 0D                mov    dl,0Dh
  1351. F000:E4C8  B4 02                mov    ah,2
  1352. F000:E4CA  CD 10                int    10h            ; Video display   ah=functn 02h
  1353.                                         ;  set cursor location in dx
  1354. F000:E4CC  A1 0013                mov    ax,main_ram_size    ; (0040:0013=280h)
  1355. F000:E4CF  BE 000A                mov    si,0Ah
  1356. F000:E4D2  B9 0004                mov    cx,4
  1357.   
  1358.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 24
  1359.  
  1360. F000:E4D5            locloop_66:                    ;  xref F000:E4E3
  1361. F000:E4D5  33 D2                xor    dx,dx            ; Zero register
  1362. F000:E4D7  F7 F6                div    si            ; ax,dx rem=dx:ax/reg
  1363. F000:E4D9  D1 C3                rol    bx,1            ; Rotate
  1364. F000:E4DB  D1 C3                rol    bx,1            ; Rotate
  1365. F000:E4DD  D1 C3                rol    bx,1            ; Rotate
  1366. F000:E4DF  D1 C3                rol    bx,1            ; Rotate
  1367. F000:E4E1  0B DA                or    bx,dx
  1368. F000:E4E3  E2 F0                loop    locloop_66        ; Loop if cx > 0
  1369.   
  1370. F000:E4E5  B9 0003                mov    cx,3
  1371. F000:E4E8  8B C3                mov    ax,bx
  1372.   
  1373. F000:E4EA            locloop_67:                    ;  xref F000:E4FE
  1374. F000:E4EA  D1 C8                ror    ax,1            ; Rotate
  1375. F000:E4EC  D1 C8                ror    ax,1            ; Rotate
  1376. F000:E4EE  D1 C8                ror    ax,1            ; Rotate
  1377. F000:E4F0  D1 C8                ror    ax,1            ; Rotate
  1378. F000:E4F2  50                    push    ax
  1379. F000:E4F3  24 0F                and    al,0Fh
  1380. F000:E4F5  0C 30                or    al,30h            ; '0'
  1381. F000:E4F7  33 DB                xor    bx,bx            ; Zero register
  1382. F000:E4F9  B4 0E                mov    ah,0Eh
  1383. F000:E4FB  CD 10                int    10h            ; Video display   ah=functn 0Eh
  1384.                                         ;  write char al, teletype mode
  1385. F000:E4FD  58                    pop    ax
  1386. F000:E4FE  E2 EA                loop    locloop_67        ; Loop if cx > 0
  1387.   
  1388. F000:E500  33 DB                xor    bx,bx            ; Zero register
  1389. F000:E502  B0 4B                mov    al,4Bh            ; 'K'
  1390. F000:E504  B4 0E                mov    ah,0Eh
  1391. F000:E506  CD 10                int    10h            ; Video display   ah=functn 0Eh
  1392.                                         ;  write char al, teletype mode
  1393. F000:E508  58                    pop    ax
  1394. F000:E509  5B                    pop    bx
  1395. F000:E50A  59                    pop    cx
  1396. F000:E50B  5A                    pop    dx
  1397. F000:E50C  5E                    pop    si
  1398. F000:E50D  C3                    retn
  1399.                 sub_4        endp
  1400.   
  1401.   
  1402.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1403.                 ;                   SUBROUTINE
  1404.                 ;
  1405.                 ;         Called from:     F000:E22F, E36D
  1406.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1407.   
  1408.                 sub_5        proc    near
  1409. F000:E50E  1E                    push    ds
  1410. F000:E50F            loc_68:                        ;  xref F000:E53C
  1411. F000:E50F  8E DB                mov    ds,bx
  1412. F000:E511  33 F6                xor    si,si            ; Zero register
  1413. F000:E513  81 3C AA55                cmp    word ptr [si],0AA55h
  1414. F000:E517  B8 0080                mov    ax,80h
  1415. F000:E51A  75 1C                jnz    loc_69            ; Jump if not zero
  1416. F000:E51C  E8 19BC                call    sub_60            ; (FEDB)
  1417.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 25
  1418.  
  1419. F000:E51F  0E                    push    cs
  1420. F000:E520  B8 E52A                mov    ax,0E52Ah
  1421. F000:E523  50                    push    ax
  1422. F000:E524  53                    push    bx
  1423. F000:E525  B8 0003                mov    ax,3
  1424. F000:E528  50                    push    ax
  1425. F000:E529  CB                    retf                ; Return far
  1426. F000:E52A  E8 FB 0A 8E DB 33            db    0E8h, 0FBh, 0Ah, 8Eh, 0DBh, 33h
  1427. F000:E530  C0 8A 44 02 B1 05            db    0C0h, 8Ah, 44h, 2, 0B1h, 5
  1428. F000:E536  D3 C0                db    0D3h, 0C0h
  1429. F000:E538            loc_69:                        ;  xref F000:E51A
  1430. F000:E538  03 D8                add    bx,ax
  1431. F000:E53A  3B DF                cmp    bx,di
  1432. F000:E53C  72 D1                jb    loc_68            ; Jump if below
  1433. F000:E53E  1F                    pop    ds
  1434. F000:E53F  C3                    retn
  1435.                 sub_5        endp
  1436.   
  1437.   
  1438.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1439.                 ;                   SUBROUTINE
  1440.                 ;
  1441.                 ;         Called from:     F000:E147
  1442.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1443.   
  1444.                 sub_6        proc    near
  1445. F000:E540  1E                    push    ds
  1446. F000:E541  B9 0020                mov    cx,20h
  1447. F000:E544  2B FF                sub    di,di
  1448. F000:E546  8E C7                mov    es,di
  1449. F000:E548  BE FEF3                mov    si,0FEF3h
  1450. F000:E54B  0E                    push    cs
  1451. F000:E54C  58                    pop    ax
  1452. F000:E54D  8E D8                mov    ds,ax
  1453.   
  1454. F000:E54F            locloop_70:                    ;  xref F000:E551
  1455. F000:E54F  A5                    movsw                ; Mov [si] to es:[di]
  1456. F000:E550  AB                    stosw                ; Store ax to es:[di]
  1457. F000:E551  E2 FC                loop    locloop_70        ; Loop if cx > 0
  1458.   
  1459. F000:E553  1F                    pop    ds
  1460. F000:E554  C3                    retn
  1461.                 sub_6        endp
  1462.   
  1463.   
  1464.   
  1465.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 2 ▒▒▒▒▒▒▒
  1466.                 ;
  1467.                 ;   NON-MASKABLE HARDWARE INTERRUPT
  1468.                 ;
  1469.                 ;      This function is    called in the event of a memory parity error or may
  1470.                 ;      occur in    the event of other hardware problems or failures (depends on
  1471.                 ;      the specific manufacturer's hardware).  Displays the appropriate
  1472.                 ;      error message and halts the processor.
  1473.   
  1474. F000:E555            int_2_NMI    proc    near
  1475. F000:E555  50                    push    ax
  1476.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 26
  1477.  
  1478. F000:E556  E4 62                in    al,62h            ; port 62h, 8255 C - sw2, etc.
  1479. F000:E558  A8 80                test    al,80h
  1480. F000:E55A  74 05                jz    loc_71            ; Jump if zero
  1481. F000:E55C  BE FEC0                mov    si,0FEC0h
  1482. F000:E55F  EB 07                jmp    short loc_72        ; (E568)
  1483. F000:E561            loc_71:                        ;  xref F000:E55A
  1484. F000:E561  A8 40                test    al,40h            ; '@'
  1485. F000:E563  74 15                jz    loc_74            ; Jump if zero
  1486. F000:E565  BE FEB5                mov    si,0FEB5h
  1487. F000:E568            loc_72:                        ;  xref F000:E55F
  1488. F000:E568  E8 FF3B                call    sub_3            ; (E4A6)
  1489. F000:E56B  FA                    cli                ; Disable interrupts
  1490. F000:E56C  B9 000A                mov    cx,0Ah
  1491.   
  1492. F000:E56F            locloop_73:                    ;  xref F000:E577
  1493. F000:E56F  51                    push    cx
  1494. F000:E570  BA 0007                mov    dx,7
  1495. F000:E573  E8 0006                call    sub_7            ; (E57C)
  1496. F000:E576  59                    pop    cx
  1497. F000:E577  E2 F6                loop    locloop_73        ; Loop if cx > 0
  1498.   
  1499. F000:E579  F4                    hlt                ; Halt processor
  1500. F000:E57A            loc_74:                        ;  xref F000:E563
  1501. F000:E57A  58                    pop    ax
  1502. F000:E57B  CF                    iret                ; Interrupt return
  1503.                 int_2_NMI    endp
  1504.   
  1505.   
  1506.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1507.                 ;                   SUBROUTINE
  1508.                 ;
  1509.                 ;         Called from:     F000:E1D8, E466, E573
  1510.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1511.   
  1512.                 sub_7        proc    near
  1513. F000:E57C  53                    push    bx
  1514. F000:E57D  51                    push    cx
  1515. F000:E57E  52                    push    dx
  1516. F000:E57F  2B C9                sub    cx,cx
  1517. F000:E581  8A EE                mov    ch,dh
  1518. F000:E583  9C                    pushf                ; Push flags
  1519. F000:E584  FA                    cli                ; Disable interrupts
  1520. F000:E585  D0 EA                shr    dl,1            ; Shift w/zeros fill
  1521. F000:E587  73 07                jnc    loc_76            ; Jump if carry=0
  1522. F000:E589  B3 05                mov    bl,5
  1523. F000:E58B  E8 0014                call    sub_8            ; (E5A2)
  1524.   
  1525. F000:E58E            locloop_75:                    ;  xref F000:E58E
  1526. F000:E58E  E2 FE                loop    locloop_75        ; Loop if cx > 0
  1527.   
  1528. F000:E590            loc_76:                        ;  xref F000:E587
  1529. F000:E590  B3 01                mov    bl,1
  1530. F000:E592            loc_77:                        ;  xref F000:E59B
  1531. F000:E592  8A EE                mov    ch,dh
  1532. F000:E594  E8 000B                call    sub_8            ; (E5A2)
  1533.   
  1534. F000:E597            locloop_78:                    ;  xref F000:E597
  1535.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 27
  1536.  
  1537. F000:E597  E2 FE                loop    locloop_78        ; Loop if cx > 0
  1538.   
  1539. F000:E599  FE CA                dec    dl
  1540. F000:E59B  75 F5                jnz    loc_77            ; Jump if not zero
  1541. F000:E59D  9D                    popf                ; Pop flags
  1542. F000:E59E  5A                    pop    dx
  1543. F000:E59F  59                    pop    cx
  1544. F000:E5A0  5B                    pop    bx
  1545. F000:E5A1  C3                    retn
  1546.                 sub_7        endp
  1547.   
  1548.   
  1549.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1550.                 ;                   SUBROUTINE
  1551.                 ;
  1552.                 ;         Called from:     F000:E58B, E594, EA2E, EC3E, F4CD
  1553.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1554.   
  1555.                 sub_8        proc    near
  1556. F000:E5A2  50                    push    ax
  1557. F000:E5A3  51                    push    cx
  1558. F000:E5A4  53                    push    bx
  1559. F000:E5A5  52                    push    dx
  1560. F000:E5A6  56                    push    si
  1561. F000:E5A7  E4 61                in    al,61h            ; port 61h, 8255 port B, read
  1562. F000:E5A9  8A E0                mov    ah,al
  1563. F000:E5AB  32 F6                xor    dh,dh            ; Zero register
  1564. F000:E5AD  0C 03                or    al,3
  1565. F000:E5AF  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  1566. F000:E5B1  BE E5E4                mov    si,0E5E4h
  1567. F000:E5B4  2E: 8A 14                mov    dl,cs:[si]
  1568. F000:E5B7  46                    inc    si
  1569. F000:E5B8  2E: 8A 04                mov    al,cs:[si]
  1570. F000:E5BB  EE                    out    dx,al            ; port 43h, 8253 wrt timr mode
  1571. F000:E5BC  FE CA                dec    dl
  1572. F000:E5BE  B9 0002                mov    cx,2
  1573.   
  1574. F000:E5C1            locloop_79:                    ;  xref F000:E5C6
  1575. F000:E5C1  46                    inc    si
  1576. F000:E5C2  2E: 8A 04                mov    al,cs:[si]
  1577. F000:E5C5  EE                    out    dx,al            ; port 42h, 8253 timer 2 spkr
  1578. F000:E5C6  E2 F9                loop    locloop_79        ; Loop if cx > 0
  1579.   
  1580. F000:E5C8  B9 C000                mov    cx,0C000h
  1581. F000:E5CB  81 FB 4401                cmp    bx,4401h
  1582. F000:E5CF  75 03                jne    locloop_80        ; Jump if not equal
  1583. F000:E5D1  B9 1000                mov    cx,1000h
  1584.   
  1585. F000:E5D4            locloop_80:                    ;  xref F000:E5CF, E5D4, E5D8
  1586. F000:E5D4  E2 FE                loop    locloop_80        ; Loop if cx > 0
  1587.   
  1588. F000:E5D6  FE CB                dec    bl
  1589. F000:E5D8  75 FA                jnz    locloop_80        ; Jump if not zero
  1590. F000:E5DA  86 C4                xchg    al,ah
  1591. F000:E5DC  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  1592.                                         ;  al = 0, disable parity
  1593. F000:E5DE  5E                    pop    si
  1594.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 28
  1595.  
  1596. F000:E5DF  5A                    pop    dx
  1597. F000:E5E0  5B                    pop    bx
  1598. F000:E5E1  59                    pop    cx
  1599. F000:E5E2  58                    pop    ax
  1600. F000:E5E3  C3                    retn
  1601.                 sub_8        endp
  1602.   
  1603. F000:E5E4  43 B6 30 05                db    43h, 0B6h, 30h, 5
  1604.   
  1605.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1606.                 ;                   SUBROUTINE
  1607.                 ;
  1608.                 ;         Called from:     F000:E2AB
  1609.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1610.   
  1611.                 sub_9        proc    near
  1612. F000:E5E8  B0 08                mov    al,8
  1613. F000:E5EA  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  1614. F000:E5EC  B9 5C30                mov    cx,5C30h
  1615.   
  1616. F000:E5EF            locloop_81:                    ;  xref F000:E5EF
  1617. F000:E5EF  E2 FE                loop    locloop_81        ; Loop if cx > 0
  1618.   
  1619. F000:E5F1  B0 C8                mov    al,0C8h
  1620. F000:E5F3  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  1621. F000:E5F5  B0 48                mov    al,48h            ; 'H'
  1622. F000:E5F7  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  1623. F000:E5F9  B0 FD                mov    al,0FDh
  1624. F000:E5FB  E6 21                out    21h,al            ; port 21h, 8259-1 int comands
  1625. F000:E5FD  FB                    sti                ; Enable interrupts
  1626. F000:E5FE  32 DB                xor    bl,bl            ; Zero register
  1627. F000:E600  33 C9                xor    cx,cx            ; Zero register
  1628.   
  1629. F000:E602            locloop_82:                    ;  xref F000:E609
  1630. F000:E602  F6 C3 FF                test    bl,0FFh
  1631. F000:E605  75 04                jnz    loc_84            ; Jump if not zero
  1632. F000:E607  EB 00                jmp    short loc_83        ; (E609)
  1633. F000:E609            loc_83:                        ;  xref F000:E607
  1634. F000:E609  E2 F7                loop    locloop_82        ; Loop if cx > 0
  1635.   
  1636. F000:E60B            loc_84:                        ;  xref F000:E605
  1637. F000:E60B  E4 60                in    al,60h            ; port 60h, keybd scan or sw1
  1638. F000:E60D  8A E0                mov    ah,al
  1639. F000:E60F  B0 C8                mov    al,0C8h
  1640. F000:E611  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  1641. F000:E613  B0 48                mov    al,48h            ; 'H'
  1642. F000:E615  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  1643. F000:E617  C3                    retn
  1644.                 sub_9        endp
  1645.   
  1646.   
  1647.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1648.                 ;                   SUBROUTINE
  1649.                 ;
  1650.                 ;         Called from:     F000:E24E, E3E1
  1651.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1652.   
  1653.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 29
  1654.  
  1655.                 sub_10        proc    near
  1656. F000:E618  53                    push    bx
  1657. F000:E619  50                    push    ax
  1658. F000:E61A  BB E813                mov    bx,0E813h
  1659. F000:E61D            loc_85:                        ;  xref F000:E631
  1660. F000:E61D  2E: 8A 27                mov    ah,cs:[bx]
  1661. F000:E620  8A C4                mov    al,ah
  1662. F000:E622  EE                    out    dx,al            ; port 21h, 8259-1 int comands
  1663. F000:E623  90                    nop
  1664. F000:E624  90                    nop
  1665. F000:E625  32 C0                xor    al,al            ; Zero register
  1666. F000:E627  EC                    in    al,dx            ; port 21h, 8259-1 int IMR
  1667. F000:E628  32 C4                xor    al,ah
  1668. F000:E62A  75 07                jnz    loc_86            ; Jump if not zero
  1669. F000:E62C  43                    inc    bx
  1670. F000:E62D  FE C4                inc    ah
  1671. F000:E62F  0A E4                or    ah,ah            ; Zero ?
  1672. F000:E631  75 EA                jnz    loc_85            ; Jump if not zero
  1673. F000:E633            loc_86:                        ;  xref F000:E62A
  1674. F000:E633  58                    pop    ax
  1675. F000:E634  5B                    pop    bx
  1676. F000:E635  C3                    retn
  1677.                 sub_10        endp
  1678.   
  1679.   
  1680.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1681.                 ;                   SUBROUTINE
  1682.                 ;
  1683.                 ;         Called from:     F000:E277
  1684.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1685.   
  1686.                 sub_11        proc    near
  1687. F000:E636  E6 43                out    43h,al            ; port 43h, 8253 wrt timr mode
  1688. F000:E638  32 C9                xor    cl,cl            ; Zero register
  1689. F000:E63A  8A F9                mov    bh,cl
  1690. F000:E63C  8A C1                mov    al,cl
  1691. F000:E63E  EE                    out    dx,al            ; port 40h, 8253 timer 0 clock
  1692. F000:E63F  B3 02                mov    bl,2
  1693. F000:E641            loc_87:                        ;  xref F000:E654
  1694. F000:E641  2B C9                sub    cx,cx
  1695.   
  1696. F000:E643            locloop_88:                    ;  xref F000:E650
  1697. F000:E643  8A C4                mov    al,ah
  1698. F000:E645  E6 43                out    43h,al            ; port 43h, 8253 wrt timr mode
  1699.                                         ;  al = 0, timer 0 count mode
  1700. F000:E647  90                    nop
  1701. F000:E648  EC                    in    al,dx            ; port 40h, 8253 timer 0 clock
  1702. F000:E649  0A F8                or    bh,al
  1703. F000:E64B  80 FF FF                cmp    bh,0FFh
  1704. F000:E64E  74 0E                je    loc_90            ; Jump if equal
  1705. F000:E650  E2 F1                loop    locloop_88        ; Loop if cx > 0
  1706.   
  1707. F000:E652  FE CB                dec    bl
  1708. F000:E654  75 EB                jnz    loc_87            ; Jump if not zero
  1709. F000:E656  EB 01                jmp    short loc_89        ; (E659)
  1710. F000:E658  90                    db    90h
  1711. F000:E659            loc_89:                        ;  xref F000:E656
  1712.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 30
  1713.  
  1714. F000:E659  F9                    stc                ; Set carry flag
  1715. F000:E65A  EB 03                jmp    short loc_ret_91    ; (E65F)
  1716. F000:E65C  90 C3                db    90h, 0C3h
  1717. F000:E65E            loc_90:                        ;  xref F000:E64E
  1718. F000:E65E  F8                    clc                ; Clear carry flag
  1719.   
  1720. F000:E65F            loc_ret_91:                    ;  xref F000:E65A
  1721. F000:E65F  C3                    retn
  1722.                 sub_11        endp
  1723.   
  1724.   
  1725.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1726.                 ;                   SUBROUTINE
  1727.                 ;
  1728.                 ;         Called from:     F000:E1C9, E341
  1729.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1730.   
  1731.                 sub_12        proc    near
  1732. F000:E660            loc_92:                        ;  xref F000:E123
  1733. F000:E660  8C C3                mov    bx,es
  1734. F000:E662  FC                    cld                ; Clear direction
  1735. F000:E663  8C D8                mov    ax,ds
  1736. F000:E665  8E C0                mov    es,ax
  1737. F000:E667  E4 61                in    al,61h            ; port 61h, 8255 port B, read
  1738. F000:E669  24 CF                and    al,0CFh
  1739. F000:E66B  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  1740.                                         ;  al = 0, disable parity
  1741. F000:E66D  B8 5551                mov    ax,5551h
  1742. F000:E670            loc_93:                        ;  xref F000:E689
  1743. F000:E670  8B CD                mov    cx,bp
  1744. F000:E672  32 C9                xor    cl,cl            ; Zero register
  1745. F000:E674  8B D1                mov    dx,cx
  1746. F000:E676  33 FF                xor    di,di            ; Zero register
  1747. F000:E678  F3/ AB                rep    stosw            ; Rep when cx >0 Store ax to es:[di]
  1748. F000:E67A  8B CA                mov    cx,dx
  1749. F000:E67C  33 FF                xor    di,di            ; Zero register
  1750. F000:E67E  F3/ AF                repe    scasw            ; Rep zf=1+cx >0 Scan es:[di] for ax
  1751. F000:E680  F8                    clc                ; Clear carry flag
  1752. F000:E681  75 1E                jnz    loc_95            ; Jump if not zero
  1753. F000:E683  35 FFFF                xor    ax,0FFFFh
  1754. F000:E686  3D 5551                cmp    ax,5551h
  1755. F000:E689  75 E5                jne    loc_93            ; Jump if not equal
  1756. F000:E68B  8B CA                mov    cx,dx
  1757. F000:E68D  33 C0                xor    ax,ax            ; Zero register
  1758. F000:E68F  33 FF                xor    di,di            ; Zero register
  1759. F000:E691  F3/ AB                rep    stosw            ; Rep when cx >0 Store ax to es:[di]
  1760. F000:E693  E4 62                in    al,62h            ; port 62h, 8255 C - sw2, etc.
  1761. F000:E695  8B CD                mov    cx,bp
  1762. F000:E697  22 C1                and    al,cl
  1763. F000:E699  75 03                jnz    loc_94            ; Jump if not zero
  1764. F000:E69B  8E C3                mov    es,bx
  1765. F000:E69D  C3                    retn
  1766. F000:E69E            loc_94:                        ;  xref F000:E699
  1767. F000:E69E  32 C0                xor    al,al            ; Zero register
  1768. F000:E6A0  F9                    stc                ; Set carry flag
  1769. F000:E6A1            loc_95:                        ;  xref F000:E681
  1770. F000:E6A1  8E C3                mov    es,bx
  1771.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 31
  1772.  
  1773. F000:E6A3  C3                    retn
  1774.                 sub_12        endp
  1775.   
  1776.   
  1777.   
  1778.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 8 ▒▒▒▒▒▒▒
  1779.                 ;
  1780.                 ;   TIMER TICKS     (called by hardware 8259-1, IRQ 0)
  1781.                 ;
  1782.                 ;      This is the primary timer used to control the clock and other key
  1783.                 ;      system resources.  It is called indirectly by channel A of the 8253
  1784.                 ;      timer every 18.2    milliseconds.  Every timer tick also calls int 1Ch
  1785.                 ;      for user    needs (int 1Ch points to an iret instruction unless changed
  1786.                 ;      by a resident program).  The timer interrupt is given the highest
  1787.                 ;      maskable    interrupt priority upon power up.
  1788.                 ;
  1789.                 ;      The main    timing functions of int 8 include increment of a 32-bit
  1790.                 ;      time since powered on counter, timer_hi and timer_low, and after 24
  1791.                 ;      hours since powered on, timer_rolled is incremented.
  1792.                 ;
  1793.                 ;      The last    task of    int 8 is turning off the floppy drive motor after
  1794.                 ;      2 seconds of non-use.  The counter dsk_motor_tmr is decremented upon
  1795.                 ;      each occurrence of int 8.  When the count reaches zero, the motor is
  1796.                 ;      set off,    and the    motor running flags are cleared in dsk_motor_stat.
  1797.   
  1798. F000:E6A4            int_8_timer    proc    near            ;  xref F000:FF03
  1799. F000:E6A4  FB                    sti                ; Enable interrupts
  1800. F000:E6A5  1E                    push    ds
  1801. F000:E6A6  50                    push    ax
  1802. F000:E6A7  52                    push    dx
  1803. F000:E6A8  E8 12D0                call    sub_57            ; (F97B)
  1804. F000:E6AB  56                    push    si
  1805. F000:E6AC  BE 006C                mov    si,6Ch
  1806. F000:E6AF  FF 04                inc    word ptr [si]
  1807. F000:E6B1  75 03                jnz    loc_96            ; Jump if not zero
  1808. F000:E6B3  FF 44 02                inc    word ptr [si+2]
  1809. F000:E6B6            loc_96:                        ;  xref F000:E6B1
  1810. F000:E6B6  83 7C 02 18                cmp    word ptr [si+2],18h
  1811. F000:E6BA  7C 11                jl    loc_97            ; Jump if <
  1812. F000:E6BC  81 3C 00B0                cmp    word ptr [si],0B0h
  1813. F000:E6C0  75 0B                jne    loc_97            ; Jump if not equal
  1814. F000:E6C2  33 C0                xor    ax,ax            ; Zero register
  1815. F000:E6C4  89 04                mov    [si],ax
  1816. F000:E6C6  89 44 02                mov    [si+2],ax
  1817. F000:E6C9  C6 44 04 01                mov    byte ptr [si+4],1
  1818. F000:E6CD            loc_97:                        ;  xref F000:E6BA, E6C0
  1819. F000:E6CD  5E                    pop    si
  1820. F000:E6CE  FE 0E 0040                dec    dsk_motor_tmr        ; (0040:0040=96h)
  1821. F000:E6D2  75 0C                jnz    loc_98            ; Jump if not zero
  1822. F000:E6D4  B0 F0                mov    al,0F0h
  1823. F000:E6D6  20 06 003F                and    dsk_motor_stat,al    ; (0040:003F=50h)
  1824. F000:E6DA  34 FC                xor    al,0FCh
  1825. F000:E6DC  BA 03F2                mov    dx,3F2h
  1826. F000:E6DF  EE                    out    dx,al            ; port 3F2h, dsk0 contrl output
  1827. F000:E6E0            loc_98:                        ;  xref F000:E6D2
  1828. F000:E6E0  CD 1C                int    1Ch            ; Timer break (call each 18.2ms)
  1829. F000:E6E2  E8 133C                call    sub_59            ; (FA21)
  1830.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 32
  1831.  
  1832. F000:E6E5  5A                    pop    dx
  1833. F000:E6E6  58                    pop    ax
  1834. F000:E6E7  1F                    pop    ds
  1835. F000:E6E8  CF                    iret                ; Interrupt return
  1836.                 int_8_timer    endp
  1837.   
  1838. F000:E6E9  0009[00]                db    9 dup (0)
  1839.   
  1840.   
  1841.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 19h ▒▒▒▒▒
  1842.                 ;
  1843.                 ;   BOOTSTRAP LOADER
  1844.                 ;
  1845.                 ;      Floppy drive a: attempts a read from the first sector of    the disk.
  1846.                 ;      If read properly    (i.e a boot disk is in drive a:), control is
  1847.                 ;      transferred to the loaded program.  The boot sector at track 0,
  1848.                 ;      sector 1    is transfered to memory at 0:7C00h.  dh = drive    which
  1849.                 ;      was used    (0=A:).     Control is passed to 0:7C00h.
  1850.   
  1851. F000:E6F2            int_19h_bootup    proc    near            ;  xref F000:FF25
  1852. F000:E6F2  FB                    sti                ; Enable interrupts
  1853. F000:E6F3  E8 1285                call    sub_57            ; (F97B)
  1854. F000:E6F6  BD 0003                mov    bp,3
  1855. F000:E6F9            loc_99:                        ;  xref F000:E711
  1856. F000:E6F9  33 C0                xor    ax,ax            ; Zero register
  1857. F000:E6FB  CD 13                int    13h            ; Disk  dl=drive #: ah=func a0h
  1858.                                         ;  reset disk, al=return status
  1859. F000:E6FD  72 11                jc    loc_100            ; Jump if carry Set
  1860. F000:E6FF  33 D2                xor    dx,dx            ; Zero register
  1861. F000:E701  8E C2                mov    es,dx
  1862. F000:E703  BB 7C00                mov    bx,7C00h
  1863. F000:E706  B9 0001                mov    cx,1
  1864. F000:E709  B8 0201                mov    ax,201h
  1865. F000:E70C  CD 13                int    13h            ; Disk  dl=drive #: ah=func a2h
  1866.                                         ;  read sectors to memory es:bx
  1867. F000:E70E  73 07                jnc    loc_101            ; Jump if carry=0
  1868. F000:E710            loc_100:                    ;  xref F000:E6FD
  1869. F000:E710  4D                    dec    bp
  1870. F000:E711  75 E6                jnz    loc_99            ; Jump if not zero
  1871. F000:E713  F9                    stc                ; Set carry flag
  1872. F000:E714  CA 0002                retf    2            ; Return far
  1873.                 int_19h_bootup    endp
  1874.   
  1875. F000:E717            loc_101:                    ;  xref F000:E70E
  1876. F000:E717  33 DB                xor    bx,bx            ; Zero register
  1877. F000:E719  53                    push    bx
  1878. F000:E71A  BB 7C00                mov    bx,7C00h
  1879. F000:E71D  53                    push    bx
  1880. F000:E71E  CB                    retf                ; Return far
  1881.   
  1882.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1883.                 ;                   SUBROUTINE
  1884.                 ;
  1885.                 ;         Called from:     F000:EC52
  1886.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1887.   
  1888.                 sub_13        proc    near
  1889.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 33
  1890.  
  1891. F000:E71F  56                    push    si
  1892. F000:E720  BE FECF                mov    si,0FECFh
  1893. F000:E723  E8 FD80                call    sub_3            ; (E4A6)
  1894. F000:E726  5E                    pop    si
  1895. F000:E727  C3                    retn
  1896.                 sub_13        endp
  1897.   
  1898. F000:E728  00                    db    0
  1899.   
  1900.                                         ; █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  1901.                                         ; █        Baud Rate Table        █
  1902.                                         ; █                               █
  1903.                                         ; █   Table of hex divsors  for   █
  1904.                                         ; █   the serial ports.   Table   █
  1905.                                         ; █   divisors for bauds 110 to   █
  1906.                                         ; █   19,200.                     █
  1907.                                         ; █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  1908.   
  1909. F000:E729  0417            baud_rate_tbl    dw    417h            ; 110 Baud rate divisor
  1910. F000:E72B  0300            baud_150    dw    300h
  1911. F000:E72D  0180            baud_300    dw    180h
  1912. F000:E72F  00C0            baud_600    dw    0C0h
  1913. F000:E731  0060            baud_1200    dw    60h
  1914. F000:E733  0030            baud_2400    dw    30h
  1915. F000:E735  0018            baud_4800    dw    18h
  1916. F000:E737  000C            baud_9600    dw    0Ch
  1917.   
  1918.   
  1919.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 14h ▒▒▒▒▒
  1920.                 ;
  1921.                 ;   RS-232 SERIAL PORTS    SERVICES
  1922.                 ;
  1923.                 ;      Call with: ah = sub-function number
  1924.                 ;          dx = communications number, com1 = 0
  1925.                 ;
  1926.                 ;      Returns:      ah = line status,  bit 0 = Data ready
  1927.                 ;                         bit 1 = Overrun error
  1928.                 ;                         bit 2 = Parity error
  1929.                 ;                         bit 3 = CRC framing error
  1930.                 ;                         bit 4 = Break detect
  1931.                 ;                         bit 5 = Xmit buffer register empty
  1932.                 ;                         bit 6 = Xmit shift out register empty
  1933.                 ;                         bit 7 = No response, ignore bits 0-6
  1934.                 ;
  1935.                 ;          al = modem status, bit 0 = Change in Clear To    Send
  1936.                 ;                         bit 1 = Change in Data Set    Ready
  1937.                 ;                         bit 2 = Falling edge ring detect
  1938.                 ;                         bit 3 = Change in receive detect line
  1939.                 ;                         bit 4 = Clear to Send (CTS)
  1940.                 ;                         bit 5 = Data Set Ready (DTS)
  1941.                 ;                         bit 6 = Ring detected
  1942.                 ;                         bit 7 = Receive detect line
  1943.                 ;
  1944.                 ;      Functions:
  1945.                 ;        ah = 0        Reset the specified port
  1946.                 ;              Call with:  al serial port register values
  1947.                 ;                         bits  7    6    5    4    3    2    1    0
  1948.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 34
  1949.  
  1950.                 ;                              --baud-rate--  -Parity- Stop  --Word--
  1951.                 ;                               000 =  110      bits       bit    size
  1952.                 ;                               001 =  150                 (bits)
  1953.                 ;                               010 =  300    00 = off  0=1
  1954.                 ;                               011 =  600    01 = odd  1=2   10 = 7
  1955.                 ;                               100 = 1200    10 = off        11 = 8
  1956.                 ;                               101 = 2400    11 = even
  1957.                 ;                               110 = 4800
  1958.                 ;                               111 = 9600
  1959.                 ;       ah = 1        Transmit a character
  1960.                 ;              Call with:  al = character to send (not changed on exit)
  1961.                 ;       ah = 2        Received a character
  1962.                 ;              Returns:    al = character received
  1963.                 ;       ah = 3        Get    status
  1964.                 ;       ah = 4        Advanced Initialization (not supported on all systems)
  1965.                 ;              Call with:  al = 0/1  no break/break
  1966.                 ;                      bh = Parity,    0 = none     3 = stick odd
  1967.                 ;                                      1 = odd      4 = stick even
  1968.                 ;                                      2 = even
  1969.                 ;                      bl = 0/1 Stop bits set to 1/2
  1970.                 ;                      ch = Word size, 0 = 5 bits   2 = 7 bits
  1971.                 ;                                      1 = 6 bits   3 = 8 bits
  1972.                 ;
  1973.                 ;                      cl = Baud rate, 0 =  110     5 =  2400
  1974.                 ;                                      1 =  150     6 =  4800
  1975.                 ;                                      2 =  300     7 =  9600
  1976.                 ;                                      3 =  600     8 = 19200
  1977.                 ;                                      4 = 1200
  1978.                 ;        ah = 5        Advanced port control (not supported on all    systems)
  1979.                 ;              al = 0  Get modem register
  1980.                 ;                    Returns: bl bit 0 = Data Terminal Ready (DTR)
  1981.                 ;                                bit 1 = Request To Send (RTS)
  1982.                 ;                                bit 2 = Out 1
  1983.                 ;                                bit 3 = Out 2
  1984.                 ;                                bit 4 = Loop modem
  1985.                 ;              al = 1  Set modem register
  1986.                 ;                    Call with:  bl = value for register (see above)
  1987.   
  1988. F000:E739            int_14h_RS232    proc    near            ;  xref F000:FF1B
  1989. F000:E739  80 FC 03                cmp    ah,3
  1990. F000:E73C  7E 01                jle    loc_102            ; Jump if < or =
  1991. F000:E73E  CF                    iret                ; Interrupt return
  1992.                 int_14h_RS232    endp
  1993.   
  1994. F000:E73F            loc_102:                    ;  xref F000:E73C
  1995. F000:E73F  E8 1799                call    sub_60            ; (FEDB)
  1996. F000:E742  E8 1236                call    sub_57            ; (F97B)
  1997. F000:E745  8B FA                mov    di,dx
  1998. F000:E747  03 D2                add    dx,dx
  1999. F000:E749  BB 0000                mov    bx,0
  2000. F000:E74C  03 DA                add    bx,dx
  2001. F000:E74E  8B 17                mov    dx,[bx]
  2002. F000:E750  8A D8                mov    bl,al
  2003. F000:E752  83 FA 00                cmp    dx,0
  2004. F000:E755  75 03                jne    loc_103            ; Jump if not equal
  2005. F000:E757  E9 009E                jmp    loc_110            ; (E7F8)
  2006. F000:E75A            loc_103:                    ;  xref F000:E755
  2007.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 35
  2008.  
  2009. F000:E75A  80 FC 00                cmp    ah,0
  2010. F000:E75D  75 48                jne    loc_105            ; Jump if not equal
  2011. F000:E75F  83 C2 03                add    dx,3
  2012. F000:E762  86 E0                xchg    ah,al
  2013. F000:E764  0C 80                or    al,80h
  2014. F000:E766  EE                    out    dx,al            ; port 2FBh, RS232-2 line cntrl
  2015. F000:E767  33 C9                xor    cx,cx            ; Zero register
  2016. F000:E769  0A EC                or    ch,ah
  2017. F000:E76B  80 C9 04                or    cl,4
  2018. F000:E76E  80 E5 E0                and    ch,0E0h
  2019. F000:E771  D2 ED                shr    ch,cl            ; Shift w/zeros fill
  2020. F000:E773  80 E1 00                and    cl,0
  2021. F000:E776  86 E9                xchg    ch,cl
  2022. F000:E778  BB E729                mov    bx,0E729h
  2023. F000:E77B  83 EA 03                sub    dx,3
  2024. F000:E77E  03 D9                add    bx,cx
  2025. F000:E780  1E                    push    ds
  2026. F000:E781  0E                    push    cs
  2027. F000:E782  1F                    pop    ds
  2028. F000:E783  8A 07                mov    al,[bx]
  2029. F000:E785  EE                    out    dx,al            ; port 2F8h, RS232-2 xmit buffr
  2030. F000:E786  83 C2 01                add    dx,1
  2031. F000:E789  43                    inc    bx
  2032. F000:E78A  8A 07                mov    al,[bx]
  2033. F000:E78C  EE                    out    dx,al            ; port 2F9h, RS232-2 int enable
  2034. F000:E78D  1F                    pop    ds
  2035. F000:E78E  80 E4 1F                and    ah,1Fh
  2036. F000:E791  42                    inc    dx
  2037. F000:E792  42                    inc    dx
  2038. F000:E793  86 E0                xchg    ah,al
  2039. F000:E795  EE                    out    dx,al            ; port 2FBh, RS232-2 line cntrl
  2040. F000:E796  24 00                and    al,0
  2041. F000:E798  83 EA 02                sub    dx,2
  2042. F000:E79B  EE                    out    dx,al            ; port 2F9h, RS232-2 int enable
  2043.                                         ;  al = 0, all interrupts off
  2044. F000:E79C            loc_104:                    ;  xref F000:E7F6
  2045. F000:E79C  83 C2 04                add    dx,4
  2046. F000:E79F  EC                    in    al,dx            ; port 2FDh, RS232-2 line stat
  2047. F000:E7A0  86 E0                xchg    ah,al
  2048. F000:E7A2  42                    inc    dx
  2049. F000:E7A3  EC                    in    al,dx            ; port 2FEh, RS232-2 modem stat
  2050. F000:E7A4  EB 52                jmp    short loc_110        ; (E7F8)
  2051. F000:E7A6  90                    db    90h
  2052. F000:E7A7            loc_105:                    ;  xref F000:E75D
  2053. F000:E7A7  80 FC 01                cmp    ah,1
  2054. F000:E7AA  75 23                jne    loc_108            ; Jump if not equal
  2055. F000:E7AC  B9 3003                mov    cx,3003h
  2056. F000:E7AF  E8 004A                call    sub_14            ; (E7FC)
  2057. F000:E7B2  72 44                jc    loc_110            ; Jump if carry Set
  2058. F000:E7B4  83 EA 01                sub    dx,1
  2059. F000:E7B7  B5 20                mov    ch,20h            ; ' '
  2060. F000:E7B9  86 D8                xchg    bl,al
  2061. F000:E7BB  E8 1247                call    sub_58            ; (FA05)
  2062. F000:E7BE  86 D8                xchg    bl,al
  2063. F000:E7C0  73 06                jnc    loc_107            ; Jump if carry=0
  2064. F000:E7C2            loc_106:                    ;  xref F000:E7E4
  2065. F000:E7C2  80 CC 80                or    ah,80h
  2066.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 36
  2067.  
  2068. F000:E7C5  EB 31                jmp    short loc_110        ; (E7F8)
  2069. F000:E7C7  90                    db    90h
  2070. F000:E7C8            loc_107:                    ;  xref F000:E7C0
  2071. F000:E7C8  83 EA 05                sub    dx,5
  2072. F000:E7CB  EE                    out    dx,al            ; port 2F8h, RS232-2 xmit buffr
  2073. F000:E7CC  EB 2A                jmp    short loc_110        ; (E7F8)
  2074. F000:E7CE  90                    db    90h
  2075. F000:E7CF            loc_108:                    ;  xref F000:E7AA
  2076. F000:E7CF  80 FC 02                cmp    ah,2
  2077. F000:E7D2  75 1C                jne    loc_109            ; Jump if not equal
  2078. F000:E7D4  B9 2001                mov    cx,2001h
  2079. F000:E7D7  E8 0022                call    sub_14            ; (E7FC)
  2080. F000:E7DA  72 1C                jc    loc_110            ; Jump if carry Set
  2081. F000:E7DC  83 EA 01                sub    dx,1
  2082. F000:E7DF  B5 01                mov    ch,1
  2083. F000:E7E1  E8 1221                call    sub_58            ; (FA05)
  2084. F000:E7E4  72 DC                jc    loc_106            ; Jump if carry Set
  2085. F000:E7E6  83 EA 05                sub    dx,5
  2086. F000:E7E9  EC                    in    al,dx            ; port 2F2h
  2087. F000:E7EA  80 E4 1E                and    ah,1Eh
  2088. F000:E7ED  EB 09                jmp    short loc_110        ; (E7F8)
  2089. F000:E7EF  90                    db    90h
  2090. F000:E7F0            loc_109:                    ;  xref F000:E7D2
  2091. F000:E7F0  83 C2 01                add    dx,1
  2092. F000:E7F3  80 FC 03                cmp    ah,3
  2093. F000:E7F6  74 A4                je    loc_104            ; Jump if equal
  2094. F000:E7F8            loc_110:                    ;  xref F000:E757, E7A4, E7B2, E7C5
  2095.                                         ;            E7CC, E7DA, E7ED
  2096. F000:E7F8  E8 082D                call    sub_32            ; (F028)
  2097. F000:E7FB  CF                    iret                ; Interrupt return
  2098.   
  2099.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  2100.                 ;                   SUBROUTINE
  2101.                 ;
  2102.                 ;         Called from:     F000:E7AF, E7D7
  2103.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2104.   
  2105.                 sub_14        proc    near
  2106. F000:E7FC  86 D8                xchg    bl,al
  2107. F000:E7FE  8A C1                mov    al,cl
  2108. F000:E800  83 C2 04                add    dx,4
  2109. F000:E803  EE                    out    dx,al            ; port 302h
  2110. F000:E804  83 C2 02                add    dx,2
  2111. F000:E807  E8 11FB                call    sub_58            ; (FA05)
  2112. F000:E80A  86 D8                xchg    bl,al
  2113. F000:E80C  73 04                jnc    loc_ret_111        ; Jump if carry=0
  2114. F000:E80E  80 CC 80                or    ah,80h
  2115. F000:E811  F9                    stc                ; Set carry flag
  2116.   
  2117. F000:E812            loc_ret_111:                    ;  xref F000:E80C
  2118. F000:E812  C3                    retn
  2119.                 sub_14        endp
  2120.   
  2121. F000:E813  00 01 FF 00 BC 03            db    0, 1, 0FFh, 0, 0BCh, 3
  2122. F000:E819  78 03 78 02 C0 00            db    78h, 3, 78h, 2, 0C0h, 0
  2123. F000:E81F  00 00 52 40 47 AE            db    0, 0, 52h, 40h, 47h, 0AEh
  2124. F000:E825  42 10 00 00 00 00            db    42h, 10h, 0, 0, 0, 0
  2125.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 37
  2126.  
  2127. F000:E82B  00 00 00                db    0, 0, 0
  2128.   
  2129.   
  2130.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 16h ▒▒▒▒▒
  2131.                 ;
  2132.                 ;   KEYBOARD SERVICES
  2133.                 ;
  2134.                 ;      Call with:   ah = sub-function number
  2135.                 ;
  2136.                 ;      Functions:
  2137.                 ;        ah = 0        Get    a key, and wait until one is available if none are
  2138.                 ;              in the queue.
  2139.                 ;              Returns:    ah = keyboard scan code
  2140.                 ;                      al = ASCII character, or 0 if    non-ASCII
  2141.                 ;        ah = 1        Get    key status
  2142.                 ;              Returns:    zero flag = 0 if a valid key is in the queue
  2143.                 ;                          ah = keyboard scan code
  2144.                 ;                          al = ASCII character, or 0 if non-ASCII
  2145.                 ;                      zero flag = 1 if no keys in the queue
  2146.                 ;        ah = 2        Get    shift status register
  2147.                 ;              Returns:    al = bits  7    6    5    4     3    2    1    0
  2148.                 ;                               right left ctrl alt scrl  num  cap insrt
  2149.                 ;                               -------shifts------ ------toggles-------
  2150.                 ;                                     1 = down         1 = on
  2151.                 ;        ah = 3        Set    repeating character rate (not supported    in all systems)
  2152.                 ;              Call with:  al = 5
  2153.                 ;                      bh = start delay, 0 = 250 ms      2 =  750 ms
  2154.                 ;                                        1 = 500 ms      3 = 1000 ms
  2155.                 ;                      bl = speed in characters per second - values
  2156.                 ;                             range from 0 = 30 cps,    to 1Fh = 2 cps
  2157.                 ;        ah = 5        Load keyboard queue (not supported in all systems)
  2158.                 ;              Call with:  ch/cl = scan code/character to load into the queue
  2159.                 ;              Returns:    al = 0 if ok, 1 if keyboard queue is full
  2160.                 ;
  2161.                 ;             **** Support for extended keyboard functions ****
  2162.                 ;        ah = 10h   Get    a key (similar to ah = 0, not supported    in all systems)
  2163.                 ;        ah = 11h   Get    key status (similar to ah = 1, not supported in all systems)
  2164.                 ;        ah = 12h   Get    shift info (similar to ah = 2, not supported in all systems)
  2165.   
  2166. F000:E82E            int_16h_keybd    proc    near            ;  xref F000:FF1F
  2167. F000:E82E  E8 16AA                call    sub_60            ; (FEDB)
  2168. F000:E831  E8 1147                call    sub_57            ; (F97B)
  2169. F000:E834  BB 001A                mov    bx,1Ah
  2170. F000:E837  80 FC 00                cmp    ah,0
  2171. F000:E83A  77 1B                ja    loc_115            ; Jump if above
  2172. F000:E83C            loc_112:                    ;  xref F000:E842
  2173. F000:E83C  FB                    sti                ; Enable interrupts
  2174. F000:E83D  0B C9                or    cx,cx            ; Zero ?
  2175. F000:E83F  E8 0024                call    sub_15            ; (E866)
  2176. F000:E842  74 F8                jz    loc_112            ; Jump if zero
  2177. F000:E844  E8 0028                call    sub_16            ; (E86F)
  2178. F000:E847  89 37                mov    [bx],si
  2179. F000:E849            loc_113:                    ;  xref F000:E85D, E864
  2180. F000:E849  E8 07DC                call    sub_32            ; (F028)
  2181. F000:E84C  CF                    iret                ; Interrupt return
  2182.                 int_16h_keybd    endp
  2183.   
  2184.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 38
  2185.  
  2186. F000:E84D            loc_114:                    ;  xref F000:E859
  2187. F000:E84D  E8 0016                call    sub_15            ; (E866)
  2188. F000:E850  FB                    sti                ; Enable interrupts
  2189. F000:E851  E8 07D4                call    sub_32            ; (F028)
  2190. F000:E854  CA 0002                retf    2            ; Return far
  2191. F000:E857            loc_115:                    ;  xref F000:E83A
  2192. F000:E857  FE CC                dec    ah
  2193. F000:E859  74 F2                jz    loc_114            ; Jump if zero
  2194. F000:E85B  FE CC                dec    ah
  2195. F000:E85D  75 EA                jnz    loc_113            ; Jump if not zero
  2196. F000:E85F  BB 0017                mov    bx,17h
  2197. F000:E862  8A 07                mov    al,[bx]
  2198. F000:E864  EB E3                jmp    short loc_113        ; (E849)
  2199.   
  2200.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  2201.                 ;                   SUBROUTINE
  2202.                 ;
  2203.                 ;         Called from:     F000:E83F, E84D
  2204.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2205.   
  2206.                 sub_15        proc    near
  2207. F000:E866  FA                    cli                ; Disable interrupts
  2208. F000:E867  8B 37                mov    si,[bx]
  2209. F000:E869  3B 77 02                cmp    si,[bx+2]
  2210. F000:E86C  8B 04                mov    ax,[si]
  2211. F000:E86E  C3                    retn
  2212.                 sub_15        endp
  2213.   
  2214.   
  2215.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  2216.                 ;                   SUBROUTINE
  2217.                 ;
  2218.                 ;         Called from:     F000:E844, EA20
  2219.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2220.   
  2221.                 sub_16        proc    near
  2222. F000:E86F  81 FE 003C                cmp    si,3Ch
  2223.                         nop                ;*Fixup for MASM (M)
  2224. F000:E873  74 04                je    loc_116            ; Jump if equal
  2225. F000:E875  83 C6 02                add    si,2
  2226. F000:E878  C3                    retn
  2227. F000:E879            loc_116:                    ;  xref F000:E873
  2228. F000:E879  BE 001E                mov    si,1Eh
  2229. F000:E87C  C3                    retn
  2230.                 sub_16        endp
  2231.   
  2232. F000:E87D  36 2A 1D 38 46 45            db    36h, 2Ah, 1Dh, 38h, 46h, 45h
  2233. F000:E883  3A 52 1B 1B                db    3Ah, 52h, 1Bh, 1Bh
  2234. F000:E887  21 31 40 32 23 33            db    '!1@2#3$'
  2235. F000:E88D  24
  2236. F000:E88E  34 25 35 5E 36 26            db    '4%5^6&7*8(9)0_-+='
  2237. F000:E894  37 2A 38 28 39 29
  2238. F000:E89A  30 5F 2D 2B 3D
  2239. F000:E89F  08 08 00                db    8, 8, 0
  2240. F000:E8A2  09 51 71 57 77 45            db    9, 'QqWwEeRrTtYyUuIiOoPp{[}]', 0Dh
  2241. F000:E8A8  65 52 72 54 74 59
  2242. F000:E8AE  79 55 75 49 69 4F
  2243.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 39
  2244.  
  2245. F000:E8B4  6F 50 70 7B 5B 7D
  2246. F000:E8BA  5D 0D
  2247. F000:E8BC  0D                    db    0Dh
  2248. F000:E8BD  FF FF                db    0FFh, 0FFh
  2249. F000:E8BF  41 61 53 73 44 64            db    'AaSsDdFfGgHhJjKkLl:;"', 27h, '~`'
  2250. F000:E8C5  46 66 47 67 48 68
  2251. F000:E8CB  4A 6A 4B 6B 4C 6C
  2252. F000:E8D1  3A 3B 22 27 7E 60
  2253. F000:E8D7  FF FF                db    0FFh, 0FFh
  2254. F000:E8D9  7C 5C 5A 7A 58 78            db    '|\ZzXxCcVvBbNnMm<,>.?/'
  2255. F000:E8DF  43 63 56 76 42 62
  2256. F000:E8E5  4E 6E 4D 6D 3C 2C
  2257. F000:E8EB  3E 2E 3F 2F
  2258. F000:E8EF  FF FF 00 2A 1B FF            db    0FFh, 0FFh, 0, 2Ah, 1Bh, 0FFh
  2259. F000:E8F5  00 FF FF FF 1E FF            db    0, 0FFh, 0FFh, 0FFh, 1Eh, 0FFh
  2260. F000:E8FB  FF FF FF 1F FF 7F            db    0FFh, 0FFh, 0FFh, 1Fh, 0FFh, 7Fh
  2261. F000:E901  FF 11 17 05 12 14            db    0FFh, 11h, 17h, 5, 12h, 14h
  2262. F000:E907  19 15 09 0F 10 1B            db    19h, 15h, 9, 0Fh, 10h, 1Bh
  2263. F000:E90D  1D 0A FF 01 13 04            db    1Dh, 0Ah, 0FFh, 1, 13h, 4
  2264. F000:E913  06 07 08 0A 0B 0C            db    6, 7, 8, 0Ah, 0Bh, 0Ch
  2265. F000:E919  FF FF FF FF 1C 1A            db    0FFh, 0FFh, 0FFh, 0FFh, 1Ch, 1Ah
  2266. F000:E91F  18 03 16 02 0E 0D            db    18h, 3, 16h, 2, 0Eh, 0Dh
  2267. F000:E925  07                    db    7
  2268. F000:E926            loc_117:                    ;  xref F000:E93C
  2269. F000:E926  08 09                or    [bx+di],cl
  2270. F000:E928  FF 04                inc    word ptr [si]
  2271. F000:E92A  05 FF06                add    ax,0FF06h
  2272. F000:E92D  01 02                add    [bp+si],ax
  2273. F000:E92F  03 00                add    ax,[bx+si]
  2274. F000:E931  FF 77 84                push    word ptr [bx-7Ch]
  2275. F000:E934  73 74        ;*        jnc    loc_126            ;*Jump if carry=0
  2276. F000:E934  73 74                db    73h, 74h
  2277. F000:E936  75 76        ;*        jnz    loc_127            ;*Jump if not zero
  2278. F000:E936  75 76                db    75h, 76h
  2279. F000:E938  FF B3 BE01                push    word ptr [bp+di-41FFh]
  2280. F000:E93C  7D E8                jge    loc_117            ; Jump if > or =
  2281. F000:E93E  B9 0008                mov    cx,8
  2282.   
  2283. F000:E941            locloop_118:                    ;  xref F000:E949
  2284. F000:E941  2E: 3A 04                cmp    al,cs:[si]
  2285. F000:E944  74 05                je    loc_ret_119        ; Jump if equal
  2286. F000:E946  D0 E3                shl    bl,1            ; Shift w/zeros fill
  2287. F000:E948  46                    inc    si
  2288. F000:E949  E2 F6                loop    locloop_118        ; Loop if cx > 0
  2289.   
  2290.   
  2291. F000:E94B            loc_ret_119:                    ;  xref F000:E944
  2292. F000:E94B  C3                    retn
  2293.   
  2294.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  2295.                 ;                   SUBROUTINE
  2296.                 ;
  2297.                 ;         Called from:     F000:EA8F, EBC0
  2298.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2299.   
  2300.                 sub_18        proc    near
  2301. F000:E94C  F8                    clc                ; Clear carry flag
  2302.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 40
  2303.  
  2304. F000:E94D  8A CA                mov    cl,dl
  2305. F000:E94F  0A C9                or    cl,cl            ; Zero ?
  2306. F000:E951  74 11                jz    loc_ret_122        ; Jump if zero
  2307. F000:E953  22 CD                and    cl,ch
  2308. F000:E955  74 07                jz    loc_120            ; Jump if zero
  2309. F000:E957  F6 C2 03                test    dl,3
  2310. F000:E95A  75 08                jnz    loc_ret_122        ; Jump if not zero
  2311. F000:E95C  EB 05                jmp    short loc_121        ; (E963)
  2312. F000:E95E            loc_120:                    ;  xref F000:E955
  2313. F000:E95E  F6 C2 03                test    dl,3
  2314. F000:E961  74 01                jz    loc_ret_122        ; Jump if zero
  2315. F000:E963            loc_121:                    ;  xref F000:E95C
  2316. F000:E963  F9                    stc                ; Set carry flag
  2317.   
  2318. F000:E964            loc_ret_122:                    ;  xref F000:E951, E95A, E961
  2319. F000:E964  C3                    retn
  2320.                 sub_18        endp
  2321.   
  2322.   
  2323.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  2324.                 ;                   SUBROUTINE
  2325.                 ;
  2326.                 ;         Called from:     F000:EAAD, EADD, EAFB
  2327.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2328.   
  2329.                 sub_19        proc    near
  2330. F000:E965  BB E885                mov    bx,0E885h
  2331. F000:E968  32 ED                xor    ch,ch            ; Zero register
  2332. F000:E96A  3C 0F                cmp    al,0Fh
  2333. F000:E96C  76 14                jbe    loc_123            ; Jump if below or =
  2334. F000:E96E  3C 32                cmp    al,32h            ; '2'
  2335. F000:E970  77 10                ja    loc_123            ; Jump if above
  2336. F000:E972  3C 1A                cmp    al,1Ah
  2337. F000:E974  72 0E                jb    loc_ret_124        ; Jump if below
  2338. F000:E976  3C 2C                cmp    al,2Ch            ; ','
  2339. F000:E978  73 0A                jae    loc_ret_124        ; Jump if above or =
  2340. F000:E97A  3C 1E                cmp    al,1Eh
  2341. F000:E97C  72 04                jb    loc_123            ; Jump if below
  2342. F000:E97E  3C 26                cmp    al,26h            ; '&'
  2343. F000:E980  76 02                jbe    loc_ret_124        ; Jump if below or =
  2344. F000:E982            loc_123:                    ;  xref F000:E96C, E970, E97C
  2345. F000:E982  FE C5                inc    ch
  2346.   
  2347. F000:E984            loc_ret_124:                    ;  xref F000:E974, E978, E980
  2348. F000:E984  C3                    retn
  2349.                 sub_19        endp
  2350.   
  2351. F000:E985  00 00                db    0, 0
  2352.   
  2353.   
  2354.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 9 ▒▒▒▒▒▒▒
  2355.                 ;
  2356.                 ;   KEYBOARD I/O  (called by hardware 8259-1, IRQ 1)
  2357.                 ;
  2358.                 ;      When any    key is pressed on the keyboard, the hardware calls this
  2359.                 ;      interrupt to service the pressed key or key combination.      The
  2360.                 ;      hardware    provides the key pressed in a non-ASCII scan code format
  2361.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 41
  2362.  
  2363.                 ;      read at i/o port    60h.  The servicer acknowledges receipt    of the key
  2364.                 ;      by toggling bit 7 of port 61h.  (Port 61h should be read    first, then
  2365.                 ;      bit 7 ored on, output to port 61h, then anded off, and resent to
  2366.                 ;      port 61h).
  2367.                 ;
  2368.                 ;      The read    key is decoded to yield an ASCII character, special function
  2369.                 ;      key (such as F1)    or a control function like Left Shift Key down.
  2370.                 ;      The converted ASCII character is placed into the next available
  2371.                 ;      position    in the circular queue keybd_queue to keybd_q_end.  It is
  2372.                 ;      put in the position indicated by keydb_q_tail when it will not
  2373.                 ;      cause the loss of earlier entered data.  The value keybd_q_head
  2374.                 ;      points to the oldest key pressed in the buffer which has    not been
  2375.                 ;      removed from the    queue (the normal process uses int 16h to remove
  2376.                 ;      keys from the queue and return the key value to the int 16h caller).
  2377.                 ;
  2378.                 ;      The 16 word queue holds up to 16 keys.  If keybd_q_head equals the
  2379.                 ;      keybd_q_tail, the queue is empty.  Valid keys in the queue comprise
  2380.                 ;      the upper byte scan code and the lower byte ASCII character.  If the
  2381.                 ;      key pressed has no ASCII equivalent (i.e F1 to F12), the    lower byte
  2382.                 ;      is zero.
  2383.                 ;
  2384.                 ;      Toggle and shift    keys are not placed in the buffer, but appear in 2
  2385.                 ;      status registers    keybd_flags_1 and keybd_flags_2.
  2386.                 ;
  2387.                 ;      Special key combinations will cause other events to occur:
  2388.                 ;         Ctrl-Alt_Del    -  Reset computer by jumping to power_on_reset
  2389.                 ;         Print    screen    -  Call int_5_prn_scrn to print the current screen
  2390.                 ;         Ctrl-Break    -  Call int_1Bh control break key processor (DOS)
  2391.                 ;         Pause        -  Wait until an ASCII key is pressed, without
  2392.                 ;               placing the key in the queue
  2393.   
  2394. F000:E987            int_9_keyboard    proc    near            ;  xref F000:FF05
  2395. F000:E987  E8 1551                call    sub_60            ; (FEDB)
  2396. F000:E98A  50                    push    ax
  2397. F000:E98B  E4 60                in    al,60h            ; port 60h, keybd scan or sw1
  2398. F000:E98D  50                    push    ax
  2399. F000:E98E  E4 61                in    al,61h            ; port 61h, 8255 port B, read
  2400. F000:E990  8A E0                mov    ah,al
  2401. F000:E992  0C 80                or    al,80h
  2402. F000:E994  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  2403. F000:E996  8A C4                mov    al,ah
  2404. F000:E998  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  2405.                                         ;  al = 0, disable parity
  2406. F000:E99A  58                    pop    ax
  2407. F000:E99B  3C FF                cmp    al,0FFh
  2408. F000:E99D  72 05                jb    loc_125            ; Jump if below
  2409. F000:E99F  B5 00                mov    ch,0
  2410. F000:E9A1  E9 0087                jmp    loc_131            ; (EA2B)
  2411. F000:E9A4            loc_125:                    ;  xref F000:E99D
  2412. F000:E9A4  E8 0FD4                call    sub_57            ; (F97B)
  2413. F000:E9A7  8A 16 0017                mov    dl,keybd_flags_1    ; (0040:0017=0)
  2414. F000:E9AB  8A 36 0018                mov    dh,keybd_flags_2    ; (0040:0018=0)
  2415. F000:E9AF  FC                    cld                ; Clear direction
  2416. F000:E9B0  A8 80                test    al,80h
  2417. F000:E9B2  74 50                jz    loc_129            ; Jump if zero
  2418. F000:E9B4  24 7F                and    al,7Fh
  2419. F000:E9B6  E8 FF80        ;*        call    sub_17            ;*(E939)
  2420.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 42
  2421.  
  2422. F000:E9B6  E8 80 FF                db    0E8h, 80h, 0FFh
  2423. F000:E9B9  0A DB                or    bl,bl            ; Zero ?
  2424. F000:E9BB  74 7C                jz    loc_133            ; Jump if zero
  2425. F000:E9BD  F6 C3 0F                test    bl,0Fh
  2426. F000:E9C0  F6 D3                not    bl
  2427. F000:E9C2  75 08                jnz    loc_128            ; Jump if not zero
  2428. F000:E9C4  22 F3                and    dh,bl
  2429. F000:E9C6  88 36 0018                mov    keybd_flags_2,dh    ; (0040:0018=0)
  2430. F000:E9CA  EB 6D                jmp    short loc_133        ; (EA39)
  2431. F000:E9CC            loc_128:                    ;  xref F000:E9C2
  2432. F000:E9CC  22 D3                and    dl,bl
  2433. F000:E9CE  88 16 0017                mov    keybd_flags_1,dl    ; (0040:0017=0)
  2434. F000:E9D2  3C 38                cmp    al,38h            ; '8'
  2435. F000:E9D4  75 63                jne    loc_133            ; Jump if not equal
  2436. F000:E9D6  33 C0                xor    ax,ax            ; Zero register
  2437. F000:E9D8  A0 0019                mov    al,keybd_alt_num    ; (0040:0019=0)
  2438. F000:E9DB  0A C0                or    al,al            ; Zero ?
  2439. F000:E9DD  74 5A                jz    loc_133            ; Jump if zero
  2440. F000:E9DF  C6 06 0019 00            mov    keybd_alt_num,0        ; (0040:0019=0)
  2441. F000:E9E4  8A C8                mov    cl,al
  2442. F000:E9E6  80 E1 DF                and    cl,0DFh
  2443. F000:E9E9  80 F9 40                cmp    cl,40h            ; '@'
  2444. F000:E9EC  76 2C                jbe    loc_130            ; Jump if below or =
  2445. F000:E9EE  80 F9 5B                cmp    cl,5Bh            ; '['
  2446. F000:E9F1  73 27                jae    loc_130            ; Jump if above or =
  2447. F000:E9F3  F6 C2 40                test    dl,40h            ; '@'
  2448. F000:E9F6  74 22                jz    loc_130            ; Jump if zero
  2449. F000:E9F8  24 DF                and    al,0DFh
  2450. F000:E9FA  F6 C2 03                test    dl,3
  2451. F000:E9FD  74 1B                jz    loc_130            ; Jump if zero
  2452. F000:E9FF  34 20                xor    al,20h            ; ' '
  2453. F000:EA01  EB 17                jmp    short loc_130        ; (EA1A)
  2454. F000:EA03  90                    db    90h
  2455. F000:EA04            loc_129:                    ;  xref F000:E9B2
  2456. F000:EA04  8A E0                mov    ah,al
  2457. F000:EA06  E8 FF30        ;*        call    sub_17            ;*(E939)
  2458. F000:EA06  E8 30 FF                db    0E8h, 30h, 0FFh
  2459. F000:EA09  0A DB                or    bl,bl            ; Zero ?
  2460. F000:EA0B  74 4F                jz    loc_138            ; Jump if zero
  2461. F000:EA0D  F6 C3 0F                test    bl,0Fh
  2462. F000:EA10  74 2F                jz    loc_135            ; Jump if zero
  2463. F000:EA12  0A D3                or    dl,bl
  2464. F000:EA14  88 16 0017                mov    keybd_flags_1,dl    ; (0040:0017=0)
  2465. F000:EA18  EB 1F                jmp    short loc_133        ; (EA39)
  2466. F000:EA1A            loc_130:                    ;  xref F000:E9EC, E9F1, E9F6, E9FD
  2467.                                         ;            EA01, EA86, EA99, EAAA
  2468.                                         ;            EB0D, EBB8
  2469. F000:EA1A  8B 36 001C                mov    si,keybd_q_tail        ; (0040:001C=38h)
  2470. F000:EA1E  8B FE                mov    di,si
  2471. F000:EA20  E8 FE4C                call    sub_16            ; (E86F)
  2472. F000:EA23  3B 36 001A                cmp    si,keybd_q_head        ; (0040:001A=38h)
  2473. F000:EA27  75 0A                jne    loc_132            ; Jump if not equal
  2474. F000:EA29  B5 80                mov    ch,80h
  2475. F000:EA2B            loc_131:                    ;  xref F000:E9A1
  2476. F000:EA2B  BB 4401                mov    bx,4401h
  2477. F000:EA2E  E8 FB71                call    sub_8            ; (E5A2)
  2478. F000:EA31  EB 06                jmp    short loc_133        ; (EA39)
  2479.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 43
  2480.  
  2481. F000:EA33            loc_132:                    ;  xref F000:EA27
  2482. F000:EA33  89 05                mov    [di],ax
  2483. F000:EA35  89 36 001C                mov    keybd_q_tail,si        ; (0040:001C=38h)
  2484. F000:EA39            loc_133:                    ;  xref F000:E9BB, E9CA, E9D4, E9DD
  2485.                                         ;            EA18, EA31, EA51, EA5A
  2486.                                         ;            EA6E, EA82, EAA6, EAB6
  2487.                                         ;            EB92, EBBB
  2488. F000:EA39  E8 0FE5                call    sub_59            ; (FA21)
  2489. F000:EA3C            loc_134:                    ;  xref F000:EB19, EC0E
  2490. F000:EA3C  58                    pop    ax
  2491. F000:EA3D  E8 05E8                call    sub_32            ; (F028)
  2492. F000:EA40  CF                    iret                ; Interrupt return
  2493.                 int_9_keyboard    endp
  2494.   
  2495. F000:EA41            loc_135:                    ;  xref F000:EA10
  2496. F000:EA41  F6 C2 04                test    dl,4
  2497. F000:EA44  74 21                jz    loc_139            ; Jump if zero
  2498. F000:EA46            loc_136:                    ;  xref F000:EA8B
  2499. F000:EA46  F6 C6 08                test    dh,8
  2500. F000:EA49  74 51                jz    loc_142            ; Jump if zero
  2501. F000:EA4B  E8 01E3                call    sub_21            ; (EC31)
  2502. F000:EA4E  F6 C3 20                test    bl,20h            ; ' '
  2503. F000:EA51  75 E6                jnz    loc_133            ; Jump if not zero
  2504. F000:EA53            loc_137:                    ;  xref F000:EA62
  2505. F000:EA53  80 E6 F7                and    dh,0F7h
  2506. F000:EA56  88 36 0018                mov    keybd_flags_2,dh    ; (0040:0018=0)
  2507. F000:EA5A  EB DD                jmp    short loc_133        ; (EA39)
  2508. F000:EA5C            loc_138:                    ;  xref F000:EA0B
  2509. F000:EA5C  E8 01D2                call    sub_21            ; (EC31)
  2510. F000:EA5F  F6 C6 08                test    dh,8
  2511. F000:EA62  75 EF                jnz    loc_137            ; Jump if not zero
  2512. F000:EA64  EB 36                jmp    short loc_142        ; (EA9C)
  2513. F000:EA66  90                    db    90h
  2514. F000:EA67            loc_139:                    ;  xref F000:EA44
  2515. F000:EA67  F6 C3 80                test    bl,80h
  2516. F000:EA6A  75 1C                jnz    loc_141            ; Jump if not zero
  2517. F000:EA6C            loc_140:                    ;  xref F000:EA92
  2518. F000:EA6C  84 F3                test    dh,bl
  2519. F000:EA6E  75 C9                jnz    loc_133            ; Jump if not zero
  2520. F000:EA70  E8 01BE                call    sub_21            ; (EC31)
  2521. F000:EA73  32 D3                xor    dl,bl
  2522. F000:EA75  0A F3                or    dh,bl
  2523. F000:EA77  88 16 0017                mov    keybd_flags_1,dl    ; (0040:0017=0)
  2524. F000:EA7B  88 36 0018                mov    keybd_flags_2,dh    ; (0040:0018=0)
  2525. F000:EA7F  F6 C3 80                test    bl,80h
  2526. F000:EA82  74 B5                jz    loc_133            ; Jump if zero
  2527. F000:EA84  32 C0                xor    al,al            ; Zero register
  2528. F000:EA86  EB 92                jmp    short loc_130        ; (EA1A)
  2529. F000:EA88            loc_141:                    ;  xref F000:EA6A
  2530. F000:EA88  F6 C2 08                test    dl,8
  2531. F000:EA8B  75 B9                jnz    loc_136            ; Jump if not zero
  2532. F000:EA8D  B5 20                mov    ch,20h            ; ' '
  2533. F000:EA8F  E8 FEBA                call    sub_18            ; (E94C)
  2534. F000:EA92  73 D8                jnc    loc_140            ; Jump if carry=0
  2535. F000:EA94  B0 30                mov    al,30h            ; '0'
  2536. F000:EA96  E8 0198                call    sub_21            ; (EC31)
  2537. F000:EA99  E9 FF7E                jmp    loc_130            ; (EA1A)
  2538.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 44
  2539.  
  2540. F000:EA9C            loc_142:                    ;  xref F000:EA49, EA64
  2541. F000:EA9C  3C 3A                cmp    al,3Ah            ; ':'
  2542. F000:EA9E  77 4D                ja    loc_146            ; Jump if above
  2543. F000:EAA0  3C 37                cmp    al,37h            ; '7'
  2544. F000:EAA2  76 14                jbe    loc_144            ; Jump if below or =
  2545. F000:EAA4  3C 39                cmp    al,39h            ; '9'
  2546. F000:EAA6  75 91                jne    loc_133            ; Jump if not equal
  2547. F000:EAA8  2C 19                sub    al,19h
  2548. F000:EAAA  E9 FF6D                jmp    loc_130            ; (EA1A)
  2549. F000:EAAD            loc_143:                    ;  xref F000:EAC5, EACA
  2550. F000:EAAD  E8 FEB5                call    sub_19            ; (E965)
  2551. F000:EAB0  32 C0                xor    al,al            ; Zero register
  2552. F000:EAB2  0A ED                or    ch,ch            ; Zero ?
  2553. F000:EAB4  74 57                jz    loc_150            ; Jump if zero
  2554. F000:EAB6  EB 81                jmp    short loc_133        ; (EA39)
  2555. F000:EAB8            loc_144:                    ;  xref F000:EAA2
  2556. F000:EAB8  F6 C2 08                test    dl,8
  2557. F000:EABB  74 16                jz    loc_145            ; Jump if zero
  2558. F000:EABD  C6 06 0019 00            mov    keybd_alt_num,0        ; (0040:0019=0)
  2559. F000:EAC2  80 FC 0D                cmp    ah,0Dh
  2560. F000:EAC5  77 E6                ja    loc_143            ; Jump if above
  2561. F000:EAC7  80 FC 01                cmp    ah,1
  2562. F000:EACA  76 E1                jbe    loc_143            ; Jump if below or =
  2563. F000:EACC  32 C0                xor    al,al            ; Zero register
  2564. F000:EACE  80 C4 76                add    ah,76h            ; 'v'
  2565. F000:EAD1  EB 3A                jmp    short loc_150        ; (EB0D)
  2566. F000:EAD3            loc_145:                    ;  xref F000:EABB
  2567. F000:EAD3  F6 C2 04                test    dl,4
  2568. F000:EAD6  75 44                jnz    loc_153            ; Jump if not zero
  2569. F000:EAD8  F6 C2 03                test    dl,3
  2570. F000:EADB  75 16                jnz    loc_147            ; Jump if not zero
  2571. F000:EADD  E8 FE85                call    sub_19            ; (E965)
  2572. F000:EAE0  0A ED                or    ch,ch            ; Zero ?
  2573. F000:EAE2  75 26                jnz    loc_149            ; Jump if not zero
  2574. F000:EAE4  F6 C2 40                test    dl,40h            ; '@'
  2575. F000:EAE7  75 21                jnz    loc_149            ; Jump if not zero
  2576. F000:EAE9  FE C5                inc    ch
  2577. F000:EAEB  EB 1D                jmp    short loc_149        ; (EB0A)
  2578. F000:EAED            loc_146:                    ;  xref F000:EA9E
  2579. F000:EAED  3C 45                cmp    al,45h            ; 'E'
  2580. F000:EAEF  73 6C                jae    loc_161            ; Jump if above or =
  2581. F000:EAF1  EB 46                jmp    short loc_157        ; (EB39)
  2582. F000:EAF3            loc_147:                    ;  xref F000:EADB
  2583. F000:EAF3  3C 37                cmp    al,37h            ; '7'
  2584. F000:EAF5  74 1D                je    loc_152            ; Jump if equal
  2585. F000:EAF7  3C 0F                cmp    al,0Fh
  2586. F000:EAF9  74 15                je    loc_151            ; Jump if equal
  2587. F000:EAFB  E8 FE67                call    sub_19            ; (E965)
  2588. F000:EAFE  0A ED                or    ch,ch            ; Zero ?
  2589. F000:EB00  75 05                jnz    loc_148            ; Jump if not zero
  2590. F000:EB02  F6 C2 40                test    dl,40h            ; '@'
  2591. F000:EB05  74 03                jz    loc_149            ; Jump if zero
  2592. F000:EB07            loc_148:                    ;  xref F000:EB00
  2593. F000:EB07  80 F5 01                xor    ch,1
  2594. F000:EB0A            loc_149:                    ;  xref F000:EAE2, EAE7, EAEB, EB05
  2595. F000:EB0A  E8 011B                call    sub_20            ; (EC28)
  2596. F000:EB0D            loc_150:                    ;  xref F000:EAB4, EAD1, EB12, EB37
  2597.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 45
  2598.  
  2599.                                         ;            EB41, EB4B
  2600. F000:EB0D  E9 FF0A                jmp    loc_130            ; (EA1A)
  2601. F000:EB10            loc_151:                    ;  xref F000:EAF9
  2602. F000:EB10  32 C0                xor    al,al            ; Zero register
  2603. F000:EB12  EB F9                jmp    short loc_150        ; (EB0D)
  2604. F000:EB14            loc_152:                    ;  xref F000:EAF5
  2605. F000:EB14  E8 0F0A                call    sub_59            ; (FA21)
  2606. F000:EB17  CD 05                int    5            ; Print screen (status at 50:0h)
  2607. F000:EB19  E9 FF20                jmp    loc_134            ; (EA3C)
  2608. F000:EB1C            loc_153:                    ;  xref F000:EAD6
  2609. F000:EB1C  EB 04                jmp    short loc_155        ; (EB22)
  2610. F000:EB1E  90                    nop
  2611. F000:EB1F            loc_154:                    ;  xref F000:EB32
  2612. F000:EB1F  EB 71                jmp    short loc_164        ; (EB92)
  2613. F000:EB21  90                    db    90h
  2614. F000:EB22            loc_155:                    ;  xref F000:EB1C
  2615. F000:EB22  3C 32                cmp    al,32h            ; '2'
  2616. F000:EB24  77 0A                ja    loc_156            ; Jump if above
  2617. F000:EB26  FE C8                dec    al
  2618. F000:EB28  BB E8F3                mov    bx,0E8F3h
  2619. F000:EB2B  2E: D7                xlat cs:[bx]            ; al=[al+[bx]] table
  2620. F000:EB2D  E9 00AA                jmp    loc_174            ; (EBDA)
  2621. F000:EB30            loc_156:                    ;  xref F000:EB24
  2622. F000:EB30  3C 37                cmp    al,37h            ; '7'
  2623. F000:EB32  75 EB                jne    loc_154            ; Jump if not equal
  2624. F000:EB34  05 3AC9                add    ax,3AC9h
  2625. F000:EB37  EB D4                jmp    short loc_150        ; (EB0D)
  2626. F000:EB39            loc_157:                    ;  xref F000:EAF1
  2627. F000:EB39  32 C0                xor    al,al            ; Zero register
  2628. F000:EB3B  A2 0019                mov    keybd_alt_num,al    ; (0040:0019=0)
  2629. F000:EB3E  F6 C2 0F                test    dl,0Fh
  2630. F000:EB41  74 CA                jz    loc_150            ; Jump if zero
  2631. F000:EB43  F6 C2 08                test    dl,8
  2632. F000:EB46  74 05                jz    loc_158            ; Jump if zero
  2633. F000:EB48  80 C4 2D                add    ah,2Dh            ; '-'
  2634. F000:EB4B  EB C0                jmp    short loc_150        ; (EB0D)
  2635. F000:EB4D            loc_158:                    ;  xref F000:EB46
  2636. F000:EB4D  F6 C2 04                test    dl,4
  2637. F000:EB50  74 05                jz    loc_159            ; Jump if zero
  2638. F000:EB52  80 C4 23                add    ah,23h            ; '#'
  2639. F000:EB55  EB 03                jmp    short loc_160        ; (EB5A)
  2640. F000:EB57            loc_159:                    ;  xref F000:EB50
  2641. F000:EB57  80 C4 19                add    ah,19h
  2642. F000:EB5A            loc_160:                    ;  xref F000:EB55
  2643. F000:EB5A  EB 5C                jmp    short loc_169        ; (EBB8)
  2644. F000:EB5C  90                    db    90h
  2645. F000:EB5D            loc_161:                    ;  xref F000:EAEF
  2646. F000:EB5D  2C 47                sub    al,47h            ; 'G'
  2647. F000:EB5F  3C 03                cmp    al,3
  2648. F000:EB61  75 03                jne    loc_162            ; Jump if not equal
  2649. F000:EB63  E9 0EC0                jmp    loc_385            ; (FA26)
  2650. F000:EB66            loc_162:                    ;  xref F000:EB61, FA54
  2651. F000:EB66  3C 0C                cmp    al,0Ch
  2652. F000:EB68  75 15                jne    loc_163            ; Jump if not equal
  2653. F000:EB6A  8A EA                mov    ch,dl
  2654. F000:EB6C  80 E5 0C                and    ch,0Ch
  2655. F000:EB6F  80 ED 0C                sub    ch,0Ch
  2656.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 46
  2657.  
  2658. F000:EB72  75 0B                jnz    loc_163            ; Jump if not zero
  2659. F000:EB74  C7 06 0072 1234            mov    warm_boot_flag,1234h    ; (0040:0072=0)
  2660. F000:EB7A  EA F000:E05B                jmp    far ptr system_reset    ; (E05B)
  2661. F000:EB7F            loc_163:                    ;  xref F000:EB68, EB72
  2662. F000:EB7F  F6 C2 08                test    dl,8
  2663. F000:EB82  74 21                jz    loc_167            ; Jump if zero
  2664. F000:EB84  BB E925                mov    bx,0E925h
  2665. F000:EB87  2E: D7                xlat cs:[bx]            ; al=[al+[bx]] table
  2666. F000:EB89  3C FF                cmp    al,0FFh
  2667. F000:EB8B  75 08                jne    loc_165            ; Jump if not equal
  2668. F000:EB8D  C6 06 0019 00            mov    keybd_alt_num,0        ; (0040:0019=0)
  2669. F000:EB92            loc_164:                    ;  xref F000:EB1F, EBA3, EBDC
  2670. F000:EB92  E9 FEA4                jmp    loc_133            ; (EA39)
  2671. F000:EB95            loc_165:                    ;  xref F000:EB8B
  2672. F000:EB95  8A C8                mov    cl,al
  2673. F000:EB97  B4 0A                mov    ah,0Ah
  2674. F000:EB99  A0 0019                mov    al,keybd_alt_num    ; (0040:0019=0)
  2675. F000:EB9C  F6 E4                mul    ah            ; ax = reg * al
  2676. F000:EB9E  02 C1                add    al,cl
  2677. F000:EBA0  A2 0019                mov    keybd_alt_num,al    ; (0040:0019=0)
  2678. F000:EBA3            loc_166:                    ;  xref F000:EC1B
  2679. F000:EBA3  EB ED                jmp    short loc_164        ; (EB92)
  2680. F000:EBA5            loc_167:                    ;  xref F000:EB82
  2681. F000:EBA5  F6 C2 04                test    dl,4
  2682. F000:EBA8  75 67                jnz    loc_178            ; Jump if not zero
  2683. F000:EBAA  3C 03                cmp    al,3
  2684. F000:EBAC  75 04                jne    loc_168            ; Jump if not equal
  2685. F000:EBAE  B0 2D                mov    al,2Dh            ; '-'
  2686. F000:EBB0  EB 06                jmp    short loc_169        ; (EBB8)
  2687. F000:EBB2            loc_168:                    ;  xref F000:EBAC
  2688. F000:EBB2  3C 07                cmp    al,7
  2689. F000:EBB4  75 08                jne    loc_171            ; Jump if not equal
  2690. F000:EBB6  B0 2B                mov    al,2Bh            ; '+'
  2691. F000:EBB8            loc_169:                    ;  xref F000:EB5A, EBB0, EBCB, EBD3
  2692.                                         ;            EBE1, EBE5, EBF8
  2693. F000:EBB8  E9 FE5F                jmp    loc_130            ; (EA1A)
  2694. F000:EBBB            loc_170:                    ;  xref F000:EBC7
  2695. F000:EBBB  E9 FE7B                jmp    loc_133            ; (EA39)
  2696. F000:EBBE            loc_171:                    ;  xref F000:EBB4
  2697. F000:EBBE  B5 20                mov    ch,20h            ; ' '
  2698. F000:EBC0  E8 FD89                call    sub_18            ; (E94C)
  2699. F000:EBC3  72 08                jc    loc_172            ; Jump if carry Set
  2700. F000:EBC5  3C 05                cmp    al,5
  2701. F000:EBC7  74 F2                je    loc_170            ; Jump if equal
  2702. F000:EBC9  32 C0                xor    al,al            ; Zero register
  2703. F000:EBCB  EB EB                jmp    short loc_169        ; (EBB8)
  2704. F000:EBCD            loc_172:                    ;  xref F000:EBC3
  2705. F000:EBCD  3C 0C                cmp    al,0Ch
  2706. F000:EBCF  75 04                jne    loc_173            ; Jump if not equal
  2707. F000:EBD1  B0 2E                mov    al,2Eh            ; '.'
  2708. F000:EBD3  EB E3                jmp    short loc_169        ; (EBB8)
  2709. F000:EBD5            loc_173:                    ;  xref F000:EBCF
  2710. F000:EBD5  BB E925                mov    bx,0E925h
  2711. F000:EBD8  2E: D7                xlat cs:[bx]            ; al=[al+[bx]] table
  2712. F000:EBDA            loc_174:                    ;  xref F000:EB2D, EC26
  2713. F000:EBDA  0A C0                or    al,al            ; Zero ?
  2714. F000:EBDC  78 B4                js    loc_164            ; Jump if sign=1
  2715.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 47
  2716.  
  2717. F000:EBDE  F6 C2 04                test    dl,4
  2718. F000:EBE1  75 D5                jnz    loc_169            ; Jump if not zero
  2719. F000:EBE3  04 30                add    al,30h            ; '0'
  2720. F000:EBE5  EB D1                jmp    short loc_169        ; (EBB8)
  2721. F000:EBE7            loc_175:                    ;  xref F000:EC17
  2722. F000:EBE7  C6 06 0071 01            mov    keybd_break,1        ; (0040:0071=0)
  2723. F000:EBEC  CD 1B                int    1Bh            ; Keyboard break (cntrl-break)
  2724. F000:EBEE  33 C0                xor    ax,ax            ; Zero register
  2725. F000:EBF0  8B 36 001A                mov    si,keybd_q_head        ; (0040:001A=38h)
  2726. F000:EBF4  89 36 001C                mov    keybd_q_tail,si        ; (0040:001C=38h)
  2727. F000:EBF8  EB BE                jmp    short loc_169        ; (EBB8)
  2728. F000:EBFA            loc_176:                    ;  xref F000:EC13
  2729. F000:EBFA  80 C6 08                add    dh,8
  2730. F000:EBFD  88 36 0018                mov    keybd_flags_2,dh    ; (0040:0018=0)
  2731. F000:EC01  E8 0E1D                call    sub_59            ; (FA21)
  2732. F000:EC04  E8 097D                call    sub_45            ; (F584)
  2733. F000:EC07            loc_177:                    ;  xref F000:EC0C
  2734. F000:EC07  F6 06 0018 08            test    keybd_flags_2,8        ; (0040:0018=0)
  2735. F000:EC0C  75 F9                jnz    loc_177            ; Jump if not zero
  2736. F000:EC0E  E9 FE2B                jmp    loc_134            ; (EA3C)
  2737. F000:EC11            loc_178:                    ;  xref F000:EBA8
  2738. F000:EC11  3C FE                cmp    al,0FEh
  2739. F000:EC13  74 E5                je    loc_176            ; Jump if equal
  2740. F000:EC15  3C FF                cmp    al,0FFh
  2741. F000:EC17  74 CE                je    loc_175            ; Jump if equal
  2742. F000:EC19  D0 E8                shr    al,1            ; Shift w/zeros fill
  2743. F000:EC1B  72 86                jc    loc_166            ; Jump if carry Set
  2744. F000:EC1D  BB E932                mov    bx,0E932h
  2745. F000:EC20  2E: D7                xlat cs:[bx]            ; al=[al+[bx]] table
  2746. F000:EC22  8A E0                mov    ah,al
  2747. F000:EC24  32 C0                xor    al,al            ; Zero register
  2748. F000:EC26  EB B2                jmp    short loc_174        ; (EBDA)
  2749.   
  2750.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  2751.                 ;                   SUBROUTINE
  2752.                 ;
  2753.                 ;         Called from:     F000:EB0A
  2754.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2755.   
  2756.                 sub_20        proc    near
  2757. F000:EC28  FE C8                dec    al
  2758. F000:EC2A  D0 E0                shl    al,1            ; Shift w/zeros fill
  2759. F000:EC2C  02 C5                add    al,ch
  2760. F000:EC2E  2E: D7                xlat cs:[bx]            ; al=[al+[bx]] table
  2761. F000:EC30  C3                    retn
  2762.                 sub_20        endp
  2763.   
  2764.   
  2765.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  2766.                 ;                   SUBROUTINE
  2767.                 ;
  2768.                 ;         Called from:     F000:EA4B, EA5C, EA70, EA96
  2769.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2770.   
  2771.                 sub_21        proc    near
  2772. F000:EC31  F6 06 0018 01            test    keybd_flags_2,1        ; (0040:0018=0)
  2773. F000:EC36  74 0B                jz    loc_ret_179        ; Jump if zero
  2774.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 48
  2775.  
  2776. F000:EC38  53                    push    bx
  2777. F000:EC39  51                    push    cx
  2778. F000:EC3A  B5 10                mov    ch,10h
  2779. F000:EC3C  B3 01                mov    bl,1
  2780. F000:EC3E  E8 F961                call    sub_8            ; (E5A2)
  2781. F000:EC41  59                    pop    cx
  2782. F000:EC42  5B                    pop    bx
  2783.   
  2784. F000:EC43            loc_ret_179:                    ;  xref F000:EC36
  2785. F000:EC43  C3                    retn
  2786.                 sub_21        endp
  2787.   
  2788. F000:EC44            loc_180:                    ;  xref F000:E479
  2789. F000:EC44  E4 61                in    al,61h            ; port 61h, 8255 port B, read
  2790. F000:EC46  0C 04                or    al,4
  2791. F000:EC48  EB 00                jmp    short loc_181        ; (EC4A)
  2792. F000:EC4A            loc_181:                    ;  xref F000:EC48
  2793. F000:EC4A  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  2794. F000:EC4C  E9 F40C                jmp    system_reset        ; (E05B)
  2795.   
  2796.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  2797.                 ;                   SUBROUTINE
  2798.                 ;
  2799.                 ;         Called from:     F000:E268, E281, E2B8, E3C3
  2800.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2801.   
  2802.                 sub_22        proc    near
  2803. F000:EC4F  E8 F3BA                call    sub_1            ; (E00C)
  2804. F000:EC52  E8 FACA                call    sub_13            ; (E71F)
  2805. F000:EC55  C3                    retn
  2806.                 sub_22        endp
  2807.   
  2808. F000:EC56  00 00 00                db    0, 0, 0
  2809.   
  2810.   
  2811.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 13h ▒▒▒▒▒
  2812.                 ;
  2813.                 ;   FLOPPY DISK    SERVICES
  2814.                 ;
  2815.                 ;      Note: Floppy disk services may be vectored to this routine from int 40h
  2816.                 ;            on    newer systems with hard disk support inside the    BIOS.
  2817.                 ;
  2818.                 ;      Call with: ah = sub-function number
  2819.                 ;          dl = drive number (unless otherwise noted), drive a: = 0
  2820.                 ;
  2821.                 ;      Returns:      carry    = 0 if function ok
  2822.                 ;          ah = status (unless otherwise noted)
  2823.                 ;            ah = 0    Function ok
  2824.                 ;            ah = 1    Invalid value passed or unsupported function
  2825.                 ;            ah = 2    Can not locate address mark
  2826.                 ;            ah = 3    Floppy write protected
  2827.                 ;            ah = 4    Sector not found
  2828.                 ;            ah = 6    Floppy changed line on (1.2 meg drives)
  2829.                 ;            ah = 8    DMA overrun occurred
  2830.                 ;            ah = 9    DMA attempted across 64K byte boundary
  2831.                 ;            ah = 0Ch  Media type not found
  2832.                 ;            ah = 10h  CRC read error
  2833.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 49
  2834.  
  2835.                 ;            ah = 20h  Floppy controller failure
  2836.                 ;            ah = 40h  Seek operation failed
  2837.                 ;            ah = 80h  Floppy drive not ready
  2838.                 ;
  2839.                 ;      Functions:
  2840.                 ;        ah = 0        Floppy disk controller reset
  2841.                 ;        ah = 1        Get    last status
  2842.                 ;        ah = 2        Read sectors
  2843.                 ;              Call with:  al = number of sectors to read
  2844.                 ;                      ch/cl = starting track/starting sector
  2845.                 ;                      dh = head number, head 0 = 0
  2846.                 ;                      es:bx = ptr to buffer where to put data
  2847.                 ;        ah = 3        Write sectors
  2848.                 ;              Call with:  al = number of sectors to write
  2849.                 ;                      ch/cl = starting track/starting sector
  2850.                 ;                      dh = head number, head 0 = 0
  2851.                 ;                      es:bx = ptr to buffer where to get data
  2852.                 ;              Return:     al = number of sectors written
  2853.                 ;        ah = 4        Verify sectors
  2854.                 ;              Call with:  al = number of sectors to compare
  2855.                 ;                      ch/cl = starting track/starting sector
  2856.                 ;                      dh = head number, head 0 = 0
  2857.                 ;                      es:bx = ptr to buffer where to compare data
  2858.                 ;              Return:     al = number of sectors checked
  2859.                 ;        ah = 5        Format track
  2860.                 ;              Call with:  al = number of sectors to format
  2861.                 ;                      ch/cl = starting track/starting sector
  2862.                 ;                      dh = head number, head 0 = 0
  2863.                 ;                      es:bx = ptr to table of address fields
  2864.                 ;        ah = 8        Get    drive information (not supported by all    systems)
  2865.                 ;              Returns:    ax/bh = 0          size dia.       size dia.
  2866.                 ;                      bl = drive type: 1=360K 5.25     3=720K 3.5
  2867.                 ;                                       2=1.2M 5.25     4=1.4M 3.5
  2868.                 ;                      cx bits 7&6, 15-8 = number of    tracks, 0=1 track
  2869.                 ;                         bits 5-0 = number of sectors per track
  2870.                 ;                      dh/dl = # of heads/number of floppy drives
  2871.                 ;                      es:di = ptr to floppy parameter table
  2872.                 ;        ah = 15h   Get    drive type (not supported by all systems)
  2873.                 ;              Returns:    ah = 0 no drive
  2874.                 ;                      ah = 1/2  floppy changed line    not/is available
  2875.                 ;        ah = 16h   Get    changed floppy status (not supported by    all systems)
  2876.                 ;              Returns:    ah = 0   floppy in drive,    carry = 0
  2877.                 ;                      ah = 1   bad drive number,    carry = 1
  2878.                 ;                      ah = 6   floppy out of drive,    carry = 1
  2879.                 ;                      ah = 80h drive not ready,    carry = 1
  2880.                 ;        ah = 17h   Specify media type for a drive
  2881.                 ;              Call with:  al = 1  use a 320/360K floppy    in 360k drive
  2882.                 ;                      al = 2  use a 360K floppy in a 1.2M drive
  2883.                 ;                      al = 3  use a 1.2M floppy in a 1.2M drive
  2884.                 ;                      al = 4  use a 720K disk in a 720K drive
  2885.                 ;        ah = 18h   Prepare for format (not supported by all systems)
  2886.                 ;              Call with:  cx bits 7&6, 15-8 = number of    tracks, 0=1 track
  2887.                 ;                         bits 5-0 = number of sectors per track
  2888.                 ;              Returns:    es:di = ptr to floppy parameter table
  2889.   
  2890. F000:EC59            int_13h_floppy    proc    near            ;  xref F000:FF19
  2891. F000:EC59  FB                    sti                ; Enable interrupts
  2892.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 50
  2893.  
  2894. F000:EC5A  E8 127E                call    sub_60            ; (FEDB)
  2895. F000:EC5D  BF 0040                mov    di,seg seg_b
  2896. F000:EC60  8E DF                mov    ds,di
  2897. F000:EC62  52                    push    dx
  2898. F000:EC63  52                    push    dx
  2899. F000:EC64  51                    push    cx
  2900. F000:EC65  50                    push    ax
  2901. F000:EC66  8B EC                mov    bp,sp
  2902. F000:EC68  80 0E 003F C0            or    dsk_motor_stat,0C0h    ; (0040:003F=50h)
  2903. F000:EC6D  2A C0                sub    al,al
  2904. F000:EC6F  BA 03F2                mov    dx,3F2h
  2905. F000:EC72  80 FC 00                cmp    ah,0
  2906. F000:EC75  75 50                jne    loc_184            ; Jump if not equal
  2907. F000:EC77  FA                    cli                ; Disable interrupts
  2908. F000:EC78  02 06 003F                add    al,dsk_motor_stat    ; (0040:003F=50h)
  2909. F000:EC7C  24 BF                and    al,0BFh
  2910. F000:EC7E  D0 C0                rol    al,1            ; Rotate
  2911. F000:EC80  D0 C0                rol    al,1            ; Rotate
  2912. F000:EC82  D0 C0                rol    al,1            ; Rotate
  2913. F000:EC84  D0 C0                rol    al,1            ; Rotate
  2914. F000:EC86  EE                    out    dx,al            ; port 3F2h, dsk0 contrl output
  2915. F000:EC87  80 26 003E 00            and    dsk_recal_stat,0    ; (0040:003E=3)
  2916. F000:EC8C  80 26 0041 00            and    dsk_ret_code,0        ; (0040:0041=0)
  2917. F000:EC91  04 04                add    al,4
  2918. F000:EC93  C6 46 07 02                mov    byte ptr [bp+7],2
  2919. F000:EC97  EE                    out    dx,al            ; port 3F2h, dsk0 contrl output
  2920. F000:EC98  FB                    sti                ; Enable interrupts
  2921. F000:EC99  E8 0214                call    sub_25            ; (EEB0)
  2922. F000:EC9C  73 03                jnc    loc_182            ; Jump if carry=0
  2923. F000:EC9E  E9 0122                jmp    loc_199            ; (EDC3)
  2924. F000:ECA1            loc_182:                    ;  xref F000:EC9C
  2925. F000:ECA1  80 3E 0042 C0            cmp    dsk_status_1,0C0h    ; (0040:0042=0Ah)
  2926. F000:ECA6  75 17                jne    loc_183            ; Jump if not equal
  2927. F000:ECA8  E8 025D                call    sub_28            ; (EF08)
  2928. F000:ECAB  26: 8A 45 01                mov    al,es:[di+1]
  2929. F000:ECAF  50                    push    ax
  2930. F000:ECB0  26: 8A 05                mov    al,es:[di]
  2931. F000:ECB3  50                    push    ax
  2932. F000:ECB4  B8 0003                mov    ax,3
  2933. F000:ECB7  50                    push    ax
  2934. F000:ECB8  50                    push    ax
  2935. F000:ECB9  E8 0BA1                call    sub_55            ; (F85D)
  2936. F000:ECBC  E9 0104                jmp    loc_199            ; (EDC3)
  2937. F000:ECBF            loc_183:                    ;  xref F000:ECA6
  2938. F000:ECBF  80 06 0041 20            add    dsk_ret_code,20h    ; (0040:0041=0) ' '
  2939. F000:ECC4  E9 00FC                jmp    loc_199            ; (EDC3)
  2940. F000:ECC7            loc_184:                    ;  xref F000:EC75
  2941. F000:ECC7  80 FC 01                cmp    ah,1
  2942. F000:ECCA  75 07                jne    loc_185            ; Jump if not equal
  2943. F000:ECCC  02 06 0041                add    al,dsk_ret_code        ; (0040:0041=0)
  2944. F000:ECD0  E9 00F0                jmp    loc_199            ; (EDC3)
  2945. F000:ECD3            loc_185:                    ;  xref F000:ECCA
  2946. F000:ECD3  8A C4                mov    al,ah
  2947. F000:ECD5  C6 46 01 46                mov    byte ptr [bp+1],46h    ; 'F'
  2948. F000:ECD9  B4 E6                mov    ah,0E6h
  2949. F000:ECDB  80 26 0041 00            and    dsk_ret_code,0        ; (0040:0041=0)
  2950. F000:ECE0  F6 46 04 FC                test    byte ptr [bp+4],0FCh
  2951.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 51
  2952.  
  2953. F000:ECE4  75 2D                jnz    loc_189            ; Jump if not zero
  2954. F000:ECE6  3C 02                cmp    al,2
  2955. F000:ECE8  75 03                jne    loc_186            ; Jump if not equal
  2956. F000:ECEA  EB 2F                jmp    short loc_190        ; (ED1B)
  2957. F000:ECEC  90                    db    90h
  2958. F000:ECED            loc_186:                    ;  xref F000:ECE8
  2959. F000:ECED  3C 04                cmp    al,4
  2960. F000:ECEF  75 07                jne    loc_187            ; Jump if not equal
  2961. F000:ECF1  80 6E 01 04                sub    byte ptr [bp+1],4
  2962. F000:ECF5  EB 24                jmp    short loc_190        ; (ED1B)
  2963. F000:ECF7  90                    db    90h
  2964. F000:ECF8            loc_187:                    ;  xref F000:ECEF
  2965. F000:ECF8  3C 03                cmp    al,3
  2966. F000:ECFA  75 0A                jne    loc_188            ; Jump if not equal
  2967. F000:ECFC  80 46 01 04                add    byte ptr [bp+1],4
  2968. F000:ED00  80 EC 21                sub    ah,21h            ; '!'
  2969. F000:ED03  EB 16                jmp    short loc_190        ; (ED1B)
  2970. F000:ED05  90                    db    90h
  2971. F000:ED06            loc_188:                    ;  xref F000:ECFA
  2972. F000:ED06  3C 05                cmp    al,5
  2973. F000:ED08  75 09                jne    loc_189            ; Jump if not equal
  2974. F000:ED0A  80 46 01 04                add    byte ptr [bp+1],4
  2975. F000:ED0E  B4 4D                mov    ah,4Dh            ; 'M'
  2976. F000:ED10  EB 09                jmp    short loc_190        ; (ED1B)
  2977. F000:ED12  90                    db    90h
  2978. F000:ED13            loc_189:                    ;  xref F000:ECE4, ED08
  2979. F000:ED13  80 06 0041 01            add    dsk_ret_code,1        ; (0040:0041=0)
  2980. F000:ED18  E9 00A8                jmp    loc_199            ; (EDC3)
  2981. F000:ED1B            loc_190:                    ;  xref F000:ECEA, ECF5, ED03, ED10
  2982. F000:ED1B  50                    push    ax
  2983. F000:ED1C  80 26 0040 00            and    dsk_motor_tmr,0        ; (0040:0040=8Bh)
  2984. F000:ED21  80 7E 04 00                cmp    byte ptr [bp+4],0
  2985. F000:ED25  75 0A                jne    loc_191            ; Jump if not equal
  2986. F000:ED27  80 26 003F C1            and    dsk_motor_stat,0C1h    ; (0040:003F=50h)
  2987. F000:ED2C  B0 01                mov    al,1
  2988. F000:ED2E  EB 28                jmp    short loc_194        ; (ED58)
  2989. F000:ED30  90                    db    90h
  2990. F000:ED31            loc_191:                    ;  xref F000:ED25
  2991. F000:ED31  80 7E 04 01                cmp    byte ptr [bp+4],1
  2992. F000:ED35  75 0A                jne    loc_192            ; Jump if not equal
  2993. F000:ED37  80 26 003F C2            and    dsk_motor_stat,0C2h    ; (0040:003F=50h)
  2994. F000:ED3C  B0 12                mov    al,12h
  2995. F000:ED3E  EB 18                jmp    short loc_194        ; (ED58)
  2996. F000:ED40  90                    db    90h
  2997. F000:ED41            loc_192:                    ;  xref F000:ED35
  2998. F000:ED41  80 7E 04 02                cmp    byte ptr [bp+4],2
  2999. F000:ED45  75 0A                jne    loc_193            ; Jump if not equal
  3000. F000:ED47  80 26 003F C4            and    dsk_motor_stat,0C4h    ; (0040:003F=50h)
  3001. F000:ED4C  B0 24                mov    al,24h            ; '$'
  3002. F000:ED4E  EB 08                jmp    short loc_194        ; (ED58)
  3003. F000:ED50  90                    db    90h
  3004. F000:ED51            loc_193:                    ;  xref F000:ED45
  3005. F000:ED51  80 26 003F C8            and    dsk_motor_stat,0C8h    ; (0040:003F=50h)
  3006. F000:ED56  B0 38                mov    al,38h            ; '8'
  3007. F000:ED58            loc_194:                    ;  xref F000:ED2E, ED3E, ED4E
  3008. F000:ED58  FA                    cli                ; Disable interrupts
  3009. F000:ED59  84 06 003F                test    al,dsk_motor_stat    ; (0040:003F=50h)
  3010.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 52
  3011.  
  3012. F000:ED5D  9C                    pushf                ; Push flags
  3013. F000:ED5E  08 06 003F                or    dsk_motor_stat,al    ; (0040:003F=50h)
  3014. F000:ED62  A0 003F                mov    al,dsk_motor_stat    ; (0040:003F=50h)
  3015. F000:ED65  D0 C0                rol    al,1            ; Rotate
  3016. F000:ED67  D0 C0                rol    al,1            ; Rotate
  3017. F000:ED69  D0 C0                rol    al,1            ; Rotate
  3018. F000:ED6B  D0 C0                rol    al,1            ; Rotate
  3019. F000:ED6D  EE                    out    dx,al            ; port 3F2h, dsk0 contrl output
  3020. F000:ED6E  9D                    popf                ; Pop flags
  3021. F000:ED6F  FB                    sti                ; Enable interrupts
  3022. F000:ED70  75 3D                jnz    loc_197            ; Jump if not zero
  3023. F000:ED72  06                    push    es
  3024. F000:ED73  E8 0192                call    sub_28            ; (EF08)
  3025. F000:ED76  26: 8A 65 0A                mov    ah,es:[di+0Ah]
  3026. F000:ED7A  07                    pop    es
  3027. F000:ED7B  22 E4                and    ah,ah
  3028. F000:ED7D  74 30                jz    loc_197            ; Jump if zero
  3029. F000:ED7F  BE 25E4                mov    si,25E4h
  3030. F000:ED82            loc_195:                    ;  xref F000:ED8D
  3031. F000:ED82  4E                    dec    si
  3032. F000:ED83  74 2A                jz    loc_197            ; Jump if zero
  3033. F000:ED85  E8 0176                call    sub_27            ; (EEFE)
  3034. F000:ED88  80 7E 06 F9                cmp    byte ptr [bp+6],0F9h
  3035. F000:ED8C  F8                    clc                ; Clear carry flag
  3036. F000:ED8D  75 F3                jnz    loc_195            ; Jump if not zero
  3037. F000:ED8F  E8 0A45                call    sub_54            ; (F7D7)
  3038. F000:ED92  72 29                jc    loc_198            ; Jump if carry Set
  3039. F000:ED94  8A 56 04                mov    dl,[bp+4]
  3040. F000:ED97  8A 6E 03                mov    ch,[bp+3]
  3041. F000:ED9A  E8 0AD9                call    sub_56            ; (F876)
  3042. F000:ED9D  72 1E                jc    loc_198            ; Jump if carry Set
  3043. F000:ED9F            loc_196:                    ;  xref F000:EDAA
  3044. F000:ED9F  4E                    dec    si
  3045. F000:EDA0  74 1B                jz    loc_198            ; Jump if zero
  3046. F000:EDA2  E8 0159                call    sub_27            ; (EEFE)
  3047. F000:EDA5  80 7E 06 F4                cmp    byte ptr [bp+6],0F4h
  3048. F000:EDA9  F8                    clc                ; Clear carry flag
  3049. F000:EDAA  75 F3                jnz    loc_196            ; Jump if not zero
  3050. F000:EDAC  EB 0F                jmp    short loc_198        ; (EDBD)
  3051. F000:EDAE  90                    db    90h
  3052. F000:EDAF            loc_197:                    ;  xref F000:ED70, ED7D, ED83
  3053. F000:EDAF  E8 0A25                call    sub_54            ; (F7D7)
  3054. F000:EDB2  72 09                jc    loc_198            ; Jump if carry Set
  3055. F000:EDB4  8A 56 04                mov    dl,[bp+4]
  3056. F000:EDB7  8A 6E 03                mov    ch,[bp+3]
  3057. F000:EDBA  E8 0AB9                call    sub_56            ; (F876)
  3058. F000:EDBD            loc_198:                    ;  xref F000:ED92, ED9D, EDA0, EDAC
  3059.                                         ;            EDB2
  3060. F000:EDBD  58                    pop    ax
  3061. F000:EDBE  72 03                jc    loc_199            ; Jump if carry Set
  3062. F000:EDC0  E8 0025                call    sub_23            ; (EDE8)
  3063. F000:EDC3            loc_199:                    ;  xref F000:EC9E, ECBC, ECC4, ECD0
  3064.                                         ;            ED18, EDBE
  3065. F000:EDC3  E8 0142                call    sub_28            ; (EF08)
  3066. F000:EDC6  26: 8A 65 02                mov    ah,es:[di+2]
  3067. F000:EDCA  88 26 0040                mov    dsk_motor_tmr,ah    ; (0040:0040=72h)
  3068. F000:EDCE  80 66 07 00                and    byte ptr [bp+7],0
  3069.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 53
  3070.  
  3071. F000:EDD2  2A E4                sub    ah,ah
  3072. F000:EDD4  02 26 0041                add    ah,dsk_ret_code        ; (0040:0041=0)
  3073. F000:EDD8  F6 C4 FF                test    ah,0FFh
  3074. F000:EDDB  74 01                jz    loc_200            ; Jump if zero
  3075. F000:EDDD  F9                    stc                ; Set carry flag
  3076. F000:EDDE            loc_200:                    ;  xref F000:EDDB
  3077. F000:EDDE  5E                    pop    si
  3078. F000:EDDF  5E                    pop    si
  3079. F000:EDE0  5E                    pop    si
  3080. F000:EDE1  5E                    pop    si
  3081. F000:EDE2  E8 0243                call    sub_32            ; (F028)
  3082. F000:EDE5  CA 0002                retf    2            ; Return far
  3083.                 int_13h_floppy    endp
  3084.   
  3085.   
  3086.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3087.                 ;                   SUBROUTINE
  3088.                 ;
  3089.                 ;         Called from:     F000:EDC0
  3090.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3091.   
  3092.                 sub_23        proc    near
  3093. F000:EDE8  C6 46 07 07                mov    byte ptr [bp+7],7
  3094. F000:EDEC  8A C4                mov    al,ah
  3095. F000:EDEE  8A 4E 04                mov    cl,[bp+4]
  3096. F000:EDF1  80 E1 FB                and    cl,0FBh
  3097. F000:EDF4  F6 46 05 01                test    byte ptr [bp+5],1
  3098. F000:EDF8  74 03                jz    loc_201            ; Jump if zero
  3099. F000:EDFA  80 C9 04                or    cl,4
  3100. F000:EDFD            loc_201:                    ;  xref F000:EDF8
  3101. F000:EDFD  80 EC 4D                sub    ah,4Dh            ; 'M'
  3102. F000:EE00  E8 0105                call    sub_28            ; (EF08)
  3103. F000:EE03  75 1D                jnz    loc_202            ; Jump if not zero
  3104. F000:EE05  26: 8A 5D 08                mov    bl,es:[di+8]
  3105. F000:EE09  53                    push    bx
  3106. F000:EE0A  26: 8A 5D 07                mov    bl,es:[di+7]
  3107. F000:EE0E  53                    push    bx
  3108. F000:EE0F  26: 8A 5D 04                mov    bl,es:[di+4]
  3109. F000:EE13  53                    push    bx
  3110. F000:EE14  26: 8A 5D 03                mov    bl,es:[di+3]
  3111. F000:EE18  53                    push    bx
  3112. F000:EE19  51                    push    cx
  3113. F000:EE1A  50                    push    ax
  3114. F000:EE1B  B8 0006                mov    ax,6
  3115. F000:EE1E  50                    push    ax
  3116. F000:EE1F  EB 30                jmp    short loc_203        ; (EE51)
  3117. F000:EE21  90                    db    90h
  3118. F000:EE22            loc_202:                    ;  xref F000:EE03
  3119. F000:EE22  8A 5E 02                mov    bl,[bp+2]
  3120. F000:EE25  53                    push    bx
  3121. F000:EE26  8A 5E 05                mov    bl,[bp+5]
  3122. F000:EE29  53                    push    bx
  3123. F000:EE2A  8A 5E 03                mov    bl,[bp+3]
  3124. F000:EE2D  53                    push    bx
  3125. F000:EE2E  51                    push    cx
  3126. F000:EE2F  50                    push    ax
  3127. F000:EE30  BB 0005                mov    bx,5
  3128.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 54
  3129.  
  3130. F000:EE33  53                    push    bx
  3131. F000:EE34  E8 0A26                call    sub_55            ; (F85D)
  3132. F000:EE37  72 28                jc    loc_204            ; Jump if carry Set
  3133. F000:EE39  26: 8A 5D 06                mov    bl,es:[di+6]
  3134. F000:EE3D  53                    push    bx
  3135. F000:EE3E  26: 8A 5D 05                mov    bl,es:[di+5]
  3136. F000:EE42  53                    push    bx
  3137. F000:EE43  26: 8A 5D 04                mov    bl,es:[di+4]
  3138. F000:EE47  53                    push    bx
  3139. F000:EE48  26: 8A 5D 03                mov    bl,es:[di+3]
  3140. F000:EE4C  53                    push    bx
  3141. F000:EE4D  BB 0004                mov    bx,4
  3142. F000:EE50  53                    push    bx
  3143. F000:EE51            loc_203:                    ;  xref F000:EE1F
  3144. F000:EE51  E8 0A09                call    sub_55            ; (F85D)
  3145. F000:EE54  72 0B                jc    loc_204            ; Jump if carry Set
  3146. F000:EE56  E8 0057                call    sub_25            ; (EEB0)
  3147. F000:EE59  72 06                jc    loc_204            ; Jump if carry Set
  3148. F000:EE5B  E8 0007                call    sub_24            ; (EE65)
  3149. F000:EE5E  EB 04                jmp    short loc_ret_205    ; (EE64)
  3150. F000:EE60  90                    db    90h
  3151. F000:EE61            loc_204:                    ;  xref F000:EE37, EE54, EE59
  3152. F000:EE61  E8 00B2                call    sub_29            ; (EF16)
  3153.   
  3154. F000:EE64            loc_ret_205:                    ;  xref F000:EE5E
  3155. F000:EE64  C3                    retn
  3156.                 sub_23        endp
  3157.   
  3158.   
  3159.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3160.                 ;                   SUBROUTINE
  3161.                 ;
  3162.                 ;         Called from:     F000:EE5B
  3163.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3164.   
  3165.                 sub_24        proc    near
  3166. F000:EE65  56                    push    si
  3167. F000:EE66  8A 26 0042                mov    ah,dsk_status_1        ; (0040:0042=0Ah)
  3168. F000:EE6A  F6 C4 C0                test    ah,0C0h
  3169. F000:EE6D  75 03                jnz    loc_206            ; Jump if not zero
  3170. F000:EE6F  EB 25                jmp    short loc_212        ; (EE96)
  3171. F000:EE71  90                    db    90h
  3172. F000:EE72            loc_206:                    ;  xref F000:EE6D
  3173. F000:EE72  80 E4 80                and    ah,80h
  3174. F000:EE75  74 03                jz    loc_207            ; Jump if zero
  3175. F000:EE77  EB 17                jmp    short loc_210        ; (EE90)
  3176. F000:EE79  90                    db    90h
  3177. F000:EE7A            loc_207:                    ;  xref F000:EE75
  3178. F000:EE7A  A0 0043                mov    al,dsk_status_2        ; (0040:0043=2)
  3179. F000:EE7D  BE F020                mov    si,0F020h
  3180. F000:EE80  B9 0008                mov    cx,8
  3181.   
  3182. F000:EE83            locloop_208:                    ;  xref F000:EE88
  3183. F000:EE83  D0 E0                shl    al,1            ; Shift w/zeros fill
  3184. F000:EE85  72 03                jc    loc_209            ; Jump if carry Set
  3185. F000:EE87  46                    inc    si
  3186. F000:EE88  E2 F9                loop    locloop_208        ; Loop if cx > 0
  3187.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 55
  3188.  
  3189.   
  3190. F000:EE8A            loc_209:                    ;  xref F000:EE85
  3191. F000:EE8A  2E: 8A 24                mov    ah,cs:[si]
  3192. F000:EE8D  EB 03                jmp    short loc_211        ; (EE92)
  3193. F000:EE8F  90                    db    90h
  3194. F000:EE90            loc_210:                    ;  xref F000:EE77
  3195. F000:EE90  B4 20                mov    ah,20h            ; ' '
  3196. F000:EE92            loc_211:                    ;  xref F000:EE8D
  3197. F000:EE92  00 26 0041                add    dsk_ret_code,ah        ; (0040:0041=0)
  3198. F000:EE96            loc_212:                    ;  xref F000:EE6F
  3199. F000:EE96  E8 006F                call    sub_28            ; (EF08)
  3200. F000:EE99  26: 8A 45 04                mov    al,es:[di+4]
  3201. F000:EE9D  04 01                add    al,1
  3202. F000:EE9F  BE 0047                mov    si,47h
  3203. F000:EEA2  8A 64 FE                mov    ah,[si-2]
  3204. F000:EEA5  3A 66 03                cmp    ah,[bp+3]
  3205. F000:EEA8  75 01                jne    loc_213            ; Jump if not equal
  3206. F000:EEAA  AC                    lodsb                ; String [si] to al
  3207. F000:EEAB            loc_213:                    ;  xref F000:EEA8
  3208. F000:EEAB  2A 46 02                sub    al,[bp+2]
  3209. F000:EEAE  5E                    pop    si
  3210. F000:EEAF  C3                    retn
  3211.                 sub_24        endp
  3212.   
  3213.   
  3214.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3215.                 ;                   SUBROUTINE
  3216.                 ;
  3217.                 ;         Called from:     F000:EC99, EE56, F8B2, F8D5
  3218.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3219.   
  3220.                 sub_25        proc    near
  3221. F000:EEB0  B8 FFFF                mov    ax,0FFFFh
  3222. F000:EEB3            loc_214:                    ;  xref F000:EEBF
  3223. F000:EEB3  90                    nop
  3224. F000:EEB4  90                    nop
  3225. F000:EEB5  F6 06 003E 80            test    dsk_recal_stat,80h    ; (0040:003E=3)
  3226. F000:EEBA  75 11                jnz    loc_216            ; Jump if not zero
  3227. F000:EEBC  2D 0001                sub    ax,1
  3228. F000:EEBF  75 F2                jnz    loc_214            ; Jump if not zero
  3229. F000:EEC1  80 06 0041 80            add    dsk_ret_code,80h    ; (0040:0041=0)
  3230. F000:EEC6  80 26 003E 7F            and    dsk_recal_stat,7Fh    ; (0040:003E=3)
  3231. F000:EECB  F9                    stc                ; Set carry flag
  3232.   
  3233. F000:EECC            loc_ret_215:                    ;  xref F000:EED5
  3234. F000:EECC  C3                    retn
  3235. F000:EECD            loc_216:                    ;  xref F000:EEBA
  3236. F000:EECD  80 26 003E 7F            and    dsk_recal_stat,7Fh    ; (0040:003E=3)
  3237. F000:EED2  E8 0096                call    sub_31            ; (EF6B)
  3238. F000:EED5  EB F5                jmp    short loc_ret_215    ; (EECC)
  3239.                 sub_25        endp
  3240.   
  3241.   
  3242.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3243.                 ;                   SUBROUTINE
  3244.                 ;
  3245.                 ;         Called from:     F000:EF9A, F861
  3246.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 56
  3247.  
  3248.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3249.   
  3250.                 sub_26        proc    near
  3251. F000:EED7  53                    push    bx
  3252. F000:EED8  BA 03F4                mov    dx,3F4h
  3253. F000:EEDB  BB 0000                mov    bx,0
  3254. F000:EEDE            loc_217:                    ;  xref F000:EEE8
  3255. F000:EEDE  EC                    in    al,dx            ; port 3F4h, dsk0 cntrlr status
  3256. F000:EEDF  24 C0                and    al,0C0h
  3257. F000:EEE1  3A C4                cmp    al,ah
  3258. F000:EEE3  74 17                je    loc_220            ; Jump if equal
  3259. F000:EEE5  83 EB 01                sub    bx,1
  3260. F000:EEE8  75 F4                jnz    loc_217            ; Jump if not zero
  3261. F000:EEEA  A8 80                test    al,80h
  3262. F000:EEEC  74 08                jz    loc_218            ; Jump if zero
  3263. F000:EEEE  80 06 0041 20            add    dsk_ret_code,20h    ; (0040:0041=0) ' '
  3264. F000:EEF3  EB 06                jmp    short loc_219        ; (EEFB)
  3265. F000:EEF5  90                    db    90h
  3266. F000:EEF6            loc_218:                    ;  xref F000:EEEC
  3267. F000:EEF6  80 06 0041 80            add    dsk_ret_code,80h    ; (0040:0041=0)
  3268. F000:EEFB            loc_219:                    ;  xref F000:EEF3
  3269. F000:EEFB  F9                    stc                ; Set carry flag
  3270. F000:EEFC            loc_220:                    ;  xref F000:EEE3
  3271. F000:EEFC  5B                    pop    bx
  3272. F000:EEFD  C3                    retn
  3273.                 sub_26        endp
  3274.   
  3275.   
  3276.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3277.                 ;                   SUBROUTINE
  3278.                 ;
  3279.                 ;         Called from:     F000:ED85, EDA2
  3280.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3281.   
  3282.                 sub_27        proc    near
  3283. F000:EEFE  53                    push    bx
  3284. F000:EEFF  8A 1E 0040                mov    bl,dsk_motor_tmr    ; (0040:0040=3Fh)
  3285. F000:EF03  88 5E 06                mov    [bp+6],bl
  3286. F000:EF06  5B                    pop    bx
  3287. F000:EF07  C3                    retn
  3288.                 sub_27        endp
  3289.   
  3290.   
  3291.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3292.                 ;                   SUBROUTINE
  3293.                 ;
  3294.                 ;         Called from:     F000:ECA8, ED73, EDC3, EE00, EE96, F804, F8EC
  3295.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3296.   
  3297.                 sub_28        proc    near
  3298. F000:EF08  1E                    push    ds
  3299. F000:EF09  52                    push    dx
  3300. F000:EF0A  BA 0000                mov    dx,0
  3301. F000:EF0D  8E DA                mov    ds,dx
  3302. F000:EF0F  C4 3E 0078                les    di,dword ptr ds:disk_parm_off    ; (0000:0078=522h) Load 32 bit ptr
  3303. F000:EF13  5A                    pop    dx
  3304. F000:EF14  1F                    pop    ds
  3305.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 57
  3306.  
  3307. F000:EF15  C3                    retn
  3308.                 sub_28        endp
  3309.   
  3310.   
  3311.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3312.                 ;                   SUBROUTINE
  3313.                 ;
  3314.                 ;         Called from:     F000:EE61, F907
  3315.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3316.   
  3317.                 sub_29        proc    near
  3318. F000:EF16  B9 0200                mov    cx,200h
  3319.   
  3320. F000:EF19            locloop_221:                    ;  xref F000:EF25
  3321. F000:EF19  BA 03F5                mov    dx,3F5h
  3322. F000:EF1C  EC                    in    al,dx            ; port 3F5h, dsk0 controlr data
  3323. F000:EF1D  4A                    dec    dx
  3324. F000:EF1E  EC                    in    al,dx            ; port 3F4h, dsk0 cntrlr status
  3325. F000:EF1F  24 C0                and    al,0C0h
  3326. F000:EF21  3C 80                cmp    al,80h
  3327. F000:EF23  74 02                je    loc_222            ; Jump if equal
  3328. F000:EF25  E2 F2                loop    locloop_221        ; Loop if cx > 0
  3329.   
  3330. F000:EF27            loc_222:                    ;  xref F000:EF23
  3331. F000:EF27  F9                    stc                ; Set carry flag
  3332. F000:EF28  C3                    retn
  3333.                 sub_29        endp
  3334.   
  3335. F000:EF29            loc_223:                    ;  xref F000:EF9D, EFBC, EFBF
  3336. F000:EF29  58                    pop    ax
  3337. F000:EF2A  5A                    pop    dx
  3338. F000:EF2B  59                    pop    cx
  3339. F000:EF2C  5B                    pop    bx
  3340. F000:EF2D  8A 66 06                mov    ah,[bp+6]
  3341. F000:EF30  1F                    pop    ds
  3342. F000:EF31  C3                    retn
  3343.   
  3344.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3345.                 ;                   SUBROUTINE
  3346.                 ;
  3347.                 ;         Called from:     F000:E226
  3348.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3349.   
  3350.                 sub_30        proc    near
  3351. F000:EF32  1E                    push    ds
  3352. F000:EF33  33 C0                xor    ax,ax            ; Zero register
  3353. F000:EF35  8E D8                mov    ds,ax
  3354. F000:EF37  BB 0040                mov    bx,seg seg_b
  3355. F000:EF3A  C7 07 FF53                mov    word ptr [bx],0FF53h
  3356. F000:EF3E  0E                    push    cs
  3357. F000:EF3F  58                    pop    ax
  3358. F000:EF40  89 47 02                mov    [bx+2],ax
  3359. F000:EF43  1F                    pop    ds
  3360. F000:EF44  C3                    retn
  3361.                 sub_30        endp
  3362.   
  3363. F000:EF45  0012[00]                db    18 dup (0)
  3364.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 58
  3365.  
  3366.   
  3367.   
  3368.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 0Eh ▒▒▒▒▒
  3369.                 ;
  3370.                 ;   FLOPPY DISK    CONTROLLER (called by hardware 8259-1, IRQ 6)
  3371.   
  3372. F000:EF57            int_0Eh_floppy    proc    near            ;  xref F000:FF0F
  3373. F000:EF57  FB                    sti                ; Enable interrupts
  3374. F000:EF58  50                    push    ax
  3375. F000:EF59  1E                    push    ds
  3376. F000:EF5A  B8 0040                mov    ax,seg_b
  3377. F000:EF5D  8E D8                mov    ds,ax
  3378. F000:EF5F  80 0E 003E 80            or    dsk_recal_stat,80h    ; (0040:003E=3)
  3379. F000:EF64  B0 20                mov    al,20h            ; ' '
  3380. F000:EF66  E6 20                out    20h,al            ; port 20h, 8259-1 int command
  3381.                                         ;  al = 20h, end of interrupt
  3382. F000:EF68  1F                    pop    ds
  3383. F000:EF69  58                    pop    ax
  3384. F000:EF6A  CF                    iret                ; Interrupt return
  3385.                 int_0Eh_floppy    endp
  3386.   
  3387.   
  3388.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3389.                 ;                   SUBROUTINE
  3390.                 ;
  3391.                 ;         Called from:     F000:EED2
  3392.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3393.   
  3394.                 sub_31        proc    near
  3395. F000:EF6B  1E                    push    ds
  3396. F000:EF6C  53                    push    bx
  3397. F000:EF6D  51                    push    cx
  3398. F000:EF6E  BB 0040                mov    bx,seg seg_b
  3399. F000:EF71  8E DB                mov    ds,bx
  3400. F000:EF73  52                    push    dx
  3401. F000:EF74  88 66 06                mov    [bp+6],ah
  3402. F000:EF77  50                    push    ax
  3403. F000:EF78  F6 46 07 FF                test    byte ptr [bp+7],0FFh
  3404. F000:EF7C  74 41                jz    loc_227            ; Jump if zero
  3405. F000:EF7E  80 7E 07 02                cmp    byte ptr [bp+7],2
  3406. F000:EF82  75 0B                jne    loc_224            ; Jump if not equal
  3407. F000:EF84  BB 0008                mov    bx,8
  3408. F000:EF87  53                    push    bx
  3409. F000:EF88  BB 0001                mov    bx,1
  3410. F000:EF8B  53                    push    bx
  3411. F000:EF8C  E8 08CE                call    sub_55            ; (F85D)
  3412. F000:EF8F            loc_224:                    ;  xref F000:EF82
  3413. F000:EF8F  FC                    cld                ; Clear direction
  3414. F000:EF90  BB 0042                mov    bx,42h
  3415. F000:EF93  B5 00                mov    ch,0
  3416. F000:EF95  8A 4E 07                mov    cl,[bp+7]
  3417.   
  3418. F000:EF98            locloop_225:                    ;  xref F000:EFA8
  3419. F000:EF98  B4 C0                mov    ah,0C0h
  3420. F000:EF9A  E8 FF3A                call    sub_26            ; (EED7)
  3421. F000:EF9D  72 8A                jc    loc_223            ; Jump if carry Set
  3422. F000:EF9F  BA 03F5                mov    dx,3F5h
  3423.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 59
  3424.  
  3425. F000:EFA2  EC                    in    al,dx            ; port 3F5h, dsk0 controlr data
  3426. F000:EFA3  88 07                mov    [bx],al
  3427. F000:EFA5  83 C3 01                add    bx,1
  3428. F000:EFA8  E2 EE                loop    locloop_225        ; Loop if cx > 0
  3429.   
  3430. F000:EFAA  B9 0020                mov    cx,20h
  3431. F000:EFAD  BA 03F4                mov    dx,3F4h
  3432.   
  3433. F000:EFB0            locloop_226:                    ;  xref F000:EFB5
  3434. F000:EFB0  EC                    in    al,dx            ; port 3F4h, dsk0 cntrlr status
  3435. F000:EFB1  24 10                and    al,10h
  3436. F000:EFB3  74 0A                jz    loc_227            ; Jump if zero
  3437. F000:EFB5  E2 F9                loop    locloop_226        ; Loop if cx > 0
  3438.   
  3439. F000:EFB7  80 06 0041 20            add    dsk_ret_code,20h    ; (0040:0041=0) ' '
  3440. F000:EFBC  E9 FF6A                jmp    loc_223            ; (EF29)
  3441. F000:EFBF            loc_227:                    ;  xref F000:EF7C, EFB3
  3442. F000:EFBF  E9 FF67                jmp    loc_223            ; (EF29)
  3443.                 sub_31        endp
  3444.   
  3445. F000:EFC2  00 00 00 00 00            db    0, 0, 0, 0, 0
  3446.   
  3447.                                         ; █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  3448.                                         ; █     Floppy Disk Parameters    █
  3449.                                         ; █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  3450.   
  3451. F000:EFC7  DF            dsk_info_1    db    0DFh            ;  hi nibble = stepping rate in ms
  3452.                                         ;  lo nibble = head unload time, ms
  3453.                                         ;  xref F000:FF2F
  3454. F000:EFC8  02            dsk_info_2    db    2            ;  2nd info byte bit 0 = 0 for DMA
  3455. F000:EFC9  24            dsk_motor_delay    db    24h            ;  Delay after use for motor off
  3456. F000:EFCA  02            dsk_sectr_bytes    db    2            ;  Bytes per sector  0 =  128 bytes
  3457.                                         ;                    1 =  256 bytes
  3458.                                         ;                    2 =  512 bytes
  3459.                                         ;                    3 = 1024 bytes
  3460. F000:EFCB  08            dsk_sector_trac    db    8            ;  Number of sectors per track
  3461. F000:EFCC  2A            dsk_head_gap    db    2Ah            ;  Gap Length
  3462. F000:EFCD  FF            dsk_data_length    db    0FFh            ;  Data Length
  3463. F000:EFCE  50            dsk_format_gap    db    50h            ;  Format Gap Length
  3464. F000:EFCF  F6            dsk_format_byte    db    0F6h            ;  Format write byte
  3465. F000:EFD0  0F            dsk_settlg_time    db    0Fh            ;  Head load time, in milliseconds
  3466. F000:EFD1  03            dsk_startup_tim    db    3            ;  Motor startup wait time * .125ms
  3467. F000:EFD2  EA 0B F9 00 F0            db    0EAh, 0Bh, 0F9h, 0, 0F0h
  3468. F000:EFD7  0D 0A 0A 2A 20 42            db    0Dh, 0Ah, 0Ah, '* Boot record not'
  3469. F000:EFDD  6F 6F 74 20 72 65
  3470. F000:EFE3  63 6F 72 64 20 6E
  3471. F000:EFE9  6F 74
  3472. F000:EFEB  20 66 6F 75 6E 64            db    ' found *', 0Dh, 0Ah, '* Strike a'
  3473. F000:EFF1  20 2A 0D 0A 2A 20
  3474. F000:EFF7  53 74 72 69 6B 65
  3475. F000:EFFD  20 61
  3476. F000:EFFF  6E 79 20 6B 65 79            db    'ny key to reboot - '
  3477. F000:F005  20 74 6F 20 72 65
  3478. F000:F00B  62 6F 6F 74 20 2D
  3479. F000:F011  20
  3480. F000:F012  07 00                db    7, 0
  3481. F000:F014  52 41 4D 20 54 45            db    'RAM TEST ..'
  3482.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 60
  3483.  
  3484. F000:F01A  53 54 20 2E 2E
  3485. F000:F01F  00 04 00 10 08 00            db    0, 4, 0, 10h, 8, 0
  3486. F000:F025  04 03 02                db    4, 3, 2
  3487.   
  3488.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3489.                 ;                   SUBROUTINE
  3490.                 ;
  3491.                 ;         Called from:     F000:E7F8, E849, E851, EA3D, EDE2, F483, F5FF
  3492.                 ;                  F771, F7A0
  3493.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3494.   
  3495.                 sub_32        proc    near
  3496. F000:F028  5E                    pop    si
  3497. F000:F029  8B FC                mov    di,sp
  3498. F000:F02B  36: 89 75 10                mov    ss:[di+10h],si
  3499. F000:F02F  07                    pop    es
  3500. F000:F030  1F                    pop    ds
  3501. F000:F031  5D                    pop    bp
  3502. F000:F032  5E                    pop    si
  3503. F000:F033  5F                    pop    di
  3504. F000:F034  5A                    pop    dx
  3505. F000:F035  59                    pop    cx
  3506. F000:F036  5B                    pop    bx
  3507. F000:F037  C3                    retn
  3508.                 sub_32        endp
  3509.   
  3510.   
  3511.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3512.                 ;                   SUBROUTINE
  3513.                 ;
  3514.                 ;         Called from:     F000:F457, F5E4, F5EB
  3515.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3516.   
  3517.                 sub_33        proc    near
  3518. F000:F038  50                    push    ax
  3519. F000:F039  8A E3                mov    ah,bl
  3520. F000:F03B  EF                    out    dx,ax            ; port 3B4h, MDA/EGA reg index
  3521.                                         ;  al = 0, horiz char total
  3522. F000:F03C  58                    pop    ax
  3523. F000:F03D  C3                    retn
  3524.                 sub_33        endp
  3525.   
  3526. F000:F03E  0007[00]                db    7 dup (0)
  3527. F000:F045  B2 F3 C6 F5 05 F6            db    0B2h, 0F3h, 0C6h, 0F5h, 5, 0F6h
  3528. F000:F04B  F0 F5 C8 F6 A7 F5            db    0F0h, 0F5h, 0C8h, 0F6h, 0A7h, 0F5h
  3529. F000:F051  FE F4 09 F5 2A F6            db    0FEh, 0F4h, 9, 0F5h, 2Ah, 0F6h
  3530. F000:F057  D4 F2 DE F2 75 F7            db    0D4h, 0F2h, 0DEh, 0F2h, 75h, 0F7h
  3531. F000:F05D  54 F6 51 F6 87 F4            db    54h, 0F6h, 51h, 0F6h, 87h, 0F4h
  3532. F000:F063  A0 F7                db    0A0h, 0F7h
  3533.   
  3534.   
  3535.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 10h ▒▒▒▒▒
  3536.                 ;
  3537.                 ;   VIDEO DISPLAY SERVICES
  3538.                 ;
  3539.                 ;      Called with:  ah    = primary function number
  3540.                 ;
  3541.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 61
  3542.  
  3543.                 ;      Returns:    (unless    otherwise indicated)
  3544.                 ;             ax    - altered (some systems may not alter ax)
  3545.                 ;
  3546.                 ;      Functions:
  3547.                 ;        ah = 0        Set    video display mode in al.
  3548.                 ;        ah = 1        Set    cursor size
  3549.                 ;              Call with:  ch = top line, 0-32
  3550.                 ;                      cl = bottom line, 0-32
  3551.                 ;        ah = 2        Set    cursor location
  3552.                 ;              Call with:  bh = page number, 0 = 1st page
  3553.                 ;                      dh = row (0 for top row)
  3554.                 ;                      dl = column (0 for leftmost)
  3555.                 ;        ah = 3        Get    cursor location
  3556.                 ;              Call with:  bh = page number, 0 = 1st page
  3557.                 ;              Returns:    ch/cl = cursor size (top & bottom)
  3558.                 ;                      dh/dl = row and column of cursor
  3559.                 ;        ah = 4        Get    light pen location
  3560.                 ;              Returns:    ah = 0 not on/unsupported & bx,cx,dx changed
  3561.                 ;                           1 status valid
  3562.                 ;                      bx = pixel column
  3563.                 ;                      cx = horizontal line number
  3564.                 ;                      dh/dl = row and column
  3565.                 ;        ah = 5        Set    Page number al, 0 = 1st page
  3566.                 ;        ah = 6        Up scroll screen
  3567.                 ;              Call with:  al = # bottom lines to clear,    set 0 for all
  3568.                 ;                      bh = attribute to fill cleared lines
  3569.                 ;                      ch/cl = row/column of top left scroll corner
  3570.                 ;                      dh/dl = row/column of bottom right scroll corner
  3571.                 ;        ah = 7        Down scroll screen
  3572.                 ;              Call with:  al = # top lines to clear, set 0 for all
  3573.                 ;                      bh = attribute to fill cleared lines
  3574.                 ;                      ch/cl = row/column of top left scroll corner
  3575.                 ;                      dh/dl = row/column of bottom right scroll corner
  3576.                 ;        ah = 8        Get    character & attribute at cursor
  3577.                 ;              Call with:  bh = page number, 0 = 1st page
  3578.                 ;              Returns:    ah/al = attribute/character
  3579.                 ;        ah = 9        Write character & attribute at cursor (graphics modes)
  3580.                 ;              Call with:  al = character
  3581.                 ;                      bh = page number, 0 = 1st page
  3582.                 ;                      bl = attribute, bit 7 = 1 to xor with old color
  3583.                 ;                      cx = Number of same characters to write
  3584.                 ;        ah = 0Ah   Write character at cursor (graphics modes)
  3585.                 ;              Call with:  al = character
  3586.                 ;                      bh = page number, 0 = 1st page
  3587.                 ;                      cx = Number of same characters to write
  3588.                 ;        ah = 0Bh   Set    colors (typically in low res modes)
  3589.                 ;              Call with:  bh = 0, bl = color low res background, border
  3590.                 ;                      bh = 1, bl = 0/1 for low res color group 0/1
  3591.                 ;        ah = 0Ch   Write graphics dot
  3592.                 ;              Call with:  al = color, bit 7 = 1 to xor bit with old color
  3593.                 ;                      cx/dx = pixel row/pixel column
  3594.                 ;        ah = 0Dh   Read graphics dot
  3595.                 ;              Call with:  cx/dx = pixel row/pixel column
  3596.                 ;        ah = 0Eh   Write in ASCII mode (cr, lf, bell, and bs as operators)
  3597.                 ;              Call with:  al/bl = character/color
  3598.                 ;        ah = 0Fh   Get    video info
  3599.                 ;              Returns:    ah = columns active
  3600.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 62
  3601.  
  3602.                 ;                      al = active video mode
  3603.                 ;                      bh = active page, 0 = 1st page
  3604.                 ;        ah = 10h   Colors  (EGA/VGA)   Called with al = subfunction
  3605.                 ;              al = 1    bl = color register (0-15)  bh = color to set
  3606.                 ;              al = 2    es:dx = ptr to change all 16 colors & overscan #
  3607.                 ;              al = 3    bl = color high bit as: 0-intensity, 1-blink
  3608.                 ;            For    VGA equipped systems only
  3609.                 ;              al = 7    bl = color register to get in bh
  3610.                 ;              al = 8    bh = returned overscan value
  3611.                 ;              al = 9    es:dx = ptr where to put all 16    colors & overscan
  3612.                 ;              al = 10h  bx = color register to set; ch/cl/dl = grn/blu/red
  3613.                 ;              al = 12h  es:dx = ptr to change color registers
  3614.                 ;                    bx = 1st register to set, cx = # of registers
  3615.                 ;              al = 13h  bl = 0, set color page mode in bh
  3616.                 ;                    bl = 1, set page;  bh = page number
  3617.                 ;              al = 15h  bx = color reg to read; ch/cl/dl = grn/blu/red
  3618.                 ;              al = 17h  es:dx = ptr where to load color    regs
  3619.                 ;                    bx = 1st register to get, cx = # of registers
  3620.                 ;              al = 1Ah  get color page info; bl = mode;    bh = page #
  3621.                 ;        ah = 11h   Reset mode with new character set (leave memory as-is)
  3622.                 ;              al = 0    Character set load
  3623.                 ;                    es:bp = ptr to table of chars
  3624.                 ;                    bl/bh = which block/bytes per char
  3625.                 ;                    cx/dx = # of characters/where to start in block
  3626.                 ;              al = 1    bl = block to load the mono character set
  3627.                 ;              al = 2    bl = block to load the double wide character set
  3628.                 ;              al = 3    bl = block select related to attribute
  3629.                 ;              al = 4    bl = block to load the 8 by 16 set (VGA)
  3630.                 ;              al = 10h - 14h same as 0 - 4, must occur after setting mode
  3631.                 ;              al = 20h  es:bp = ptr to table of char, using int 1Fh ptr
  3632.                 ;              al = 21h  es:bp = ptr to table of char, using int 43h ptr
  3633.                 ;                    bl = 0-dl=# rows; 1-14 rows; 2-25 rows; 3-43 rows
  3634.                 ;                    cx = number of bytes per character in table
  3635.                 ;              al = 22h  use 8 by 14 char set, bl=rows (see al=21h)
  3636.                 ;              al = 23h  use double wide char set, bl=rows (see al=21h)
  3637.                 ;              al = 24h  use 8 by 16 char set, bl=rows (see al=21h)
  3638.                 ;            Get    table pointer and info
  3639.                 ;              al = 30h  es:bp = ptr returned; cx=bytes per char; dl=rows
  3640.                 ;                    bh = 0, get int 1Fh      bh = 4, get double wide
  3641.                 ;                    bh = 1, get int 43h      bh = 5, get mono 9 by 14
  3642.                 ;                    bh = 2, get 8 by 14      bh = 6, get 8 by 16 (VGA)
  3643.                 ;                    bh = 3, get double wide  bh = 7, get 9 by 16 (VGA)
  3644.                 ;        ah = 12h   Miscellaneous functions, bl = sub-function
  3645.                 ;              bl = 10h  Get info,  bh = 0-now color, 1-now mono
  3646.                 ;                    ch/cl = info bits/switches
  3647.                 ;              bl = 20h  Set print screen to work with EGA/VGA
  3648.                 ;            Functions for VGA only (bl = 30-34h return al = 12h)
  3649.                 ;              bl = 30h  Set # of scan lines, 0-200, 1-350, 2-400
  3650.                 ;                      activates after mode change
  3651.                 ;              bl = 31h  ax = 0/1  allow/prevent palette    load with new mode
  3652.                 ;              bl = 32h  al = 0/1  video off/on
  3653.                 ;              bl = 33h  al = 0/1  gray scale summing off/on
  3654.                 ;              bl = 34h  al = 0/1  scale cursor size to font off/on
  3655.                 ;              bl = 35h  switch between adapter and motherboard video
  3656.                 ;                    al = 0, adapter off, es:dx = save state area
  3657.                 ;                    al = 1, motherboard on
  3658.                 ;                    al = 2, active video off, es:dx    = save area
  3659.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 63
  3660.  
  3661.                 ;                    al = 3, inactive video on, es:dx = save area
  3662.                 ;              bl = 36h  al = 0/1  screen off/on
  3663.                 ;        ah = 13h   Write character string (cr, lf, bell, and bs as operators)
  3664.                 ;              Call with:  al = 0/1 write characters, cursor not/is moved
  3665.                 ;                            bl = attribute of all characters
  3666.                 ;                         = 2/3 write characters, cursor not/is moved
  3667.                 ;                            string alternates character & attribute
  3668.                 ;                      bh = page number, 0 = 1st page
  3669.                 ;                      cx = number of characters
  3670.                 ;                      dh/dl = row and column to start
  3671.                 ;                      es:bp = ptr to character string
  3672.                 ;        ah = 14h   LCD    display support, al = sub-function
  3673.                 ;               al = 0,    es:di = ptr to font table to load
  3674.                 ;                      bl/bh = which block/bytes per    char
  3675.                 ;                      cx/dx = # of characters/where    to start in block
  3676.                 ;               al = 1,    bl = block # of ROM font to load
  3677.                 ;               al = 2,    bl = how to support high intensity
  3678.                 ;        ah = 15h   LCD    info table ptr returned in es:di
  3679.                 ;               ax = 0      there is no alternate adapter
  3680.                 ;               ax = 5140h  LCD is the alternate
  3681.                 ;               ax = 5153h  CGA is alternate
  3682.                 ;               ax = 5151h  MDA is alternate
  3683.                 ;
  3684.                 ;                **** VGA SUPPORT ONLY ****
  3685.                 ;        ah = 1Ah   Get/Set types of displays which are operating
  3686.                 ;               al = 0, get displays, returns al = 1Ah
  3687.                 ;                   bl = in use display code
  3688.                 ;                   bh = alternate display code
  3689.                 ;               al = 1, set codes, returns al = 1Ah
  3690.                 ;                   bl = in use display code
  3691.                 ;                   bh = alternate display code
  3692.                 ;               codes:   0 = no display
  3693.                 ;                    1 = mono display
  3694.                 ;                    2 = CGA
  3695.                 ;                    4 = EGA, color
  3696.                 ;                    5 = EGA, mono
  3697.                 ;                    6 = PGA
  3698.                 ;                    7 = VGA, mono  (PS/2 MCA only)
  3699.                 ;                    8 = VGA, color (PS/2 MCA only)
  3700.                 ;                   Bh = VGA, mono  (PS/2 non MCA)
  3701.                 ;                   Ch = VGA, color (PS/2 non MCA)
  3702.                 ;                  FFh = display type not known
  3703.                 ;        ah = 1Bh   Get    video system information
  3704.                 ;               call with:  bx = 0
  3705.                 ;                       es:di = ptr to buffer where to put info
  3706.                 ;        ah = 1Ch   Video system save & restore, al = sub-function
  3707.                 ;               call with:  al = 0, get buffer size
  3708.                 ;                          = 1, save system, buffer at es:bx
  3709.                 ;                          = 2, restore system, buffer at es:bx
  3710.                 ;                       cx bit 0 = 1 for hardware registers
  3711.                 ;                          bit 1 = 1 for software states
  3712.                 ;                          bit 2 = 1 for colors & DAC registers
  3713.   
  3714. F000:F065            int_10h_video    proc    near            ;  xref F000:FF13
  3715. F000:F065  80 FC 0F                cmp    ah,0Fh
  3716. F000:F068  76 01                jbe    loc_228            ; Jump if below or =
  3717. F000:F06A  CF                    iret                ; Interrupt return
  3718.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 64
  3719.  
  3720.                 int_10h_video    endp
  3721.   
  3722. F000:F06B            loc_228:                    ;  xref F000:F068
  3723. F000:F06B  E8 0E6D                call    sub_60            ; (FEDB)
  3724. F000:F06E  8B F8                mov    di,ax
  3725. F000:F070  BE F045                mov    si,0F045h
  3726. F000:F073  E8 0905                call    sub_57            ; (F97B)
  3727. F000:F076  51                    push    cx
  3728. F000:F077  8B 0E 0010                mov    cx,equip_bits        ; (0040:0010=526Fh)
  3729. F000:F07B  80 E1 30                and    cl,30h            ; '0'
  3730. F000:F07E  80 F9 30                cmp    cl,30h            ; '0'
  3731. F000:F081  B9 B800                mov    cx,0B800h
  3732. F000:F084  75 03                jnz    loc_229            ; Jump if not zero
  3733. F000:F086  80 ED 08                sub    ch,8
  3734. F000:F089            loc_229:                    ;  xref F000:F084
  3735. F000:F089  51                    push    cx
  3736. F000:F08A  07                    pop    es
  3737. F000:F08B  B1 07                mov    cl,7
  3738. F000:F08D  D3 E8                shr    ax,cl            ; Shift w/zeros fill
  3739. F000:F08F  25 01FE                and    ax,1FEh
  3740. F000:F092  8B E8                mov    bp,ax
  3741. F000:F094  8B C7                mov    ax,di
  3742. F000:F096  59                    pop    cx
  3743. F000:F097  FC                    cld                ; Clear direction
  3744. F000:F098  2E: FF 22                jmp    word ptr cs:[bp+si]    ;*16 entries
  3745.   
  3746.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3747.                 ;                   SUBROUTINE
  3748.                 ;
  3749.                 ;         Called from:     F000:F2F4, F63B, F779
  3750.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3751.   
  3752.                 sub_34        proc    near
  3753. F000:F09B  8B 16 0063                mov    dx,@video_port        ; (0040:0063=3D4h)
  3754. F000:F09F  80 C2 06                add    dl,6
  3755. F000:F0A2  C3                    retn
  3756.                 sub_34        endp
  3757.   
  3758. F000:F0A3  00                    db    0
  3759.   
  3760.                                         ; █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  3761.                                         ; █    Video Hardware Registers   █
  3762.                                         ; █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  3763.   
  3764. F000:F0A4  38 28 2D 0A 1F 06    video_hdwr_tbl1    db    38h, 28h, 2Dh, 0Ah, 1Fh, 6    ;   mode CGA 40 columns x 25 lines
  3765.                                         ;  xref F000:FF2D
  3766. F000:F0AA  19 1C 02 07 06 07            db    19h, 1Ch, 2, 7, 6, 7
  3767. F000:F0B0  00 00 00 00                db    0, 0, 0, 0
  3768. F000:F0B4  71 50 5A 0A 1F 06    video_hdrw_tbl2    db    71h, 50h, 5Ah, 0Ah, 1Fh, 6    ;   mode CGA 80 columns x 25 lines
  3769. F000:F0BA  19 1C 02 07 06 07            db    19h, 1Ch, 2, 7, 6, 7
  3770. F000:F0C0  00 00 00 00                db    0, 0, 0, 0
  3771. F000:F0C4  38 28 2D 0A 7F 06    video_hdwr_tbl3    db    38h, 28h, 2Dh, 0Ah, 7Fh, 6    ;   mode CGA graphics
  3772. F000:F0CA  64 70 02 01 06 07            db    64h, 70h, 2, 1, 6, 7
  3773. F000:F0D0  00 00 00 00                db    0, 0, 0, 0
  3774. F000:F0D4  61 50 52 0F 19 06    video_hdwr_tbl4    db    61h, 50h, 52h, 0Fh, 19h, 6    ;   mode MDA 80 columns x 25 lines
  3775. F000:F0DA  19 19 02 0D 0B 0C            db    19h, 19h, 2, 0Dh, 0Bh, 0Ch
  3776. F000:F0E0  00 00 00 00                db    0, 0, 0, 0
  3777.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 65
  3778.  
  3779. F000:F0E4  2C 28 2D 29 2A 2E    video_hdwr_mode    db    2Ch, 28h, 2Dh, 29h, 2Ah, 2Eh    ; Video hardware modes (0-7)
  3780. F000:F0EA  1E 29                db    1Eh, 29h
  3781. F000:F0EC            loc_230:                    ;  xref F000:F525
  3782. F000:F0EC  33 ED                xor    bp,bp            ; Zero register
  3783. F000:F0EE  8B F5                mov    si,bp
  3784. F000:F0F0  9D                    popf                ; Pop flags
  3785. F000:F0F1  9C                    pushf                ; Push flags
  3786. F000:F0F2  72 04                jc    loc_231            ; Jump if carry Set
  3787. F000:F0F4  45                    inc    bp
  3788. F000:F0F5  BE 00F0                mov    si,0F0h
  3789. F000:F0F8            loc_231:                    ;  xref F000:F0F2
  3790. F000:F0F8  80 3E 0049 06            cmp    video_mode,6        ; (0040:0049=3)
  3791. F000:F0FD  74 04                je    loc_232            ; Jump if equal
  3792. F000:F0FF  02 D2                add    dl,dl
  3793. F000:F101  03 FD                add    di,bp
  3794. F000:F103            loc_232:                    ;  xref F000:F0FD
  3795. F000:F103  03 FE                add    di,si
  3796. F000:F105  BD 0050                mov    bp,seg seg_c
  3797. F000:F108  9D                    popf                ; Pop flags
  3798. F000:F109  72 02                jc    loc_233            ; Jump if carry Set
  3799. F000:F10B  F7 DD                neg    bp
  3800. F000:F10D            loc_233:                    ;  xref F000:F109
  3801. F000:F10D  06                    push    es
  3802. F000:F10E  1F                    pop    ds
  3803. F000:F10F  32 ED                xor    ch,ch            ; Zero register
  3804. F000:F111  58                    pop    ax
  3805. F000:F112  86 FB                xchg    bh,bl
  3806. F000:F114  53                    push    bx
  3807. F000:F115  02 C0                add    al,al
  3808. F000:F117  02 C0                add    al,al
  3809. F000:F119  50                    push    ax
  3810. F000:F11A  8B DD                mov    bx,bp
  3811. F000:F11C  F6 EB                imul    bl            ; ax = reg * al
  3812. F000:F11E  57                    push    di
  3813. F000:F11F  5E                    pop    si
  3814. F000:F120  03 F0                add    si,ax
  3815. F000:F122  58                    pop    ax
  3816. F000:F123  02 F6                add    dh,dh
  3817. F000:F125  02 F6                add    dh,dh
  3818. F000:F127  A8 FF                test    al,0FFh
  3819. F000:F129  74 10                jz    loc_235            ; Jump if zero
  3820. F000:F12B  2A F0                sub    dh,al
  3821. F000:F12D  86 C6                xchg    al,dh
  3822. F000:F12F  74 0A                jz    loc_235            ; Jump if zero
  3823. F000:F131            loc_234:                    ;  xref F000:F139
  3824. F000:F131  F9                    stc                ; Set carry flag
  3825. F000:F132  E8 024B                call    sub_43            ; (F380)
  3826. F000:F135  03 F5                add    si,bp
  3827. F000:F137  FE C8                dec    al
  3828. F000:F139  7F F6                jg    loc_234            ; Jump if >
  3829. F000:F13B            loc_235:                    ;  xref F000:F129, F12F
  3830. F000:F13B  58                    pop    ax
  3831. F000:F13C            loc_236:                    ;  xref F000:F142
  3832. F000:F13C  F8                    clc                ; Clear carry flag
  3833. F000:F13D  E8 0240                call    sub_43            ; (F380)
  3834. F000:F140  FE CE                dec    dh
  3835. F000:F142  7F F8                jg    loc_236            ; Jump if >
  3836.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 66
  3837.  
  3838. F000:F144  E9 033C                jmp    loc_296            ; (F483)
  3839. F000:F147            loc_237:                    ;  xref F000:F2EA
  3840. F000:F147  56                    push    si
  3841. F000:F148  8A EB                mov    ch,bl
  3842. F000:F14A  8B D8                mov    bx,ax
  3843. F000:F14C  80 FB 80                cmp    bl,80h
  3844. F000:F14F  73 07                jae    loc_238            ; Jump if above or =
  3845. F000:F151  BE FA6E                mov    si,0FA6Eh
  3846. F000:F154  8C CD                mov    bp,cs
  3847. F000:F156  EB 10                jmp    short loc_239        ; (F168)
  3848. F000:F158            loc_238:                    ;  xref F000:F14F
  3849. F000:F158  80 E3 7F                and    bl,7Fh
  3850. F000:F15B  33 D2                xor    dx,dx            ; Zero register
  3851. F000:F15D  52                    push    dx
  3852. F000:F15E  1F                    pop    ds
  3853. F000:F15F  C5 36 007C                lds    si,dword ptr ds:graph_tbl_off    ; (0000:007C=2A00h) Load 32 bit ptr
  3854. F000:F163  8C DD                mov    bp,ds
  3855. F000:F165  E8 0813                call    sub_57            ; (F97B)
  3856. F000:F168            loc_239:                    ;  xref F000:F156
  3857. F000:F168  32 E4                xor    ah,ah            ; Zero register
  3858. F000:F16A  A1 0050                mov    ax,vid_curs_pos0    ; (0040:0050=184Fh)
  3859. F000:F16D  E8 01B1                call    sub_40            ; (F321)
  3860. F000:F170  B1 03                mov    cl,3
  3861. F000:F172  32 FF                xor    bh,bh            ; Zero register
  3862. F000:F174  D3 E3                shl    bx,cl            ; Shift w/zeros fill
  3863. F000:F176  8B F8                mov    di,ax
  3864. F000:F178  03 F3                add    si,bx
  3865. F000:F17A  80 3E 0049 06            cmp    video_mode,6        ; (0040:0049=3)
  3866. F000:F17F  8E DD                mov    ds,bp
  3867. F000:F181  BD 2000                mov    bp,2000h
  3868. F000:F184  8A DD                mov    bl,ch
  3869. F000:F186  B9 0004                mov    cx,4
  3870. F000:F189  8B D7                mov    dx,di
  3871. F000:F18B  74 3A                jz    locloop_244        ; Jump if zero
  3872. F000:F18D  8A EB                mov    ch,bl
  3873. F000:F18F  33 C0                xor    ax,ax            ; Zero register
  3874. F000:F191  D0 EB                shr    bl,1            ; Shift w/zeros fill
  3875. F000:F193  73 03                jnc    loc_240            ; Jump if carry=0
  3876. F000:F195  0D 5555                or    ax,5555h
  3877. F000:F198            loc_240:                    ;  xref F000:F193
  3878. F000:F198  D0 EB                shr    bl,1            ; Shift w/zeros fill
  3879. F000:F19A  73 03                jnc    loc_241            ; Jump if carry=0
  3880. F000:F19C  0D AAAA                or    ax,0AAAAh
  3881. F000:F19F            loc_241:                    ;  xref F000:F19A
  3882. F000:F19F  8B D8                mov    bx,ax
  3883. F000:F1A1            loc_242:                    ;  xref F000:F1B2, F1C5
  3884. F000:F1A1  E8 005F                call    sub_38            ; (F203)
  3885. F000:F1A4  03 FD                add    di,bp
  3886. F000:F1A6  46                    inc    si
  3887. F000:F1A7  E8 0059                call    sub_38            ; (F203)
  3888. F000:F1AA  2B FD                sub    di,bp
  3889. F000:F1AC  4E                    dec    si
  3890. F000:F1AD  E8 0048                call    sub_36            ; (F1F8)
  3891. F000:F1B0  FE C9                dec    cl
  3892. F000:F1B2  75 ED                jnz    loc_242            ; Jump if not zero
  3893. F000:F1B4  59                    pop    cx
  3894. F000:F1B5  49                    dec    cx
  3895.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 67
  3896.  
  3897. F000:F1B6  77 03                ja    loc_243            ; Jump if above
  3898. F000:F1B8  E9 02C8                jmp    loc_296            ; (F483)
  3899. F000:F1BB            loc_243:                    ;  xref F000:F1B6
  3900. F000:F1BB  E8 0034                call    sub_35            ; (F1F2)
  3901. F000:F1BE  47                    inc    di
  3902. F000:F1BF  E8 003D                call    sub_37            ; (F1FF)
  3903. F000:F1C2  51                    push    cx
  3904. F000:F1C3  B1 04                mov    cl,4
  3905. F000:F1C5  EB DA                jmp    short loc_242        ; (F1A1)
  3906.   
  3907. F000:F1C7            locloop_244:                    ;  xref F000:F18B, F1DD, F1F0
  3908. F000:F1C7  8B 04                mov    ax,[si]
  3909. F000:F1C9  80 FB 00                cmp    bl,0
  3910. F000:F1CC  7D 06                jge    loc_245            ; Jump if > or =
  3911. F000:F1CE  26: 32 05                xor    al,es:[di]
  3912. F000:F1D1  26: 32 23                xor    ah,es:[bp+di]
  3913. F000:F1D4            loc_245:                    ;  xref F000:F1CC
  3914. F000:F1D4  26: 88 05                mov    es:[di],al
  3915. F000:F1D7  26: 88 23                mov    es:[bp+di],ah
  3916. F000:F1DA  E8 001B                call    sub_36            ; (F1F8)
  3917. F000:F1DD  E2 E8                loop    locloop_244        ; Loop if cx > 0
  3918.   
  3919. F000:F1DF  59                    pop    cx
  3920. F000:F1E0  49                    dec    cx
  3921. F000:F1E1  77 03                ja    loc_246            ; Jump if above
  3922. F000:F1E3  E9 029D                jmp    loc_296            ; (F483)
  3923. F000:F1E6            loc_246:                    ;  xref F000:F1E1
  3924. F000:F1E6  51                    push    cx
  3925. F000:F1E7  B9 0004                mov    cx,4
  3926. F000:F1EA  E8 0005                call    sub_35            ; (F1F2)
  3927. F000:F1ED  E8 000F                call    sub_37            ; (F1FF)
  3928. F000:F1F0  EB D5                jmp    short locloop_244    ; (F1C7)
  3929.   
  3930.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3931.                 ;                   SUBROUTINE
  3932.                 ;
  3933.                 ;         Called from:     F000:F1BB, F1EA
  3934.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3935.   
  3936.                 sub_35        proc    near
  3937. F000:F1F2  83 EE 08                sub    si,8
  3938. F000:F1F5  8B FA                mov    di,dx
  3939. F000:F1F7  C3                    retn
  3940.                 sub_35        endp
  3941.   
  3942.   
  3943.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3944.                 ;                   SUBROUTINE
  3945.                 ;
  3946.                 ;         Called from:     F000:F1AD, F1DA, F266
  3947.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3948.   
  3949.                 sub_36        proc    near
  3950. F000:F1F8  83 C6 02                add    si,2
  3951. F000:F1FB  83 C7 50                add    di,50h
  3952. F000:F1FE  C3                    retn
  3953.                 sub_36        endp
  3954.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 68
  3955.  
  3956.   
  3957.   
  3958.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3959.                 ;                   SUBROUTINE
  3960.                 ;
  3961.                 ;         Called from:     F000:F1BF, F1ED
  3962.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3963.   
  3964.                 sub_37        proc    near
  3965. F000:F1FF  47                    inc    di
  3966. F000:F200  8B D7                mov    dx,di
  3967. F000:F202  C3                    retn
  3968.                 sub_37        endp
  3969.   
  3970.   
  3971.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  3972.                 ;                   SUBROUTINE
  3973.                 ;
  3974.                 ;         Called from:     F000:F1A1, F1A7
  3975.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3976.   
  3977.                 sub_38        proc    near
  3978. F000:F203  55                    push    bp
  3979. F000:F204  53                    push    bx
  3980. F000:F205  8A 04                mov    al,[si]
  3981. F000:F207  BB 0003                mov    bx,3
  3982. F000:F20A  33 ED                xor    bp,bp            ; Zero register
  3983. F000:F20C            loc_247:                    ;  xref F000:F21A
  3984. F000:F20C  A8 FF                test    al,0FFh
  3985. F000:F20E  74 0C                jz    loc_249            ; Jump if zero
  3986. F000:F210  D0 E8                shr    al,1            ; Shift w/zeros fill
  3987. F000:F212  73 02                jnc    loc_248            ; Jump if carry=0
  3988. F000:F214  0B EB                or    bp,bx
  3989. F000:F216            loc_248:                    ;  xref F000:F212
  3990. F000:F216  D1 E3                shl    bx,1            ; Shift w/zeros fill
  3991. F000:F218  D1 E3                shl    bx,1            ; Shift w/zeros fill
  3992. F000:F21A  EB F0                jmp    short loc_247        ; (F20C)
  3993. F000:F21C            loc_249:                    ;  xref F000:F20E
  3994. F000:F21C  8B C5                mov    ax,bp
  3995. F000:F21E  5B                    pop    bx
  3996. F000:F21F  5D                    pop    bp
  3997. F000:F220  23 C3                and    ax,bx
  3998. F000:F222  86 E0                xchg    ah,al
  3999. F000:F224  80 FD 00                cmp    ch,0
  4000. F000:F227  7D 03                jge    loc_250            ; Jump if > or =
  4001. F000:F229  26: 33 05                xor    ax,es:[di]
  4002. F000:F22C            loc_250:                    ;  xref F000:F227
  4003. F000:F22C  26: 89 05                mov    es:[di],ax
  4004. F000:F22F  C3                    retn
  4005.                 sub_38        endp
  4006.   
  4007. F000:F230            loc_251:                    ;  xref F000:F62F
  4008. F000:F230  A1 0050                mov    ax,vid_curs_pos0    ; (0040:0050=184Fh)
  4009. F000:F233  E8 00EB                call    sub_40            ; (F321)
  4010. F000:F236  8C C2                mov    dx,es
  4011. F000:F238  83 EC 08                sub    sp,8
  4012. F000:F23B  8B F4                mov    si,sp
  4013.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 69
  4014.  
  4015. F000:F23D  B9 0004                mov    cx,4
  4016. F000:F240  BD 2000                mov    bp,2000h
  4017. F000:F243  80 3E 0049 06            cmp    video_mode,6        ; (0040:0049=3)
  4018. F000:F248  8E DA                mov    ds,dx
  4019. F000:F24A  8B F8                mov    di,ax
  4020. F000:F24C  74 10                jz    locloop_253        ; Jump if zero
  4021.   
  4022. F000:F24E            locloop_252:                    ;  xref F000:F259
  4023. F000:F24E  33 ED                xor    bp,bp            ; Zero register
  4024. F000:F250  E8 005B                call    sub_39            ; (F2AE)
  4025. F000:F253  E8 0058                call    sub_39            ; (F2AE)
  4026. F000:F256  83 C7 50                add    di,50h
  4027. F000:F259  E2 F3                loop    locloop_252        ; Loop if cx > 0
  4028.   
  4029. F000:F25B  EB 0E                jmp    short loc_254        ; (F26B)
  4030. F000:F25D  90                    db    90h
  4031.   
  4032. F000:F25E            locloop_253:                    ;  xref F000:F24C, F269
  4033. F000:F25E  8A 05                mov    al,[di]
  4034. F000:F260  3E: 8A 23                mov    ah,ds:[bp+di]
  4035. F000:F263  36: 89 04                mov    ss:[si],ax
  4036. F000:F266  E8 FF8F                call    sub_36            ; (F1F8)
  4037. F000:F269  E2 F3                loop    locloop_253        ; Loop if cx > 0
  4038.   
  4039. F000:F26B            loc_254:                    ;  xref F000:F25B
  4040. F000:F26B  0E                    push    cs
  4041. F000:F26C  1F                    pop    ds
  4042. F000:F26D  BF FA6E                mov    di,0FA6Eh
  4043. F000:F270  83 EF 08                sub    di,8
  4044. F000:F273  B0 00                mov    al,0
  4045. F000:F275  8B F4                mov    si,sp
  4046. F000:F277            loc_255:                    ;  xref F000:F296, F29A, F2A8
  4047. F000:F277  83 C7 08                add    di,8
  4048. F000:F27A  33 DB                xor    bx,bx            ; Zero register
  4049. F000:F27C  B4 08                mov    ah,8
  4050. F000:F27E            loc_256:                    ;  xref F000:F288
  4051. F000:F27E  36: 8A 10                mov    dl,ss:[bx+si]
  4052. F000:F281  3A 11                cmp    dl,[bx+di]
  4053. F000:F283  75 0B                jne    loc_258            ; Jump if not equal
  4054. F000:F285  43                    inc    bx
  4055. F000:F286  FE CC                dec    ah
  4056. F000:F288  75 F4                jnz    loc_256            ; Jump if not zero
  4057. F000:F28A            loc_257:                    ;  xref F000:F294, F2AC
  4058. F000:F28A  83 C4 08                add    sp,8
  4059. F000:F28D  E9 01F3                jmp    loc_296            ; (F483)
  4060. F000:F290            loc_258:                    ;  xref F000:F283
  4061. F000:F290  FE C0                inc    al
  4062. F000:F292  3C 00                cmp    al,0
  4063. F000:F294  74 F4                je    loc_257            ; Jump if equal
  4064. F000:F296  7F DF                jg    loc_255            ; Jump if >
  4065. F000:F298  A8 7F                test    al,7Fh
  4066. F000:F29A  75 DB                jnz    loc_255            ; Jump if not zero
  4067. F000:F29C  33 FF                xor    di,di            ; Zero register
  4068. F000:F29E  8E DF                mov    ds,di
  4069. F000:F2A0  C5 3E 007C                lds    di,dword ptr ds:graph_tbl_off    ; (0000:007C=2A00h) Load 32 bit ptr
  4070. F000:F2A4  8C DA                mov    dx,ds
  4071. F000:F2A6  0B D7                or    dx,di
  4072.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 70
  4073.  
  4074. F000:F2A8  75 CD                jnz    loc_255            ; Jump if not zero
  4075. F000:F2AA  32 C0                xor    al,al            ; Zero register
  4076. F000:F2AC  EB DC                jmp    short loc_257        ; (F28A)
  4077.   
  4078.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  4079.                 ;                   SUBROUTINE
  4080.                 ;
  4081.                 ;         Called from:     F000:F250, F253
  4082.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  4083.   
  4084.                 sub_39        proc    near
  4085. F000:F2AE  3E: 8B 03                mov    ax,ds:[bp+di]
  4086. F000:F2B1  86 C4                xchg    al,ah
  4087. F000:F2B3  32 D2                xor    dl,dl            ; Zero register
  4088. F000:F2B5  B3 01                mov    bl,1
  4089. F000:F2B7            loc_259:                    ;  xref F000:F2CA
  4090. F000:F2B7  A9 FFFF                test    ax,0FFFFh
  4091. F000:F2BA  74 10                jz    loc_262            ; Jump if zero
  4092. F000:F2BC  D1 E8                shr    ax,1            ; Shift w/zeros fill
  4093. F000:F2BE  73 02                jnc    loc_260            ; Jump if carry=0
  4094. F000:F2C0  0A D3                or    dl,bl
  4095. F000:F2C2            loc_260:                    ;  xref F000:F2BE
  4096. F000:F2C2  D1 E8                shr    ax,1            ; Shift w/zeros fill
  4097. F000:F2C4  73 02                jnc    loc_261            ; Jump if carry=0
  4098. F000:F2C6  0A D3                or    dl,bl
  4099. F000:F2C8            loc_261:                    ;  xref F000:F2C4
  4100. F000:F2C8  D0 E3                shl    bl,1            ; Shift w/zeros fill
  4101. F000:F2CA  EB EB                jmp    short loc_259        ; (F2B7)
  4102. F000:F2CC            loc_262:                    ;  xref F000:F2BA
  4103. F000:F2CC  36: 88 14                mov    ss:[si],dl
  4104. F000:F2CF  46                    inc    si
  4105. F000:F2D0  BD 2000                mov    bp,2000h
  4106. F000:F2D3  C3                    retn
  4107.                 sub_39        endp
  4108.   
  4109.   
  4110.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4111.   
  4112. F000:F2D4            loc_263:                    ;  xref F000:F099
  4113. F000:F2D4  E3 48                jcxz    loc_273            ; Jump if cx=0
  4114. F000:F2D6  8A E3                mov    ah,bl
  4115. F000:F2D8  51                    push    cx
  4116. F000:F2D9  B9 0101                mov    cx,101h
  4117. F000:F2DC  EB 06                jmp    short loc_265        ; (F2E4)
  4118.   
  4119.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4120.   
  4121. F000:F2DE            loc_264:                    ;  xref F000:F099
  4122. F000:F2DE  E3 3E                jcxz    loc_273            ; Jump if cx=0
  4123. F000:F2E0  51                    push    cx
  4124. F000:F2E1  B9 0001                mov    cx,1
  4125. F000:F2E4            loc_265:                    ;  xref F000:F2DC
  4126. F000:F2E4  5E                    pop    si
  4127. F000:F2E5  E8 04DB                call    sub_53            ; (F7C3)
  4128. F000:F2E8  75 03                jnz    loc_266            ; Jump if not zero
  4129. F000:F2EA  E9 FE5A                jmp    loc_237            ; (F147)
  4130. F000:F2ED            loc_266:                    ;  xref F000:F2E8
  4131.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 71
  4132.  
  4133. F000:F2ED  E8 005E                call    sub_41            ; (F34E)
  4134. F000:F2F0  8B FB                mov    di,bx
  4135. F000:F2F2  8A D8                mov    bl,al
  4136. F000:F2F4  E8 FDA4                call    sub_34            ; (F09B)
  4137. F000:F2F7            loc_267:                    ;  xref F000:F31C
  4138. F000:F2F7  22 E9                and    ch,cl
  4139. F000:F2F9  74 10                jz    loc_270            ; Jump if zero
  4140. F000:F2FB            loc_268:                    ;  xref F000:F2FE
  4141. F000:F2FB  EC                    in    al,dx            ; port 0, DMA-1 bas&add ch 0
  4142. F000:F2FC  22 C1                and    al,cl
  4143. F000:F2FE  75 FB                jnz    loc_268            ; Jump if not zero
  4144. F000:F300  FA                    cli                ; Disable interrupts
  4145. F000:F301            loc_269:                    ;  xref F000:F304
  4146. F000:F301  EC                    in    al,dx            ; port 0, DMA-1 bas&add ch 0
  4147. F000:F302  22 C1                and    al,cl
  4148. F000:F304  74 FB                jz    loc_269            ; Jump if zero
  4149. F000:F306  8A C3                mov    al,bl
  4150. F000:F308  AB                    stosw                ; Store ax to es:[di]
  4151. F000:F309  EB 0F                jmp    short loc_272        ; (F31A)
  4152. F000:F30B            loc_270:                    ;  xref F000:F2F9, F30E
  4153. F000:F30B  EC                    in    al,dx            ; port 0, DMA-1 bas&add ch 0
  4154. F000:F30C  22 C1                and    al,cl
  4155. F000:F30E  75 FB                jnz    loc_270            ; Jump if not zero
  4156. F000:F310  FA                    cli                ; Disable interrupts
  4157. F000:F311            loc_271:                    ;  xref F000:F314
  4158. F000:F311  EC                    in    al,dx            ; port 0, DMA-1 bas&add ch 0
  4159. F000:F312  22 C1                and    al,cl
  4160. F000:F314  74 FB                jz    loc_271            ; Jump if zero
  4161. F000:F316  8A C3                mov    al,bl
  4162. F000:F318  AA                    stosb                ; Store al to es:[di]
  4163. F000:F319  47                    inc    di
  4164. F000:F31A            loc_272:                    ;  xref F000:F309
  4165. F000:F31A  FB                    sti                ; Enable interrupts
  4166. F000:F31B  4E                    dec    si
  4167. F000:F31C  7F D9                jg    loc_267            ; Jump if >
  4168. F000:F31E            loc_273:                    ;  xref F000:F2D4, F2DE
  4169. F000:F31E  E9 0162                jmp    loc_296            ; (F483)
  4170.   
  4171.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  4172.                 ;                   SUBROUTINE
  4173.                 ;
  4174.                 ;         Called from:     F000:F16D, F233, F354, F51B, F5D4
  4175.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  4176.   
  4177.                 sub_40        proc    near
  4178. F000:F321  51                    push    cx
  4179. F000:F322  8B 0E 004E                mov    cx,video_segment    ; (0040:004E=0)
  4180. F000:F326  E8 049A                call    sub_53            ; (F7C3)
  4181. F000:F329  75 0F                jnz    loc_275            ; Jump if not zero
  4182. F000:F32B  D0 E4                shl    ah,1            ; Shift w/zeros fill
  4183. F000:F32D  80 3E 0049 06            cmp    video_mode,6        ; (0040:0049=3)
  4184. F000:F332  75 04                jne    loc_274            ; Jump if not equal
  4185. F000:F334  D0 E4                shl    ah,1            ; Shift w/zeros fill
  4186. F000:F336  EB 0A                jmp    short loc_276        ; (F342)
  4187. F000:F338            loc_274:                    ;  xref F000:F332
  4188. F000:F338  D0 E4                shl    ah,1            ; Shift w/zeros fill
  4189. F000:F33A            loc_275:                    ;  xref F000:F329
  4190.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 72
  4191.  
  4192. F000:F33A  D0 E4                shl    ah,1            ; Shift w/zeros fill
  4193. F000:F33C  D0 E0                shl    al,1            ; Shift w/zeros fill
  4194. F000:F33E  73 02                jnc    loc_276            ; Jump if carry=0
  4195. F000:F340  FE C5                inc    ch
  4196. F000:F342            loc_276:                    ;  xref F000:F336, F33E
  4197. F000:F342  8A C8                mov    cl,al
  4198. F000:F344  86 E0                xchg    ah,al
  4199. F000:F346  F6 26 004A                mul    byte ptr video_columns    ; (0040:004A=50h) ax = data * al
  4200. F000:F34A  03 C1                add    ax,cx
  4201. F000:F34C  59                    pop    cx
  4202. F000:F34D  C3                    retn
  4203.                 sub_40        endp
  4204.   
  4205.   
  4206.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  4207.                 ;                   SUBROUTINE
  4208.                 ;
  4209.                 ;         Called from:     F000:F2ED, F638
  4210.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  4211.   
  4212.                 sub_41        proc    near
  4213. F000:F34E  50                    push    ax
  4214. F000:F34F  E8 02CA                call    sub_50            ; (F61C)
  4215. F000:F352  8B 05                mov    ax,[di]
  4216. F000:F354  E8 FFCA                call    sub_40            ; (F321)
  4217. F000:F357  3A 3E 0062                cmp    bh,video_page        ; (0040:0062=0)
  4218. F000:F35B  75 04                jne    loc_277            ; Jump if not equal
  4219. F000:F35D  33 DB                xor    bx,bx            ; Zero register
  4220. F000:F35F  EB 07                jmp    short loc_278        ; (F368)
  4221. F000:F361            loc_277:                    ;  xref F000:F35B
  4222. F000:F361  2B 06 004E                sub    ax,video_segment    ; (0040:004E=0)
  4223. F000:F365  E8 0004                call    sub_42            ; (F36C)
  4224. F000:F368            loc_278:                    ;  xref F000:F35F
  4225. F000:F368  03 D8                add    bx,ax
  4226. F000:F36A  58                    pop    ax
  4227. F000:F36B  C3                    retn
  4228.                 sub_41        endp
  4229.   
  4230.   
  4231.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  4232.                 ;                   SUBROUTINE
  4233.                 ;
  4234.                 ;         Called from:     F000:F365, F5B0
  4235.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  4236.   
  4237.                 sub_42        proc    near
  4238. F000:F36C  51                    push    cx
  4239. F000:F36D  33 C9                xor    cx,cx            ; Zero register
  4240. F000:F36F  80 FF 00                cmp    bh,0
  4241. F000:F372  74 08                je    loc_280            ; Jump if equal
  4242. F000:F374            loc_279:                    ;  xref F000:F37A
  4243. F000:F374  03 0E 004C                add    cx,video_buf_siz    ; (0040:004C=10A0h)
  4244. F000:F378  FE CF                dec    bh
  4245. F000:F37A  75 F8                jnz    loc_279            ; Jump if not zero
  4246. F000:F37C            loc_280:                    ;  xref F000:F372
  4247. F000:F37C  8B D9                mov    bx,cx
  4248. F000:F37E  59                    pop    cx
  4249.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 73
  4250.  
  4251. F000:F37F  C3                    retn
  4252.                 sub_42        endp
  4253.   
  4254.   
  4255.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  4256.                 ;                   SUBROUTINE
  4257.                 ;
  4258.                 ;         Called from:     F000:F132, F13D
  4259.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  4260.   
  4261.                 sub_43        proc    near
  4262. F000:F380  8A CA                mov    cl,dl
  4263. F000:F382  53                    push    bx
  4264. F000:F383  55                    push    bp
  4265. F000:F384  BB 2000                mov    bx,2000h
  4266. F000:F387  8B EF                mov    bp,di
  4267. F000:F389  72 0D                jc    loc_282            ; Jump if carry Set
  4268. F000:F38B            loc_281:                    ;  xref F000:F396
  4269. F000:F38B  F3/ AA                rep    stosb            ; Rep when cx >0 Store al to es:[di]
  4270. F000:F38D  72 1C                jc    loc_285            ; Jump if carry Set
  4271. F000:F38F  8B FD                mov    di,bp
  4272. F000:F391  03 FB                add    di,bx
  4273. F000:F393  8A CA                mov    cl,dl
  4274. F000:F395  F9                    stc                ; Set carry flag
  4275. F000:F396  EB F3                jmp    short loc_281        ; (F38B)
  4276. F000:F398            loc_282:                    ;  xref F000:F389
  4277. F000:F398  56                    push    si
  4278. F000:F399  56                    push    si
  4279. F000:F39A            loc_283:                    ;  xref F000:F3A8
  4280. F000:F39A  F3/ A4                rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  4281. F000:F39C  73 0C                jnc    loc_284            ; Jump if carry=0
  4282. F000:F39E  5E                    pop    si
  4283. F000:F39F  8B FD                mov    di,bp
  4284. F000:F3A1  03 FB                add    di,bx
  4285. F000:F3A3  03 F3                add    si,bx
  4286. F000:F3A5  8A CA                mov    cl,dl
  4287. F000:F3A7  F8                    clc                ; Clear carry flag
  4288. F000:F3A8  EB F0                jmp    short loc_283        ; (F39A)
  4289. F000:F3AA            loc_284:                    ;  xref F000:F39C
  4290. F000:F3AA  5E                    pop    si
  4291. F000:F3AB            loc_285:                    ;  xref F000:F38D
  4292. F000:F3AB  8B FD                mov    di,bp
  4293. F000:F3AD  5D                    pop    bp
  4294. F000:F3AE  5B                    pop    bx
  4295. F000:F3AF  03 FD                add    di,bp
  4296. F000:F3B1  C3                    retn
  4297.                 sub_43        endp
  4298.   
  4299.   
  4300.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4301.   
  4302. F000:F3B2            loc_286:                    ;  xref F000:F099
  4303. F000:F3B2  BF 0067                mov    di,67h
  4304. F000:F3B5  B9 001E                mov    cx,1Eh
  4305.   
  4306. F000:F3B8            locloop_287:                    ;  xref F000:F3BC
  4307. F000:F3B8  4F                    dec    di
  4308.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 74
  4309.  
  4310. F000:F3B9  C6 05 00                mov    byte ptr [di],0
  4311. F000:F3BC  E2 FA                loop    locloop_287        ; Loop if cx > 0
  4312.   
  4313. F000:F3BE  C7 45 17 0607            mov    word ptr [di+17h],607h
  4314. F000:F3C3  8B 16 0010                mov    dx,equip_bits        ; (0040:0010=526Fh)
  4315. F000:F3C7  80 E2 30                and    dl,30h            ; '0'
  4316. F000:F3CA  80 FA 30                cmp    dl,30h            ; '0'
  4317. F000:F3CD  BA 03D4                mov    dx,3D4h
  4318. F000:F3D0  75 08                jnz    loc_288            ; Jump if not zero
  4319. F000:F3D2  80 EA 20                sub    dl,20h            ; ' '
  4320. F000:F3D5  B8 0107                mov    ax,107h
  4321. F000:F3D8  EB 09                jmp    short loc_289        ; (F3E3)
  4322. F000:F3DA            loc_288:                    ;  xref F000:F3D0
  4323. F000:F3DA  32 E4                xor    ah,ah            ; Zero register
  4324. F000:F3DC  3C 06                cmp    al,6
  4325. F000:F3DE  76 03                jbe    loc_289            ; Jump if below or =
  4326. F000:F3E0  E9 00A0                jmp    loc_296            ; (F483)
  4327. F000:F3E3            loc_289:                    ;  xref F000:F3D8, F3DE
  4328. F000:F3E3  89 55 1A                mov    [di+1Ah],dx
  4329. F000:F3E6  88 05                mov    [di],al
  4330. F000:F3E8  86 E0                xchg    ah,al
  4331. F000:F3EA  52                    push    dx
  4332. F000:F3EB  83 C2 04                add    dx,4
  4333. F000:F3EE  EE                    out    dx,al            ; port 3B8h, MDA video control
  4334. F000:F3EF  BA 0028                mov    dx,28h
  4335. F000:F3F2  A0 0049                mov    al,video_mode        ; (0040:0049=3)
  4336. F000:F3F5  3C 01                cmp    al,1
  4337. F000:F3F7  76 0B                jbe    loc_291            ; Jump if below or =
  4338. F000:F3F9  3C 03                cmp    al,3
  4339. F000:F3FB  76 04                jbe    loc_290            ; Jump if below or =
  4340. F000:F3FD  3C 05                cmp    al,5
  4341. F000:F3FF  76 03                jbe    loc_291            ; Jump if below or =
  4342. F000:F401            loc_290:                    ;  xref F000:F3FB
  4343. F000:F401  80 C2 28                add    dl,28h            ; '('
  4344. F000:F404            loc_291:                    ;  xref F000:F3F7, F3FF
  4345. F000:F404  89 55 01                mov    [di+1],dx
  4346. F000:F407  33 DB                xor    bx,bx            ; Zero register
  4347. F000:F409  B9 2000                mov    cx,2000h
  4348. F000:F40C  BE 0720                mov    si,720h
  4349. F000:F40F  BA 0800                mov    dx,800h
  4350. F000:F412  3C 01                cmp    al,1
  4351. F000:F414  76 20                jbe    loc_292            ; Jump if below or =
  4352. F000:F416  83 C3 10                add    bx,10h
  4353. F000:F419  D1 E2                shl    dx,1            ; Shift w/zeros fill
  4354. F000:F41B  3C 03                cmp    al,3
  4355. F000:F41D  76 17                jbe    loc_292            ; Jump if below or =
  4356. F000:F41F  83 C3 10                add    bx,10h
  4357. F000:F422  D1 E2                shl    dx,1            ; Shift w/zeros fill
  4358. F000:F424  D1 E2                shl    dx,1            ; Shift w/zeros fill
  4359. F000:F426  33 F6                xor    si,si            ; Zero register
  4360. F000:F428  3C 06                cmp    al,6
  4361. F000:F42A  76 0A                jbe    loc_292            ; Jump if below or =
  4362. F000:F42C  83 C3 10                add    bx,10h
  4363. F000:F42F  81 E9 1800                sub    cx,1800h
  4364. F000:F433  BE 0720                mov    si,720h
  4365. F000:F436            loc_292:                    ;  xref F000:F414, F41D, F42A
  4366. F000:F436  89 55 03                mov    [di+3],dx
  4367.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 75
  4368.  
  4369. F000:F439  5A                    pop    dx
  4370. F000:F43A  1E                    push    ds
  4371. F000:F43B  33 ED                xor    bp,bp            ; Zero register
  4372. F000:F43D  55                    push    bp
  4373. F000:F43E  1F                    pop    ds
  4374.   
  4375. F000:F43F            locloop_293:                    ;  xref F000:F446
  4376. F000:F43F  26: 89 76 00                mov    es:[bp],si
  4377. F000:F443  83 C5 02                add    bp,2
  4378. F000:F446  E2 F7                loop    locloop_293        ; Loop if cx > 0
  4379.   
  4380. F000:F448  C5 2E 0074                lds    bp,dword ptr ds:video_hdw_off    ; (0000:0074=0F0A4h) Load 32 bit ptr
  4381. F000:F44C  03 EB                add    bp,bx
  4382. F000:F44E  B9 0010                mov    cx,10h
  4383. F000:F451  32 C0                xor    al,al            ; Zero register
  4384.   
  4385. F000:F453            locloop_294:                    ;  xref F000:F45D
  4386. F000:F453  3E: 8A 5E 00                mov    bl,ds:[bp]
  4387. F000:F457  E8 FBDE                call    sub_33            ; (F038)
  4388. F000:F45A  45                    inc    bp
  4389. F000:F45B  FE C0                inc    al
  4390. F000:F45D  E2 F4                loop    locloop_294        ; Loop if cx > 0
  4391.   
  4392. F000:F45F  1F                    pop    ds
  4393. F000:F460  86 E0                xchg    ah,al
  4394. F000:F462  32 E4                xor    ah,ah            ; Zero register
  4395. F000:F464  83 C2 04                add    dx,4
  4396. F000:F467  BE F0E4                mov    si,0F0E4h
  4397. F000:F46A  03 F0                add    si,ax
  4398. F000:F46C  2E: 8A 04                mov    al,cs:[si]
  4399. F000:F46F  EE                    out    dx,al            ; port 3B8h, MDA video control
  4400. F000:F470  88 45 1C                mov    [di+1Ch],al
  4401. F000:F473  42                    inc    dx
  4402. F000:F474  B0 1F                mov    al,1Fh
  4403. F000:F476  80 3E 0049 06            cmp    video_mode,6        ; (0040:0049=3)
  4404. F000:F47B  74 02                je    loc_295            ; Jump if equal
  4405. F000:F47D  04 11                add    al,11h
  4406. F000:F47F            loc_295:                    ;  xref F000:F47B
  4407. F000:F47F  EE                    out    dx,al            ; port 3B9h, CGA color(port3D9)
  4408. F000:F480  88 45 1D                mov    [di+1Dh],al
  4409. F000:F483            loc_296:                    ;  xref F000:F144, F1B8, F1E3, F28D
  4410.                                         ;            F31E, F3E0, F4C3, F506
  4411.                                         ;            F570, F5C3, F5D1, F608
  4412.                                         ;            F635, F6A4, F6C5, F79D
  4413.                                         ;            FFDB
  4414. F000:F483  E8 FBA2                call    sub_32            ; (F028)
  4415. F000:F486  CF                    iret                ; Interrupt return
  4416.   
  4417.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4418.   
  4419. F000:F487            loc_297:                    ;  xref F000:F099
  4420. F000:F487  8A 3E 0062                mov    bh,video_page        ; (0040:0062=0)
  4421. F000:F48B  8B E8                mov    bp,ax
  4422. F000:F48D  E8 018C                call    sub_50            ; (F61C)
  4423. F000:F490  8B 15                mov    dx,[di]
  4424. F000:F492  8A 0E 004A                mov    cl,byte ptr video_columns    ; (0040:004A=50h)
  4425. F000:F496  B5 18                mov    ch,18h
  4426.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 76
  4427.  
  4428. F000:F498  8B F1                mov    si,cx
  4429. F000:F49A  B4 0A                mov    ah,0Ah
  4430. F000:F49C  3C 0D                cmp    al,0Dh
  4431. F000:F49E  75 04                jne    loc_298            ; Jump if not equal
  4432. F000:F4A0  32 D2                xor    dl,dl            ; Zero register
  4433. F000:F4A2  EB 1A                jmp    short loc_301        ; (F4BE)
  4434. F000:F4A4            loc_298:                    ;  xref F000:F49E
  4435. F000:F4A4  3C 0A                cmp    al,0Ah
  4436. F000:F4A6  75 08                jne    loc_300            ; Jump if not equal
  4437. F000:F4A8            loc_299:                    ;  xref F000:F4DF
  4438. F000:F4A8  3A F5                cmp    dh,ch
  4439. F000:F4AA  74 35                je    loc_305            ; Jump if equal
  4440. F000:F4AC  FE C6                inc    dh
  4441. F000:F4AE  EB 0E                jmp    short loc_301        ; (F4BE)
  4442. F000:F4B0            loc_300:                    ;  xref F000:F4A6
  4443. F000:F4B0  B9 0002                mov    cx,2
  4444. F000:F4B3  3C 08                cmp    al,8
  4445. F000:F4B5  75 0E                jne    loc_303            ; Jump if not equal
  4446. F000:F4B7  F6 C2 FF                test    dl,0FFh
  4447. F000:F4BA  74 02                jz    loc_301            ; Jump if zero
  4448. F000:F4BC  FE CA                dec    dl
  4449. F000:F4BE            loc_301:                    ;  xref F000:F4A2, F4AE, F4BA, F4DB
  4450. F000:F4BE  E8 014A                call    sub_49            ; (F60B)
  4451. F000:F4C1            loc_302:                    ;  xref F000:F4D0, F4FC
  4452. F000:F4C1  8B C5                mov    ax,bp
  4453. F000:F4C3  EB BE                jmp    short loc_296        ; (F483)
  4454. F000:F4C5            loc_303:                    ;  xref F000:F4B5
  4455. F000:F4C5  3C 07                cmp    al,7
  4456. F000:F4C7  75 09                jne    loc_304            ; Jump if not equal
  4457. F000:F4C9  33 C9                xor    cx,cx            ; Zero register
  4458. F000:F4CB  B3 03                mov    bl,3
  4459. F000:F4CD  E8 F0D2                call    sub_8            ; (E5A2)
  4460. F000:F4D0  EB EF                jmp    short loc_302        ; (F4C1)
  4461. F000:F4D2            loc_304:                    ;  xref F000:F4C7
  4462. F000:F4D2  49                    dec    cx
  4463. F000:F4D3  CD 10                int    10h            ; Video display   ah=functn 00h
  4464.                                         ;  set display mode in al
  4465. F000:F4D5  8B CE                mov    cx,si
  4466. F000:F4D7  FE C2                inc    dl
  4467. F000:F4D9  3A D1                cmp    dl,cl
  4468. F000:F4DB  75 E1                jne    loc_301            ; Jump if not equal
  4469. F000:F4DD  32 D2                xor    dl,dl            ; Zero register
  4470. F000:F4DF  EB C7                jmp    short loc_299        ; (F4A8)
  4471. F000:F4E1            loc_305:                    ;  xref F000:F4AA
  4472. F000:F4E1  E8 0127                call    sub_49            ; (F60B)
  4473. F000:F4E4  32 FF                xor    bh,bh            ; Zero register
  4474. F000:F4E6  E8 02DA                call    sub_53            ; (F7C3)
  4475. F000:F4E9  74 07                jz    loc_306            ; Jump if zero
  4476. F000:F4EB  1E                    push    ds
  4477. F000:F4EC  E8 0149                call    sub_51            ; (F638)
  4478. F000:F4EF  1F                    pop    ds
  4479. F000:F4F0  8A FC                mov    bh,ah
  4480. F000:F4F2            loc_306:                    ;  xref F000:F4E9
  4481. F000:F4F2  4E                    dec    si
  4482. F000:F4F3  B8 0601                mov    ax,601h
  4483. F000:F4F6  8B D6                mov    dx,si
  4484. F000:F4F8  33 C9                xor    cx,cx            ; Zero register
  4485.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 77
  4486.  
  4487. F000:F4FA  CD 10                int    10h            ; Video display   ah=functn 06h
  4488.                                         ;  scroll up, al=lines
  4489. F000:F4FC  EB C3                jmp    short loc_302        ; (F4C1)
  4490.   
  4491.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4492.   
  4493. F000:F4FE            loc_307:                    ;  xref F000:F099
  4494. F000:F4FE  F9                    stc                ; Set carry flag
  4495. F000:F4FF  50                    push    ax
  4496. F000:F500  8B C1                mov    ax,cx
  4497. F000:F502  EB 0A                jmp    short loc_310        ; (F50E)
  4498. F000:F504            loc_308:                    ;  xref F000:F511, F515
  4499. F000:F504  9D                    popf                ; Pop flags
  4500. F000:F505  58                    pop    ax
  4501. F000:F506  E9 FF7A                jmp    loc_296            ; (F483)
  4502.   
  4503.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4504.   
  4505. F000:F509            loc_309:                    ;  xref F000:F099
  4506. F000:F509  FD                    std                ; Set direction flag
  4507. F000:F50A  F8                    clc                ; Clear carry flag
  4508. F000:F50B  50                    push    ax
  4509. F000:F50C  8B C2                mov    ax,dx
  4510. F000:F50E            loc_310:                    ;  xref F000:F502
  4511. F000:F50E  9C                    pushf                ; Push flags
  4512. F000:F50F  2A F5                sub    dh,ch
  4513. F000:F511  7C F1                jl    loc_308            ; Jump if <
  4514. F000:F513  2A D1                sub    dl,cl
  4515. F000:F515  72 ED                jc    loc_308            ; Jump if carry Set
  4516. F000:F517  81 C2 0101                add    dx,101h
  4517. F000:F51B  E8 FE03                call    sub_40            ; (F321)
  4518. F000:F51E  50                    push    ax
  4519. F000:F51F  5F                    pop    di
  4520. F000:F520  E8 02A0                call    sub_53            ; (F7C3)
  4521. F000:F523  75 03                jnz    loc_311            ; Jump if not zero
  4522. F000:F525  E9 FBC4                jmp    loc_230            ; (F0EC)
  4523. F000:F528            loc_311:                    ;  xref F000:F523
  4524. F000:F528  50                    push    ax
  4525. F000:F529  5E                    pop    si
  4526. F000:F52A  9D                    popf                ; Pop flags
  4527. F000:F52B  58                    pop    ax
  4528. F000:F52C  B3 20                mov    bl,20h            ; ' '
  4529. F000:F52E  8B EB                mov    bp,bx
  4530. F000:F530  50                    push    ax
  4531. F000:F531  9C                    pushf                ; Push flags
  4532. F000:F532  D0 E0                shl    al,1            ; Shift w/zeros fill
  4533. F000:F534  8B 1E 004A                mov    bx,video_columns    ; (0040:004A=50h)
  4534. F000:F538  F6 E3                mul    bl            ; ax = reg * al
  4535. F000:F53A  D1 E3                shl    bx,1            ; Shift w/zeros fill
  4536. F000:F53C  9D                    popf                ; Pop flags
  4537. F000:F53D  72 04                jc    loc_312            ; Jump if carry Set
  4538. F000:F53F  F7 D8                neg    ax
  4539. F000:F541  F7 DB                neg    bx
  4540. F000:F543            loc_312:                    ;  xref F000:F53D
  4541. F000:F543  03 F0                add    si,ax
  4542. F000:F545  E8 0049                call    sub_46            ; (F591)
  4543. F000:F548  58                    pop    ax
  4544.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 78
  4545.  
  4546. F000:F549  1E                    push    ds
  4547. F000:F54A  06                    push    es
  4548. F000:F54B  1F                    pop    ds
  4549. F000:F54C  2A ED                sub    ch,ch
  4550. F000:F54E  A8 FF                test    al,0FFh
  4551. F000:F550  74 10                jz    loc_314            ; Jump if zero
  4552. F000:F552  2A F0                sub    dh,al
  4553. F000:F554  86 C6                xchg    al,dh
  4554. F000:F556  74 0A                jz    loc_314            ; Jump if zero
  4555. F000:F558            loc_313:                    ;  xref F000:F560
  4556. F000:F558  F9                    stc                ; Set carry flag
  4557. F000:F559  E8 0017                call    sub_44            ; (F573)
  4558. F000:F55C  03 F3                add    si,bx
  4559. F000:F55E  FE C8                dec    al
  4560. F000:F560  7F F6                jg    loc_313            ; Jump if >
  4561. F000:F562            loc_314:                    ;  xref F000:F550, F556
  4562. F000:F562  8B C5                mov    ax,bp
  4563. F000:F564            loc_315:                    ;  xref F000:F56A
  4564. F000:F564  F8                    clc                ; Clear carry flag
  4565. F000:F565  E8 000B                call    sub_44            ; (F573)
  4566. F000:F568  FE CE                dec    dh
  4567. F000:F56A  7F F8                jg    loc_315            ; Jump if >
  4568. F000:F56C  1F                    pop    ds
  4569. F000:F56D  E8 0014                call    sub_45            ; (F584)
  4570. F000:F570  E9 FF10                jmp    loc_296            ; (F483)
  4571.   
  4572.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  4573.                 ;                   SUBROUTINE
  4574.                 ;
  4575.                 ;         Called from:     F000:F559, F565
  4576.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  4577.   
  4578.                 sub_44        proc    near
  4579. F000:F573  8A CA                mov    cl,dl
  4580. F000:F575  57                    push    di
  4581. F000:F576  56                    push    si
  4582. F000:F577  72 04                jc    loc_316            ; Jump if carry Set
  4583. F000:F579  F3/ AB                rep    stosw            ; Rep when cx >0 Store ax to es:[di]
  4584. F000:F57B  EB 02                jmp    short loc_317        ; (F57F)
  4585. F000:F57D            loc_316:                    ;  xref F000:F577
  4586. F000:F57D  F3/ A5                rep    movsw            ; Rep when cx >0 Mov [si] to es:[di]
  4587. F000:F57F            loc_317:                    ;  xref F000:F57B
  4588. F000:F57F  5E                    pop    si
  4589. F000:F580  5F                    pop    di
  4590. F000:F581  03 FB                add    di,bx
  4591. F000:F583  C3                    retn
  4592.                 sub_44        endp
  4593.   
  4594.   
  4595.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  4596.                 ;                   SUBROUTINE
  4597.                 ;
  4598.                 ;         Called from:     F000:EC04, F56D
  4599.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  4600.   
  4601.                 sub_45        proc    near
  4602. F000:F584  E8 022F                call    sub_52            ; (F7B6)
  4603.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 79
  4604.  
  4605. F000:F587  75 07                jnz    loc_ret_318        ; Jump if not zero
  4606. F000:F589  A0 0065                mov    al,video_mode_reg    ; (0040:0065=29h)
  4607. F000:F58C  BA 03D8                mov    dx,3D8h
  4608. F000:F58F  EE                    out    dx,al            ; port 3D8h, CGA video control
  4609.   
  4610. F000:F590            loc_ret_318:                    ;  xref F000:F587
  4611. F000:F590  C3                    retn
  4612.                 sub_45        endp
  4613.   
  4614.   
  4615.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  4616.                 ;                   SUBROUTINE
  4617.                 ;
  4618.                 ;         Called from:     F000:F545
  4619.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  4620.   
  4621.                 sub_46        proc    near
  4622. F000:F591  E8 0222                call    sub_52            ; (F7B6)
  4623. F000:F594  75 10                jnz    loc_ret_320        ; Jump if not zero
  4624. F000:F596  52                    push    dx
  4625. F000:F597  BA 03DA                mov    dx,3DAh
  4626. F000:F59A            loc_319:                    ;  xref F000:F59D
  4627. F000:F59A  EC                    in    al,dx            ; port 3DAh, CGA/EGA vid status
  4628. F000:F59B  24 08                and    al,8
  4629. F000:F59D  74 FB                jz    loc_319            ; Jump if zero
  4630. F000:F59F  80 EA 02                sub    dl,2
  4631. F000:F5A2  B0 21                mov    al,21h            ; '!'
  4632. F000:F5A4  EE                    out    dx,al            ; port 3D8h, CGA video control
  4633. F000:F5A5  5A                    pop    dx
  4634.   
  4635. F000:F5A6            loc_ret_320:                    ;  xref F000:F594
  4636. F000:F5A6  C3                    retn
  4637.                 sub_46        endp
  4638.   
  4639.   
  4640.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4641.   
  4642. F000:F5A7            loc_321:                    ;  xref F000:F099
  4643. F000:F5A7  8A F8                mov    bh,al
  4644. F000:F5A9  E8 0070                call    sub_50            ; (F61C)
  4645. F000:F5AC  88 3E 0062                mov    video_page,bh        ; (0040:0062=0)
  4646. F000:F5B0  E8 FDB9                call    sub_42            ; (F36C)
  4647. F000:F5B3  89 1E 004E                mov    video_segment,bx    ; (0040:004E=0)
  4648. F000:F5B7  D1 EB                shr    bx,1            ; Shift w/zeros fill
  4649. F000:F5B9  B0 0C                mov    al,0Ch
  4650. F000:F5BB  E8 001F                call    sub_48            ; (F5DD)
  4651. F000:F5BE  8B 05                mov    ax,[di]
  4652. F000:F5C0  E8 0011                call    sub_47            ; (F5D4)
  4653. F000:F5C3  E9 FEBD                jmp    loc_296            ; (F483)
  4654.   
  4655.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4656.   
  4657. F000:F5C6            loc_322:                    ;  xref F000:F099
  4658. F000:F5C6  8B D9                mov    bx,cx
  4659. F000:F5C8  89 1E 0060                mov    vid_curs_mode,bx    ; (0040:0060=2000h)
  4660. F000:F5CC  B0 0A                mov    al,0Ah
  4661. F000:F5CE  E8 000C                call    sub_48            ; (F5DD)
  4662.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 80
  4663.  
  4664. F000:F5D1  E9 FEAF                jmp    loc_296            ; (F483)
  4665.   
  4666.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  4667.                 ;                   SUBROUTINE
  4668.                 ;
  4669.                 ;         Called from:     F000:F5C0, F618
  4670.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  4671.   
  4672.                 sub_47        proc    near
  4673. F000:F5D4  E8 FD4A                call    sub_40            ; (F321)
  4674. F000:F5D7  8B D8                mov    bx,ax
  4675. F000:F5D9  D1 FB                sar    bx,1            ; Shift w/sign fill
  4676. F000:F5DB  B0 0E                mov    al,0Eh
  4677.   
  4678.                 ;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  4679.                 ;
  4680.                 ;         Called from:     F000:F5BB, F5CE
  4681.   
  4682.                 sub_48:
  4683. F000:F5DD  52                    push    dx
  4684. F000:F5DE  8B 16 0063                mov    dx,@video_port        ; (0040:0063=3D4h)
  4685. F000:F5E2  86 FB                xchg    bh,bl
  4686. F000:F5E4  E8 FA51                call    sub_33            ; (F038)
  4687. F000:F5E7  FE C0                inc    al
  4688. F000:F5E9  86 FB                xchg    bh,bl
  4689. F000:F5EB  E8 FA4A                call    sub_33            ; (F038)
  4690. F000:F5EE  5A                    pop    dx
  4691. F000:F5EF  C3                    retn
  4692.                 sub_47        endp
  4693.   
  4694.   
  4695.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4696.   
  4697. F000:F5F0            loc_323:                    ;  xref F000:F099
  4698. F000:F5F0  E8 0029                call    sub_50            ; (F61C)
  4699. F000:F5F3  8B 05                mov    ax,[di]
  4700. F000:F5F5  8B 0E 0060                mov    cx,vid_curs_mode    ; (0040:0060=2000h)
  4701. F000:F5F9  8B FC                mov    di,sp
  4702. F000:F5FB  36: 89 4D 0C                mov    ss:[di+0Ch],cx
  4703. F000:F5FF  E8 FA26                call    sub_32            ; (F028)
  4704. F000:F602  8B D0                mov    dx,ax
  4705. F000:F604  CF                    iret                ; Interrupt return
  4706.   
  4707.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4708.   
  4709. F000:F605            loc_324:                    ;  xref F000:F099
  4710. F000:F605  E8 0003                call    sub_49            ; (F60B)
  4711. F000:F608  E9 FE78                jmp    loc_296            ; (F483)
  4712.   
  4713.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  4714.                 ;                   SUBROUTINE
  4715.                 ;
  4716.                 ;         Called from:     F000:F4BE, F4E1, F605
  4717.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  4718.   
  4719.                 sub_49        proc    near
  4720. F000:F60B  E8 000E                call    sub_50            ; (F61C)
  4721.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 81
  4722.  
  4723. F000:F60E  89 15                mov    [di],dx
  4724. F000:F610  38 3E 0062                cmp    video_page,bh        ; (0040:0062=0)
  4725. F000:F614  75 05                jne    loc_ret_325        ; Jump if not equal
  4726. F000:F616  8B C2                mov    ax,dx
  4727. F000:F618  E8 FFB9                call    sub_47            ; (F5D4)
  4728.   
  4729. F000:F61B            loc_ret_325:                    ;  xref F000:F614
  4730. F000:F61B  C3                    retn
  4731.                 sub_49        endp
  4732.   
  4733.   
  4734.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  4735.                 ;                   SUBROUTINE
  4736.                 ;
  4737.                 ;         Called from:     F000:F34F, F48D, F5A9, F5F0, F60B, FF84
  4738.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  4739.   
  4740.                 sub_50        proc    near
  4741. F000:F61C  53                    push    bx
  4742. F000:F61D  86 FB                xchg    bh,bl
  4743. F000:F61F  32 FF                xor    bh,bh            ; Zero register
  4744. F000:F621  D1 E3                shl    bx,1            ; Shift w/zeros fill
  4745. F000:F623  BF 0050                mov    di,seg seg_c
  4746. F000:F626  03 FB                add    di,bx
  4747. F000:F628  5B                    pop    bx
  4748. F000:F629  C3                    retn
  4749.                 sub_50        endp
  4750.   
  4751.   
  4752.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4753.   
  4754. F000:F62A            loc_326:                    ;  xref F000:F099
  4755. F000:F62A  E8 0196                call    sub_53            ; (F7C3)
  4756. F000:F62D  75 03                jnz    loc_327            ; Jump if not zero
  4757. F000:F62F  E9 FBFE                jmp    loc_251            ; (F230)
  4758. F000:F632            loc_327:                    ;  xref F000:F62D
  4759. F000:F632  E8 0003                call    sub_51            ; (F638)
  4760. F000:F635  E9 FE4B                jmp    loc_296            ; (F483)
  4761.   
  4762.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  4763.                 ;                   SUBROUTINE
  4764.                 ;
  4765.                 ;         Called from:     F000:F4EC, F632
  4766.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  4767.   
  4768.                 sub_51        proc    near
  4769. F000:F638  E8 FD13                call    sub_41            ; (F34E)
  4770. F000:F63B  E8 FA5D                call    sub_34            ; (F09B)
  4771. F000:F63E  06                    push    es
  4772. F000:F63F  1F                    pop    ds
  4773. F000:F640  B1 01                mov    cl,1
  4774. F000:F642  FA                    cli                ; Disable interrupts
  4775. F000:F643            loc_328:                    ;  xref F000:F646
  4776. F000:F643  EC                    in    al,dx            ; port 300h
  4777. F000:F644  22 C1                and    al,cl
  4778. F000:F646  75 FB                jnz    loc_328            ; Jump if not zero
  4779. F000:F648            loc_329:                    ;  xref F000:F64B
  4780.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 82
  4781.  
  4782. F000:F648  EC                    in    al,dx            ; port 300h
  4783. F000:F649  22 C1                and    al,cl
  4784. F000:F64B  74 FB                jz    loc_329            ; Jump if zero
  4785. F000:F64D  8B 07                mov    ax,[bx]
  4786. F000:F64F  FB                    sti                ; Enable interrupts
  4787. F000:F650  C3                    retn
  4788.                 sub_51        endp
  4789.   
  4790.   
  4791.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4792.   
  4793. F000:F651            loc_330:                    ;  xref F000:F099
  4794. F000:F651  F9                    stc                ; Set carry flag
  4795. F000:F652  EB 01                jmp    short loc_332        ; (F655)
  4796.   
  4797.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4798.   
  4799. F000:F654            loc_331:                    ;  xref F000:F099
  4800. F000:F654  F8                    clc                ; Clear carry flag
  4801. F000:F655            loc_332:                    ;  xref F000:F652
  4802. F000:F655  9C                    pushf                ; Push flags
  4803. F000:F656  8B E8                mov    bp,ax
  4804. F000:F658  8A C2                mov    al,dl
  4805. F000:F65A  D0 E8                shr    al,1            ; Shift w/zeros fill
  4806. F000:F65C  B4 50                mov    ah,50h            ; 'P'
  4807. F000:F65E  F6 E4                mul    ah            ; ax = reg * al
  4808. F000:F660  8B F8                mov    di,ax
  4809. F000:F662  D0 CA                ror    dl,1            ; Rotate
  4810. F000:F664  73 04                jnc    loc_333            ; Jump if carry=0
  4811. F000:F666  81 C7 2000                add    di,2000h
  4812. F000:F66A            loc_333:                    ;  xref F000:F664
  4813. F000:F66A  8B D1                mov    dx,cx
  4814. F000:F66C  BB 0302                mov    bx,302h
  4815. F000:F66F  80 E1 07                and    cl,7
  4816. F000:F672  D1 EA                shr    dx,1            ; Shift w/zeros fill
  4817. F000:F674  D1 EA                shr    dx,1            ; Shift w/zeros fill
  4818. F000:F676  80 3E 0049 06            cmp    video_mode,6        ; (0040:0049=3)
  4819. F000:F67B  75 08                jne    loc_334            ; Jump if not equal
  4820. F000:F67D  D1 EA                shr    dx,1            ; Shift w/zeros fill
  4821. F000:F67F  81 EB 0201                sub    bx,201h
  4822. F000:F683  EB 03                jmp    short loc_335        ; (F688)
  4823. F000:F685            loc_334:                    ;  xref F000:F67B
  4824. F000:F685  80 E1 F3                and    cl,0F3h
  4825. F000:F688            loc_335:                    ;  xref F000:F683
  4826. F000:F688  03 FA                add    di,dx
  4827. F000:F68A  80 3E 0049 06            cmp    video_mode,6        ; (0040:0049=3)
  4828. F000:F68F  74 04                je    loc_336            ; Jump if equal
  4829. F000:F691  D0 E1                shl    cl,1            ; Shift w/zeros fill
  4830. F000:F693  FE C1                inc    cl
  4831. F000:F695            loc_336:                    ;  xref F000:F68F
  4832. F000:F695  80 F1 07                xor    cl,7
  4833. F000:F698  D2 E7                shl    bh,cl            ; Shift w/zeros fill
  4834. F000:F69A  9D                    popf                ; Pop flags
  4835. F000:F69B  73 0A                jnc    loc_337            ; Jump if carry=0
  4836. F000:F69D  26: 8A 05                mov    al,es:[di]
  4837. F000:F6A0  22 C7                and    al,bh
  4838. F000:F6A2  D2 E8                shr    al,cl            ; Shift w/zeros fill
  4839.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 83
  4840.  
  4841. F000:F6A4  E9 FDDC                jmp    loc_296            ; (F483)
  4842. F000:F6A7            loc_337:                    ;  xref F000:F69B
  4843. F000:F6A7  8B C5                mov    ax,bp
  4844. F000:F6A9  D2 E0                shl    al,cl            ; Shift w/zeros fill
  4845. F000:F6AB  22 C7                and    al,bh
  4846. F000:F6AD  8A C8                mov    cl,al
  4847. F000:F6AF  26: 8A 1D                mov    bl,es:[di]
  4848. F000:F6B2  8B C5                mov    ax,bp
  4849. F000:F6B4  A8 80                test    al,80h
  4850. F000:F6B6  74 04                jz    loc_338            ; Jump if zero
  4851. F000:F6B8  32 CB                xor    cl,bl
  4852. F000:F6BA  EB 06                jmp    short loc_339        ; (F6C2)
  4853. F000:F6BC            loc_338:                    ;  xref F000:F6B6
  4854. F000:F6BC  F6 D7                not    bh
  4855. F000:F6BE  22 DF                and    bl,bh
  4856. F000:F6C0  0A CB                or    cl,bl
  4857. F000:F6C2            loc_339:                    ;  xref F000:F6BA
  4858. F000:F6C2  26: 88 0D                mov    es:[di],cl
  4859. F000:F6C5  E9 FDBB                jmp    loc_296            ; (F483)
  4860.   
  4861.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4862.   
  4863. F000:F6C8            loc_340:                    ;  xref F000:F099
  4864. F000:F6C8  BA 03DA                mov    dx,3DAh
  4865. F000:F6CB  8B F2                mov    si,dx
  4866. F000:F6CD  32 E4                xor    ah,ah            ; Zero register
  4867. F000:F6CF  EC                    in    al,dx            ; port 3DAh, CGA/EGA vid status
  4868. F000:F6D0  24 06                and    al,6
  4869. F000:F6D2  75 03                jnz    loc_341            ; Jump if not zero
  4870. F000:F6D4  E9 008C                jmp    loc_350            ; (F763)
  4871. F000:F6D7            loc_341:                    ;  xref F000:F6D2
  4872. F000:F6D7  3C 02                cmp    al,2
  4873. F000:F6D9  74 03                je    loc_342            ; Jump if equal
  4874. F000:F6DB  E9 007F                jmp    loc_349            ; (F75D)
  4875. F000:F6DE            loc_342:                    ;  xref F000:F6D9
  4876. F000:F6DE  B9 1011                mov    cx,1011h
  4877. F000:F6E1  B3 D5                mov    bl,0D5h
  4878. F000:F6E3  83 EA 06                sub    dx,6
  4879. F000:F6E6  8A C5                mov    al,ch
  4880. F000:F6E8  EE                    out    dx,al            ; port 3D4h, CGA/EGA reg index
  4881.                                         ;  al = 10h, light pen high
  4882. F000:F6E9  86 D3                xchg    dl,bl
  4883. F000:F6EB  EC                    in    al,dx            ; port 3D5h, CGA/EGA indxd data
  4884. F000:F6EC  8A F8                mov    bh,al
  4885. F000:F6EE  86 D3                xchg    dl,bl
  4886. F000:F6F0  8A C1                mov    al,cl
  4887. F000:F6F2  EE                    out    dx,al            ; port 3D4h, CGA/EGA reg index
  4888.                                         ;  al = 11h, light pen low
  4889. F000:F6F3  86 D3                xchg    dl,bl
  4890. F000:F6F5  EC                    in    al,dx            ; port 3D5h, CGA/EGA indxd data
  4891. F000:F6F6  8A D8                mov    bl,al
  4892. F000:F6F8  8B 16 004E                mov    dx,video_segment    ; (0040:004E=0)
  4893. F000:F6FC  D1 EA                shr    dx,1            ; Shift w/zeros fill
  4894. F000:F6FE  83 C2 04                add    dx,4
  4895. F000:F701  E8 00BF                call    sub_53            ; (F7C3)
  4896. F000:F704  74 0A                jz    loc_343            ; Jump if zero
  4897. F000:F706  80 3E 0049 01            cmp    video_mode,1        ; (0040:0049=3)
  4898.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 84
  4899.  
  4900. F000:F70B  76 03                jbe    loc_343            ; Jump if below or =
  4901. F000:F70D  83 C2 02                add    dx,2
  4902. F000:F710            loc_343:                    ;  xref F000:F704, F70B
  4903. F000:F710  2B DA                sub    bx,dx
  4904. F000:F712  79 02                jns    loc_344            ; Jump if not sign
  4905. F000:F714  33 DB                xor    bx,bx            ; Zero register
  4906. F000:F716            loc_344:                    ;  xref F000:F712
  4907. F000:F716  B9 2803                mov    cx,2803h
  4908. F000:F719  93                    xchg    ax,bx
  4909. F000:F71A  F6 F5                div    ch            ; al, ah rem = ax/reg
  4910. F000:F71C  8A E8                mov    ch,al
  4911. F000:F71E  02 ED                add    ch,ch
  4912. F000:F720  E8 00A0                call    sub_53            ; (F7C3)
  4913. F000:F723  75 1D                jnz    loc_346            ; Jump if not zero
  4914. F000:F725  8A D4                mov    dl,ah
  4915. F000:F727  8A F0                mov    dh,al
  4916. F000:F729  86 C4                xchg    al,ah
  4917. F000:F72B  32 E4                xor    ah,ah            ; Zero register
  4918. F000:F72D  D3 E0                shl    ax,cl            ; Shift w/zeros fill
  4919. F000:F72F  FE C9                dec    cl
  4920. F000:F731  D2 EE                shr    dh,cl            ; Shift w/zeros fill
  4921. F000:F733  80 3E 0049 06            cmp    video_mode,6        ; (0040:0049=3)
  4922. F000:F738  75 04                jne    loc_345            ; Jump if not equal
  4923. F000:F73A  D0 E2                shl    dl,1            ; Shift w/zeros fill
  4924. F000:F73C  D1 E0                shl    ax,1            ; Shift w/zeros fill
  4925. F000:F73E            loc_345:                    ;  xref F000:F738
  4926. F000:F73E  8B D8                mov    bx,ax
  4927. F000:F740  EB 19                jmp    short loc_348        ; (F75B)
  4928. F000:F742            loc_346:                    ;  xref F000:F723
  4929. F000:F742  80 3E 0049 01            cmp    video_mode,1        ; (0040:0049=3)
  4930. F000:F747  76 02                jbe    loc_347            ; Jump if below or =
  4931. F000:F749  D1 E8                shr    ax,1            ; Shift w/zeros fill
  4932. F000:F74B            loc_347:                    ;  xref F000:F747
  4933. F000:F74B  8B D0                mov    dx,ax
  4934. F000:F74D  86 F2                xchg    dh,dl
  4935. F000:F74F  86 E0                xchg    ah,al
  4936. F000:F751  32 E4                xor    ah,ah            ; Zero register
  4937. F000:F753  D3 E0                shl    ax,cl            ; Shift w/zeros fill
  4938. F000:F755  8B D8                mov    bx,ax
  4939. F000:F757  8A EE                mov    ch,dh
  4940. F000:F759  D2 E5                shl    ch,cl            ; Shift w/zeros fill
  4941. F000:F75B            loc_348:                    ;  xref F000:F740
  4942. F000:F75B  B4 01                mov    ah,1
  4943. F000:F75D            loc_349:                    ;  xref F000:F6DB
  4944. F000:F75D  87 F2                xchg    si,dx
  4945. F000:F75F  42                    inc    dx
  4946. F000:F760  EE                    out    dx,al            ; port 3DBh, CGA light pen clr
  4947. F000:F761  87 F2                xchg    si,dx
  4948. F000:F763            loc_350:                    ;  xref F000:F6D4
  4949. F000:F763  8B FC                mov    di,sp
  4950. F000:F765  36: 89 5D 0E                mov    ss:[di+0Eh],bx
  4951. F000:F769  36: 89 4D 0C                mov    ss:[di+0Ch],cx
  4952. F000:F76D  36: 89 55 0A                mov    ss:[di+0Ah],dx
  4953. F000:F771  E8 F8B4                call    sub_32            ; (F028)
  4954. F000:F774  CF                    iret                ; Interrupt return
  4955.   
  4956.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4957.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 85
  4958.  
  4959.   
  4960. F000:F775            loc_351:                    ;  xref F000:F099
  4961. F000:F775  8A 0E 0066                mov    cl,video_color        ; (0040:0066=30h)
  4962. F000:F779  E8 F91F                call    sub_34            ; (F09B)
  4963. F000:F77C  4A                    dec    dx
  4964. F000:F77D  22 FF                and    bh,bh
  4965. F000:F77F  74 0D                jz    loc_352            ; Jump if zero
  4966. F000:F781  80 E1 1F                and    cl,1Fh
  4967. F000:F784  80 E3 01                and    bl,1
  4968. F000:F787  74 0D                jz    loc_353            ; Jump if zero
  4969. F000:F789  80 C9 20                or    cl,20h            ; ' '
  4970. F000:F78C  EB 08                jmp    short loc_353        ; (F796)
  4971. F000:F78E            loc_352:                    ;  xref F000:F77F
  4972. F000:F78E  80 E3 DF                and    bl,0DFh
  4973. F000:F791  80 E1 20                and    cl,20h            ; ' '
  4974. F000:F794  0A CB                or    cl,bl
  4975. F000:F796            loc_353:                    ;  xref F000:F787, F78C
  4976. F000:F796  8A C1                mov    al,cl
  4977. F000:F798  EE                    out    dx,al            ; port 0FFFFh
  4978. F000:F799  88 0E 0066                mov    video_color,cl        ; (0040:0066=30h)
  4979. F000:F79D  E9 FCE3                jmp    loc_296            ; (F483)
  4980.   
  4981.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  4982.   
  4983. F000:F7A0            loc_354:                    ;  xref F000:F099
  4984. F000:F7A0  E8 F885                call    sub_32            ; (F028)
  4985. F000:F7A3  1E                    push    ds
  4986. F000:F7A4  B8 0040                mov    ax,seg_b
  4987. F000:F7A7  8E D8                mov    ds,ax
  4988. F000:F7A9  A0 0049                mov    al,video_mode        ; (0040:0049=3)
  4989. F000:F7AC  8A 26 004A                mov    ah,byte ptr video_columns    ; (0040:004A=50h)
  4990. F000:F7B0  8A 3E 0062                mov    bh,video_page        ; (0040:0062=0)
  4991. F000:F7B4  1F                    pop    ds
  4992. F000:F7B5  CF                    iret                ; Interrupt return
  4993.   
  4994.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  4995.                 ;                   SUBROUTINE
  4996.                 ;
  4997.                 ;         Called from:     F000:F584, F591
  4998.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  4999.   
  5000.                 sub_52        proc    near
  5001. F000:F7B6  80 3E 0049 02            cmp    video_mode,2        ; (0040:0049=3)
  5002. F000:F7BB  74 05                je    loc_ret_355        ; Jump if equal
  5003. F000:F7BD  80 3E 0049 03            cmp    video_mode,3        ; (0040:0049=3)
  5004.   
  5005. F000:F7C2            loc_ret_355:                    ;  xref F000:F7BB
  5006. F000:F7C2  C3                    retn
  5007.                 sub_52        endp
  5008.   
  5009.   
  5010.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  5011.                 ;                   SUBROUTINE
  5012.                 ;
  5013.                 ;         Called from:     F000:F2E5, F326, F4E6, F520, F62A, F701, F720
  5014.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5015.   
  5016.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 86
  5017.  
  5018.                 sub_53        proc    near
  5019. F000:F7C3  80 3E 0049 04            cmp    video_mode,4        ; (0040:0049=3)
  5020. F000:F7C8  74 0C                je    loc_ret_356        ; Jump if equal
  5021. F000:F7CA  80 3E 0049 05            cmp    video_mode,5        ; (0040:0049=3)
  5022. F000:F7CF  74 05                je    loc_ret_356        ; Jump if equal
  5023. F000:F7D1  80 3E 0049 06            cmp    video_mode,6        ; (0040:0049=3)
  5024.   
  5025. F000:F7D6            loc_ret_356:                    ;  xref F000:F7C8, F7CF
  5026. F000:F7D6  C3                    retn
  5027.                 sub_53        endp
  5028.   
  5029.   
  5030.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  5031.                 ;                   SUBROUTINE
  5032.                 ;
  5033.                 ;         Called from:     F000:ED8F, EDAF
  5034.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5035.   
  5036.                 sub_54        proc    near
  5037. F000:F7D7  8A 46 01                mov    al,[bp+1]
  5038. F000:F7DA  E6 0B                out    0Bh,al            ; port 0Bh, DMA-1 mode reg
  5039. F000:F7DC  06                    push    es
  5040. F000:F7DD  58                    pop    ax
  5041. F000:F7DE  8A F4                mov    dh,ah
  5042. F000:F7E0  B9 0004                mov    cx,4
  5043.   
  5044. F000:F7E3            locloop_357:                    ;  xref F000:F7E7
  5045. F000:F7E3  D0 EE                shr    dh,1            ; Shift w/zeros fill
  5046. F000:F7E5  D1 E0                shl    ax,1            ; Shift w/zeros fill
  5047. F000:F7E7  E2 FA                loop    locloop_357        ; Loop if cx > 0
  5048.   
  5049. F000:F7E9  03 C3                add    ax,bx
  5050. F000:F7EB  73 02                jnc    loc_358            ; Jump if carry=0
  5051. F000:F7ED  FE C6                inc    dh
  5052. F000:F7EF            loc_358:                    ;  xref F000:F7EB
  5053. F000:F7EF  86 C6                xchg    al,dh
  5054. F000:F7F1  E6 81                out    81h,al            ; port 81h, DMA page reg ch 2
  5055. F000:F7F3  86 C6                xchg    al,dh
  5056. F000:F7F5  E6 0C                out    0Ch,al            ; port 0Ch, DMA-1 clr byte ptr
  5057. F000:F7F7  E6 04                out    4,al            ; port 4, DMA-1 bas&add ch 2
  5058. F000:F7F9  86 C4                xchg    al,ah
  5059. F000:F7FB  E6 04                out    4,al            ; port 4, DMA-1 bas&add ch 2
  5060. F000:F7FD  86 C4                xchg    al,ah
  5061. F000:F7FF  32 F6                xor    dh,dh            ; Zero register
  5062. F000:F801  8A 56 00                mov    dl,[bp]
  5063. F000:F804  E8 F701                call    sub_28            ; (EF08)
  5064. F000:F807  26: 8A 4D 03                mov    cl,es:[di+3]
  5065. F000:F80B  80 C1 07                add    cl,7
  5066. F000:F80E  D3 E2                shl    dx,cl            ; Shift w/zeros fill
  5067. F000:F810  4A                    dec    dx
  5068. F000:F811  03 C2                add    ax,dx
  5069. F000:F813  92                    xchg    ax,dx
  5070. F000:F814  72 0D                jc    loc_359            ; Jump if carry Set
  5071. F000:F816  E6 05                out    5,al            ; port 5, DMA-1 bas&cnt ch 2
  5072. F000:F818  86 C4                xchg    al,ah
  5073. F000:F81A  E6 05                out    5,al            ; port 5, DMA-1 bas&cnt ch 2
  5074. F000:F81C  B0 02                mov    al,2
  5075.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 87
  5076.  
  5077. F000:F81E  E6 0A                out    0Ah,al            ; port 0Ah, DMA-1 mask reg bit
  5078. F000:F820  EB 09                jmp    short loc_ret_360    ; (F82B)
  5079. F000:F822  90                    db    90h
  5080. F000:F823            loc_359:                    ;  xref F000:F814
  5081. F000:F823  80 06 0041 09            add    dsk_ret_code,9        ; (0040:0041=0)
  5082. F000:F828  2A C0                sub    al,al
  5083. F000:F82A  F9                    stc                ; Set carry flag
  5084.   
  5085. F000:F82B            loc_ret_360:                    ;  xref F000:F820
  5086. F000:F82B  C3                    retn
  5087.                 sub_54        endp
  5088.   
  5089. F000:F82C  0015[00]                db    21 dup (0)
  5090.   
  5091.   
  5092.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 12h ▒▒▒▒▒
  5093.                 ;
  5094.                 ;   SYSTEM MEMORY SIZE
  5095.                 ;
  5096.                 ;      Returns:      ax = number of contiguous 1K bytes blocks of memory
  5097.                 ;               from 0 to 640 K.
  5098.                 ;
  5099.                 ;      Regs used: ax
  5100.   
  5101. F000:F841            int_12h_memsiz    proc    near            ;  xref F000:FF17
  5102. F000:F841  FB                    sti                ; Enable interrupts
  5103. F000:F842  1E                    push    ds
  5104. F000:F843  E8 0135                call    sub_57            ; (F97B)
  5105. F000:F846  A1 0013                mov    ax,main_ram_size    ; (0040:0013=280h)
  5106. F000:F849  1F                    pop    ds
  5107. F000:F84A  CF                    iret                ; Interrupt return
  5108.                 int_12h_memsiz    endp
  5109.   
  5110. F000:F84B  00 00                db    0, 0
  5111.   
  5112.   
  5113.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 11h ▒▒▒▒▒
  5114.                 ;
  5115.                 ;   EQUIPMENT INSTALLED
  5116.                 ;
  5117.                 ;      Returns:      ax = equip_install word
  5118.                 ;
  5119.                 ;               15   14   13   12   11   10    9    8
  5120.                 ;            \    /       game  \          /
  5121.                 ;               # of printer  port   # of RS-232
  5122.                 ;            ports 0-3    used    ports 0-4
  5123.                 ;
  5124.                 ;            7    6    5    4    3    2    1    0
  5125.                 ;            \    /    \    /    \    /  Math   |
  5126.                 ;             # of   video mode   RAM     uP    no
  5127.                 ;            floppy  at boot up  00=16K       floppy
  5128.                 ;            drives  00=EGA      01=32K       drive
  5129.                 ;              1-4   01=CGA-40   10=48K       if 0
  5130.                 ;            if bit  10=CGA-80   11=64K
  5131.                 ;             0 = 1  11=MDA-80   (old PCs)
  5132.                 ;
  5133.                 ;               Note: bit 13 = modem on PC lap-tops
  5134.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 88
  5135.  
  5136.                 ;                 bit  2 = mouse on PS/2
  5137.                 ;
  5138.                 ;      Regs used: ax
  5139.   
  5140. F000:F84D            int_11h_equip    proc    near            ;  xref F000:FF15
  5141. F000:F84D  FB                    sti                ; Enable interrupts
  5142. F000:F84E  1E                    push    ds
  5143. F000:F84F  E8 0129                call    sub_57            ; (F97B)
  5144. F000:F852  A1 0010                mov    ax,equip_bits        ; (0040:0010=526Fh)
  5145. F000:F855  1F                    pop    ds
  5146. F000:F856  CF                    iret                ; Interrupt return
  5147.                 int_11h_equip    endp
  5148.   
  5149. F000:F857  00 00                db    0, 0
  5150.   
  5151.   
  5152.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 15h ▒▒▒▒▒
  5153.                 ;
  5154.                 ;   GENERAL SERVICES
  5155.                 ;
  5156.                 ;      On old PCs this function is only used for cassette servicing.
  5157.                 ;      Additional functions have been added for advanced features with
  5158.                 ;      newer equipment.
  5159.                 ;
  5160.                 ;      Called with: ah = function code
  5161.                 ;
  5162.                 ;      Returns:        CF = 0 if successful
  5163.                 ;            CF = 1 if failure or function not supported
  5164.                 ;
  5165.                 ;      Functions:
  5166.                 ;        ah = 0        Cassette motor set on
  5167.                 ;        ah = 1        Cassette motor set off
  5168.                 ;        ah = 2        Read cx bytes from cassette, es:bx = ptr to    load area
  5169.                 ;        ah = 3        Write cx bytes to cassette,  es:bx = ptr to    read area
  5170.                 ;        ah = 0Fh   Disk format hook, called from disk format routines
  5171.                 ;              after a cylinder access completed.  Called with:
  5172.                 ;              al = 1-undergoing surface analysis, 2-if formating
  5173.                 ;        ah = 21h   Error log (PS 2), al = 0 to read, al = 1 to    write
  5174.                 ;
  5175.                 ;             ***  LAP TOP MACHINES ONLY - 40h to 44h  ***
  5176.                 ;        ah = 40h   Systems info in cx, bx - al = 0 to read, 1 to write
  5177.                 ;              for modem info in bx - al = 2 to read, 3 to write
  5178.                 ;        ah = 41h   Wait for an event, dx = i/o port to read or    use es:di
  5179.                 ;              as ptr to user event.  al = type of event    0-4,11-14
  5180.                 ;              bh = event mask, bl = # of 55ms counts to    timeout
  5181.                 ;        ah = 42h   Power off, al = 0 or 1 for mode of power off
  5182.                 ;        ah = 43h   Get    system status in al
  5183.                 ;              7     6     5     4       3     2    1    0
  5184.                 ;            low   extrn  bad  pwr up  modem  ports        LCD
  5185.                 ;              battery  pwr  time  alarm    on     on      missing
  5186.                 ;        ah = 44h   Modem power, al = 0 turn off,  al = 1 turn on
  5187.                 ;
  5188.                 ;               *** FUNCTIONS IN RECENT BIOS VERSIONS ONLY ***
  5189.                 ;        ah = 4Fh   Keyboard input hook, called every keystroke    with
  5190.                 ;              al = scan code.  CF = 1 to change or use the scan
  5191.                 ;              code in al.  CF = 0 to ignore the key.
  5192.                 ;        ah = 80h   Open device number bx, in process number cx.
  5193.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 89
  5194.  
  5195.                 ;        ah = 81h   Close device number bx, in process number cx.
  5196.                 ;        ah = 82h   Terminate device number bx
  5197.                 ;        ah = 83h   Wait for timeout, and set bit 15 at ptr es:bx when
  5198.                 ;              timed out.  al = 0 to set wait period cx:dx uSec,
  5199.                 ;              al = 1 to stop timeout timer.
  5200.                 ;        ah = 84h   Game port read, dx = 0 to read switches into al
  5201.                 ;              high nibble,  dx = 1 to read linear position
  5202.                 ;              (Unit 1: ax = x, bx = y   Unit 2: cx = x,    dx = y)
  5203.                 ;        ah = 85h   Get    system request key state, al = 0 down, al = 1 up
  5204.                 ;        ah = 86h   Wait cx:dx microseconds before return
  5205.                 ;        ah = 87h   Transfer cx words to/from memory above 1 meg
  5206.                 ;              es:si ptr to table with source & destination ptrs:
  5207.                 ;              es:si -> zeros          db  16dup(0)
  5208.                 ;                   src_seg_limit  dw  ?        ; 1-64K bytes
  5209.                 ;                   scr_ptr_low    dw  ?        ; 0-64K range
  5210.                 ;                   scr_ptr_high   db  ?        ; 0-16 Meg range
  5211.                 ;                   scr_rights     db  93h      ; r/w access
  5212.                 ;                   scr_zero       dw  0
  5213.                 ;                   dst_seg_limit  dw  ?        ; 1-64K bytes
  5214.                 ;                   dst_ptr_low    dw  ?        ; 0-64K range
  5215.                 ;                   dst_ptr_high   db  ?        ; 0-16 Meg range
  5216.                 ;                   dst_rights     db  93h      ; r/w access
  5217.                 ;                   dst_zero       dw  0
  5218.                 ;                   zeros2         db  16dup(0)
  5219.                 ;              Notes:
  5220.                 ;            cx = 32K words max xfer, ptr_low & ptr_high form
  5221.                 ;            a 24 bit physical address (do not use a    segment)
  5222.                 ;              Return codes: al = 0 if ok, al = 1 parity    error
  5223.                 ;            al = 2 other errors, al = 3 gate addr line 20 bad
  5224.                 ;        ah = 88h   Get    extended memory size (above 1 Meg boundary)
  5225.                 ;              ax = (number of bytes / 1024)
  5226.                 ;        ah = 89h   Go to protected mode of operation. es:si ptr to table
  5227.                 ;              comprised of 8 groups of 8 byte ptr sub-arrays.  Each.
  5228.                 ;              group is formed from 8 bytes as follows:
  5229.                 ;              seg_limit    dw  ?     ; 1-64K bytes
  5230.                 ;              ptr_low      dw  ?     ; 0-64K range
  5231.                 ;              ptr_high     db  ?     ; 0-16 Meg range
  5232.                 ;              rights       db  93h   ; read/write access
  5233.                 ;              zero         dw  0     ; set to zero
  5234.                 ;              Ptr_low & high form a 24 bit physical address.
  5235.                 ;
  5236.                 ;              The 8 groups are as follows:
  5237.                 ;            es:si ->  Group_1   Set to all zero
  5238.                 ;                      Group_2   ptr to beginning of    Group_1
  5239.                 ;                      Group_3   ptr to Interrupt Descript Table IDT
  5240.                 ;                      Group_4   ptr to present DS segment
  5241.                 ;                      Group_5   ptr to present ES segment
  5242.                 ;                      Group_6   ptr to present SS segment
  5243.                 ;                      Group_7   ptr to present CS segment
  5244.                 ;                      Group_8   ptr where to jump to when done
  5245.                 ;              Also: bh & bl set as offset from beginning of IDT to
  5246.                 ;            spot where 1st & 2nd set of 8 hardware interrupts begin.
  5247.                 ;              Returns ah = 0 if ok, regs changed: ax,bp,ds,es,ss,cs
  5248.                 ;        ah = 90h   Device busy - used to signal DOS when it must wait.
  5249.                 ;              Type   0  Disk timeout          0FCh  Hard disk timeout
  5250.                 ;              codes  1  Floppy timeout                (PS 2 only)
  5251.                 ;              (al)   2  Keyboard no timeout   0FDh  Floppy motor timeout
  5252.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 90
  5253.  
  5254.                 ;                 3  Mouse timeout         0FEh  Printer timeout
  5255.                 ;               80h  Local area network (es:bx = network cntrl block
  5256.                 ;              Returns CF = 0 if failure, 1 if minimum wait time occurred
  5257.                 ;        ah = 91h   Interrupt done - used to signal DOS when hardware done
  5258.                 ;              al = type code (Device busy type codes)
  5259.                 ;        ah = C0h   Get    ROM system information table ptr in es:bx.  See data
  5260.                 ;              area starting at byte "sys_info_size".
  5261.                 ;
  5262.                 ;               *** PS 2 & COMPATIBLES ONLY - C1h to C4h    ***
  5263.                 ;        ah = C1h   Get    Extended BIOS data area segment in es
  5264.                 ;        ah = C2h   Mouse support (BIOS).  Sub-function code in    al
  5265.                 ;            al = 0  if bh = 0 mouse off, bh = 1 mouse on
  5266.                 ;            al = 1  reset mouse & parameters, returns bh = 0
  5267.                 ;                      bl altered on return
  5268.                 ;            al = 2  Set number of updates per second in bh,
  5269.                 ;                      bh = 0 - 10 updates/sec  4 - 80  updates/sec
  5270.                 ;                           1 - 20 updates/sec  5 - 100 updates/sec
  5271.                 ;                           2 - 40 updates/sec  6 - 200 updates/sec
  5272.                 ;                           3 - 60 updates/sec
  5273.                 ;            al = 3  Set resolution in counts per millimeter:
  5274.                 ;                      bh = 0 - 1 cnts per mm   2 - 4 cnts per mm
  5275.                 ;                           1 - 2 cnts per mm   3 - 8 cnts per mm
  5276.                 ;            al = 4  Get device type, bh = 0
  5277.                 ;            al = 5  Initialize pointing device interface data size
  5278.                 ;                      bh = size 1 to 8 (1 to 8 bytes)
  5279.                 ;            al = 6  Additional sub-functions in bh:
  5280.                 ;                      bh = 0  Get status, cl = cnts    per mm (see al=3)
  5281.                 ;                              dl = updates/sec in hex, bl = status:
  5282.                 ;                                   bit 6 = mode (0=stream, 1=remote)
  5283.                 ;                                       5 = 0 disabled, 1 enabled
  5284.                 ;                                       4 = scaling (0=1:1, 1=2:1)
  5285.                 ;                                       2 = Left button pressed
  5286.                 ;                                       0 = right button pressed
  5287.                 ;                      bh = 1  Set scaling to 1:1
  5288.                 ;                      bh = 2  Set scaling to 2:1
  5289.                 ;            al = 7  Set location to "call far" when    data available
  5290.                 ;                       in es:bx
  5291.                 ;              Return code for all sub-functions in al:
  5292.                 ;            al = 0  successful             3  interface error
  5293.                 ;                 1  bad function call      4  resend
  5294.                 ;                 2  invalid input          5  no far call installed
  5295.                 ;        ah = C3h   Watchdog timer mode al = 0 disable, al = 1 enable,
  5296.                 ;              bx = set counter value 1 to FFh
  5297.                 ;        ah = C4h   Bus    option select (POS) subfunction in al,
  5298.                 ;              al = 0  Get base POS adapter register address in dx
  5299.                 ;               1  Enable setup for slot bl
  5300.                 ;               2  Adapter enable
  5301.   
  5302. F000:F859            int_15h_servics    proc    near            ;  xref F000:FF1D
  5303. F000:F859  F9                    stc                ; Set carry flag
  5304. F000:F85A  CA 0002                retf    2            ; Return far
  5305.                 int_15h_servics    endp
  5306.   
  5307.   
  5308.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  5309.                 ;                   SUBROUTINE
  5310.                 ;
  5311.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 91
  5312.  
  5313.                 ;         Called from:     F000:ECB9, EE34, EE51, EF8C, F8AD, F8D0
  5314.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5315.   
  5316.                 sub_55        proc    near
  5317. F000:F85D  5B                    pop    bx
  5318. F000:F85E  59                    pop    cx
  5319.   
  5320. F000:F85F            locloop_361:                    ;  xref F000:F86B
  5321. F000:F85F  B4 80                mov    ah,80h
  5322. F000:F861  E8 F673                call    sub_26            ; (EED7)
  5323. F000:F864  72 0A                jc    locloop_362        ; Jump if carry Set
  5324. F000:F866  58                    pop    ax
  5325. F000:F867  BA 03F5                mov    dx,3F5h
  5326. F000:F86A  EE                    out    dx,al            ; port 3F5h, dsk0 controlr data
  5327. F000:F86B  E2 F2                loop    locloop_361        ; Loop if cx > 0
  5328.   
  5329. F000:F86D  EB 05                jmp    short loc_363        ; (F874)
  5330. F000:F86F  90                    db    90h
  5331.   
  5332. F000:F870            locloop_362:                    ;  xref F000:F864, F871
  5333. F000:F870  58                    pop    ax
  5334. F000:F871  E2 FD                loop    locloop_362        ; Loop if cx > 0
  5335.   
  5336. F000:F873  F9                    stc                ; Set carry flag
  5337. F000:F874            loc_363:                    ;  xref F000:F86D
  5338. F000:F874  53                    push    bx
  5339. F000:F875  C3                    retn
  5340.                 sub_55        endp
  5341.   
  5342.   
  5343.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  5344.                 ;                   SUBROUTINE
  5345.                 ;
  5346.                 ;         Called from:     F000:E3AD, E3B4, E3BB, ED9A, EDBA
  5347.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5348.   
  5349.                 sub_56        proc    near
  5350. F000:F876  B0 01                mov    al,1
  5351. F000:F878  88 56 04                mov    [bp+4],dl
  5352. F000:F87B  88 6E 03                mov    [bp+3],ch
  5353. F000:F87E  C6 46 07 02                mov    byte ptr [bp+7],2
  5354. F000:F882  80 FA 00                cmp    dl,0
  5355. F000:F885  74 10                je    loc_364            ; Jump if equal
  5356. F000:F887  B0 02                mov    al,2
  5357. F000:F889  80 FA 01                cmp    dl,1
  5358. F000:F88C  74 09                je    loc_364            ; Jump if equal
  5359. F000:F88E  B0 04                mov    al,4
  5360. F000:F890  80 FA 02                cmp    dl,2
  5361. F000:F893  74 02                je    loc_364            ; Jump if equal
  5362. F000:F895  B0 08                mov    al,8
  5363. F000:F897            loc_364:                    ;  xref F000:F885, F88C, F893
  5364. F000:F897  84 06 003E                test    al,ds:data_27e        ; (C000:003E=52h)
  5365. F000:F89B  75 23                jnz    loc_365            ; Jump if not zero
  5366. F000:F89D  08 06 003E                or    ds:data_27e,al        ; (C000:003E=52h)
  5367. F000:F8A1  8A 5E 04                mov    bl,[bp+4]
  5368. F000:F8A4  53                    push    bx
  5369. F000:F8A5  BB 0007                mov    bx,7
  5370.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 92
  5371.  
  5372. F000:F8A8  53                    push    bx
  5373. F000:F8A9  BB 0002                mov    bx,2
  5374. F000:F8AC  53                    push    bx
  5375. F000:F8AD  E8 FFAD                call    sub_55            ; (F85D)
  5376. F000:F8B0  72 55                jc    loc_370            ; Jump if carry Set
  5377. F000:F8B2  E8 F5FB                call    sub_25            ; (EEB0)
  5378. F000:F8B5  72 50                jc    loc_370            ; Jump if carry Set
  5379. F000:F8B7  A0 0042                mov    al,ds:data_30e        ; (C000:0042=53h)
  5380. F000:F8BA  24 60                and    al,60h            ; '`'
  5381. F000:F8BC  3C 60                cmp    al,60h            ; '`'
  5382. F000:F8BE  74 23                je    loc_366            ; Jump if equal
  5383. F000:F8C0            loc_365:                    ;  xref F000:F89B
  5384. F000:F8C0  8A 5E 03                mov    bl,[bp+3]
  5385. F000:F8C3  53                    push    bx
  5386. F000:F8C4  8A 5E 04                mov    bl,[bp+4]
  5387. F000:F8C7  53                    push    bx
  5388. F000:F8C8  BB 000F                mov    bx,0Fh
  5389. F000:F8CB  53                    push    bx
  5390. F000:F8CC  BB 0003                mov    bx,3
  5391. F000:F8CF  53                    push    bx
  5392. F000:F8D0  E8 FF8A                call    sub_55            ; (F85D)
  5393. F000:F8D3  72 32                jc    loc_370            ; Jump if carry Set
  5394. F000:F8D5  E8 F5D8                call    sub_25            ; (EEB0)
  5395. F000:F8D8  72 2D                jc    loc_370            ; Jump if carry Set
  5396. F000:F8DA  A0 0042                mov    al,ds:data_30e        ; (C000:0042=53h)
  5397. F000:F8DD  24 60                and    al,60h            ; '`'
  5398. F000:F8DF  3C 60                cmp    al,60h            ; '`'
  5399. F000:F8E1  75 09                jne    loc_367            ; Jump if not equal
  5400. F000:F8E3            loc_366:                    ;  xref F000:F8BE
  5401. F000:F8E3  80 0E 0041 40            or    byte ptr ds:data_29e,40h    ; (C000:0041=49h) '@'
  5402. F000:F8E8  F9                    stc                ; Set carry flag
  5403. F000:F8E9  EB 1C                jmp    short loc_370        ; (F907)
  5404. F000:F8EB  90                    db    90h
  5405. F000:F8EC            loc_367:                    ;  xref F000:F8E1
  5406. F000:F8EC  E8 F619                call    sub_28            ; (EF08)
  5407. F000:F8EF  26: 8A 4D 09                mov    cl,es:[di+9]
  5408. F000:F8F3  B5 00                mov    ch,0
  5409. F000:F8F5  80 F9 00                cmp    cl,0
  5410. F000:F8F8  74 10                je    loc_ret_371        ; Jump if equal
  5411.   
  5412. F000:F8FA            locloop_368:                    ;  xref F000:F901
  5413. F000:F8FA  BB 00E4                mov    bx,0E4h
  5414. F000:F8FD            loc_369:                    ;  xref F000:F8FF
  5415. F000:F8FD  4B                    dec    bx
  5416. F000:F8FE  90                    nop
  5417. F000:F8FF  75 FC                jnz    loc_369            ; Jump if not zero
  5418. F000:F901  E2 F7                loop    locloop_368        ; Loop if cx > 0
  5419.   
  5420. F000:F903  F8                    clc                ; Clear carry flag
  5421. F000:F904  EB 04                jmp    short loc_ret_371    ; (F90A)
  5422. F000:F906  90                    db    90h
  5423. F000:F907            loc_370:                    ;  xref F000:F8B0, F8B5, F8D3, F8D8
  5424.                                         ;            F8E9
  5425. F000:F907  E8 F60C                call    sub_29            ; (EF16)
  5426.   
  5427. F000:F90A            loc_ret_371:                    ;  xref F000:F8F8, F904
  5428. F000:F90A  C3                    retn
  5429.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 93
  5430.  
  5431.                 sub_56        endp
  5432.   
  5433.   
  5434.   
  5435.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 17h ▒▒▒▒▒
  5436.                 ;
  5437.                 ;   PRINTER SERVICES
  5438.                 ;
  5439.                 ;      Call with:  ah =    function code
  5440.                 ;           dx =    printer number 0-2 (some systems allow 0-3)
  5441.                 ;
  5442.                 ;      Returns:       ah =    status bits
  5443.                 ;             7      6      5      4      3     2  1        0
  5444.                 ;            not  acknow-  no   select   I/O   unused   no
  5445.                 ;            busy  ledge  paper         error    response
  5446.                 ;            __________from printer__________
  5447.                 ;
  5448.                 ;      Functions:
  5449.                 ;        ah = 0      Send character to printer, al = character
  5450.                 ;        ah = 1      Printer port initialization
  5451.                 ;        ah = 2      Get printer status in ah
  5452.   
  5453. F000:F90B            int_17h_printer    proc    near            ;  xref F000:FF21
  5454. F000:F90B  FB                    sti                ; Enable interrupts
  5455. F000:F90C  52                    push    dx
  5456. F000:F90D  56                    push    si
  5457. F000:F90E  53                    push    bx
  5458. F000:F90F  51                    push    cx
  5459. F000:F910  1E                    push    ds
  5460. F000:F911  80 FC 02                cmp    ah,2
  5461. F000:F914  77 20                ja    loc_372            ; Jump if above
  5462. F000:F916  E8 0062                call    sub_57            ; (F97B)
  5463. F000:F919  8B DA                mov    bx,dx
  5464. F000:F91B  03 DB                add    bx,bx
  5465. F000:F91D  8B 97 0008                mov    dx,[bx+8]
  5466.                         nop                ;*Fixup for MASM (M)
  5467. F000:F921  23 D2                and    dx,dx
  5468. F000:F923  74 11                jz    loc_372            ; Jump if zero
  5469. F000:F925  50                    push    ax
  5470. F000:F926  8A C4                mov    al,ah
  5471. F000:F928  32 E4                xor    ah,ah            ; Zero register
  5472. F000:F92A  03 C0                add    ax,ax
  5473. F000:F92C  8B F0                mov    si,ax
  5474. F000:F92E  58                    pop    ax
  5475. F000:F92F  8A E0                mov    ah,al
  5476. F000:F931  2E: FF A4 F975            jmp    word ptr cs:data_47[si]    ;*(F000:F975=0F93Ch) 3 entries
  5477. F000:F936            loc_372:                    ;  xref F000:F914, F923, F956
  5478. F000:F936  1F                    pop    ds
  5479. F000:F937  59                    pop    cx
  5480. F000:F938  5B                    pop    bx
  5481. F000:F939  5E                    pop    si
  5482. F000:F93A  5A                    pop    dx
  5483. F000:F93B  CF                    iret                ; Interrupt return
  5484.                 int_17h_printer    endp
  5485.   
  5486.   
  5487.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  5488.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 94
  5489.  
  5490.   
  5491. F000:F93C            loc_373:                    ;  xref F000:F932, F975
  5492. F000:F93C  EE                    out    dx,al            ; port 378h, printer-2 data
  5493. F000:F93D  8A 7F 78                mov    bh,[bx+78h]
  5494. F000:F940  42                    inc    dx
  5495. F000:F941            loc_374:                    ;  xref F000:F94C
  5496. F000:F941  33 C9                xor    cx,cx            ; Zero register
  5497.   
  5498. F000:F943            locloop_375:                    ;  xref F000:F948
  5499. F000:F943  EC                    in    al,dx            ; port 379h, printer-2 status
  5500. F000:F944  22 C0                and    al,al
  5501. F000:F946  78 10                js    loc_377            ; Jump if sign=1
  5502. F000:F948  E2 F9                loop    locloop_375        ; Loop if cx > 0
  5503.   
  5504. F000:F94A  FE CF                dec    bh
  5505. F000:F94C  75 F3                jnz    loc_374            ; Jump if not zero
  5506. F000:F94E  0C 01                or    al,1
  5507. F000:F950  24 F9                and    al,0F9h
  5508. F000:F952            loc_376:                    ;  xref F000:F966
  5509. F000:F952  34 48                xor    al,48h            ; 'H'
  5510. F000:F954  86 E0                xchg    ah,al
  5511. F000:F956  EB DE                jmp    short loc_372        ; (F936)
  5512. F000:F958            loc_377:                    ;  xref F000:F946
  5513. F000:F958  42                    inc    dx
  5514. F000:F959  B0 0D                mov    al,0Dh
  5515. F000:F95B  EE                    out    dx,al            ; port 37Ah, printer-2 control
  5516.                                         ;  al = 0Dh, strobe on
  5517. F000:F95C            loc_378:                    ;  xref F000:F973
  5518. F000:F95C  B0 0C                mov    al,0Ch
  5519. F000:F95E  EE                    out    dx,al            ; port 37Ah, printer-2 control
  5520.                                         ;  al = 0Ch, init & strobe off
  5521. F000:F95F  83 EA 02                sub    dx,2
  5522.   
  5523.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  5524.   
  5525. F000:F962            loc_379:                    ;  xref F000:F932, F979
  5526. F000:F962  42                    inc    dx
  5527. F000:F963  EC                    in    al,dx            ; port 379h, printer-2 status
  5528. F000:F964  24 F8                and    al,0F8h
  5529. F000:F966  EB EA                jmp    short loc_376        ; (F952)
  5530.   
  5531.                 ;───── Indexed Entry Point ────────────────────────────────────────────────
  5532.   
  5533. F000:F968            loc_380:                    ;  xref F000:F932, F977
  5534. F000:F968  83 C2 02                add    dx,2
  5535. F000:F96B  B0 08                mov    al,8
  5536. F000:F96D  EE                    out    dx,al            ; port 37Ah, printer-2 control
  5537.                                         ;  al = 8, initialize printer
  5538. F000:F96E  B9 05DC                mov    cx,5DCh
  5539.   
  5540. F000:F971            locloop_381:                    ;  xref F000:F971
  5541. F000:F971  E2 FE                loop    locloop_381        ; Loop if cx > 0
  5542.   
  5543. F000:F973  EB E7                jmp    short loc_378        ; (F95C)
  5544. F000:F975  F93C            data_47        dw    offset loc_373        ; Data table (indexed access)
  5545.                                         ;  xref F000:F932
  5546. F000:F977  F968            data_48        dw    offset loc_380        ;  xref F000:F932
  5547.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 95
  5548.  
  5549. F000:F979  F962            data_49        dw    offset loc_379        ;  xref F000:F932
  5550.   
  5551.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  5552.                 ;                   SUBROUTINE
  5553.                 ;
  5554.                 ;         Called from:     F000:E144, E2CB, E6A8, E6F3, E742, E831, E9A4
  5555.                 ;                  F073, F165, F843, F84F, F916, FE74, FF7D
  5556.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5557.   
  5558.                 sub_57        proc    near
  5559. F000:F97B  53                    push    bx
  5560. F000:F97C  BB 0040                mov    bx,seg seg_b
  5561. F000:F97F  8E DB                mov    ds,bx
  5562. F000:F981  5B                    pop    bx
  5563. F000:F982  C3                    retn
  5564.                 sub_57        endp
  5565.   
  5566. F000:F983  002E[00]                db    46 dup (0)
  5567. F000:F9B1  0D 0A 0A 43 4F 4D            db    0Dh, 0Ah, 0Ah, 'COMPUADD COMPUTER'
  5568. F000:F9B7  50 55 41 44 44 20
  5569. F000:F9BD  43 4F 4D 50 55 54
  5570. F000:F9C3  45 52
  5571. F000:F9C5  20 27 38 38 20 20            db    ' ', 27h, '88      ', 0Dh, 0Ah, 0Dh
  5572. F000:F9CB  20 20 20 20 0D 0A
  5573. F000:F9D1  0D
  5574. F000:F9D2  0A 44 54 4B 2F 45            db    0Ah, 'DTK/ERSO/BIOS 2.38 (C) 1986'
  5575. F000:F9D8  52 53 4F 2F 42 49
  5576. F000:F9DE  4F 53 20 32 2E 33
  5577. F000:F9E4  38 20 28 43 29 20
  5578. F000:F9EA  31 39 38 36
  5579. F000:F9EE  0D 0A 0D 0A                db    0Dh, 0Ah, 0Dh, 0Ah
  5580. F000:F9F2  00 2E 38 32 35 33            db    0, 2Eh, 38h, 32h, 35h, 33h
  5581. F000:F9F8  00 2E 4B 2D 42 20            db    0, 2Eh, 4Bh, 2Dh, 42h, 20h
  5582. F000:F9FE  00 2E 44 69 73 6B            db    0, 2Eh, 44h, 69h, 73h, 6Bh
  5583. F000:FA04  00                    db    0
  5584.   
  5585.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  5586.                 ;                   SUBROUTINE
  5587.                 ;
  5588.                 ;         Called from:     F000:E7BB, E7E1, E807
  5589.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5590.   
  5591.                 sub_58        proc    near
  5592. F000:FA05  8A BD 007C                mov    bh,rs232_timeout_1[di]    ; (0040:007C=1)
  5593. F000:FA09  81 E6 0000                and    si,0
  5594.                         nop                ;*Fixup for MASM (M)
  5595. F000:FA0D            loc_382:                    ;  xref F000:FA1E
  5596. F000:FA0D  4E                    dec    si
  5597. F000:FA0E  75 05                jnz    loc_383            ; Jump if not zero
  5598. F000:FA10  FE CF                dec    bh
  5599. F000:FA12  F9                    stc                ; Set carry flag
  5600. F000:FA13  74 0B                jz    loc_ret_384        ; Jump if zero
  5601. F000:FA15            loc_383:                    ;  xref F000:FA0E
  5602. F000:FA15  EC                    in    al,dx            ; port 2FDh, RS232-2 line stat
  5603. F000:FA16  86 E0                xchg    ah,al
  5604. F000:FA18  8A C4                mov    al,ah
  5605. F000:FA1A  22 C5                and    al,ch
  5606.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 96
  5607.  
  5608. F000:FA1C  3A E8                cmp    ch,al
  5609. F000:FA1E  75 ED                jne    loc_382            ; Jump if not equal
  5610.   
  5611. F000:FA20            loc_ret_384:                    ;  xref F000:FA13
  5612. F000:FA20  C3                    retn
  5613.                 sub_58        endp
  5614.   
  5615.   
  5616.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  5617.                 ;                   SUBROUTINE
  5618.                 ;
  5619.                 ;         Called from:     F000:E6E2, EA39, EB14, EC01
  5620.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5621.   
  5622.                 sub_59        proc    near
  5623. F000:FA21  B0 20                mov    al,20h            ; ' '
  5624. F000:FA23  E6 20                out    20h,al            ; port 20h, 8259-1 int command
  5625.                                         ;  al = 20h, end of interrupt
  5626. F000:FA25  C3                    retn
  5627.                 sub_59        endp
  5628.   
  5629. F000:FA26            loc_385:                    ;  xref F000:EB63
  5630. F000:FA26  50                    push    ax
  5631. F000:FA27  51                    push    cx
  5632. F000:FA28  52                    push    dx
  5633. F000:FA29  53                    push    bx
  5634. F000:FA2A  8A EA                mov    ch,dl
  5635. F000:FA2C  80 E5 0C                and    ch,0Ch
  5636. F000:FA2F  80 ED 0C                sub    ch,0Ch
  5637. F000:FA32  75 1C                jnz    loc_388            ; Jump if not zero
  5638. F000:FA34  E4 61                in    al,61h            ; port 61h, 8255 port B, read
  5639. F000:FA36  A8 04                test    al,4
  5640. F000:FA38  75 07                jnz    loc_386            ; Jump if not zero
  5641. F000:FA3A  0C 04                or    al,4
  5642. F000:FA3C  B9 0005                mov    cx,5
  5643. F000:FA3F  EB 05                jmp    short loc_387        ; (FA46)
  5644. F000:FA41            loc_386:                    ;  xref F000:FA38
  5645. F000:FA41  24 FB                and    al,0FBh
  5646. F000:FA43  B9 0607                mov    cx,607h
  5647. F000:FA46            loc_387:                    ;  xref F000:FA3F
  5648. F000:FA46  E6 61                out    61h,al            ; port 61h, 8255 B - spkr, etc
  5649.                                         ;  al = 0, disable parity
  5650. F000:FA48  32 C0                xor    al,al            ; Zero register
  5651. F000:FA4A  B4 01                mov    ah,1
  5652. F000:FA4C  CD 10                int    10h            ; Video display   ah=functn 01h
  5653.                                         ;  set cursor mode in cx
  5654. F000:FA4E  E6 C0                out    0C0h,al            ; port 0C0h, DMA-2 bas&add ch 0
  5655. F000:FA50            loc_388:                    ;  xref F000:FA32
  5656. F000:FA50  5B                    pop    bx
  5657. F000:FA51  5A                    pop    dx
  5658. F000:FA52  59                    pop    cx
  5659. F000:FA53  58                    pop    ax
  5660. F000:FA54  E9 F10F                jmp    loc_162            ; (EB66)
  5661.   
  5662.   
  5663.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ unused ▒▒▒▒▒
  5664.                 ;
  5665.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 97
  5666.  
  5667.                 ;   Unused interrupt vector termination
  5668.                 ;
  5669.                 ;      This routine processes invalid and unused interrupt requests.  The
  5670.                 ;      hardware    IRQ number is loaded into gen_int_occured, and the interrupt
  5671.                 ;      cleared.     For software calls to an unused interrupt, a value 0FFh is
  5672.                 ;      loaded into gen_int_occured, and the routine returns to the caller
  5673.                 ;      without changing    registers.
  5674.                 ;
  5675.                 ;      Alternatively, some systems simply return (iret).
  5676.   
  5677. F000:FA57            int_unused    proc    near            ;  xref F000:FF07, FF09, FF0B, FF0D
  5678.                                         ;            FF11
  5679. F000:FA57  50                    push    ax
  5680. F000:FA58  52                    push    dx
  5681. F000:FA59  BA 0020                mov    dx,20h
  5682. F000:FA5C  E8 04D5                call    sub_61            ; (FF34)
  5683. F000:FA5F  5A                    pop    dx
  5684. F000:FA60  58                    pop    ax
  5685. F000:FA61  CF                    iret                ; Interrupt return
  5686.                 int_unused    endp
  5687.   
  5688. F000:FA62  000C[00]                db    12 dup (0)
  5689. F000:FA6E  00 00 00 00 00 00    video_char_tbl    db    0, 0, 0, 0, 0, 0    ; Video characters in graphic modes
  5690. F000:FA74  00 00 7E 81 A5 81            db    0, 0, 7Eh, 81h, 0A5h, 81h
  5691. F000:FA7A  A5 BD 81 7E 7E FF            db    0A5h, 0BDh, 81h, 7Eh, 7Eh, 0FFh
  5692. F000:FA80  DB FF DB C3 FF 7E            db    0DBh, 0FFh, 0DBh, 0C3h, 0FFh, 7Eh
  5693. F000:FA86  36 7F 7F 7F 3E 1C            db    36h, 7Fh, 7Fh, 7Fh, 3Eh, 1Ch
  5694. F000:FA8C  08 00 08 1C 3E 7F            db    8, 0, 8, 1Ch, 3Eh, 7Fh
  5695. F000:FA92  3E 1C 08 00 1C 3E            db    3Eh, 1Ch, 8, 0, 1Ch, 3Eh
  5696. F000:FA98  1C 7F 7F 3E 1C 3E            db    1Ch, 7Fh, 7Fh, 3Eh, 1Ch, 3Eh
  5697. F000:FA9E  08 08 1C 3E 7F 3E            db    8, 8, 1Ch, 3Eh, 7Fh, 3Eh
  5698. F000:FAA4  1C 3E 00 00 18 3C            db    1Ch, 3Eh, 0, 0, 18h, 3Ch
  5699. F000:FAAA  3C 18 00 00 FF FF            db    3Ch, 18h, 0, 0, 0FFh, 0FFh
  5700. F000:FAB0  E7 C3 C3 E7 FF FF            db    0E7h, 0C3h, 0C3h, 0E7h, 0FFh, 0FFh
  5701. F000:FAB6  00 3C 66 42 42 66            db    0, 3Ch, 66h, 42h, 42h, 66h
  5702. F000:FABC  3C 00 FF C3 99 BD            db    3Ch, 0, 0FFh, 0C3h, 99h, 0BDh
  5703. F000:FAC2  BD 99 C3 FF 1F 07            db    0BDh, 99h, 0C3h, 0FFh, 1Fh, 7
  5704. F000:FAC8  0F 79 CC CC CC 78            db    0Fh, 79h, 0CCh, 0CCh, 0CCh, 78h
  5705. F000:FACE  3C 66 66 66 3C 18            db    3Ch, 66h, 66h, 66h, 3Ch, 18h
  5706. F000:FAD4  7E 18 1C 1E 19 1B            db    7Eh, 18h, 1Ch, 1Eh, 19h, 1Bh
  5707. F000:FADA  3A 70 F0 E0 7F 63            db    3Ah, 70h, 0F0h, 0E0h, 7Fh, 63h
  5708. F000:FAE0  7F 63 E3 E7 C7 06            db    7Fh, 63h, 0E3h, 0E7h, 0C7h, 6
  5709. F000:FAE6  99 5A 3C E7 E7 3C            db    99h, 5Ah, 3Ch, 0E7h, 0E7h, 3Ch
  5710. F000:FAEC  5A 99 40 70 7C 7F            db    5Ah, 99h, 40h, 70h, 7Ch, 7Fh
  5711. F000:FAF2  7C 70 40 00 01 07            db    7Ch, 70h, 40h, 0, 1, 7
  5712. F000:FAF8  1F 7F 1F 07 01 00            db    1Fh, 7Fh, 1Fh, 7, 1, 0
  5713. F000:FAFE  18 3C 7E 18 18 7E            db    18h, 3Ch, 7Eh, 18h, 18h, 7Eh
  5714. F000:FB04  3C 18 66 66 66 66            db    3Ch, 18h, 66h, 66h, 66h, 66h
  5715. F000:FB0A  66 00 66 00 7F DB            db    66h, 0, 66h, 0, 7Fh, 0DBh
  5716. F000:FB10  DB 7B 1B 1B 19 00            db    0DBh, 7Bh, 1Bh, 1Bh, 19h, 0
  5717. F000:FB16  1E 31 1C 36 36 1C            db    1Eh, 31h, 1Ch, 36h, 36h, 1Ch
  5718. F000:FB1C  46 3C 00 00 00 7E            db    46h, 3Ch, 0, 0, 0, 7Eh
  5719. F000:FB22  7E 7E 00 00 18 3C            db    7Eh, 7Eh, 0, 0, 18h, 3Ch
  5720. F000:FB28  7E 18 7E 3C 18 FF            db    7Eh, 18h, 7Eh, 3Ch, 18h, 0FFh
  5721. F000:FB2E  0C 1E 3F 0C 0C 0C            db    0Ch, 1Eh, 3Fh, 0Ch, 0Ch, 0Ch
  5722. F000:FB34  0C 00 0C 0C 0C 0C            db    0Ch, 0, 0Ch, 0Ch, 0Ch, 0Ch
  5723. F000:FB3A  3F 1E 0C 00 00 0C            db    3Fh, 1Eh, 0Ch, 0, 0, 0Ch
  5724.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 98
  5725.  
  5726. F000:FB40  06 7F 06 0C 00 00            db    6, 7Fh, 6, 0Ch, 0, 0
  5727. F000:FB46  00 18 30 7F 30 18            db    0, 18h, 30h, 7Fh, 30h, 18h
  5728. F000:FB4C  00 00 00 00 60 60            db    0, 0, 0, 0, 60h, 60h
  5729. F000:FB52  60 7F 00 00 00 00            db    60h, 7Fh, 0, 0, 0, 0
  5730. F000:FB58  24 66 FF 66 24 00            db    24h, 66h, 0FFh, 66h, 24h, 0
  5731. F000:FB5E  00 00 18 3C 7F FF            db    0, 0, 18h, 3Ch, 7Fh, 0FFh
  5732. F000:FB64  FF 00 00 00 FF FF            db    0FFh, 0, 0, 0, 0FFh, 0FFh
  5733. F000:FB6A  7E 3C 18 00 00 00            db    7Eh, 3Ch, 18h, 0, 0, 0
  5734. F000:FB70  00 00 00 00 00 00            db    0, 0, 0, 0, 0, 0
  5735. F000:FB76  18 3C 3C 18 18 00            db    18h, 3Ch, 3Ch, 18h, 18h, 0
  5736. F000:FB7C  18 00 36 36 36 00            db    18h, 0, 36h, 36h, 36h, 0
  5737. F000:FB82  00 00 00 00 36 36            db    0, 0, 0, 0, 36h, 36h
  5738. F000:FB88  7F 36 7F 36 36 00            db    7Fh, 36h, 7Fh, 36h, 36h, 0
  5739. F000:FB8E  0C 3F 68 3E 0B 7E            db    0Ch, 3Fh, 68h, 3Eh, 0Bh, 7Eh
  5740. F000:FB94  18 08 62 66 0C 18            db    18h, 8, 62h, 66h, 0Ch, 18h
  5741. F000:FB9A  30 66 46 00 1C 36            db    30h, 66h, 46h, 0, 1Ch, 36h
  5742. F000:FBA0  1C 18 3D 66 3D 00            db    1Ch, 18h, 3Dh, 66h, 3Dh, 0
  5743. F000:FBA6  18 18 30 00 00 00            db    18h, 18h, 30h, 0, 0, 0
  5744. F000:FBAC  00 00 0C 18 30 30            db    0, 0, 0Ch, 18h, 30h, 30h
  5745. F000:FBB2  30 18 0C 00 30 18            db    30h, 18h, 0Ch, 0, 30h, 18h
  5746. F000:FBB8  0C 0C 0C 18 30 00            db    0Ch, 0Ch, 0Ch, 18h, 30h, 0
  5747. F000:FBBE  00 42 3C 7E 3C 42            db    0, 42h, 3Ch, 7Eh, 3Ch, 42h
  5748. F000:FBC4  00 00 00 18 18 7E            db    0, 0, 0, 18h, 18h, 7Eh
  5749. F000:FBCA  18 18 00 00 00 00            db    18h, 18h, 0, 0, 0, 0
  5750. F000:FBD0  00 00 00 18 18 30            db    0, 0, 0, 18h, 18h, 30h
  5751. F000:FBD6  00 00 00 7E 00 00            db    0, 0, 0, 7Eh, 0, 0
  5752. F000:FBDC  00 00 00 00 00 00            db    0, 0, 0, 0, 0, 0
  5753. F000:FBE2  00 18 18 00 03 06            db    0, 18h, 18h, 0, 3, 6
  5754. F000:FBE8  0C 18 30 60 40 00            db    0Ch, 18h, 30h, 60h, 40h, 0
  5755. F000:FBEE  3E 67 6F 7B 73 63            db    3Eh, 67h, 6Fh, 7Bh, 73h, 63h
  5756. F000:FBF4  3E 00 0C 1C 0C 0C            db    3Eh, 0, 0Ch, 1Ch, 0Ch, 0Ch
  5757. F000:FBFA  0C 0C 3F 00 3C 66            db    0Ch, 0Ch, 3Fh, 0, 3Ch, 66h
  5758. F000:FC00  06 1C 30 66 7E 00            db    6, 1Ch, 30h, 66h, 7Eh, 0
  5759. F000:FC06  3C 66 06 1C 06 66            db    3Ch, 66h, 6, 1Ch, 6, 66h
  5760. F000:FC0C  3C 00 0E 1E 36 66            db    3Ch, 0, 0Eh, 1Eh, 36h, 66h
  5761. F000:FC12  7F 06 06 00 7E 60            db    7Fh, 6, 6, 0, 7Eh, 60h
  5762. F000:FC18  7C 06 06 66 3C 00            db    7Ch, 6, 6, 66h, 3Ch, 0
  5763. F000:FC1E  3C 66 60 7C 66 66            db    3Ch, 66h, 60h, 7Ch, 66h, 66h
  5764. F000:FC24  3C 00 7E 66 06 0C            db    3Ch, 0, 7Eh, 66h, 6, 0Ch
  5765. F000:FC2A  18 18 18 00 3C 66            db    18h, 18h, 18h, 0, 3Ch, 66h
  5766. F000:FC30  66 3C 66 66 3C 00            db    66h, 3Ch, 66h, 66h, 3Ch, 0
  5767. F000:FC36  3C 66 66 3E 06 66            db    3Ch, 66h, 66h, 3Eh, 6, 66h
  5768. F000:FC3C  3C 00 00 18 18 00            db    3Ch, 0, 0, 18h, 18h, 0
  5769. F000:FC42  00 18 18 00 00 18            db    0, 18h, 18h, 0, 0, 18h
  5770. F000:FC48  18 00 00 18 18 30            db    18h, 0, 0, 18h, 18h, 30h
  5771. F000:FC4E  0C 18 30 60 30 18            db    0Ch, 18h, 30h, 60h, 30h, 18h
  5772. F000:FC54  0C 00 00 00 7E 00            db    0Ch, 0, 0, 0, 7Eh, 0
  5773. F000:FC5A  7E 00 00 00 30 18            db    7Eh, 0, 0, 0, 30h, 18h
  5774. F000:FC60  0C 06 0C 18 30 00            db    0Ch, 6, 0Ch, 18h, 30h, 0
  5775. F000:FC66  3C 66 66 0C 18 00            db    3Ch, 66h, 66h, 0Ch, 18h, 0
  5776. F000:FC6C  18 00 3E 63 6F 6B            db    18h, 0, 3Eh, 63h, 6Fh, 6Bh
  5777. F000:FC72  6F 60 3E 00 18 3C            db    6Fh, 60h, 3Eh, 0, 18h, 3Ch
  5778. F000:FC78  66 66 7E 66 66 00            db    66h, 66h, 7Eh, 66h, 66h, 0
  5779. F000:FC7E  7E 33 33 3E 33 33            db    7Eh, 33h, 33h, 3Eh, 33h, 33h
  5780. F000:FC84  7E 00 1F 33 60 60            db    7Eh, 0, 1Fh, 33h, 60h, 60h
  5781. F000:FC8A  60 33 1E 00 7C 36            db    60h, 33h, 1Eh, 0, 7Ch, 36h
  5782. F000:FC90  33 33 33 36 7C 00            db    33h, 33h, 33h, 36h, 7Ch, 0
  5783.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 99
  5784.  
  5785. F000:FC96  7F 31 34 3C 34 31            db    7Fh, 31h, 34h, 3Ch, 34h, 31h
  5786. F000:FC9C  7F 00 7F 31 34 3C            db    7Fh, 0, 7Fh, 31h, 34h, 3Ch
  5787. F000:FCA2  34 30 78 00 1F 33            db    34h, 30h, 78h, 0, 1Fh, 33h
  5788. F000:FCA8  60 60 67 33 1F 00            db    60h, 60h, 67h, 33h, 1Fh, 0
  5789. F000:FCAE  66 66 66 7E 66 66            db    66h, 66h, 66h, 7Eh, 66h, 66h
  5790. F000:FCB4  66 00 3C 18 18 18            db    66h, 0, 3Ch, 18h, 18h, 18h
  5791. F000:FCBA  18 18 3C 00 0F 06            db    18h, 18h, 3Ch, 0, 0Fh, 6
  5792. F000:FCC0  06 06 66 66 3C 00            db    6, 6, 66h, 66h, 3Ch, 0
  5793. F000:FCC6  7B 33 36 3C 36 33            db    7Bh, 33h, 36h, 3Ch, 36h, 33h
  5794. F000:FCCC  7B 00 78 30 30 30            db    7Bh, 0, 78h, 30h, 30h, 30h
  5795. F000:FCD2  31 33 7F 00 63 77            db    31h, 33h, 7Fh, 0, 63h, 77h
  5796. F000:FCD8  7F 7F 6B 63 63 00            db    7Fh, 7Fh, 6Bh, 63h, 63h, 0
  5797. F000:FCDE  63 73 7B 6F 67 63            db    63h, 73h, 7Bh, 6Fh, 67h, 63h
  5798. F000:FCE4  63 00 3E 63 63 63            db    63h, 0, 3Eh, 63h, 63h, 63h
  5799. F000:FCEA  63 63 3E 00 7E 33            db    63h, 63h, 3Eh, 0, 7Eh, 33h
  5800. F000:FCF0  33 3E 30 30 78 00            db    33h, 3Eh, 30h, 30h, 78h, 0
  5801. F000:FCF6  3C 66 66 66 66 3C            db    3Ch, 66h, 66h, 66h, 66h, 3Ch
  5802. F000:FCFC  0F 00 7E 33 33 3E            db    0Fh, 0, 7Eh, 33h, 33h, 3Eh
  5803. F000:FD02  3C 36 73 00 3C 66            db    3Ch, 36h, 73h, 0, 3Ch, 66h
  5804. F000:FD08  60 3C 06 66 3C 00            db    60h, 3Ch, 6, 66h, 3Ch, 0
  5805. F000:FD0E  7E 5A 18 18 18 18            db    7Eh, 5Ah, 18h, 18h, 18h, 18h
  5806. F000:FD14  3C 00 66 66 66 66            db    3Ch, 0, 66h, 66h, 66h, 66h
  5807. F000:FD1A  66 66 3C 00 66 66            db    66h, 66h, 3Ch, 0, 66h, 66h
  5808. F000:FD20  66 66 66 3C 18 00            db    66h, 66h, 66h, 3Ch, 18h, 0
  5809. F000:FD26  63 63 63 6B 7F 77            db    63h, 63h, 63h, 6Bh, 7Fh, 77h
  5810. F000:FD2C  22 00 63 63 36 1C            db    22h, 0, 63h, 63h, 36h, 1Ch
  5811. F000:FD32  36 63 63 00 66 66            db    36h, 63h, 63h, 0, 66h, 66h
  5812. F000:FD38  66 3C 18 18 3C 00            db    66h, 3Ch, 18h, 18h, 3Ch, 0
  5813. F000:FD3E  7F 63 46 0C 19 33            db    7Fh, 63h, 46h, 0Ch, 19h, 33h
  5814. F000:FD44  7F 00 3C 30 30 30            db    7Fh, 0, 3Ch, 30h, 30h, 30h
  5815. F000:FD4A  30 30 3C 00 60 30            db    30h, 30h, 3Ch, 0, 60h, 30h
  5816. F000:FD50  18 0C 06 03 01 00            db    18h, 0Ch, 6, 3, 1, 0
  5817. F000:FD56  3C 0C 0C 0C 0C 0C            db    3Ch, 0Ch, 0Ch, 0Ch, 0Ch, 0Ch
  5818. F000:FD5C  3C 00 08 1C 36 63            db    3Ch, 0, 8, 1Ch, 36h, 63h
  5819. F000:FD62  00 00 00 00 00 00            db    0, 0, 0, 0, 0, 0
  5820. F000:FD68  00 00 00 00 00 FF            db    0, 0, 0, 0, 0, 0FFh
  5821. F000:FD6E  18 18 0C 00 00 00            db    18h, 18h, 0Ch, 0, 0, 0
  5822. F000:FD74  00 00 00 00 3C 06            db    0, 0, 0, 0, 3Ch, 6
  5823. F000:FD7A  3E 26 3B 00 70 30            db    3Eh, 26h, 3Bh, 0, 70h, 30h
  5824. F000:FD80  30 3E 33 33 3E 00            db    30h, 3Eh, 33h, 33h, 3Eh, 0
  5825. F000:FD86  00 00 3C 66 60 62            db    0, 0, 3Ch, 66h, 60h, 62h
  5826. F000:FD8C  3C 00 0E 06 06 3E            db    3Ch, 0, 0Eh, 6, 6, 3Eh
  5827. F000:FD92  66 66 3E 00 00 00            db    66h, 66h, 3Eh, 0, 0, 0
  5828. F000:FD98  3C 66 7E 60 3C 00            db    3Ch, 66h, 7Eh, 60h, 3Ch, 0
  5829. F000:FD9E  1C 36 30 78 30 30            db    1Ch, 36h, 30h, 78h, 30h, 30h
  5830. F000:FDA4  78 00 00 00 3E 66            db    78h, 0, 0, 0, 3Eh, 66h
  5831. F000:FDAA  66 3E 06 7C 70 30            db    66h, 3Eh, 6, 7Ch, 70h, 30h
  5832. F000:FDB0  36 3F 33 33 73 00            db    36h, 3Fh, 33h, 33h, 73h, 0
  5833. F000:FDB6  18 00 38 18 18 18            db    18h, 0, 38h, 18h, 18h, 18h
  5834. F000:FDBC  3C 00 06 00 06 06            db    3Ch, 0, 6, 0, 6, 6
  5835. F000:FDC2  06 66 66 3C 70 30            db    6, 66h, 66h, 3Ch, 70h, 30h
  5836. F000:FDC8  33 36 3C 36 73 00            db    33h, 36h, 3Ch, 36h, 73h, 0
  5837. F000:FDCE  38 18 18 18 18 18            db    38h, 18h, 18h, 18h, 18h, 18h
  5838. F000:FDD4  3C 00 00 00 66 7F            db    3Ch, 0, 0, 0, 66h, 7Fh
  5839. F000:FDDA  6B 6B 63 00 00 00            db    6Bh, 6Bh, 63h, 0, 0, 0
  5840. F000:FDE0  7C 7E 66 66 66 00            db    7Ch, 7Eh, 66h, 66h, 66h, 0
  5841. F000:FDE6  00 00 3C 66 66 66            db    0, 0, 3Ch, 66h, 66h, 66h
  5842.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 100
  5843.  
  5844. F000:FDEC  3C 00 00 00 7E 33            db    3Ch, 0, 0, 0, 7Eh, 33h
  5845. F000:FDF2  33 3E 30 78 00 00            db    33h, 3Eh, 30h, 78h, 0, 0
  5846. F000:FDF8  3E 66 66 3E 06 0F            db    3Eh, 66h, 66h, 3Eh, 6, 0Fh
  5847. F000:FDFE  00 00 6F 3B 30 30            db    0, 0, 6Fh, 3Bh, 30h, 30h
  5848. F000:FE04  78 00 00 00 3E 60            db    78h, 0, 0, 0, 3Eh, 60h
  5849. F000:FE0A  3C 06 7C 00 18 18            db    3Ch, 6, 7Ch, 0, 18h, 18h
  5850. F000:FE10  7E 18 18 1B 0E 00            db    7Eh, 18h, 18h, 1Bh, 0Eh, 0
  5851. F000:FE16  00 00 66 66 66 66            db    0, 0, 66h, 66h, 66h, 66h
  5852. F000:FE1C  3B 00 00 00 66 66            db    3Bh, 0, 0, 0, 66h, 66h
  5853. F000:FE22  66 3C 18 00 00 00            db    66h, 3Ch, 18h, 0, 0, 0
  5854. F000:FE28  63 63 6B 7F 36 00            db    63h, 63h, 6Bh, 7Fh, 36h, 0
  5855. F000:FE2E  00 00 63 36 1C 36            db    0, 0, 63h, 36h, 1Ch, 36h
  5856. F000:FE34  63 00 00 00 E6 66            db    63h, 0, 0, 0, 0E6h, 66h
  5857. F000:FE3A  66 3E 06 7C 00 00            db    66h, 3Eh, 6, 7Ch, 0, 0
  5858. F000:FE40  7E 4C 18 32 7E 00            db    7Eh, 4Ch, 18h, 32h, 7Eh, 0
  5859. F000:FE46  0E 18 18 70 18 18            db    0Eh, 18h, 18h, 70h, 18h, 18h
  5860. F000:FE4C  0E 00 18 18 18 00            db    0Eh, 0, 18h, 18h, 18h, 0
  5861. F000:FE52  18 18 18 00 70 18            db    18h, 18h, 18h, 0, 70h, 18h
  5862. F000:FE58  18 0E 18 18 70 00            db    18h, 0Eh, 18h, 18h, 70h, 0
  5863. F000:FE5E  31 49 46 00 00 00            db    31h, 49h, 46h, 0, 0, 0
  5864. F000:FE64  00 00 00 D8 1C 36            db    0, 0, 0, 0D8h, 1Ch, 36h
  5865. F000:FE6A  63 63 7F 00                db    63h, 63h, 7Fh, 0
  5866.   
  5867.   
  5868.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 1Ah ▒▒▒▒▒
  5869.                 ;
  5870.                 ;   REAL-TIME CLOCK SERVICES
  5871.                 ;
  5872.                 ;      Call with:   ah = sub-function number
  5873.                 ;
  5874.                 ;      Functions:
  5875.                 ;        ah = 0        Get    system timer (increments every 54.92 ms    from int 8)
  5876.                 ;              Returns:    al = # of 24 hour periods since read/powered up
  5877.                 ;                      cx:dx = 32 bit count
  5878.                 ;        ah = 1        Get    system timer & reset 24 hour counter
  5879.                 ;              Returns:    cx:dx = 32 bit count
  5880.                 ;
  5881.                 ;              **** System must have CMOS clock for services 2-0Bh ****
  5882.                 ;        ah = 2        Get    time in BCD format
  5883.                 ;              Returns:    ch/cl = hours/minutes
  5884.                 ;                      dh = seconds
  5885.                 ;                      dl = 0/1 if daylight savings time operation off/on
  5886.                 ;                      carry flag = 0 if clock ok, 1    if stopped
  5887.                 ;        ah = 3        Set    time in BCD format
  5888.                 ;              Call with:  ch/cl = hours/minutes
  5889.                 ;                      dh = seconds
  5890.                 ;                      dl = 0/1 if daylight savings time operation off/on
  5891.                 ;        ah = 4        Get    date in BCD format
  5892.                 ;              Returns:    cx = four digit year
  5893.                 ;                      dh/dl = month/day
  5894.                 ;                      carry flag = 0 if clock ok, 1    if stopped
  5895.                 ;        ah = 5        Set    date in BCD format
  5896.                 ;              Call with:  cx = four digit year
  5897.                 ;                      dh/dl = month/day
  5898.                 ;        ah = 6        Set    24 hour alarm (alarm vectors to int 4Ah)
  5899.                 ;              Call with:  ch/cl = hours/minutes
  5900.                 ;                      dh = seconds
  5901.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 101
  5902.  
  5903.                 ;        ah = 7        Clear alarm
  5904.                 ;        ah = 9        Get    alarm time & status
  5905.                 ;              Returns:    ch/cl = hours/minutes
  5906.                 ;                      dh = seconds
  5907.                 ;                      dl = 0/1 alarm off/on
  5908.                 ;        ah = 0Ah   Get    days counter
  5909.                 ;              Returns:    cx = number of days since 1-Jan-80
  5910.                 ;        ah = 0Bh   Set    days counter
  5911.                 ;              Call with:  cx = number of days since 1-Jan-80
  5912.   
  5913. F000:FE6E            int_1Ah_RTC    proc    near            ;  xref F000:FF27
  5914. F000:FE6E  80 FC 02                cmp    ah,2
  5915. F000:FE71  73 28                jae    loc_ret_399        ; Jump if above or =
  5916. F000:FE73  1E                    push    ds
  5917. F000:FE74  E8 FB04                call    sub_57            ; (F97B)
  5918. F000:FE77  56                    push    si
  5919. F000:FE78  BE 006C                mov    si,6Ch
  5920. F000:FE7B  80 FC 00                cmp    ah,0
  5921. F000:FE7E  FA                    cli                ; Disable interrupts
  5922. F000:FE7F  75 0E                jnz    loc_397            ; Jump if not zero
  5923. F000:FE81  8B 14                mov    dx,[si]
  5924. F000:FE83  8B 4C 02                mov    cx,[si+2]
  5925. F000:FE86  8A 44 04                mov    al,[si+4]
  5926. F000:FE89  C6 44 04 00                mov    byte ptr [si+4],0
  5927. F000:FE8D  EB 09                jmp    short loc_398        ; (FE98)
  5928. F000:FE8F            loc_397:                    ;  xref F000:FE7F
  5929. F000:FE8F  89 14                mov    [si],dx
  5930. F000:FE91  89 4C 02                mov    [si+2],cx
  5931. F000:FE94  C6 44 04 00                mov    byte ptr [si+4],0
  5932. F000:FE98            loc_398:                    ;  xref F000:FE8D
  5933. F000:FE98  FB                    sti                ; Enable interrupts
  5934. F000:FE99  5E                    pop    si
  5935. F000:FE9A  1F                    pop    ds
  5936.   
  5937. F000:FE9B            loc_ret_399:                    ;  xref F000:FE71
  5938. F000:FE9B  CF                    iret                ; Interrupt return
  5939.                 int_1Ah_RTC    endp
  5940.   
  5941. F000:FE9C  0009[00]                db    9 dup (0)
  5942. F000:FEA5  EA A4 E6 00 F0 0D            db    0EAh, 0A4h, 0E6h, 0, 0F0h, 0Dh
  5943. F000:FEAB  0A 00 20 00 00 00            db    0Ah, 0, 20h, 0, 0, 0
  5944. F000:FEB1  00 40 DE                db    0, 40h, 0DEh
  5945. F000:FEB4  37 50 2D 43 4B 20            db    '7P-CK 2(IO)'
  5946. F000:FEBA  32 28 49 4F 29
  5947. F000:FEBF  00                    db    0
  5948. F000:FEC0  50 2D 43 4B 20 31            db    'P-CK 1(M)'
  5949. F000:FEC6  28 4D 29
  5950. F000:FEC9  00                    db    0
  5951. F000:FECA  20 50 2D 43 4B 20            db    ' P-CK Error !'
  5952. F000:FED0  45 72 72 6F 72 20
  5953. F000:FED6  21
  5954. F000:FED7  07 0A 0D 00                db    7, 0Ah, 0Dh, 0
  5955.   
  5956.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  5957.                 ;                   SUBROUTINE
  5958.                 ;
  5959.                 ;         Called from:     F000:E51C, E73F, E82E, E987, EC5A, F06B, FF54
  5960.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 102
  5961.  
  5962.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5963.   
  5964.                 sub_60        proc    near
  5965. F000:FEDB  FB                    sti                ; Enable interrupts
  5966. F000:FEDC  53                    push    bx
  5967. F000:FEDD  51                    push    cx
  5968. F000:FEDE  52                    push    dx
  5969. F000:FEDF  57                    push    di
  5970. F000:FEE0  56                    push    si
  5971. F000:FEE1  55                    push    bp
  5972. F000:FEE2  1E                    push    ds
  5973. F000:FEE3  06                    push    es
  5974. F000:FEE4  8B FC                mov    di,sp
  5975. F000:FEE6  36: 8B 75 10                mov    si,ss:[di+10h]
  5976. F000:FEEA  56                    push    si
  5977. F000:FEEB  C3                    retn
  5978.                 sub_60        endp
  5979.   
  5980. F000:FEEC  0007[00]                db    7 dup (0)
  5981. F000:FEF3  33 FF 33 FF 55 E5            db    33h, 0FFh, 33h, 0FFh, 55h, 0E5h
  5982. F000:FEF9  33 FF 33 FF 54 FF            db    33h, 0FFh, 33h, 0FFh, 54h, 0FFh
  5983. F000:FEFF  33 FF 33 FF                db    33h, 0FFh, 33h, 0FFh
  5984. F000:FF03  E6A4            int_vec_table    dw    offset int_8_timer    ; Initial interrupt vectors
  5985. F000:FF05  E987                    dw    offset int_9_keyboard
  5986. F000:FF07  FA57                    dw    offset int_unused
  5987. F000:FF09  FA57                    dw    offset int_unused
  5988. F000:FF0B  FA57                    dw    offset int_unused
  5989. F000:FF0D  FA57                    dw    offset int_unused
  5990. F000:FF0F  EF57                    dw    offset int_0Eh_floppy
  5991. F000:FF11  FA57                    dw    offset int_unused
  5992. F000:FF13  F065                    dw    offset int_10h_video
  5993. F000:FF15  F84D                    dw    offset int_11h_equip
  5994. F000:FF17  F841                    dw    offset int_12h_memsiz
  5995. F000:FF19  EC59                    dw    offset int_13h_floppy
  5996. F000:FF1B  E739                    dw    offset int_14h_RS232
  5997. F000:FF1D  F859                    dw    offset int_15h_servics
  5998. F000:FF1F  E82E                    dw    offset int_16h_keybd
  5999. F000:FF21  F90B                    dw    offset int_17h_printer
  6000. F000:FF23  0000                    dw    0
  6001. F000:FF25  E6F2                    dw    offset int_19h_bootup
  6002. F000:FF27  FE6E                    dw    offset int_1Ah_RTC
  6003. F000:FF29  FF33                    dw    offset int_return
  6004. F000:FF2B  FF33                    dw    offset int_return
  6005. F000:FF2D  F0A4            int_data_table    dw    offset video_hdwr_tbl1
  6006. F000:FF2F  EFC7                    dw    offset dsk_info_1
  6007. F000:FF31  FF33            video_ptr    dw    0FF33h
  6008.   
  6009.                 ;██████████████████████████████████████████████████████████████████████████
  6010.                 ;
  6011.                 ;            External Entry Point
  6012.                 ;
  6013.                 ;██████████████████████████████████████████████████████████████████████████
  6014.   
  6015. F000:FF33            int_return    proc    near            ;  xref F000:FF29, FF2B
  6016. F000:FF33  CF                    iret                ; Interrupt return
  6017.                 int_return    endp
  6018.   
  6019.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 103
  6020.  
  6021.   
  6022.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  6023.                 ;                   SUBROUTINE
  6024.                 ;
  6025.                 ;         Called from:     F000:FA5C
  6026.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  6027.   
  6028.                 sub_61        proc    near
  6029. F000:FF34  B0 0B                mov    al,0Bh
  6030. F000:FF36  EE                    out    dx,al            ; port 20h, 8259-1 int command
  6031. F000:FF37  25 0000                and    ax,0
  6032. F000:FF3A  50                    push    ax
  6033. F000:FF3B  58                    pop    ax
  6034. F000:FF3C  EC                    in    al,dx            ; port 20h, 8259-1 int IRR/ISR
  6035. F000:FF3D  02 E0                add    ah,al
  6036. F000:FF3F  50                    push    ax
  6037. F000:FF40  58                    pop    ax
  6038. F000:FF41  42                    inc    dx
  6039. F000:FF42  EC                    in    al,dx            ; port 21h, 8259-1 int IMR
  6040. F000:FF43  0A C4                or    al,ah
  6041. F000:FF45  50                    push    ax
  6042. F000:FF46  58                    pop    ax
  6043. F000:FF47  EE                    out    dx,al            ; port 21h, 8259-1 int comands
  6044. F000:FF48  4A                    dec    dx
  6045. F000:FF49  90                    nop
  6046. F000:FF4A  B0 20                mov    al,20h            ; ' '
  6047. F000:FF4C  EE                    out    dx,al            ; port 20h, 8259-1 int command
  6048.                                         ;  al = 20h, end of interrupt
  6049. F000:FF4D  C3                    retn
  6050.                 sub_61        endp
  6051.   
  6052. F000:FF4E  00 00 00 00 00 CF            db    0, 0, 0, 0, 0, 0CFh
  6053.   
  6054.   
  6055.                 ; ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ int 5 ▒▒▒▒▒▒▒
  6056.                 ;
  6057.                 ;   PRINT SCREEN
  6058.                 ;
  6059.                 ;      Send the    present    active display screen contents to the printer if
  6060.                 ;      the printer is idle and not out of paper.  The status of    the print
  6061.                 ;      screen function is in prn_screen_stat at 0050:0000.  Control-Break
  6062.                 ;      will terminate an active print screen operation.
  6063.   
  6064. F000:FF54            int_5_prn_scrn    proc    near
  6065. F000:FF54  E8 FF84                call    sub_60            ; (FEDB)
  6066. F000:FF57  BB 0050                mov    bx,seg seg_c
  6067. F000:FF5A  8E C3                mov    es,bx
  6068. F000:FF5C  BD 0000                mov    bp,0
  6069. F000:FF5F  26: F6 46 00 80            test    byte ptr es:[bp],80h
  6070. F000:FF64  75 07                jnz    loc_400            ; Jump if not zero
  6071. F000:FF66  26: 80 7E 00 00            cmp    byte ptr es:[bp],0
  6072. F000:FF6B  75 6E                jne    loc_405            ; Jump if not equal
  6073. F000:FF6D            loc_400:                    ;  xref F000:FF64
  6074. F000:FF6D  26: C6 46 00 01            mov    byte ptr es:[bp],1
  6075. F000:FF72  50                    push    ax
  6076. F000:FF73  B0 0A                mov    al,0Ah
  6077. F000:FF75  E8 0066                call    sub_62            ; (FFDE)
  6078.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 104
  6079.  
  6080. F000:FF78  B0 0D                mov    al,0Dh
  6081. F000:FF7A  E8 0061                call    sub_62            ; (FFDE)
  6082. F000:FF7D  E8 F9FB                call    sub_57            ; (F97B)
  6083. F000:FF80  8A 3E 0062                mov    bh,video_page        ; (0040:0062=0)
  6084. F000:FF84  E8 F695                call    sub_50            ; (F61C)
  6085. F000:FF87  32 ED                xor    ch,ch            ; Zero register
  6086. F000:FF89  8B 3D                mov    di,[di]
  6087. F000:FF8B  BA 0000                mov    dx,0
  6088. F000:FF8E            loc_401:                    ;  xref F000:FFB6, FFCE
  6089. F000:FF8E  8B F2                mov    si,dx
  6090. F000:FF90  B4 02                mov    ah,2
  6091. F000:FF92  CD 10                int    10h            ; Video display   ah=functn 02h
  6092.                                         ;  set cursor location in dx
  6093. F000:FF94  B4 08                mov    ah,8
  6094. F000:FF96  CD 10                int    10h            ; Video display   ah=functn 08h
  6095.                                         ;  get char al & attrib ah @curs
  6096. F000:FF98  B4 00                mov    ah,0
  6097. F000:FF9A  3C 00                cmp    al,0
  6098. F000:FF9C  75 02                jne    loc_402            ; Jump if not equal
  6099. F000:FF9E  B0 20                mov    al,20h            ; ' '
  6100. F000:FFA0            loc_402:                    ;  xref F000:FF9C
  6101. F000:FFA0  E8 003B                call    sub_62            ; (FFDE)
  6102. F000:FFA3  F6 C4 29                test    ah,29h            ; ')'
  6103. F000:FFA6  74 05                jz    loc_403            ; Jump if zero
  6104. F000:FFA8  FE CD                dec    ch
  6105. F000:FFAA  EB 24                jmp    short loc_404        ; (FFD0)
  6106. F000:FFAC  90                    db    90h
  6107. F000:FFAD            loc_403:                    ;  xref F000:FFA6
  6108. F000:FFAD  8B D6                mov    dx,si
  6109. F000:FFAF  80 C2 01                add    dl,1
  6110. F000:FFB2  3A 16 004A                cmp    dl,byte ptr video_columns    ; (0040:004A=50h)
  6111. F000:FFB6  75 D6                jne    loc_401            ; Jump if not equal
  6112. F000:FFB8  B2 00                mov    dl,0
  6113. F000:FFBA  8B F2                mov    si,dx
  6114. F000:FFBC  B0 0A                mov    al,0Ah
  6115. F000:FFBE  E8 001D                call    sub_62            ; (FFDE)
  6116. F000:FFC1  B0 0D                mov    al,0Dh
  6117. F000:FFC3  E8 0018                call    sub_62            ; (FFDE)
  6118. F000:FFC6  8B D6                mov    dx,si
  6119. F000:FFC8  80 C6 01                add    dh,1
  6120. F000:FFCB  80 FE 19                cmp    dh,19h
  6121. F000:FFCE  75 BE                jne    loc_401            ; Jump if not equal
  6122. F000:FFD0            loc_404:                    ;  xref F000:FFAA
  6123. F000:FFD0  8B D7                mov    dx,di
  6124. F000:FFD2  B4 02                mov    ah,2
  6125. F000:FFD4  CD 10                int    10h            ; Video display   ah=functn 02h
  6126.                                         ;  set cursor location in dx
  6127. F000:FFD6  58                    pop    ax
  6128. F000:FFD7  26: 88 6E 00                mov    es:[bp],ch
  6129. F000:FFDB            loc_405:                    ;  xref F000:FF6B
  6130. F000:FFDB  E9 F4A5                jmp    loc_296            ; (F483)
  6131.                 int_5_prn_scrn    endp
  6132.   
  6133.   
  6134.                 ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  6135.                 ;                   SUBROUTINE
  6136.                 ;
  6137.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 105
  6138.  
  6139.                 ;         Called from:     F000:FF75, FF7A, FFA0, FFBE, FFC3
  6140.                 ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  6141.   
  6142.                 sub_62        proc    near
  6143. F000:FFDE  B4 00                mov    ah,0
  6144. F000:FFE0  BA 0000                mov    dx,0
  6145. F000:FFE3  CD 17                int    17h            ; Printer  dx=prn#, ah=func 10h
  6146.                                         ;  print char in al
  6147. F000:FFE5  C3                    retn
  6148.                 sub_62        endp
  6149.   
  6150. F000:FFE6  000A[90]                db    10 dup (90h)
  6151.   
  6152.   
  6153.                 ; ══════ BIOS EXTERNAL ENTRY POINT ═══════════════════════════════════════
  6154.   
  6155. F000:FFF0            power_on_reset:
  6156. F000:FFF0  EA F000:E05B                jmp    far ptr system_reset    ; (E05B)
  6157. F000:FFF5  30 31 2F 30 31 2F    rom_versn_date    db    '01/01/81T'        ; BIOS version date code
  6158. F000:FFFB  38 31 54
  6159. F000:FFFE  FE            model_type    db    0FEh            ; Model  FFh = PC
  6160.                                         ;        FEh = 1st XT
  6161.                                         ;        FBh = later XTs
  6162.                                         ;        FCh = AT type (286/386)
  6163.                                         ;        FAh = models 25/30
  6164.                                         ;        F9h = IBM lap-tops
  6165.                                         ;        F8h = models 70/80 (80386)
  6166. F000:FFFF  26            model_sub_type    db    26h
  6167.   
  6168.                 seg_d        ends
  6169.   
  6170.   
  6171.   
  6172.                         end
  6173.      bios.lst        BIOS ROM Analysis             Sourcer Listing v2.15    27-Nov-89   7:47 pm   Page 106
  6174.  
  6175.   
  6176.                 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ CROSS REFERENCE - KEY ENTRY POINTS ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  6177.   
  6178.                     seg:off    type       label
  6179.                    ---- ----   ----   ---------------
  6180.                    F000:E05B   near   system_reset
  6181.                    F000:E555   near   int_2_NMI
  6182.                    F000:E6A4   near   int_8_timer
  6183.                    F000:E6F2   near   int_19h_bootup
  6184.                    F000:E739   near   int_14h_RS232
  6185.                    F000:E82E   near   int_16h_keybd
  6186.                    F000:E987   near   int_9_keyboard
  6187.                    F000:EC59   near   int_13h_floppy
  6188.                    F000:EF57   near   int_0Eh_floppy
  6189.                    F000:F065   near   int_10h_video
  6190.                    F000:F841   near   int_12h_memsiz
  6191.                    F000:F84D   near   int_11h_equip
  6192.                    F000:F859   near   int_15h_servics
  6193.                    F000:F90B   near   int_17h_printer
  6194.                    F000:FA57   near   int_unused
  6195.                    F000:FE6E   near   int_1Ah_RTC
  6196.                    F000:FF33   near   int_return
  6197.                    F000:FF54   near   int_5_prn_scrn
  6198.                    F000:FFF0   extn   power_on_reset
  6199.                    F600:0000   near   int_18h_basic
  6200.   
  6201.