I/O Map

I reverse-engineered some I/O addresses from the ROM (specifically the CRT Controller and the timer, but then I found that MAME emulates the JB-3000 and that all the I/O addresses and more are documented there.

	/* Main Unit 0-0x7ff */
	// 0-3 8255A PPI parallel port
	map(0x00, 0x03).rw(m_ppi8255, FUNC(i8255_device::read), FUNC(i8255_device::write));

	// Discrete latches
	map(0x04, 0x04).r(FUNC(myb3k_state::myb3k_kbd_r));
	map(0x04, 0x04).w(FUNC(myb3k_state::myb3k_video_mode_w)); // b0=40CH, b1=80CH, b2=16 raster
	map(0x05, 0x05).r(FUNC(myb3k_state::myb3k_io_status_r)); // printer connector bits: b3=fault b2=paper out b1 or b0=busy
	map(0x05, 0x05).w(FUNC(myb3k_state::dma_segment_w)); // b0-b3=addr, b6=A b7=B
	map(0x06, 0x06).portr("DSW2");

	// 8-9 8259A interrupt controller
	map(0x08, 0x09).rw(m_pic8259, FUNC(pic8259_device::read), FUNC(pic8259_device::write));

	// c-f 8253 PIT timer
	map(0x0c, 0x0f).rw(m_pit8253, FUNC(pit8253_device::read), FUNC(pit8253_device::write));

	// 10-18 8257 DMA
	map(0x10, 0x18).rw(m_dma8257, FUNC(i8257_device::read), FUNC(i8257_device::write));

	// 1c-1d HD46505S CRTC
	map(0x1c, 0x1c).rw(m_crtc, FUNC(hd6845s_device::status_r), FUNC(hd6845s_device::address_w));
	map(0x1d, 0x1d).rw(m_crtc, FUNC(hd6845s_device::register_r), FUNC(hd6845s_device::register_w));

	/* Expansion Unit 0x800 - 0xfff */

BIOS


F000:E000 EA4BE000F0    JMP     F000:E04B

F000:E005                 52 4F 4D-20 42 49 4F 53 20 76 65        ROM BIOS ve
F000:E010  72 73 69 6F 6E 20 32 2E-30 37 20 20 39 2D 31 31   rsion 2.07  9-11
F000:E020  2D 31 39 38 32 0D 0A 24                           -1982..$

; From reset code at 0xFFFF0, DS = E000, SI = 0005
; Check for some kind of an option ROM at E000:0000
F000:E028 8CC8          MOV     AX,CS
F000:E02A 8EC0          MOV     ES,AX            ; ES = CS
F000:E02C BF40E0        MOV     DI,E040          ; Pointer to text "JB3000"
F000:E02F 90            NOP
F000:E030 B90600        MOV     CX,0006
F000:E033 F3A6          REPE    CMPSB            ; Compare DS:SI++ to ES:DI++
F000:E035 750F          JNZ     E046
F000:E037 2EFF2E3CE0    JMP     FAR CS:[E03C]    ; and jump to E000:0000 if the string matches

F000:E03C  00 00 00 E0                                       ....
F000:E040  4A 42 33 30 30 30                                 JB3000

; Otherwise no code at E000:0000, so here we are.
F000:E046 32FF          XOR     BH,BH            ; From reset, BH = 0
F000:E048 EB05          JMP     E04F

F000:E04A 90            NOP

F000:E04B FA            CLI                      ; From 0xFE000
F000:E04C FC            CLD
F000:E04D B701          MOV     BH,01

F000:E04F 8CC8          MOV     AX,CS            ; BH = 0, here after reset. BH = 1, here from F000:E000
F000:E051 8ED8          MOV     DS,AX
F000:E053 B082          MOV     AL,82
F000:E055 BA0300        MOV     DX,0003
F000:E058 EE            OUT     DX,AL ; 0x0003 = 0x82
F000:E059 B018          MOV     AL,18
F000:E05B B200          MOV     DL,00
F000:E05D EE            OUT     DX,AL ; 0x0000 = 0x18
F000:E05E B0AB          MOV     AL,AB
F000:E060 B202          MOV     DL,02
F000:E062 EE            OUT     DX,AL ; 0x0002 = 0xAB
F000:E063 B018          MOV     AL,18
F000:E065 B200          MOV     DL,00
F000:E067 EE            OUT     DX,AL ; 0x0000 = 0x18
F000:E068 32C0          XOR     AL,AL
F000:E06A B203          MOV     DL,03
F000:E06C EE            OUT     DX,AL ; 0x0003 = 0x00
F000:E06D D40A          AAM     0A               ; https://www.pcjs.org/documents/manuals/intel/8086/ops/AAM/
                                                 ; This makes no sense because result (of 0 adjusted, still 0) gets discarded
F000:E06F B001          MOV     AL,01
F000:E071 EE            OUT     DX,AL ; 0x0003 = 0x01
F000:E072 B076          MOV     AL,76
F000:E074 BA0F00        MOV     DX,000F ; you've been changing DL all along, DH is still zero... why?
F000:E077 EE            OUT     DX,AL  ; 0x000F = 0x76
F000:E078 B87404        MOV     AX,0474
F000:E07B B20D          MOV     DL,0D
F000:E07D EE            OUT     DX,AL ; 0x000D = 0x74
F000:E07E 8AC4          MOV     AL,AH
F000:E080 EE            OUT     DX,AL ; 0x000D = 0x04
F000:E081 B034          MOV     AL,34
F000:E083 B20F          MOV     DL,0F
F000:E085 EE            OUT     DX,AL 0x000F = 0x34
F000:E086 B811E9        MOV     AX,E911
F000:E089 B20C          MOV     DL,0C
F000:E08B EE            OUT     DX,AL 0x000C = 0x11
F000:E08C 8AC4          MOV     AL,AH
F000:E08E EE            OUT     DX,AL 0x000C = 0xE9
F000:E08F B002          MOV     AL,02
F000:E091 B204          MOV     DL,04
F000:E093 EE            OUT     DX,AL 0x0004 = 0x02

; get 16 bytes from E953 and write it to I/O. This is obviously the 6845
F000:E094 B91000        MOV     CX,0010
F000:E097 33F6          XOR     SI,SI
F000:E099 32DB          XOR     BL,BL

F000:E09B B21C          MOV     DL,1C
F000:E09D 8AC3          MOV     AL,BL
F000:E09F EE            OUT     DX,AL ; 0x001C = 0,1,...,0xF
F000:E0A0 8A8453E9      MOV     AL,[SI+E953]
F000:E0A4 B21D          MOV     DL,1D
F000:E0A6 EE            OUT     DX,AL ; 0x001D = 37 28 2C 84 1F 00 19 1B 00 07 60 07 00 00 00 00 
F000:E0A7 46            INC     SI
F000:E0A8 FEC3          INC     BL
F000:E0AA E2EF          LOOP    E09B
;
; Horizontal total        0x37 55
; Horizontal displayed    0x28 40
; H Sync                  0x2C 44
; Sync Width              0x84    ? Only four LSB important
; Vertical Total          0x1F 31
; V total adjust          0x00
; Vertical displayed      0x19 25
; V sync position         0x1B
; Interlace mode          0x00
; Max Scan Line           0x07
; Cursor Start            0x60
; Cursor End              0x07
; Start Address           0x0000
; Cursor                  0x0000

; This looks like the timer
F000:E0AC B013          MOV     AL,13  ;ICW1 - EDGE, SNGL, ICW4
F000:E0AE B208          MOV     DL,08
F000:E0B0 EE            OUT     DX,AL ; 0x0008 = 0x13
F000:E0B1 B040          MOV     AL,40
F000:E0B3 B209          MOV     DL,09
F000:E0B5 EE            OUT     DX,AL ; 0x0009 = 0x40 ;SETUP ICW2
F000:E0B6 B003          MOV     AL,03
F000:E0B8 EE            OUT     DX,AL ; 0x0009 = 0x03 ;SETUP ICW4

F000:E0B9 33C0          XOR     AX,AX
F000:E0BB 8ED0          MOV     SS,AX
F000:E0BD BCFFFF        MOV     SP,FFFF ; 0000:FFFF
F000:E0C0 22FF          AND     BH,BH
F000:E0C2 7413          JZ      E0D7    ; ? warm or coldstart... remember BH from E04D ?

; Warm, so interrupt vectors are in place and we can INT, except E1AA then sets up the vectors again
; as if they are not in place.
F000:E0C4 B401          MOV     AH,01
F000:E0C6 CD6E          INT     6E          ; E599, AH=1, AL=0 ; point ES:BX at 0x08004 (AH = 1) or 0x08008 (AH = 2)
F000:E0C8 268B2F        MOV     BP,ES:[BX]
F000:E0CB F7C5FF07      TEST    BP,07FF     ; check for cookie of some type
F000:E0CF 7506          JNZ     E0D7        ; otherwise cold
F000:E0D1 BD0100        MOV     BP,0001
F000:E0D4 E9D300        JMP     E1AA        ; warm

; Cold, so test memory 
F000:E0D7 B8AAAA        MOV     AX,AAAA
F000:E0DA 33FF          XOR     DI,DI
F000:E0DC 8EC7          MOV     ES,DI
F000:E0DE B90080        MOV     CX,8000
F000:E0E1 FC            CLD
F000:E0E2 F3AB          REP     STOSW
F000:E0E4 B90080        MOV     CX,8000
F000:E0E7 F3AF          REPE    SCASW
F000:E0E9 750A          JNZ     E0F5

F000:E0EB 8CC3          MOV     BX,ES
F000:E0ED 81C30010      ADD     BX,1000
F000:E0F1 8EC3          MOV     ES,BX
F000:E0F3 EBE9          JMP     E0DE

F000:E0F5 83FF02        CMP     DI,+02
F000:E0F8 7506          JNZ     E100
F000:E0FA 8CC3          MOV     BX,ES
F000:E0FC 23DB          AND     BX,BX
F000:E0FE 7503          JNZ     E103
F000:E100 EB25          JMP     E127
F000:E102 90            NOP
F000:E103 3DAAAA        CMP     AX,AAAA
F000:E106 7505          JNZ     E10D
F000:E108 B85555        MOV     AX,5555
F000:E10B EBCD          JMP     E0DA
F000:E10D 8CC5          MOV     BP,ES
F000:E10F B8AAAA        MOV     AX,AAAA

F000:E112 33FF          XOR     DI,DI
F000:E114 BA00D0        MOV     DX,D000
F000:E117 8EC2          MOV     ES,DX
F000:E119 B90080        MOV     CX,8000
F000:E11C F3AB          REP     STOSW
F000:E11E B90080        MOV     CX,8000
F000:E121 F3AF          REPE    SCASW
F000:E123 7410          JZ      E135
F000:E125 B009          MOV     AL,09

F000:E127 B00A          MOV     AL,0A
F000:E129 BA0300        MOV     DX,0003
F000:E12C EE            OUT     DX,AL
F000:E12D 83EF02        SUB     DI,+02
F000:E130 268B05        MOV     AX,ES:[DI]
F000:E133 EBFB          JMP     E130                  ; I'm guessing this is where we end if mem test fails?

F000:E135 3DAAAA        CMP     AX,AAAA
F000:E138 7505          JNZ     E13F
F000:E13A B85555        MOV     AX,5555
F000:E13D EBD3          JMP     E112                  ; repeat with 0x5555

F000:E13F B700          MOV     BH,00
F000:E141 B800FC        MOV     AX,FC00
F000:E144 E82800        CALL    E16F
F000:E147 740D          JZ      E156
F000:E149 B80608        MOV     AX,0806
F000:E14C E8A703        CALL    E4F6
F000:E14F 8AC3          MOV     AL,BL
F000:E151 B420          MOV     AH,20
F000:E153 E8A003        CALL    E4F6
F000:E156 B800FE        MOV     AX,FE00
F000:E159 E81300        CALL    E16F    ; Checksum ROM?
F000:E15C 744C          JZ      E1AA
F000:E15E B80708        MOV     AX,0807
F000:E161 E89203        CALL    E4F6
F000:E164 8AC3          MOV     AL,BL
F000:E166 B420          MOV     AH,20
F000:E168 E88B03        CALL    E4F6
F000:E16B EB3D          JMP     E1AA

F000:E16D 90            NOP
F000:E16E F4            HLT

; Checksum FE000 - FFFFF
F000:E16F 8EC0          MOV     ES,AX
F000:E171 33F6          XOR     SI,SI
F000:E173 33C0          XOR     AX,AX
F000:E175 B90020        MOV     CX,2000
F000:E178 260204        ADD     AL,ES:[SI]
F000:E17B 46            INC     SI
F000:E17C E2FA          LOOP    E178
F000:E17E F6D0          NOT     AL
F000:E180 FEC0          INC     AL
F000:E182 8AD8          MOV     BL,AL
F000:E184 22C0          AND     AL,AL
F000:E186 741F          JZ      E1A7
F000:E188 22FF          AND     BH,BH
F000:E18A 751B          JNZ     E1A7
F000:E18C B7FF          MOV     BH,FF
F000:E18E 53            PUSH    BX
F000:E18F E86F04        CALL    E601
F000:E192 E88E01        CALL    E323
F000:E195 FA            CLI
F000:E196 BA0900        MOV     DX,0009
F000:E199 B0FF          MOV     AL,FF
F000:E19B EE            OUT     DX,AL
F000:E19C B00C          MOV     AL,0C
F000:E19E B40A          MOV     AH,0A
F000:E1A0 50            PUSH    AX             ; Fake INT 60
F000:E1A1 2EFF1EF0E3    CALL    FAR CS:[E3F0]  ; Function 0A print char in AL
F000:E1A6 5B            POP     BX
F000:E1A7 22DB          AND     BL,BL
F000:E1A9 C3            RET



;F000:E460                         -00 00 86 00 00 00 81 00           ........
;F000:E470  C0 03 40 00 40 42 10 01

; move 12 bytes from E468 to 0080:0000 (0x08000)
F000:E1AA BE68E4        MOV     SI,E468
F000:E1AD 90            NOP
F000:E1AE BF8000        MOV     DI,0080
F000:E1B1 8EC7          MOV     ES,DI
F000:E1B3 BF0000        MOV     DI,0000
F000:E1B6 B90C00        MOV     CX,000C
F000:E1B9 F3A4          REP     MOVSB            ; ES:DI++ = DS:SI++

F000:E1BB E84304        CALL    E601             ; copy E614-E754 to 0x08600
F000:E1BE E86201        CALL    E323             ; Copy E3BE-E3ED to 0x08300


; Store F000:E478 from 0x00000 to 0x003FF (all vectors)
F000:E1C1 BB78E4        MOV     BX,E478
F000:E1C4 90            NOP
F000:E1C5 8CCA          MOV     DX,CS
F000:E1C7 33FF          XOR     DI,DI
F000:E1C9 8EC7          MOV     ES,DI           ; ES = 0
F000:E1CB B90001        MOV     CX,0100
F000:E1CE 8BC3          MOV     AX,BX
F000:E1D0 AB            STOSW                   ; AX -> ES:DI++
F000:E1D1 8BC2          MOV     AX,DX           ; CS
F000:E1D3 AB            STOSW                   ; AX -> ES:DI++
F000:E1D4 E2F8          LOOP    E1CE

; Move vector table at F000:E3F0 to 0000:0180 to 0000:01CF (IBM "reserved for user programs")
F000:E1D6 BEF0E3        MOV     SI,E3F0
F000:E1D9 90            NOP
F000:E1DA BF8001        MOV     DI,0180
F000:E1DD B95000        MOV     CX,0050          ; 80 bytes, 20 vectors 
F000:E1E0 F3A4          REP     MOVSB            ; ES:DI++ = DS:SI++

; move 32 bytes from table at F000:E440 to 0x00100-0x0011F
F000:E1E2 B81000        MOV     AX,0010
F000:E1E5 8EC0          MOV     ES,AX
F000:E1E7 B92000        MOV     CX,0020          ; 32 bytes
F000:E1EA BE40E4        MOV     SI,E440
F000:E1ED 90            NOP
F000:E1EE 33FF          XOR     DI,DI
F000:E1F0 F3A4          REP     MOVSB            ; ES:DI++ = DS:SI++
; move 8 bytes from F000:E460 to 0x00140-0x00147
F000:E1F2 83C720        ADD     DI,+20
F000:E1F5 B90800        MOV     CX,0008          ; 8 bytes
F000:E1F8 F3A4          REP     MOVSB            ; ES:DI++ = DS:SI++

/*
; Now our vector table should look like
INT ADDR Vector
000 0000 78 E4 00 F0 "Illegal Interrupt"
...
03F 00FC 78 E4 00 F0 "Illegal Interrupt"

040 0100 2D FD 00 F0
041 0104 98 E4 00 F0
042 0108 78 E4 00 F0 "Illegal Interrupt"
043 010C 78 E4 00 F0 "Illegal Interrupt"
044 0110 78 E4 00 F0 "Illegal Interrupt"
045 0114 76 EA 00 F0
046 0118 37 F9 00 F0
047 011C 78 E4 00 F0 "Illegal Interrupt"

050 0140 54 F9 00 F0
051 0144 3D F9 00 F0

060 0180 57 E7 00 F0
061 0184 B6 F2 00 F0
062 0188 78 E4 00 F0 "Illegal Interrupt"
063 018C D2 F3 00 F0 Disk I/O
064 0190 78 E4 00 F0 "Illegal Interrupt"
065 0194 00 A0 00 F0
066 0198 B6 FC 00 F0
067 019C 78 E4 00 F0 "Illegal Interrupt"
068 01A0 FC FE 00 F0
069 01A4 00 A8 00 F0
06A 01A8 86 FE 00 F0
06B 01AC 78 E4 00 F0 "Illegal Interrupt"
06C 01B0 78 E4 00 F0 "Illegal Interrupt"
06D 01B4 E1 E4 00 F0
06E 01B8 99 E5 00 F0
06F 01BC 00 00 80 00
070 01C0 97 E4 00 F0
071 01C4 97 E4 00 F0
072 01C8 97 E4 00 F0
073 01CC 97 E4 00 F0
*/



F000:E1FA FB            STI
F000:E1FB BA0900        MOV     DX,0009
F000:E1FE B000          MOV     AL,00
F000:E200 EE            OUT     DX,AL     ; 0x0009 = 0x00
F000:E201 BA0600        MOV     DX,0006
F000:E204 E82F01        CALL    E336       ; IN AL,0006, invert all bits, swap bits LSB..MSB
F000:E207 B401          MOV     AH,01
F000:E209 CD6E          INT     6E

F000:E20B 26884704      MOV     ES:[BX+04],AL
F000:E20F F7C50100      TEST    BP,0001
F000:E213 750E          JNZ     E223
F000:E215 A808          TEST    AL,08
F000:E217 B90008        MOV     CX,0800
F000:E21A 7402          JZ      E21E
F000:E21C D1E1          SHL     CX,1
F000:E21E 2BE9          SUB     BP,CX
F000:E220 26892F        MOV     ES:[BX],BP
F000:E223 B201          MOV     DL,01
F000:E225 E80E01        CALL    E336      ; IN AL, 0001, invert all bits, swap bits LSB..MSB
F000:E228 26884703      MOV     ES:[BX+03],AL
F000:E22C B104          MOV     CL,04
F000:E22E D2E8          SHR     AL,CL
F000:E230 2403          AND     AL,03
F000:E232 BE74E4        MOV     SI,E474
F000:E235 90            NOP
F000:E236 98            CBW
F000:E237 03F0          ADD     SI,AX
F000:E239 8A04          MOV     AL,[SI]
F000:E23B B400          MOV     AH,00
F000:E23D CD60          INT     60
F000:E23F B81001        MOV     AX,0110
F000:E242 CD68          INT     68
F000:E244 BEC0DF        MOV     SI,DFC0
F000:E247 E80603        CALL    E550
F000:E24A B401          MOV     AH,01
F000:E24C CD6E          INT     6E
F000:E24E 26F6470480    TEST    BYTE PTR ES:[BX+04],80
F000:E253 7406          JZ      E25B
F000:E255 BE05E0        MOV     SI,E005
F000:E258 E8F502        CALL    E550
F000:E25B 33ED          XOR     BP,BP
F000:E25D B401          MOV     AH,01
F000:E25F CD6E          INT     6E
F000:E261 268A4703      MOV     AL,ES:[BX+03]
F000:E265 8AF0          MOV     DH,AL
F000:E267 D0E8          SHR     AL,1
F000:E269 2403          AND     AL,03
F000:E26B 26884707      MOV     ES:[BX+07],AL
F000:E26F D0EE          SHR     DH,1
F000:E271 7312          JAE     E285
F000:E273 50            PUSH    AX
F000:E274 B81800        MOV     AX,0018
F000:E277 CD6E          INT     6E
F000:E279 26C747032005  MOV     WORD PTR ES:[BX+03],0520
F000:E27F 26C6470701    MOV     BYTE PTR ES:[BX+07],01
F000:E284 58            POP     AX
F000:E285 B400          MOV     AH,00
F000:E287 CD63          INT     63
F000:E289 7259          JB      E2E4 ; "Drive not ready"


F000:E28B BB0010        MOV     BX,1000
F000:E28E 8EDB          MOV     DS,BX
F000:E290 33DB          XOR     BX,BX
F000:E292 B406          MOV     AH,06
F000:E294 B90540        MOV     CX,4005
F000:E297 B2C4          MOV     DL,C4
F000:E299 50            PUSH    AX
F000:E29A CD63          INT     63
F000:E29C 249F          AND     AL,9F
F000:E29E 58            POP     AX
F000:E29F 7411          JZ      E2B2
F000:E2A1 23ED          AND     BP,BP
F000:E2A3 7546          JNZ     E2EB  ; "Bad disk unusable"
F000:E2A5 B408          MOV     AH,08
F000:E2A7 CD63          INT     63
F000:E2A9 26C60700      MOV     BYTE PTR ES:[BX],00
F000:E2AD BD0100        MOV     BP,0001
F000:E2B0 EBAB          JMP     E25D

F000:E2B2 8A4F03        MOV     CL,[BX+03]
F000:E2B5 FEC1          INC     CL
F000:E2B7 50            PUSH    AX
F000:E2B8 B84000        MOV     AX,0040
F000:E2BB D3E0          SHL     AX,CL
F000:E2BD 8BC8          MOV     CX,AX
F000:E2BF 58            POP     AX
F000:E2C0 50            PUSH    AX
F000:E2C1 B408          MOV     AH,08
F000:E2C3 CD63          INT     63
F000:E2C5 26894F04      MOV     ES:[BX+04],CX
F000:E2C9 33D2          XOR     DX,DX
F000:E2CB B80004        MOV     AX,0400
F000:E2CE F7F1          DIV     CX
F000:E2D0 8BC8          MOV     CX,AX
F000:E2D2 58            POP     AX
F000:E2D3 33DB          XOR     BX,BX
F000:E2D5 BA0001        MOV     DX,0100
F000:E2D8 B402          MOV     AH,02
F000:E2DA 8BE8          MOV     BP,AX
F000:E2DC CD63          INT     63
F000:E2DE 7312          JAE     E2F2
F000:E2E0 3C02          CMP     AL,02
F000:E2E2 7507          JNZ     E2EB
F000:E2E4 BEA7E3        MOV     SI,E3A7  "Drive not ready, set$"
F000:E2E7 90            NOP
F000:E2E8 EB25          JMP     E30F
F000:E2EA 90            NOP
F000:E2EB BE8BE3        MOV     SI,E38B  "Bad disk unusable, change$"
F000:E2EE 90            NOP
F000:E2EF EB1E          JMP     E30F

F000:E2F1 90            NOP
F000:E2F2 BE0300        MOV     SI,0003
F000:E2F5 BF4BE3        MOV     DI,E34B   "IPL"
F000:E2F8 90            NOP
F000:E2F9 8CC8          MOV     AX,CS
F000:E2FB 8EC0          MOV     ES,AX
F000:E2FD B90300        MOV     CX,0003
F000:E300 F3A6          REPE    CMPSB    ; Compare DS:SI++ to ES:DI++
F000:E302 7507          JNZ     E30B
F000:E304 8BC5          MOV     AX,BP
F000:E306 2EFF2E47E3    JMP     FAR CS:[E347] ; jump to boot loader at 1000:0000 0x10000

F000:E30B BE4EE3        MOV     SI,E34E  "Not JB-3000 disk, change$"
F000:E30E 90            NOP
F000:E30F 8CC8          MOV     AX,CS
F000:E311 8ED8          MOV     DS,AX
F000:E313 E83A02        CALL    E550
F000:E316 BE69E3        MOV     SI,E369  " disk & strike any key when ready$"
F000:E319 90            NOP
F000:E31A E83302        CALL    E550
F000:E31D E85802        CALL    E578
F000:E320 E9DDFC        JMP     E000 ; Warmstart




; Copy E3BE-E3ED to 0x08300
F000:E323 B88300        MOV     AX,0083
F000:E326 8EC0          MOV     ES,AX
F000:E328 BEBEE3        MOV     SI,E3BE
F000:E32B 90            NOP
F000:E32C BF0000        MOV     DI,0000
F000:E32F 8B0EEEE3      MOV     CX,[E3EE]
F000:E333 F3A4          REP     MOVSB          ; ES:DI++ = DS:SI++
F000:E335 C3            RET

; Read AL from DX, invert all bits, change bit order LSB..MSB
F000:E336 EC            IN      AL,DX
F000:E337 F6D0          NOT     AL
F000:E339 32E4          XOR     AH,AH
F000:E33B B90800        MOV     CX,0008
F000:E33E D0E8          SHR     AL,1
F000:E340 D0D4          RCL     AH,1
F000:E342 E2FA          LOOP    E33E
F000:E344 8AC4          MOV     AL,AH
F000:E346 C3            RET


F000:E340                       00-00 00 10 49 50 4C 0D 0A          ....IPL..
F000:E350  4E 6F 74 20 4A 42 2D 33-30 30 30 20 64 69 73 6B   Not JB-3000 disk
F000:E360  2C 20 63 68 61 6E 67 65-24 20 64 69 73 6B 20 26   , change$ disk &
F000:E370  20 73 74 72 69 6B 65 20-61 6E 79 20 6B 65 79 20    strike any key
F000:E380  77 68 65 6E 20 72 65 61-64 79 24 0D 0A 42 61 64   when ready$..Bad
F000:E390  20 64 69 73 6B 20 75 6E-75 73 61 62 6C 65 2C 20    disk unusable,
F000:E3A0  63 68 61 6E 67 65 24 0D-0A 44 72 69 76 65 20 6E   change$..Drive n
F000:E3B0  6F 74 20 72 65 61 64 79-2C 20 73 65 74 24         ot ready, set$

F000:E3B0                                            00 00                 ..
F000:E3C0  00 FC 00 00 84 00 00 00-00 00 00 00 00 00 00 00   ................
F000:E3D0  00 01 00 02 00 03 00 04-00 05 00 06 00 07 00 88   ................
F000:E3E0  00 8A 00 8C 00 8E 00 90-00 92 00 94 00 96 30 00   ..............0.

F000:E3F0  57 E7 00 F0 B6 F2 00 F0-78 E4 00 F0 D2 F3 00 F0   W.......x.......
F000:E400  78 E4 00 F0 00 A0 00 F0-B6 FC 00 F0 78 E4 00 F0   x...........x...
F000:E410  FC FE 00 F0 00 A8 00 F0-86 FE 00 F0 78 E4 00 F0   ............x...
F000:E420  78 E4 00 F0 E1 E4 00 F0-99 E5 00 F0 00 00 80 00   x...............
F000:E430  97 E4 00 F0 97 E4 00 F0-97 E4 00 F0 97 E4 00 F0   ................

; This goes to 0x100
F000:E440  2D FD 00 F0 98 E4 00 F0-78 E4 00 F0 78 E4 00 F0   -.......x...x...
F000:E450  78 E4 00 F0 76 EA 00 F0-37 F9 00 F0 78 E4 00 F0   x...v...7...x...

; This goes to 0x140
F000:E460  54 F9 00 F0 3D F9 00 F0


F000:E460                         -00 00 86 00 00 00 81 00           ........
F000:E470  C0 03 40 00 40 42 10 01

; Default INTs point here (see F000:E1C1)
F000:E478 50            PUSH    AX
F000:E479 56            PUSH    SI
F000:E47A 55            PUSH    BP
F000:E47B 1E            PUSH    DS
F000:E47C 8BEC          MOV     BP,SP
F000:E47E 8B7608        MOV     SI,[BP+08]
F000:E481 8E5E0A        MOV     DS,WORD PTR [BP+0A]
F000:E484 4E            DEC     SI
F000:E485 8A04          MOV     AL,[SI]
F000:E487 8CCE          MOV     SI,CS
F000:E489 8EDE          MOV     DS,SI
F000:E48B BECCE4        MOV     SI,E4CC    ; "\r\nIllegal Interrupt $"
F000:E48E 90            NOP
F000:E48F B430          MOV     AH,30
F000:E491 CD6D          INT     6D
F000:E493 1F            POP     DS
F000:E494 5D            POP     BP
F000:E495 5E            POP     SI
F000:E496 58            POP     AX
; INT 70 71 72 73 vector here (null)
F000:E497 CF            IRET




; INT 41
F000:E498 50            PUSH    AX
F000:E499 53            PUSH    BX
F000:E49A 52            PUSH    DX
F000:E49B 06            PUSH    ES
F000:E49C B408          MOV     AH,08
F000:E49E E83001        CALL    E5D1
F000:E4A1 BA0400        MOV     DX,0004
F000:E4A4 EC            IN      AL,DX
F000:E4A5 8AE0          MOV     AH,AL
F000:E4A7 D0D4          RCL     AH,1
F000:E4A9 7207          JB      E4B2
F000:E4AB 2688470B      MOV     ES:[BX+0B],AL
F000:E4AF EB16          JMP     E4C7

F000:E4B1 90            NOP
F000:E4B2 2688470C      MOV     ES:[BX+0C],AL
F000:E4B6 268A670B      MOV     AH,ES:[BX+0B]
F000:E4BA D0DC          RCR     AH,1
F000:E4BC 7309          JAE     E4C7
F000:E4BE B401          MOV     AH,01
F000:E4C0 CD6E          INT     6E
F000:E4C2 26C64702FF    MOV     BYTE PTR ES:[BX+02],FF
F000:E4C7 07            POP     ES
F000:E4C8 5A            POP     DX
F000:E4C9 5B            POP     BX
F000:E4CA 58            POP     AX
F000:E4CB CF            IRET

F000:E4C0                         -            0D 0A 49 6C               ..Il
F000:E4D0  6C 65 67 61 6C 20 69 6E-74 65 72 72 75 70 74 20   legal interrupt
F000:E4E0  24                                                $

INT 6D AH 34 prints text at [DS?:SI] terminated $ 
; INT 6D
F000:E4E1 53            PUSH    BX
F000:E4E2 06            PUSH    ES
F000:E4E3 50            PUSH    AX
F000:E4E4 B401          MOV     AH,01
F000:E4E6 CD6E          INT     6E
F000:E4E8 26F6470480    TEST    BYTE PTR ES:[BX+04],80
F000:E4ED 58            POP     AX
F000:E4EE 7403          JZ      E4F3
F000:E4F0 E80300        CALL    E4F6
F000:E4F3 07            POP     ES
F000:E4F4 5B            POP     BX
F000:E4F5 CF            IRET


F000:E4F6 50            PUSH    AX
F000:E4F7 51            PUSH    CX
F000:E4F8 52            PUSH    DX
F000:E4F9 50            PUSH    AX
F000:E4FA BA0300        MOV     DX,0003
F000:E4FD B005          MOV     AL,05
F000:E4FF EE            OUT     DX,AL
F000:E500 58            POP     AX
F000:E501 F6C410        TEST    AH,10
F000:E504 7403          JZ      E509
F000:E506 E84700        CALL    E550
F000:E509 F6C420        TEST    AH,20
F000:E50C 7512          JNZ     E520
F000:E50E F6C408        TEST    AH,08
F000:E511 742B          JZ      E53E
F000:E513 BE00F0        MOV     SI,F000
F000:E516 90            NOP
F000:E517 8EDE          MOV     DS,SI
F000:E519 BE90E5        MOV     SI,E590   "Error$"
F000:E51C 90            NOP
F000:E51D E83000        CALL    E550
F000:E520 50            PUSH    AX
F000:E521 8AE8          MOV     CH,AL
F000:E523 B104          MOV     CL,04
F000:E525 D2E8          SHR     AL,CL
F000:E527 240F          AND     AL,0F
F000:E529 E83B00        CALL    E567
F000:E52C 8AC5          MOV     AL,CH
F000:E52E 240F          AND     AL,0F
F000:E530 E83400        CALL    E567
F000:E533 B020          MOV     AL,20
F000:E535 B40A          MOV     AH,0A
F000:E537 50            PUSH    AX
F000:E538 2EFF1EF0E3    CALL    FAR CS:[E3F0] ; print char in AL
F000:E53D 58            POP     AX
F000:E53E F6C404        TEST    AH,04

F000:E541 7401          JZ      E544
F000:E543 F4            HLT
F000:E544 F6C401        TEST    AH,01
F000:E547 7403          JZ      E54C
F000:E549 E82C00        CALL    E578
F000:E54C 5A            POP     DX
F000:E54D 59            POP     CX
F000:E54E 58            POP     AX
F000:E54F C3            RET

; Load character from DS:SI and print if not $
F000:E550 50            PUSH    AX
F000:E551 56            PUSH    SI
F000:E552 1E            PUSH    DS
F000:E553 FC            CLD
F000:E554 AC            LODSB
F000:E555 3C24          CMP     AL,24 '$'
F000:E557 740A          JZ      E563  ; done
F000:E559 B40A          MOV     AH,0A
F000:E55B 50            PUSH    AX     ; Fake for IRET at end of INT 60 servive routine
F000:E55C 2EFF1EF0E3    CALL    FAR CS:[E3F0] ; address at [e3F0] is also int 60 address e757
F000:E561 EBF1          JMP     E554
F000:E563 1F            POP     DS
F000:E564 5E            POP     SI
F000:E565 58            POP     AX
F000:E566 C3            RET


F000:E567 3C0A          CMP     AL,0A
F000:E569 7202          JB      E56D
F000:E56B 0407          ADD     AL,07
F000:E56D 0430          ADD     AL,30
F000:E56F B40A          MOV     AH,0A
F000:E571 50            PUSH    AX
F000:E572 2EFF1EF0E3    CALL    FAR CS:[E3F0]
F000:E577 C3            RET
F000:E578 50            PUSH    AX
F000:E579 53            PUSH    BX
F000:E57A 06            PUSH    ES
F000:E57B B401          MOV     AH,01
F000:E57D CD6E          INT     6E
F000:E57F FB            STI
F000:E580 26C6470200    MOV     BYTE PTR ES:[BX+02],00
F000:E585 26F64702FF    TEST    BYTE PTR ES:[BX+02],FF
F000:E58A 74F9          JZ      E585
F000:E58C 07            POP     ES
F000:E58D 5B            POP     BX
F000:E58E 58            POP     AX
F000:E58F C3            RET

F000:E590  0D 0A 45 72 72 6F 72 20-24   Error $

; INT 6E
F000:E599 50            PUSH    AX
F000:E59A 22E4          AND     AH,AH
F000:E59C 7508          JNZ     E5A6
F000:E59E 8AE0          MOV     AH,AL
F000:E5A0 E82E00        CALL    E5D1
F000:E5A3 EB2A          JMP     E5CF  ; pop AX and return
F000:E5A5 90            NOP
F000:E5A6 80FC03        CMP     AH,03
F000:E5A9 7324          JAE     E5CF  ; pop AX and return
; So here AH is 1 or 2
F000:E5AB 8AC4          MOV     AL,AH
F000:E5AD D0E0          SHL     AL,1 ; 2 or 4
F000:E5AF D0E0          SHL     AL,1 ; 4 or 8
F000:E5B1 98            CBW          ; sets AH to 0 always?
F000:E5B2 56            PUSH    SI
F000:E5B3 1E            PUSH    DS
F000:E5B4 33DB          XOR     BX,BX
F000:E5B6 8EC3          MOV     ES,BX
F000:E5B8 BBBC01        MOV     BX,01BC   ; point ES:BX at 0000:01BC which is INT 6F and contains 00 00 80 00

F000:E5BB 268B7702      MOV     SI,ES:[BX+02] ; SI = 0080
F000:E5BF 8EDE          MOV     DS,SI         ; DS = 0080
F000:E5C1 268B37        MOV     SI,ES:[BX]    ; SI = 0000
F000:E5C4 03F0          ADD     SI,AX         ; SI = 0004 or 0008
F000:E5C6 8B5C02        MOV     BX,[SI+02]    ; get vector at 0x08004 or 0x08008 in ES:BX
F000:E5C9 8EC3          MOV     ES,BX
F000:E5CB 8B1C          MOV     BX,[SI]
F000:E5CD 1F            POP     DS
F000:E5CE 5E            POP     SI
F000:E5CF 58            POP     AX
F000:E5D0 CF            IRET


; E5D1 Get pointer to workspace at ES:BX+3 based on AH
; Find AH in linked list starting at 0x08600 format is two bytes next offset, one byte index. Return ES:BX points at list
; Print "No DCB" if AX not found
; AH = 04 returns 0086:0000 
; AH = 14 returns 0086:0068
; AH = 08 returns 0086:008A
; AH = 30 returns 0086:00BB
; AH = 18 returns 0086:00D9
; AH = 10 returns 0086:0112
; AH = 2C returns 0086:0121

F000:E5D1 50            PUSH    AX
F000:E5D2 BB8600        MOV     BX,0086
F000:E5D5 8EC3          MOV     ES,BX
F000:E5D7 BB0000        MOV     BX,0000
F000:E5DA 263A6702      CMP     AH,ES:[BX+02]
F000:E5DE 7415          JZ      E5F5           ; Return
F000:E5E0 268B1F        MOV     BX,ES:[BX] 
F000:E5E3 23DB          AND     BX,BX
F000:E5E5 75F3          JNZ     E5DA           ; loop
F000:E5E7 8CCE          MOV     SI,CS
F000:E5E9 8EDE          MOV     DS,SI
F000:E5EB BEF7E5        MOV     SI,E5F7 "No DCB"
F000:E5EE 90            NOP
F000:E5EF 8AC4          MOV     AL,AH
F000:E5F1 B434          MOV     AH,34
F000:E5F3 CD6D          INT     6D
F000:E5F5 58            POP     AX
F000:E5F6 C3            RET

F000:E5F7  0D 0A 4E 6F 20 44 43 42 20 24   No DCB$

; copy E614 to E754 to 0x08600
F000:E601 B88600        MOV     AX,0086
F000:E604 8EC0          MOV     ES,AX
F000:E606 BE14E6        MOV     SI,E614
F000:E609 90            NOP
F000:E60A BF0000        MOV     DI,0000
F000:E60D 8B0E55E7      MOV     CX,[E755]  ; 0x0141
F000:E611 F3A4          REP     MOVSB       ; ES:DI++ = DS:SI++
F000:E613 C3            RET

; This is the linked list traversed by routine at E5D1
F000:E610              68 00 04 10-00 00 00 D8 35 00 02 90       h.......5...
F000:E620  08 08 10 00 50 19 00 77-00 00 00 60 07 00 50 D0   ....P..w...`..P.
F000:E630  07 01 00 08 00 50 00 50-00 80 07 00 00 00 00 04   .....P.P........
F000:E640  04 00 00 00 00 00 00 00-00 00 60 56 00 00 00 00   ..........`V....
F000:E650  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
F000:E660  00 00 00 00 00 00 00 00-00 00 00 00 00 04 00 02   ................
F000:E670  00 08 00 0C 00 10 00 14-00 18 00 1C 8A 00 14 00   ................
F000:E680  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
F000:E690  00 00 00 00 00 00 00 00-00 00 00 00 00 00 BB 00   ................
F000:E6A0  08 01 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
F000:E6B0  00 00 B3 00 80 00 28 00-00 00 00 00 00 01 C0 00   ......(.........
F000:E6C0  00 01 01 01 00 01 00 00-00 00 00 00 00 00 00 D9   ................
F000:E6D0  00 30 30 05 00 00 00 00-00 00 00 00 00 BB 00 50   .00............P
F000:E6E0  00 00 00 00 00 00 00 00-00 00 00 00 00 12 01 18   ................
F000:E6F0  20 00 10 00 02 00 00 C0-00 00 00 00 00 00 00 FF    ...............
F000:E700  00 00 08 01 28 08 00 02-03 FF 20 08 01 28 08 00   ....(..... ..(..
F000:E710  02 03 FF 21 08 01 28 08-00 02 03 FF 22 08 01 28   ...!..(....."..(
F000:E720  08 00 02 03 FF 23 21 01-10 00 00 00 00 00 00 B6   .....#!.........
F000:E730  00 50 00 00 00 3F 01 2C-00 00 00 00 00 00 00 00   .P...?.,........
F000:E740  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
F000:E750  00 00 00 00 00
F000:E755  41 01
/*
0086:0000  68 00 04 10 00 00 00 D8 35 00 02 90 08 08 10 00
0086:0010  50 19 00 77 00 00 00 60 07 00 50 D0 07 01 00 08
0086:0020  00 50 00 50-00 80 07 00 00 00 00 04 04 00 00 00
0086:0030  00 00 00 00-00 00 60 56 00 00 00 00 00 00 00 00
0086:0040  00 00 00 00-00 00 00 00 00 00 00 00 00 00 00 00
0086:0050  00 00 00 00-00 00 00 00 00 04 00 02 00 08 00 0C
0086:0060  00 10 00 14 00 18 00 1C

0086:0068  8A 00 14 00 00 00 00 00
0086:0070  00 00 00 00-00 00 00 00 00 00 00 00 00 00 00 00
0086:0080  00 00 00 00-00 00 00 00 00 00

0086:008A  BB 00 08 01 00 00
0086:0090  00 00 00 00-00 00 00 00 00 00 00 00 00 00 B3 00
0086:00A0  80 00 28 00-00 00 00 00 00 01 C0 00 00 01 01 01
0086:00B0  00 01 00 00-00 00 00 00 00 00 00

0086:00BB  D9 00 30 30 05
0086:00C0  00 00 00 00-00 00 00 00 00 BB 00 50 00 00 00 00
0086:00D0  00 00 00 00 00 00 00 00 00

0086:00D9  12 01 18 20 00 10 00 02 00 00 C0 00 00 00 00 00
0086:00E9  00 00 FF 00 00 
0086:00EE  08 01 28 08 00 02 03 FF 20 ; Floppy 0
0086:00F7  08 01 28 08 00 02 03 FF 21 ; Floppy 1
0086:0100  08 01 28 08 00 02 03 FF 22 ; Floppy 2
0086:0109  08 01 28 08 00 02 03 FF 23 ; Floppy 3

0086:0112  21 01 10 00 00 00 00 00 00 B6 00 50 00 00
0086:0120  00

0086:0121  3F 01 2C 00 00 00 00 00 00 00 00 00 00 00 00
0086:0130  00 00 00 00-00 00 00 00 00 00 00 00 00 00 00

0086:013F  00 00
*/


; INT 60 service routine
; Function number in AH
F000:E757 FB            STI
F000:E758 FC            CLD
F000:E759 57            PUSH    DI
F000:E75A 50            PUSH    AX
F000:E75B D0E4          SHL     AH,1                  ; number to word offset in table
F000:E75D 8AC4          MOV     AL,AH
F000:E75F 32E4          XOR     AH,AH                 ; 
F000:E761 8BF8          MOV     DI,AX
F000:E763 58            POP     AX
F000:E764 2EFF956BE7    CALL    WORD PTR CS:[DI+E76B]
F000:E769 5F            POP     DI
F000:E76A CF            IRET

; Jump table, 19 addresses
F000:E760                         -         91 E7 9C E9 EC              .....
F000:E770  E9 BF E9 21 EA C3 EA 42-EB 06 E9 06 E9 06 E9 EC   ...!...B........
F000:E780  EB DB F0 06 E9 06 E9 EC-EB 7B E9 D5 F0 15 F1 34   .........{.....4
F000:E790  F1

;00 E791
;01 E99C
;02 E9EC
;03 E9BF
;04 EA21
;05 EAC3
;06 EB42
;07 E906
;08 E906
;09 E906
;0A EBEC
;0B F0DB
;0C E906
;0D E906
;0E EBEC
;0F E97B
;10 F0D5
;11 F115
;12 F134

; INT 60 function 0
F000:E791 06            PUSH    ES
F000:E792 1E            PUSH    DS
F000:E793 50            PUSH    AX
F000:E794 53            PUSH    BX
F000:E795 51            PUSH    CX
F000:E796 52            PUSH    DX
F000:E797 56            PUSH    SI
F000:E798 57            PUSH    DI
F000:E799 3C22          CMP     AL,22
F000:E79B 7404          JZ      E7A1
F000:E79D 3C32          CMP     AL,32
F000:E79F 7503          JNZ     E7A4

F000:E7A1 E95A01        JMP     E8FE

F000:E7A4 B404          MOV     AH,04
F000:E7A6 E828FE        CALL    E5D1
F000:E7A9 8AF0          MOV     DH,AL
F000:E7AB 80E60F        AND     DH,0F
F000:E7AE 8AD0          MOV     DL,AL
F000:E7B0 B104          MOV     CL,04
F000:E7B2 D2EA          SHR     DL,CL
F000:E7B4 8AE0          MOV     AH,AL
F000:E7B6 B004          MOV     AL,04
F000:E7B8 E8850B        CALL    F340
F000:E7BB 0E            PUSH    CS
F000:E7BC 1F            POP     DS
F000:E7BD B91200        MOV     CX,0012
F000:E7C0 BE2FE9        MOV     SI,E92F
F000:E7C3 90            NOP
F000:E7C4 8BFB          MOV     DI,BX
F000:E7C6 83C70A        ADD     DI,+0A
F000:E7C9 F3A5          REP     MOVSW
F000:E7CB 8AC4          MOV     AL,AH
F000:E7CD 2403          AND     AL,03
F000:E7CF D0EC          SHR     AH,1
F000:E7D1 D0EC          SHR     AH,1
F000:E7D3 80E41C        AND     AH,1C
F000:E7D6 0AE0          OR      AH,AL
F000:E7D8 2608670B      OR      ES:[BX+0B],AH
F000:E7DC 80FA00        CMP     DL,00
F000:E7DF 750B          JNZ     E7EC
F000:E7E1 26804F0B20    OR      BYTE PTR ES:[BX+0B],20
F000:E7E6 26C747140400  MOV     WORD PTR ES:[BX+14],0004

F000:E7EC 80FA02        CMP     DL,02
F000:E7EF 740D          JZ      E7FE
F000:E7F1 80FA03        CMP     DL,03
F000:E7F4 7408          JZ      E7FE
F000:E7F6 80FA04        CMP     DL,04
F000:E7F9 740B          JZ      E806
F000:E7FB EB0E          JMP     E80B
F000:E7FD 90            NOP
F000:E7FE 26C6470A01    MOV     BYTE PTR ES:[BX+0A],01
F000:E803 EB06          JMP     E80B

F000:E805 90            NOP
F000:E806 26C6470A02    MOV     BYTE PTR ES:[BX+0A],02
F000:E80B 80FE02        CMP     DH,02
F000:E80E 750A          JNZ     E81A
F000:E810 26C6470C10    MOV     BYTE PTR ES:[BX+0C],10
F000:E815 26C6470F01    MOV     BYTE PTR ES:[BX+0F],01
F000:E81A 80FA03        CMP     DL,03
F000:E81D 7405          JZ      E824
F000:E81F 80FA04        CMP     DL,04
F000:E822 751B          JNZ     E83F

F000:E824 26C6470D08    MOV     BYTE PTR ES:[BX+0D],08
F000:E829 26C6470E10    MOV     BYTE PTR ES:[BX+0E],10
F000:E82E 26C6471050    MOV     BYTE PTR ES:[BX+10],50
F000:E833 26C7471D0100  MOV     WORD PTR ES:[BX+1D],0001
F000:E839 26C7471F0800  MOV     WORD PTR ES:[BX+1F],0008

F000:E83F 80FE00        CMP     DH,00
F000:E842 7412          JZ      E856
F000:E844 80FE01        CMP     DH,01
F000:E847 7408          JZ      E851
F000:E849 26C6471119    MOV     BYTE PTR ES:[BX+11],19
F000:E84E EB06          JMP     E856

F000:E850 90            NOP
F000:E851 26C6471114    MOV     BYTE PTR ES:[BX+11],14
F000:E856 B85000        MOV     AX,0050
F000:E859 26F66711      MUL     BYTE PTR ES:[BX+11]
F000:E85D 2689471B      MOV     ES:[BX+1B],AX
F000:E861 32E4          XOR     AH,AH
F000:E863 8AC2          MOV     AL,DL
F000:E865 D0E0          SHL     AL,1
F000:E867 D0E0          SHL     AL,1
F000:E869 02C6          ADD     AL,DH
F000:E86B 8BF0          MOV     SI,AX
F000:E86D 2E8A8407E9    MOV     AL,CS:[SI+E907]
F000:E872 2688472B      MOV     ES:[BX+2B],AL
F000:E876 2E8A841BE9    MOV     AL,CS:[SI+E91B]
F000:E87B 2688472C      MOV     ES:[BX+2C],AL
F000:E87F 80FE00        CMP     DH,00
F000:E882 740C          JZ      E890
F000:E884 80FE01        CMP     DH,01
F000:E887 740C          JZ      E895
F000:E889 BE1C00        MOV     SI,001C
F000:E88C 90            NOP
F000:E88D EB0A          JMP     E899

F000:E88F 90            NOP
F000:E890 33F6          XOR     SI,SI
F000:E892 EB05          JMP     E899

F000:E894 90            NOP
F000:E895 BE1000        MOV     SI,0010
F000:E898 90            NOP
F000:E899 2E8A845EE9    MOV     AL,CS:[SI+E95E]
F000:E89E 26884718      MOV     ES:[BX+18],AL
F000:E8A2 B90C00        MOV     CX,000C
F000:E8A5 B000          MOV     AL,00
F000:E8A7 2E8A9453E9    MOV     DL,CS:[SI+E953]
F000:E8AC E8340A        CALL    F2E3
F000:E8AF FEC0          INC     AL
F000:E8B1 46            INC     SI
F000:E8B2 E2F3          LOOP    E8A7
F000:E8B4 E85E08        CALL    F115
F000:E8B7 53            PUSH    BX
F000:E8B8 06            PUSH    ES
F000:E8B9 B401          MOV     AH,01
F000:E8BB CD6E          INT     6E
F000:E8BD 26F6470408    TEST    BYTE PTR ES:[BX+04],08
F000:E8C2 07            POP     ES
F000:E8C3 5B            POP     BX
F000:E8C4 7408          JZ      E8CE
F000:E8C6 B011          MOV     AL,11
F000:E8C8 E8F801        CALL    EAC3
F000:E8CB E84709        CALL    F215
F000:E8CE B000          MOV     AL,00
F000:E8D0 E8F001        CALL    EAC3
F000:E8D3 E83F09        CALL    F215
F000:E8D6 B000          MOV     AL,00
F000:E8D8 268A670A      MOV     AH,ES:[BX+0A]
F000:E8DC 80FC00        CMP     AH,00
F000:E8DF 740A          JZ      E8EB
F000:E8E1 80FC02        CMP     AH,02
F000:E8E4 7507          JNZ     E8ED
F000:E8E6 B002          MOV     AL,02
F000:E8E8 EB03          JMP     E8ED

F000:E8EA 90            NOP
F000:E8EB B001          MOV     AL,01
F000:E8ED 26807F0C10    CMP     BYTE PTR ES:[BX+0C],10
F000:E8F2 7502          JNZ     E8F6
F000:E8F4 0C04          OR      AL,04
F000:E8F6 E83B0A        CALL    F334
F000:E8F9 B005          MOV     AL,05
F000:E8FB E8420A        CALL    F340
F000:E8FE 5F            POP     DI
F000:E8FF 5E            POP     SI
F000:E900 5A            POP     DX
F000:E901 59            POP     CX
F000:E902 5B            POP     BX
F000:E903 58            POP     AX
F000:E904 1F            POP     DS
F000:E905 07            POP     ES

; INT 60 Functons 07, 08, 09, 0C, 0D point here (null)
F000:E906 C3            RET

F000:E900                       00-00 02 00 00 00 02 00 01          .........
F000:E910  01 03 00 05 05 02 00 04-04 02 00 00 00 02 00 00   ................
F000:E920  00 02 00 01 01 03 00 05-05 04 00 04 04 04 00 00   ................
F000:E930  80 08 10 20 00 28 19 00-77 00 00 00 60 07 00 A0   ... .(..w...`...
F000:E940  D0 07 02 00 10 00 50 00-50 00 30 07 00 00 00 00   ......P.P.0.....
F000:E950  00 00 00 37 28 2C 84 1F-00 19 1B 00 07 60 07 00   ...7(,.......`..
F000:E960  00 00 00 37 28 2C 84 18-09 14 16 00 09 60 09 37   ...7(,.......`.7
F000:E970  28 2C 34 1A 07 19 19 03-0E 60 0F

; INT 60 Function 0F
F000:E97B 06            PUSH    ES
F000:E97C 53            PUSH    BX
F000:E97D 50            PUSH    AX
F000:E97E B404          MOV     AH,04
F000:E980 E84EFC        CALL    E5D1
F000:E983 268A7F0B      MOV     BH,ES:[BX+0B]
F000:E987 80E71F        AND     BH,1F
F000:E98A D1EB          SHR     BX,1
F000:E98C D1EB          SHR     BX,1
F000:E98E D0E7          SHL     BH,1
F000:E990 D0E7          SHL     BH,1
F000:E992 D1E3          SHL     BX,1
F000:E994 D1E3          SHL     BX,1
F000:E996 58            POP     AX
F000:E997 8AC7          MOV     AL,BH
F000:E999 5B            POP     BX
F000:E99A 07            POP     ES
F000:E99B C3            RET

; INT 60 function 01
F000:E99C 06            PUSH    ES
F000:E99D 50            PUSH    AX
F000:E99E 53            PUSH    BX
F000:E99F 52            PUSH    DX
F000:E9A0 B404          MOV     AH,04
F000:E9A2 E82CFC        CALL    E5D1
F000:E9A5 80E560        AND     CH,60
F000:E9A8 268A5717      MOV     DL,ES:[BX+17]
F000:E9AC 80E29F        AND     DL,9F
F000:E9AF 0AD5          OR      DL,CH
F000:E9B1 26885717      MOV     ES:[BX+17],DL
F000:E9B5 B00A          MOV     AL,0A
F000:E9B7 E82909        CALL    F2E3
F000:E9BA 5A            POP     DX
F000:E9BB 5B            POP     BX
F000:E9BC 58            POP     AX
F000:E9BD 07            POP     ES
F000:E9BE C3            RET

; INT 60 function 03
F000:E9BF 06            PUSH    ES
F000:E9C0 53            PUSH    BX
F000:E9C1 50            PUSH    AX
F000:E9C2 B404          MOV     AH,04
F000:E9C4 E80AFC        CALL    E5D1
F000:E9C7 268B4714      MOV     AX,ES:[BX+14]
F000:E9CB 99            CWD
F000:E9CC 2EF736EAE9    DIV     WORD PTR CS:[E9EA]
F000:E9D1 8AF0          MOV     DH,AL
F000:E9D3 26807F1028    CMP     BYTE PTR ES:[BX+10],28
F000:E9D8 750C          JNZ     E9E6
F000:E9DA D0EA          SHR     DL,1
F000:E9DC 26F6470B20    TEST    BYTE PTR ES:[BX+0B],20
F000:E9E1 7403          JZ      E9E6
F000:E9E3 80EA02        SUB     DL,02
F000:E9E6 58            POP     AX
F000:E9E7 5B            POP     BX
F000:E9E8 07            POP     ES
F000:E9E9 C3            RET

F000:E9EA 50 00


; INT 60 function 02
F000:E9EC 50            PUSH    AX
F000:E9ED 53            PUSH    BX
F000:E9EE 52            PUSH    DX
F000:E9EF 57            PUSH    DI
F000:E9F0 06            PUSH    ES
F000:E9F1 B404          MOV     AH,04
F000:E9F3 E8DBFB        CALL    E5D1
F000:E9F6 26F6470B20    TEST    BYTE PTR ES:[BX+0B],20
F000:E9FB 7403          JZ      EA00
F000:E9FD 80C202        ADD     DL,02
F000:EA00 8AC6          MOV     AL,DH
F000:EA02 2EF62620EA    MUL     BYTE PTR CS:[EA20]
F000:EA07 8BF8          MOV     DI,AX
F000:EA09 8AC2          MOV     AL,DL
F000:EA0B 32E4          XOR     AH,AH
F000:EA0D 26F7671D      MUL     WORD PTR ES:[BX+1D]
F000:EA11 03C7          ADD     AX,DI
F000:EA13 26894714      MOV     ES:[BX+14],AX
F000:EA17 E84E09        CALL    F368
F000:EA1A 07            POP     ES
F000:EA1B 5F            POP     DI
F000:EA1C 5A            POP     DX
F000:EA1D 5B            POP     BX
F000:EA1E 58            POP     AX
F000:EA1F C3            RET

F000:EA20 50

; INT 60 Function 04
F000:EA21 53            PUSH    BX
F000:EA22 06            PUSH    ES
F000:EA23 50            PUSH    AX
F000:EA24 B404          MOV     AH,04
F000:EA26 E8A8FB        CALL    E5D1
F000:EA29 BA0300        MOV     DX,0003
F000:EA2C B006          MOV     AL,06
F000:EA2E EE            OUT     DX,AL
F000:EA2F B007          MOV     AL,07
F000:EA31 EE            OUT     DX,AL
F000:EA32 26F6473001    TEST    BYTE PTR ES:[BX+30],01
F000:EA37 7507          JNZ     EA40
F000:EA39 33C0          XOR     AX,AX
F000:EA3B 32F6          XOR     DH,DH
F000:EA3D EB2A          JMP     EA69
F000:EA3F 90            NOP
F000:EA40 26C6473000    MOV     BYTE PTR ES:[BX+30],00
F000:EA45 B601          MOV     DH,01
F000:EA47 268B472E      MOV     AX,ES:[BX+2E]
F000:EA4B 2D0300        SUB     AX,0003
F000:EA4E 2EF63675EA    DIV     BYTE PTR CS:[EA75]
F000:EA53 26807F1028    CMP     BYTE PTR ES:[BX+10],28
F000:EA58 7405          JZ      EA5F
F000:EA5A D0E4          SHL     AH,1
F000:EA5C EB0B          JMP     EA69
F000:EA5E 90            NOP
F000:EA5F 26F6470B20    TEST    BYTE PTR ES:[BX+0B],20
F000:EA64 7403          JZ      EA69
F000:EA66 80EC02        SUB     AH,02
F000:EA69 8AD4          MOV     DL,AH
F000:EA6B 8ADE          MOV     BL,DH
F000:EA6D 8AF0          MOV     DH,AL
F000:EA6F 58            POP     AX
F000:EA70 8AC3          MOV     AL,BL
F000:EA72 07            POP     ES
F000:EA73 5B            POP     BX
F000:EA74 C3            RET







EAC3 INT 60 05 
EB42 INT 60 06 

EBEC INT 60 0A 0E
; INT 60 AH = 0A print AL
F000:EBEC 06            PUSH    ES
F000:EBED 1E            PUSH    DS
F000:EBEE 50            PUSH    AX
F000:EBEF 53            PUSH    BX
F000:EBF0 51            PUSH    CX
F000:EBF1 52            PUSH    DX
F000:EBF2 55            PUSH    BP
F000:EBF3 56            PUSH    SI
F000:EBF4 57            PUSH    DI
F000:EBF5 B404          MOV     AH,04
F000:EBF7 E8D7F9        CALL    E5D1
F000:EBFA 3C20          CMP     AL,20
F000:EBFC 7203          JB      EC01
F000:EBFE E9BF00        JMP     ECC0

F000:EC01 26F6472D10    TEST    BYTE PTR ES:[BX+2D],10
F000:EC06 7403          JZ      EC0B
F000:EC08 E9B500        JMP     ECC0

F000:EC0B 3C07          CMP     AL,07
F000:EC0D 7509          JNZ     EC18
F000:EC0F B005          MOV     AL,05
F000:EC11 B401          MOV     AH,01
F000:EC13 CD68          INT     68
F000:EC15 E9AB00        JMP     ECC3

F000:EC18 3C08          CMP     AL,08
F000:EC1A 7525          JNZ     EC41
F000:EC1C 268B4714      MOV     AX,ES:[BX+14]
F000:EC20 262B471D      SUB     AX,ES:[BX+1D]
F000:EC24 7818          JS      EC3E
F000:EC26 26894714      MOV     ES:[BX+14],AX
F000:EC2A B020          MOV     AL,20
F000:EC2C E89E00        CALL    ECCD
F000:EC2F 268B4714      MOV     AX,ES:[BX+14]
F000:EC33 262B471D      SUB     AX,ES:[BX+1D]
F000:EC37 26894714      MOV     ES:[BX+14],AX
F000:EC3B E82A07        CALL    F368
F000:EC3E E98200        JMP     ECC3

F000:EC41 3C09          CMP     AL,09
F000:EC43 7521          JNZ     EC66

F000:EC45 268B4714      MOV     AX,ES:[BX+14]
F000:EC49 99            CWD
F000:EC4A 26F7771F      DIV     WORD PTR ES:[BX+1F]
F000:EC4E 26F7671F      MUL     WORD PTR ES:[BX+1F]
F000:EC52 2603471F      ADD     AX,ES:[BX+1F]
F000:EC56 263B471B      CMP     AX,ES:[BX+1B]
F000:EC5A 7307          JAE     EC63
F000:EC5C 26894714      MOV     ES:[BX+14],AX
F000:EC60 E80507        CALL    F368
F000:EC63 EB5E          JMP     ECC3

F000:EC65 90            NOP
F000:EC66 3C0A          CMP     AL,0A
F000:EC68 7531          JNZ     EC9B
F000:EC6A 268B4714      MOV     AX,ES:[BX+14]
F000:EC6E 26034721      ADD     AX,ES:[BX+21]
F000:EC72 26F6472D20    TEST    BYTE PTR ES:[BX+2D],20
F000:EC77 740C          JZ      EC85
F000:EC79 263B4725      CMP     AX,ES:[BX+25]
F000:EC7D 7212          JB      EC91
F000:EC7F E8B204        CALL    F134
F000:EC82 EB11          JMP     EC95
F000:EC84 90            NOP
F000:EC85 263B471B      CMP     AX,ES:[BX+1B]
F000:EC89 7206          JB      EC91
F000:EC8B E8B4FE        CALL    EB42
F000:EC8E EB05          JMP     EC95

F000:EC90 90            NOP
F000:EC91 26894714      MOV     ES:[BX+14],AX
F000:EC95 E8D006        CALL    F368
F000:EC98 EB29          JMP     ECC3
F000:EC9A 90            NOP
F000:EC9B 3C0C          CMP     AL,0C
F000:EC9D 7506          JNZ     ECA5
F000:EC9F E87305        CALL    F215
F000:ECA2 EB1F          JMP     ECC3
F000:ECA4 90            NOP
F000:ECA5 3C0D          CMP     AL,0D
F000:ECA7 751A          JNZ     ECC3
F000:ECA9 268B4714      MOV     AX,ES:[BX+14]
F000:ECAD 99            CWD
F000:ECAE 26F77723      DIV     WORD PTR ES:[BX+23]
F000:ECB2 26F76723      MUL     WORD PTR ES:[BX+23]
F000:ECB6 26894714      MOV     ES:[BX+14],AX
F000:ECBA E8AB06        CALL    F368
F000:ECBD EB04          JMP     ECC3  ; Return
F000:ECBF 90            NOP
F000:ECC0 E80A00        CALL    ECCD

F000:ECC3 5F            POP     DI
F000:ECC4 5E            POP     SI
F000:ECC5 5D            POP     BP
F000:ECC6 5A            POP     DX
F000:ECC7 59            POP     CX
F000:ECC8 5B            POP     BX
F000:ECC9 58            POP     AX
F000:ECCA 1F            POP     DS
F000:ECCB 07            POP     ES
F000:ECCC C3            RET

F000:ECCD 53            PUSH    BX
F000:ECCE 06            PUSH    ES
F000:ECCF 83EC20        SUB     SP,+20
F000:ECD2 8BEC          MOV     BP,SP
F000:ECD4 884600        MOV     [BP+00],AL


F0D5 INT 60 10 
F0DB INT 60 0B 

F115 INT 60 11 
F134 INT 60 12 
F2B6 61

; INT 63. Disk I/O.
; Guess: Drive is in AL, function is in AH (0..8, see jump table)
F000:F3D2 FB            STI
F000:F3D3 FC            CLD
F000:F3D4 52            PUSH    DX
F000:F3D5 56            PUSH    SI
F000:F3D6 57            PUSH    DI
F000:F3D7 55            PUSH    BP
F000:F3D8 1E            PUSH    DS
F000:F3D9 06            PUSH    ES
F000:F3DA 53            PUSH    BX
F000:F3DB 50            PUSH    AX
F000:F3DC 3C04          CMP     AL,04
F000:F3DE 7208          JB      F3E8             ; Wild guess 0-3 are floppies, >3 is something else which does not yet exist
F000:F3E0 2C04          SUB     AL,04
F000:F3E2 50            PUSH    AX
F000:F3E3 B41C          MOV     AH,1C            ; 1C workspace does not exist, maybe gets added by hard drive code?
F000:F3E5 EB04          JMP     F3EB
F000:F3E7 90            NOP
F000:F3E8 50            PUSH    AX   ; AL = 0..4
F000:F3E9 B418          MOV     AH,18
F000:F3EB E8E3F1        CALL    E5D1             ; Get pointer to workspace (AH = 18, ES:BX = 0086:00D9)
F000:F3EE 51            PUSH    CX
F000:F3EF 98            CBW
F000:F3F0 B509          MOV     CH,09
F000:F3F2 F6E5          MUL     CH
F000:F3F4 8BFB          MOV     DI,BX
F000:F3F6 83C715        ADD     DI,+15           ; 21 bytes workspace, 9 bytes per drive
F000:F3F9 03F8          ADD     DI,AX            ; DI points at 9 bytes for this floppy drive 
F000:F3FB 59            POP     CX
F000:F3FC 58            POP     AX
F000:F3FD 50            PUSH    AX
F000:F3FE 8AC4          MOV     AL,AH
F000:F400 98            CBW                      ; Assuming AH is < 128 then AX is now = AH
F000:F401 D1E0          SHL     AX,1
F000:F403 8BF0          MOV     SI,AX
F000:F405 3D1200        CMP     AX,0012
F000:F408 90            NOP
F000:F409 58            POP     AX
F000:F40A 7203          JB      F40F
F000:F40C E9B101        JMP     F5C0  ; Return

F000:F40F 2EFFA414F4    JMP     WORD PTR CS:[SI+F414]
; Jump table 9 entries

F000:F410              F7 F6 26 F4-37 F4 27 F5 2E F4 C0 F5
F000:F420  AD F8 25 F9 2F F9

; F6F7 INT 63 AH=0
; F426 INT 63 AH=1
; F437 INT 63 AH=2
; F527 INT 63 AH=3
; F42E INT 63 AH=4
; F5C0 INT 63 AH=5
; F8AD INT 63 AH=6
; F925 INT 63 AH=7
; F92F INT 63 AH=8

; F426 INT 63 AH=1
F000:F426 58            POP     AX
F000:F427 268A4712      MOV     AL,ES:[BX+12]
F000:F42B E99201        JMP     F5C0   ; Routine ends

; F42E INT 63 AH=4
F000:F42E 5D            POP     BP
F000:F42F 5E            POP     SI
F000:F430 56            PUSH    SI
F000:F431 55            PUSH    BP
F000:F432 33ED          XOR     BP,BP
F000:F434 EB08          JMP     F43E
F000:F436 90            NOP

; F437 INT 63 AH=2
F000:F437 5D            POP     BP
F000:F438 5E            POP     SI
F000:F439 56            PUSH    SI
F000:F43A 55            PUSH    BP
F000:F43B BD0040        MOV     BP,4000
F000:F43E E80902        CALL    F64A
F000:F441 726F          JB      F4B2
F000:F443 E83B03        CALL    F781
F000:F446 726A          JB      F4B2
F000:F448 56            PUSH    SI
F000:F449 1E            PUSH    DS
F000:F44A 23ED          AND     BP,BP
F000:F44C 740A          JZ      F458
F000:F44E 26F64710FF    TEST    BYTE PTR ES:[BX+10],FF
F000:F453 740C          JZ      F461
F000:F455 EB06          JMP     F45D
F000:F457 90            NOP
F000:F458 26C6471000    MOV     BYTE PTR ES:[BX+10],00
F000:F45D 26C57708      LDS     SI,ES:[BX+08]
F000:F461 E85100        CALL    F4B5
F000:F464 7305          JAE     F46B
F000:F466 1F            POP     DS
F000:F467 5E            POP     SI
F000:F468 EB48          JMP     F4B2
F000:F46A 90            NOP
F000:F46B 2681470E0001  ADD     WORD PTR ES:[BX+0E],0100
F000:F471 23ED          AND     BP,BP
F000:F473 7404          JZ      F479
F000:F475 26037504      ADD     SI,ES:[DI+04]
F000:F479 E2E6          LOOP    F461
F000:F47B 26F64710FF    TEST    BYTE PTR ES:[BX+10],FF
F000:F480 1F            POP     DS
F000:F481 7504          JNZ     F487
F000:F483 5A            POP     DX
F000:F484 EB21          JMP     F4A7
F000:F486 90            NOP
F000:F487 5E            POP     SI
F000:F488 26C6471000    MOV     BYTE PTR ES:[BX+10],00
F000:F48D 268B4D04      MOV     CX,ES:[DI+04]
F000:F491 57            PUSH    DI
F000:F492 06            PUSH    ES
F000:F493 8BFE          MOV     DI,SI
F000:F495 8CDA          MOV     DX,DS
F000:F497 26C57708      LDS     SI,ES:[BX+08]
F000:F49B 8EC2          MOV     ES,DX
F000:F49D F3A4          REP     MOVSB
F000:F49F 8BF7          MOV     SI,DI
F000:F4A1 8CC7          MOV     DI,ES
F000:F4A3 8EDF          MOV     DS,DI
F000:F4A5 07            POP     ES
F000:F4A6 5F            POP     DI
F000:F4A7 26837F0C00    CMP     WORD PTR ES:[BX+0C],+00
F000:F4AC 7595          JNZ     F443
F000:F4AE F8            CLC
F000:F4AF E9FC00        JMP     F5AE
F000:F4B2 E9D700        JMP     F58C
F000:F4B5 50            PUSH    AX
F000:F4B6 51            PUSH    CX
F000:F4B7 E82C02        CALL    F6E6
F000:F4BA B40A          MOV     AH,0A
F000:F4BC 268B4D04      MOV     CX,ES:[DI+04]
F000:F4C0 49            DEC     CX
F000:F4C1 80CD40        OR      CH,40
F000:F4C4 E89A03        CALL    F861
F000:F4C7 E81E04        CALL    F8E8
F000:F4CA 7305          JAE     F4D1
F000:F4CC B211          MOV     DL,11
F000:F4CE EB53          JMP     F523
F000:F4D0 90            NOP
F000:F4D1 0C80          OR      AL,80
F000:F4D3 E8EA03        CALL    F8C0
F000:F4D6 7305          JAE     F4DD
F000:F4D8 B212          MOV     DL,12
F000:F4DA EB47          JMP     F523
F000:F4DC 90            NOP
F000:F4DD 249C          AND     AL,9C
F000:F4DF 7515          JNZ     F4F6
F000:F4E1 8AE8          MOV     CH,AL
F000:F4E3 BA1800        MOV     DX,0018
F000:F4E6 EC            IN      AL,DX
F000:F4E7 268A4F07      MOV     CL,ES:[BX+07]
F000:F4EB FEC1          INC     CL
F000:F4ED D2E8          SHR     AL,CL
F000:F4EF 722E          JB      F51F
F000:F4F1 B213          MOV     DL,13
F000:F4F3 EB2E          JMP     F523
F000:F4F5 90            NOP
F000:F4F6 8AE8          MOV     CH,AL
F000:F4F8 B000          MOV     AL,00
F000:F4FA FECC          DEC     AH
F000:F4FC 7402          JZ      F500
F000:F4FE EBBC          JMP     F4BC
F000:F500 8AC5          MOV     AL,CH
F000:F502 2490          AND     AL,90
F000:F504 7505          JNZ     F50B
F000:F506 B004          MOV     AL,04
F000:F508 EB0C          JMP     F516
F000:F50A 90            NOP
F000:F50B 2480          AND     AL,80
F000:F50D 7505          JNZ     F514
F000:F50F B008          MOV     AL,08
F000:F511 EB03          JMP     F516
F000:F513 90            NOP
F000:F514 B002          MOV     AL,02
F000:F516 26884714      MOV     ES:[BX+14],AL
F000:F51A B214          MOV     DL,14
F000:F51C EB05          JMP     F523
F000:F51E 90            NOP
F000:F51F F8            CLC
F000:F520 EB02          JMP     F524
F000:F522 90            NOP
F000:F523 F9            STC
F000:F524 59            POP     CX
F000:F525 58            POP     AX
F000:F526 C3            RET

; F527 INT 63 AH=3
F000:F527 5D            POP     BP
F000:F528 5E            POP     SI
F000:F529 56            PUSH    SI
F000:F52A 55            PUSH    BP
F000:F52B E81C01        CALL    F64A
F000:F52E 725C          JB      F58C
F000:F530 E84E02        CALL    F781
F000:F533 7257          JB      F58C
F000:F535 26F64710FF    TEST    BYTE PTR ES:[BX+10],FF
F000:F53A 56            PUSH    SI
F000:F53B 1E            PUSH    DS
F000:F53C 7414          JZ      F552
F000:F53E 51            PUSH    CX
F000:F53F 268B4D04      MOV     CX,ES:[DI+04]
F000:F543 57            PUSH    DI
F000:F544 06            PUSH    ES
F000:F545 26C47F08      LES     DI,ES:[BX+08]
F000:F549 F3A4          REP     MOVSB
F000:F54B 07            POP     ES
F000:F54C 5F            POP     DI
F000:F54D 26C57708      LDS     SI,ES:[BX+08]
F000:F551 59            POP     CX
F000:F552 E87500        CALL    F5CA
F000:F555 7306          JAE     F55D
F000:F557 83C404        ADD     SP,+04
F000:F55A EB30          JMP     F58C


F000:F55C 90            NOP
F000:F55D 2681470E0001  ADD     WORD PTR ES:[BX+0E],0100
F000:F563 26037504      ADD     SI,ES:[DI+04]
F000:F567 E2E9          LOOP    F552
F000:F569 26F64710FF    TEST    BYTE PTR ES:[BX+10],FF
F000:F56E 740E          JZ      F57E
F000:F570 26C6471000    MOV     BYTE PTR ES:[BX+10],00
F000:F575 1F            POP     DS
F000:F576 5E            POP     SI
F000:F577 26037504      ADD     SI,ES:[DI+04]
F000:F57B EB04          JMP     F581

F000:F57D 90            NOP
F000:F57E 83C404        ADD     SP,+04
F000:F581 26837F0C00    CMP     WORD PTR ES:[BX+0C],+00
F000:F586 75A8          JNZ     F530
F000:F588 F8            CLC
F000:F589 EB23          JMP     F5AE

F000:F58B 90            NOP
F000:F58C 26885713      MOV     ES:[BX+13],DL
F000:F590 52            PUSH    DX
F000:F591 268B5703      MOV     DX,ES:[BX+03]
F000:F595 83C204        ADD     DX,+04
F000:F598 268A4508      MOV     AL,ES:[DI+08]
F000:F59C 24FB          AND     AL,FB
F000:F59E 26884508      MOV     ES:[DI+08],AL
F000:F5A2 EE            OUT     DX,AL
F000:F5A3 26C64507FF    MOV     BYTE PTR ES:[DI+07],FF
F000:F5A8 58            POP     AX
F000:F5A9 B408          MOV     AH,08
F000:F5AB CD6D          INT     6D
F000:F5AD F9            STC
F000:F5AE 268B5703      MOV     DX,ES:[BX+03]
F000:F5B2 EC            IN      AL,DX
F000:F5B3 9C            PUSHF
F000:F5B4 26034F0C      ADD     CX,ES:[BX+0C]
F000:F5B8 268A5F14      MOV     BL,ES:[BX+14]
F000:F5BC 9D            POPF
F000:F5BD 58            POP     AX
F000:F5BE 8AC3          MOV     AL,BL

; Routine ends
; F5C0 INT 63 AH=5 points here
F000:F5C0 5B            POP     BX
F000:F5C1 07            POP     ES
F000:F5C2 1F            POP     DS
F000:F5C3 5D            POP     BP
F000:F5C4 5F            POP     DI
F000:F5C5 5E            POP     SI
F000:F5C6 5A            POP     DX
F000:F5C7 CA0200        RETF    0002


F000:F5CA 50            PUSH    AX
F000:F5CB 51            PUSH    CX
F000:F5CC E81701        CALL    F6E6
F000:F5CF B40A          MOV     AH,0A
F000:F5D1 268B4D04      MOV     CX,ES:[DI+04]
F000:F5D5 49            DEC     CX
F000:F5D6 80CD80        OR      CH,80
F000:F5D9 E88502        CALL    F861
F000:F5DC E80903        CALL    F8E8
F000:F5DF 7305          JAE     F5E6
F000:F5E1 B216          MOV     DL,16
F000:F5E3 EB61          JMP     F646
F000:F5E5 90            NOP
F000:F5E6 0CA0          OR      AL,A0
F000:F5E8 E8D502        CALL    F8C0
F000:F5EB 7305          JAE     F5F2
F000:F5ED B217          MOV     DL,17
F000:F5EF EB55          JMP     F646
F000:F5F1 90            NOP
F000:F5F2 24FC          AND     AL,FC
F000:F5F4 7513          JNZ     F609
F000:F5F6 BA1800        MOV     DX,0018
F000:F5F9 EC            IN      AL,DX
F000:F5FA 268A4F07      MOV     CL,ES:[BX+07]
F000:F5FE FEC1          INC     CL
F000:F600 D2E8          SHR     AL,CL
F000:F602 723E          JB      F642
F000:F604 B218          MOV     DL,18
F000:F606 EB3E          JMP     F646
F000:F608 90            NOP
F000:F609 24BC          AND     AL,BC
F000:F60B 7425          JZ      F632
F000:F60D FECC          DEC     AH
F000:F60F 7402          JZ      F613
F000:F611 EBBE          JMP     F5D1
F000:F613 24F0          AND     AL,F0
F000:F615 7505          JNZ     F61C
F000:F617 B004          MOV     AL,04
F000:F619 EB1E          JMP     F639

F000:F61B 90            NOP
F000:F61C 24E0          AND     AL,E0
F000:F61E 7505          JNZ     F625
F000:F620 B008          MOV     AL,08
F000:F622 EB15          JMP     F639

F000:F624 90            NOP
F000:F625 24C0          AND     AL,C0
F000:F627 7505          JNZ     F62E
F000:F629 B00A          MOV     AL,0A
F000:F62B EB0C          JMP     F639

F000:F62D 90            NOP
F000:F62E 2480          AND     AL,80
F000:F630 7505          JNZ     F637
F000:F632 B000          MOV     AL,00
F000:F634 EB03          JMP     F639

F000:F636 90            NOP
F000:F637 B002          MOV     AL,02
F000:F639 26884714      MOV     ES:[BX+14],AL
F000:F63D B219          MOV     DL,19
F000:F63F EB05          JMP     F646

F000:F641 90            NOP
F000:F642 F8            CLC
F000:F643 EB02          JMP     F647
F000:F645 90            NOP

F000:F646 F9            STC
F000:F647 59            POP     CX
F000:F648 58            POP     AX
F000:F649 C3            RET
F000:F64A 8AE0          MOV     AH,AL
F000:F64C 50            PUSH    AX
F000:F64D 26C6471300    MOV     BYTE PTR ES:[BX+13],00
F000:F652 26C647140C    MOV     BYTE PTR ES:[BX+14],0C
F000:F657 26894F0C      MOV     ES:[BX+0C],CX
F000:F65B 8BCA          MOV     CX,DX
F000:F65D 263A6D03      CMP     CH,ES:[DI+03]
F000:F661 7613          JBE     F676
F000:F663 26807D0102    CMP     BYTE PTR ES:[DI+01],02
F000:F668 7405          JZ      F66F
F000:F66A B21C          MOV     DL,1C
F000:F66C EB44          JMP     F6B2
F000:F66E 90            NOP
F000:F66F 262A6D03      SUB     CH,ES:[DI+03]
F000:F673 80CC08        OR      AH,08
F000:F676 26886508      MOV     ES:[DI+08],AH
-u
F000:F67A 268A4507      MOV     AL,ES:[DI+07]
F000:F67E 268B5703      MOV     DX,ES:[BX+03]
F000:F682 83C201        ADD     DX,+01
F000:F685 EE            OUT     DX,AL
F000:F686 26894F0E      MOV     ES:[BX+0E],CX
F000:F68A 26884D07      MOV     ES:[DI+07],CL
F000:F68E 3AC1          CMP     AL,CL
F000:F690 7423          JZ      F6B5
F000:F692 3CFF          CMP     AL,FF
F000:F694 750B          JNZ     F6A1
F000:F696 8AC4          MOV     AL,AH
F000:F698 E86300        CALL    F6FE
-u
F000:F69B 26884D07      MOV     ES:[DI+07],CL
F000:F69F 7211          JB      F6B2
F000:F6A1 E84402        CALL    F8E8
F000:F6A4 7305          JAE     F6AB
F000:F6A6 B21B          MOV     DL,1B
F000:F6A8 EB08          JMP     F6B2
F000:F6AA 90            NOP
F000:F6AB E80900        CALL    F6B7
F000:F6AE 7305          JAE     F6B5
F000:F6B0 B21D          MOV     DL,1D
F000:F6B2 33C9          XOR     CX,CX
F000:F6B4 F9            STC
F000:F6B5 58            POP     AX
F000:F6B6 C3            RET
F000:F6B7 50            PUSH    AX
F000:F6B8 B403          MOV     AH,03
F000:F6BA 268A4507      MOV     AL,ES:[DI+07]
-u
F000:F6BE 268B5703      MOV     DX,ES:[BX+03]
F000:F6C2 83C203        ADD     DX,+03
F000:F6C5 EE            OUT     DX,AL
F000:F6C6 B01C          MOV     AL,1C
F000:F6C8 260A4506      OR      AL,ES:[DI+06]
F000:F6CC E8F101        CALL    F8C0
F000:F6CF 7305          JAE     F6D6
F000:F6D1 B224          MOV     DL,24
F000:F6D3 EB0E          JMP     F6E3
F000:F6D5 90            NOP
F000:F6D6 2498          AND     AL,98
F000:F6D8 740A          JZ      F6E4
F000:F6DA FECC          DEC     AH
F000:F6DC 75DC          JNZ     F6BA
-u
F000:F6DE E88700        CALL    F768
F000:F6E1 B225          MOV     DL,25
F000:F6E3 F9            STC
F000:F6E4 58            POP     AX
F000:F6E5 C3            RET
F000:F6E6 50            PUSH    AX
F000:F6E7 268B470E      MOV     AX,ES:[BX+0E]
F000:F6EB 8AC4          MOV     AL,AH
F000:F6ED 268B5703      MOV     DX,ES:[BX+03]
F000:F6F1 83C202        ADD     DX,+02
F000:F6F4 EE            OUT     DX,AL
F000:F6F5 58            POP     AX
F000:F6F6 C3            RET

; F6F7 INT 63 AH=0
F000:F6F7 E80400        CALL    F6FE
F000:F6FA 58            POP     AX
F000:F6FB E9C2FE        JMP     F5C0
-u
F000:F6FE 268B5703      MOV     DX,ES:[BX+03]
F000:F702 52            PUSH    DX
F000:F703 0C04          OR      AL,04
F000:F705 26884508      MOV     ES:[DI+08],AL
F000:F709 EE            OUT     DX,AL
F000:F70A 5A            POP     DX
F000:F70B B0D0          MOV     AL,D0
F000:F70D EE            OUT     DX,AL
F000:F70E 26C6450700    MOV     BYTE PTR ES:[DI+07],00
F000:F713 E8D201        CALL    F8E8
F000:F716 7205          JB      F71D
F000:F718 E81B00        CALL    F736
F000:F71B 7318          JAE     F735
F000:F71D 26885713      MOV     ES:[BX+13],DL
-u
F000:F721 268B5703      MOV     DX,ES:[BX+03]
F000:F725 83C204        ADD     DX,+04
F000:F728 268A4508      MOV     AL,ES:[DI+08]
F000:F72C 24FB          AND     AL,FB
F000:F72E EE            OUT     DX,AL
F000:F72F 26C64507FF    MOV     BYTE PTR ES:[DI+07],FF
F000:F734 F9            STC
F000:F735 C3            RET
F000:F736 50            PUSH    AX
F000:F737 B403          MOV     AH,03
F000:F739 B008          MOV     AL,08
F000:F73B 260A4506      OR      AL,ES:[DI+06]
F000:F73F E87E01        CALL    F8C0

-u
F000:F742 7305          JAE     F749
F000:F744 B21E          MOV     DL,1E
F000:F746 EB1D          JMP     F765
F000:F748 90            NOP
F000:F749 2499          AND     AL,99
F000:F74B 7419          JZ      F766
F000:F74D B05B          MOV     AL,5B
F000:F74F 50            PUSH    AX
F000:F750 E86D01        CALL    F8C0
F000:F753 58            POP     AX
F000:F754 50            PUSH    AX
F000:F755 E86801        CALL    F8C0
F000:F758 58            POP     AX
F000:F759 E86401        CALL    F8C0
F000:F75C FECC          DEC     AH
F000:F75E 75D9          JNZ     F739
F000:F760 E80500        CALL    F768
-u
F000:F763 B21F          MOV     DL,1F
F000:F765 F9            STC
F000:F766 58            POP     AX
F000:F767 C3            RET
F000:F768 2418          AND     AL,18
F000:F76A 7505          JNZ     F771
F000:F76C B002          MOV     AL,02
F000:F76E EB0C          JMP     F77C
F000:F770 90            NOP
F000:F771 2408          AND     AL,08
F000:F773 7505          JNZ     F77A
F000:F775 B006          MOV     AL,06
F000:F777 EB03          JMP     F77C
F000:F779 90            NOP
F000:F77A B004          MOV     AL,04
F000:F77C 26884714      MOV     ES:[BX+14],AL
F000:F780 C3            RET
F000:F781 E87200        CALL    F7F6
-u
F000:F784 50            PUSH    AX
F000:F785 7262          JB      F7E9
F000:F787 268B4F0C      MOV     CX,ES:[BX+0C]
F000:F78B 268B570E      MOV     DX,ES:[BX+0E]
F000:F78F 263A7503      CMP     DH,ES:[DI+03]
F000:F793 760A          JBE     F79F
F000:F795 262A7503      SUB     DH,ES:[DI+03]
F000:F799 FEC2          INC     DL
F000:F79B 2689570E      MOV     ES:[BX+0E],DX
F000:F79F 8AD6          MOV     DL,DH
F000:F7A1 32F6          XOR     DH,DH
F000:F7A3 8BC2          MOV     AX,DX
-u
F000:F7A5 03D1          ADD     DX,CX
F000:F7A7 4A            DEC     DX
F000:F7A8 51            PUSH    CX
F000:F7A9 268A4D03      MOV     CL,ES:[DI+03]
F000:F7AD 32ED          XOR     CH,CH
F000:F7AF 3BCA          CMP     CX,DX
F000:F7B1 59            POP     CX
F000:F7B2 7309          JAE     F7BD
F000:F7B4 268A4D03      MOV     CL,ES:[DI+03]
F000:F7B8 32ED          XOR     CH,CH
F000:F7BA 41            INC     CX
F000:F7BB 2BC8          SUB     CX,AX
F000:F7BD 8CD8          MOV     AX,DS
F000:F7BF 51            PUSH    CX
F000:F7C0 B104          MOV     CL,04
F000:F7C2 D3E0          SHL     AX,CL
F000:F7C4 59            POP     CX
-u
F000:F7C5 03C6          ADD     AX,SI
F000:F7C7 7926          JNS     F7EF
F000:F7C9 F7D8          NEG     AX
F000:F7CB 33D2          XOR     DX,DX
F000:F7CD 26F77504      DIV     WORD PTR ES:[DI+04]
F000:F7D1 3BC1          CMP     AX,CX
F000:F7D3 731A          JAE     F7EF
F000:F7D5 23C0          AND     AX,AX
F000:F7D7 7405          JZ      F7DE
F000:F7D9 8BC8          MOV     CX,AX
F000:F7DB EB12          JMP     F7EF
F000:F7DD 90            NOP
F000:F7DE B90100        MOV     CX,0001
F000:F7E1 26C6471001    MOV     BYTE PTR ES:[BX+10],01
-u
F000:F7E6 EB07          JMP     F7EF
F000:F7E8 90            NOP
F000:F7E9 F9            STC
F000:F7EA 33C9          XOR     CX,CX
F000:F7EC EB06          JMP     F7F4
F000:F7EE 90            NOP
F000:F7EF 26294F0C      SUB     ES:[BX+0C],CX
F000:F7F3 F8            CLC
F000:F7F4 58            POP     AX
F000:F7F5 C3            RET
F000:F7F6 B0D0          MOV     AL,D0
F000:F7F8 268B5703      MOV     DX,ES:[BX+03]
F000:F7FC EE            OUT     DX,AL
F000:F7FD 268B4F0E      MOV     CX,ES:[BX+0E]
F000:F801 263A6D03      CMP     CH,ES:[DI+03]
F000:F805 763B          JBE     F842
-u
F000:F807 B501          MOV     CH,01
F000:F809 268A4508      MOV     AL,ES:[DI+08]
F000:F80D 26807D0102    CMP     BYTE PTR ES:[DI+01],02
F000:F812 7509          JNZ     F81D
F000:F814 A808          TEST    AL,08
F000:F816 7505          JNZ     F81D
F000:F818 0C08          OR      AL,08
F000:F81A EB05          JMP     F821
F000:F81C 90            NOP
F000:F81D 24F7          AND     AL,F7
F000:F81F FEC1          INC     CL
F000:F821 26884508      MOV     ES:[DI+08],AL
F000:F825 26894F0E      MOV     ES:[BX+0E],CX
-u
F000:F829 26884D07      MOV     ES:[DI+07],CL
F000:F82D 263A4D02      CMP     CL,ES:[DI+02]
F000:F831 7605          JBE     F838
F000:F833 B220          MOV     DL,20
F000:F835 EB28          JMP     F85F
F000:F837 90            NOP
F000:F838 E87CFE        CALL    F6B7
F000:F83B 7305          JAE     F842
F000:F83D B222          MOV     DL,22
F000:F83F EB1E          JMP     F85F
F000:F841 90            NOP
F000:F842 268B5703      MOV     DX,ES:[BX+03]
F000:F846 EC            IN      AL,DX
F000:F847 F6D0          NOT     AL
-u
F000:F849 2420          AND     AL,20
F000:F84B 7402          JZ      F84F
F000:F84D B004          MOV     AL,04
F000:F84F 263A6711      CMP     AH,ES:[BX+11]
F000:F853 7402          JZ      F857
F000:F855 B004          MOV     AL,04
F000:F857 26886711      MOV     ES:[BX+11],AH
F000:F85B F8            CLC
F000:F85C EB02          JMP     F860
F000:F85E 90            NOP
F000:F85F F9            STC
F000:F860 C3            RET
F000:F861 50            PUSH    AX
F000:F862 51            PUSH    CX
F000:F863 53            PUSH    BX
F000:F864 51            PUSH    CX
F000:F865 268A6F07      MOV     CH,ES:[BX+07]
-u
F000:F869 8CDB          MOV     BX,DS
F000:F86B 8AE5          MOV     AH,CH
F000:F86D B106          MOV     CL,06
F000:F86F D2E4          SHL     AH,CL
F000:F871 8AC7          MOV     AL,BH
F000:F873 B104          MOV     CL,04
F000:F875 D2E8          SHR     AL,CL
F000:F877 B104          MOV     CL,04
F000:F879 D3E3          SHL     BX,CL
F000:F87B 03DE          ADD     BX,SI
F000:F87D 1400          ADC     AL,00
F000:F87F 0AC4          OR      AL,AH
F000:F881 BA0500        MOV     DX,0005
F000:F884 EE            OUT     DX,AL
F000:F885 BA1000        MOV     DX,0010
F000:F888 D0E5          SHL     CH,1
-u
F000:F88A 02D5          ADD     DL,CH
F000:F88C 8AC3          MOV     AL,BL
F000:F88E EE            OUT     DX,AL
F000:F88F 8AC7          MOV     AL,BH
F000:F891 EE            OUT     DX,AL
F000:F892 42            INC     DX
F000:F893 58            POP     AX
F000:F894 EE            OUT     DX,AL
F000:F895 8AC4          MOV     AL,AH
F000:F897 EE            OUT     DX,AL
F000:F898 BA1800        MOV     DX,0018
F000:F89B 5B            POP     BX
F000:F89C 268A4F07      MOV     CL,ES:[BX+07]
F000:F8A0 FEC1          INC     CL
F000:F8A2 32C0          XOR     AL,AL
F000:F8A4 F9            STC
F000:F8A5 D2D0          RCL     AL,CL
F000:F8A7 0C40          OR      AL,40
F000:F8A9 EE            OUT     DX,AL
-u
F000:F8AA 59            POP     CX
F000:F8AB 58            POP     AX
F000:F8AC C3            RET

; F8AD INT 63 AH=6
F000:F8AD 58            POP     AX
F000:F8AE 5E            POP     SI
F000:F8AF 56            PUSH    SI
F000:F8B0 8AC2          MOV     AL,DL
F000:F8B2 E83300        CALL    F8E8
F000:F8B5 7206          JB      F8BD
F000:F8B7 E8A7FF        CALL    F861
F000:F8BA E80300        CALL    F8C0
F000:F8BD E900FD        JMP     F5C0
F000:F8C0 51            PUSH    CX
F000:F8C1 268B5703      MOV     DX,ES:[BX+03]
F000:F8C5 B90000        MOV     CX,0000
F000:F8C8 26C64712FF    MOV     BYTE PTR ES:[BX+12],FF
-u
F000:F8CD EE            OUT     DX,AL
F000:F8CE FB            STI
F000:F8CF 268A4712      MOV     AL,ES:[BX+12]
F000:F8D3 3CFF          CMP     AL,FF
F000:F8D5 750E          JNZ     F8E5
F000:F8D7 50            PUSH    AX
F000:F8D8 D40A          AAM     0A
F000:F8DA D40A          AAM     0A
F000:F8DC D40A          AAM     0A
F000:F8DE 58            POP     AX
F000:F8DF E2EE          LOOP    F8CF
F000:F8E1 F9            STC
F000:F8E2 EB02          JMP     F8E6
F000:F8E4 90            NOP
F000:F8E5 F8            CLC
F000:F8E6 59            POP     CX
F000:F8E7 C3            RET
F000:F8E8 50            PUSH    AX
F000:F8E9 51            PUSH    CX
F000:F8EA 268A4508      MOV     AL,ES:[DI+08]
-u
F000:F8EE 24DF          AND     AL,DF
F000:F8F0 26F60508      TEST    BYTE PTR ES:[DI],08
F000:F8F4 7402          JZ      F8F8
F000:F8F6 0C20          OR      AL,20
F000:F8F8 0C04          OR      AL,04
F000:F8FA 268B5703      MOV     DX,ES:[BX+03]
F000:F8FE 83C204        ADD     DX,+04
F000:F901 EE            OUT     DX,AL
F000:F902 26884508      MOV     ES:[DI+08],AL
F000:F906 B90080        MOV     CX,8000
F000:F909 268B5703      MOV     DX,ES:[BX+03]
F000:F90D EC            IN      AL,DX
-u
F000:F90E 2480          AND     AL,80
F000:F910 7410          JZ      F922
F000:F912 50            PUSH    AX
F000:F913 D40A          AAM     0A
F000:F915 D40A          AAM     0A
F000:F917 D40A          AAM     0A
F000:F919 58            POP     AX
F000:F91A E2ED          LOOP    F909
F000:F91C F9            STC
F000:F91D 26C6471402    MOV     BYTE PTR ES:[BX+14],02
F000:F922 59            POP     CX
F000:F923 58            POP     AX
F000:F924 C3            RET

; F925 INT 63 AH=7
F000:F925 58            POP     AX
F000:F926 5E            POP     SI
F000:F927 B90700        MOV     CX,0007
F000:F92A F3A4          REP     MOVSB
F000:F92C E992FC        JMP     F5C1


; F92F INT 63 AH=8
F000:F92F 58            POP     AX
F000:F930 5B            POP     BX
F000:F931 8BDF          MOV     BX,DI
F000:F933 5F            POP     DI
F000:F934 E98BFC        JMP     F5C2

INT 43?
F000:F937 50            PUSH    AX
F000:F938 B418          MOV     AH,18
F000:F93A EB04          JMP     F940
F000:F93C 90            NOP

INT 51?
F000:F93D 50            PUSH    AX
F000:F93E B41C          MOV     AH,1C
F000:F940 53            PUSH    BX
F000:F941 52            PUSH    DX
F000:F942 06            PUSH    ES
F000:F943 E88BEC        CALL    E5D1
F000:F946 268B5703      MOV     DX,ES:[BX+03]
F000:F94A EC            IN      AL,DX
F000:F94B 26884712      MOV     ES:[BX+12],AL
F000:F94F 07            POP     ES
F000:F950 5A            POP     DX
F000:F951 5B            POP     BX
F000:F952 58            POP     AX
F000:F953 CF            IRET

; INT 50?
F000:F954 FC            CLD
F000:F955 50            PUSH    AX
F000:F956 53            PUSH    BX
F000:F957 51            PUSH    CX
F000:F958 52            PUSH    DX
F000:F959 57            PUSH    DI
F000:F95A 56            PUSH    SI
F000:F95B 1E            PUSH    DS
F000:F95C 06            PUSH    ES
F000:F95D BA0400        MOV     DX,0004
F000:F960 EC            IN      AL,DX
F000:F961 B408          MOV     AH,08
F000:F963 E86BEC        CALL    E5D1
F000:F966 26F6470801    TEST    BYTE PTR ES:[BX+08],01
F000:F96B 7513          JNZ     F980
F000:F96D 2688470B      MOV     ES:[BX+0B],AL
F000:F971 2480          AND     AL,80
F000:F973 7403          JZ      F978
F000:F975 E92303        JMP     FC9B
F000:F978 26804F0801    OR      BYTE PTR ES:[BX+08],01
F000:F97D E92503        JMP     FCA5
F000:F980 268A5708      MOV     DL,ES:[BX+08]
F000:F984 2680670879    AND     BYTE PTR ES:[BX+08],79
F000:F989 2688470C      MOV     ES:[BX+0C],AL
F000:F98D A880          TEST    AL,80
F000:F98F 7503          JNZ     F994
F000:F991 E90703        JMP     FC9B
F000:F994 26F6470B01    TEST    BYTE PTR ES:[BX+0B],01
F000:F999 740F          JZ      F9AA
F000:F99B 26F6470820    TEST    BYTE PTR ES:[BX+08],20
F000:F9A0 7408          JZ      F9AA
F000:F9A2 26806708DF    AND     BYTE PTR ES:[BX+08],DF
F000:F9A7 E9DE02        JMP     FC88
F000:F9AA 247F          AND     AL,7F
F000:F9AC 2688470D      MOV     ES:[BX+0D],AL
F000:F9B0 26C57F1C      LDS     DI,ES:[BX+1C]

....
FCB6 INT 66
FD2D INT 40
....

; INT 6A args AX and BH?
F000:FE86 FB            STI
F000:FE87 06            PUSH    ES
F000:FE88 53            PUSH    BX
F000:FE89 57            PUSH    DI
F000:FE8A 56            PUSH    SI
F000:FE8B 50            PUSH    AX

F000:FE8C 50            PUSH    AX
F000:FE8D 8BF3          MOV     SI,BX
F000:FE8F B414          MOV     AH,14
F000:FE91 E83DE7        CALL    E5D1
F000:FE94 58            POP     AX
F000:FE95 22E4          AND     AH,AH
F000:FE97 740F          JZ      FEA8
F000:FE99 FECC          DEC     AH
F000:FE9B 741D          JZ      FEBA
F000:FE9D FECC          DEC     AH
F000:FE9F 7428          JZ      FEC9
F000:FEA1 FECC          DEC     AH
F000:FEA3 742E          JZ      FED3
F000:FEA5 EB3C          JMP     FEE3 ; Return

F000:FEA7 90            NOP
F000:FEA8 268B7705      MOV     SI,ES:[BX+05]
F000:FEAC 268B4F07      MOV     CX,ES:[BX+07]
F000:FEB0 268B5709      MOV     DX,ES:[BX+09]
F000:FEB4 58            POP     AX
F000:FEB5 8BC6          MOV     AX,SI
F000:FEB7 EB2B          JMP     FEE4
F000:FEB9 90            NOP
F000:FEBA 26897705      MOV     ES:[BX+05],SI
F000:FEBE 26894F07      MOV     ES:[BX+07],CX
F000:FEC2 26895709      MOV     ES:[BX+09],DX
F000:FEC6 EB1B          JMP     FEE3

F000:FEC8 90            NOP
F000:FEC9 1E            PUSH    DS
F000:FECA E81E00        CALL    FEEB
F000:FECD 8935          MOV     [DI],SI
F000:FECF 1F            POP     DS
F000:FED0 EB11          JMP     FEE3
F000:FED2 90            NOP
F000:FED3 1E            PUSH    DS
F000:FED4 E81400        CALL    FEEB
F000:FED7 8B05          MOV     AX,[DI]
F000:FED9 23C0          AND     AX,AX
F000:FEDB 7501          JNZ     FEDE
F000:FEDD F9            STC
F000:FEDE 1F            POP     DS
F000:FEDF 5E            POP     SI
F000:FEE0 EB02          JMP     FEE4
F000:FEE2 90            NOP

F000:FEE3 58            POP     AX
F000:FEE4 5E            POP     SI
F000:FEE5 5F            POP     DI
F000:FEE6 5B            POP     BX
F000:FEE7 07            POP     ES
F000:FEE8 CA0200        RETF    0002


F000:FEEB 50            PUSH    AX
F000:FEEC D0E0          SHL     AL,1
F000:FEEE 98            CBW
F000:FEEF 8BF8          MOV     DI,AX
F000:FEF1 8CC0          MOV     AX,ES
F000:FEF3 8ED8          MOV     DS,AX
F000:FEF5 03FB          ADD     DI,BX
F000:FEF7 83C70C        ADD     DI,+0C
F000:FEFA 58            POP     AX
F000:FEFB C3            RET



; INT 68, argument 0..2 in AH
F000:FEFC 50            PUSH    AX
F000:FEFD 53            PUSH    BX
F000:FEFE 51            PUSH    CX
F000:FEFF 52            PUSH    DX
F000:FF00 06            PUSH    ES
F000:FF01 22E4          AND     AH,AH
F000:FF03 743A          JZ      FF3F
F000:FF05 FECC          DEC     AH
F000:FF07 740A          JZ      FF13
F000:FF09 FECC          DEC     AH
F000:FF0B 7423          JZ      FF30
F000:FF0D 07            POP     ES
F000:FF0E 5A            POP     DX
F000:FF0F 59            POP     CX
F000:FF10 5B            POP     BX
F000:FF11 58            POP     AX
F000:FF12 CF            IRET

; INT 68 AH = 1
F000:FF13 50            PUSH    AX
F000:FF14 B414          MOV     AH,14
F000:FF16 E8B8E6        CALL    E5D1   ; Get workspace ES:BX = 0086:0068
F000:FF19 26F6470B01    TEST    BYTE PTR ES:[BX+0B],01
F000:FF1E 5B            POP     BX
F000:FF1F 7506          JNZ     FF27
F000:FF21 B00A          MOV     AL,0A
F000:FF23 BA0300        MOV     DX,0003
F000:FF26 EE            OUT     DX,AL
F000:FF27 B700          MOV     BH,00
F000:FF29 B80202        MOV     AX,0202
F000:FF2C CD6A          INT     6A
F000:FF2E EBDD          JMP     FF0D ; return from int

; INT 68 AH = 2
F000:FF30 BA0300        MOV     DX,0003
F000:FF33 B00B          MOV     AL,0B
F000:FF35 EE            OUT     DX,AL
F000:FF36 33DB          XOR     BX,BX
F000:FF38 B80202        MOV     AX,0202
F000:FF3B CD6A          INT     6A
F000:FF3D EBCE          JMP     FF0D ; return from int

; INT 68 AH = 0
F000:FF3F B414          MOV     AH,14
F000:FF41 E88DE6        CALL    E5D1   ; Get workspace ES:BX = 0086:0068
F000:FF44 B000          MOV     AL,00
F000:FF46 23C9          AND     CX,CX
F000:FF48 7502          JNZ     FF4C
F000:FF4A FEC0          INC     AL
F000:FF4C 2688470B      MOV     ES:[BX+0B],AL
F000:FF50 23C9          AND     CX,CX
F000:FF52 74B9          JZ      FF0D ; return from int
F000:FF54 B076          MOV     AL,76
F000:FF56 BA0F00        MOV     DX,000F
F000:FF59 EE            OUT     DX,AL
F000:FF5A 8BC1          MOV     AX,CX
F000:FF5C B20D          MOV     DL,0D
F000:FF5E EE            OUT     DX,AL
F000:FF5F 8AC4          MOV     AL,AH
F000:FF61 EE            OUT     DX,AL
F000:FF62 EBA9          JMP     FF0D ; return from int

F000:FFF0 FA            CLI
F000:FFF1 FC            CLD
F000:FFF2 B800E0        MOV     AX,E000
F000:FFF5 8ED8          MOV     DS,AX
F000:FFF7 BE0500        MOV     SI,0005
F000:FFFA EA28E000F0    JMP     F000:E028
F000:FFFF FD            STD



Fredrik Öhrström has BIOS images for the mybrain3000, JB-3001 and Step/One. The first two are identical while the Step/One BIOS has a bugfix at E285, and the text is changed in one place to remove "JB-3000".

Patch:

F000:E285 B400          MOV     AH,00
F000:E287 CD63          INT     63
F000:E289 7259          JB      E2E4 ; "Drive not ready"

Changed to:

F000:E285 E9E81C        JMP     FF70
F000:E288 90            NOP
F000:E289 90            NOP
F000:E28A 90            NOP

F000:FF70 B102          MOV     CL,02
F000:FF72 B400          MOV     AH,00
F000:FF74 51            PUSH    CX
F000:FF75 CD63          INT     63
F000:FF77 59            POP     CX
F000:FF78 7307          JAE     FF81
F000:FF7A FEC9          DEC     CL   ; Try three times
F000:FF7C 75F4          JNZ     FF72
F000:FF7E E963E3        JMP     E2E4 ; "Drive not ready"
F000:FF81 E907E3        JMP     E28B

This page last modified 2024-01-14