2022-08-21 09:07:57 +00:00
; Advanced Fullscreen Disassembler v2.11
; Copyright (C) by Rumen Gerasimov (GERISOFT), 1987, 1988
;
; First listing: without DATA segment
;
; Segment value: 0000, length: 0200
;
BIOS_SEG SEG MENT at 0h
org 0020h
D0020 dw 0
D0022 dw 0
INTERR8 label far
org 004Ch
D004C dw 0
D004E dw 0
org 0413h
D0413 dw 0
BIOS_SEG ends
BOOT_SEG SEG MENT at 7Ch
org 0
BOOT_PROCESS label far
BOOT_SEG ends
DISK_ROM SEG MENT at 0C800h
org 256h
C800_SEG label far
DISK_ROM ends
SEG0000 seg ment public para 'CODE'
assume CS : SEG 0000 , ds : SEG 0000
;***********************************************************;
; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ;
; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> boot sector <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ;
;***********************************************************;
; <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 0000:7C00 <20> <> <EFBFBD> 07C0:0000
;
ORG 7C00h
JMP short L7C1E
D7C02 db 90h
db 'IBM 3.1'
DB 0
DB 2
D7C0D DB 2
D7C0E DW 1
DB 2
DB 70h
DB 0
D7C13 DW 2D0h
DB 0FDh
DB 2
DB 0
D7C18 DW 9 ;Sector per track - SecPTrk
D7C1A DW 2 ;Side per track - SidPTrk
D7C1C DW 0
L7C1E: XOR AX , AX
MOV SS , AX
MOV SP , 7C00h
MOV DS , AX
assume ds : BIOS_SEG
MOV AX , Word Ptr D0413 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> BIOS MEMSIZE <20> 2
SUB AX , 0002h
MOV Word Ptr D0413 , AX
assume ds : SEG 0000
MOV CL , 06h
SHL AX , CL
SUB AX , 07C0h
MOV ES , AX ;ES: <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 2<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
MOV SI , 7C00h
MOV DI , SI
MOV CX , 0100h
REPZ MOVSW ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> : <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
db 08Eh , 0C8h ;MOV CS,AX ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
;CS:7C00 - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD>
PUSH CS
POP DS
CALL L7C4A
L7C4A: XOR AH , AH ;RESET <20> <> INT 13
INT 13h
AND Byte Ptr D7DF8 , 80h ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> (A: - floppy
; C: - hard
MOV BX , Word Ptr D7DF9 ;<3B> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> -
PUSH CS ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
POP AX
SUB AX , 0020h
MOV ES , AX ;adres = (CS - 20h):8000h
CALL L7C9D
MOV BX , Word Ptr D7DF9 ;<3B> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
INC BX ; (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> BOOT)
MOV AX , 0FFC0h ;adres = 0000:7C00
MOV ES , AX
CALL L7C9D
XOR AX , AX
MOV Byte Ptr D7DF7 , AL ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> -<2D> <> <EFBFBD> <EFBFBD> <EFBFBD> (<28> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> )
MOV DS , AX
assume ds : BIOS_SEG
MOV AX , Word Ptr D004C ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> INT 13!
MOV BX , Word Ptr D004E
MOV Word Ptr D004C , offset NewINT13
MOV Word Ptr D004E , CS
PUSH CS
POP DS
assume ds : SEG 0000
MOV Word Ptr D7D2A , AX ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> INT 13
MOV Word Ptr D7D2C , BX
MOV DL , Byte Ptr D7DF8 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> BOOT <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
jmp BOOT_PROCESS ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> BOOT process
;================================================================;
; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (L7C9D) <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> (L7C98) ;
; <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> ;
;----------------------------------------------------------------;
; BX - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ;
; ES:8000 - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ;
; ;
; D7DF8 - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ;
; ;
;================================================================;
L7C98: MOV AX , 0301h
JMP short L7CA0
L7C9D: MOV AX , 0201h
L7CA0: XCHG BX , AX
ADD AX , Word Ptr D7C1C
XOR DX , DX
DIV Word Ptr D7C18 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> AX
INC DL ; (0-7..) <20> <> <EFBFBD> Track, Side, Sector
MOV CH , DL ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> CX, DX (<28> <> INT 13)
XOR DX , DX
DIV Word Ptr D7C1A
MOV CL , 06h
SHL AH , CL
OR AH , CH
MOV CX , AX
XCHG CH , CL
MOV DH , DL
MOV AX , BX
L7CC3: MOV DL , Byte Ptr D7DF8 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (A:)
MOV BX , 8000h
INT 13h
JNC L7CCF
POP AX ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <20> <> <EFBFBD> I/O err
L7CCF: RET
;========================================================================;
; <09> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> INT 13 ;
;========================================================================;
NewINT13:
PUSH DS ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
PUSH ES
PUSH AX
PUSH BX
PUSH CX
PUSH DX
PUSH CS ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> DS <20> ES
POP DS
PUSH CS
POP ES
TEST Byte Ptr D7DF7 , 01h ;<3B> <> <EFBFBD> <20> 1 - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,
JNE L7D23 ; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> . INT 13
CMP AH , 02h ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ?
JNE L7D23 ;<3B> <> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> INT 13
CMP Byte Ptr D7DF8 , DL ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
MOV Byte Ptr D7DF8 , DL ; <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
JNE L7D12 ;<3B> <>
XOR AH , AH ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
INT 1Ah
TEST DH , 7Fh ;<3B> <> <EFBFBD> 8000 <20> <> low order part = 1?
JNE L7D03 ;<3B> <> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
TEST DL , 0F0h ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 00F0 <20> <> low order part = 1?
JNE L7D03 ;<3B> <> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> : <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> TIMER .and. 80F0h == 0
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 1800 <20> <> <EFBFBD> . = 30 <20> <> <EFBFBD> .
PUSH DX
call L7EB3 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
POP DX
L7D03: MOV CX , DX ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
SUB DX , Word Ptr D7EB0 ; (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> )
MOV Word Ptr D7EB0 , CX
SUB DX , + 24h
JC L7D23
L7D12: OR Byte Ptr D7DF7 , 01h ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> /<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
PUSH SI
PUSH DI
CALL L7D2E
POP DI
POP SI
AND Byte Ptr D7DF7 , 0FEh
L7D23: POP DX ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
POP CX
POP BX
POP AX
POP ES
POP DS
D7D2A = $ + 1
D7D2C = $ + 3
jmp c800_SEG ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> INT 13
;================================================================;
; <09> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ;
;================================================================;
L7D2E: MOV AX , 0201h ;<3B> <> <EFBFBD> <EFBFBD> BOOT sector <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
MOV DH , 00h ; BX = ?????????????????????? <20> <> <EFBFBD> <EFBFBD> , <20> <> !
MOV CX , 0001h
CALL L7CC3
TEST Byte Ptr D7DF8 , 80h ;HARD DISK?
JE L7D63 ;<3B> <>
;---- HARD DISK ----;
MOV SI , 81BEh ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> DOS partition
MOV CX , 0004h
L7D46: CMP Byte Ptr [ SI + 04h ], 01h
JE L7D58
CMP Byte Ptr [ SI + 04h ], 04h
JE L7D58
ADD SI , + 10h
LOOP L7D46
RET ;<3B> <> <EFBFBD> <EFBFBD> DOS partition, <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;---- <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> DOS partition ----;
L7D58: MOV DX , Word Ptr [ SI ]
MOV CX , Word Ptr [ SI + 02h ]
MOV AX , 0201h
CALL L7CC3 ;<3B> <> <EFBFBD> <EFBFBD> BOOT sector <20> <> DOS partition
;---- <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> BOOT sector ----;
L7D63: MOV SI , 8002h
MOV DI , offset D7C02
MOV CX , 001Ch
REPZ MOVSB ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> BPB <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> BOOT sector
CMP Word Ptr D8000 + 01FCh , 1357h ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ?
JNE L7D8B ;<3B> <>
CMP Byte Ptr D8000 + 01FBh , 00h ;<3B> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> DS?
JNC L7D8A
;---- <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ----; ;---- <20> <> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ? ----;
MOV AX , Word Ptr D8000 + 01F5h ;<3B> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ...
MOV Word Ptr D7DF5 , AX
MOV SI , Word Ptr D8000 + 01F9h
jmp L7E92
L7D8A: RET
;-------------------
; <09> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;
L7D8B: CMP Word Ptr D8000 + 000Bh , 0200h ;<3B> <> <EFBFBD> <EFBFBD> <20> <> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
JNE L7D8A
CMP Byte Ptr D8000 + 000Dh , 02h
JC L7D8A
MOV CX , Word Ptr D8000 + 000Eh
MOV AL , Byte Ptr D8000 + 0010h
CBW
MUL Word Ptr D8000 + 0016h
ADD CX , AX
MOV AX , 0020h
MUL Word Ptr D8000 + 0011h
ADD AX , 01FFh
MOV BX , 0200h
DIV BX
ADD CX , AX
MOV Word Ptr D7DF5 , CX
MOV AX , Word Ptr D7C13
SUB AX , Word Ptr D7DF5
MOV BL , Byte Ptr D7C0D
XOR DX , DX
XOR BH , BH
DIV BX
INC AX
MOV DI , AX
AND Byte Ptr D7DF7 , 0FBh
CMP AX , 0FF0h
JBE L7DE0
OR Byte Ptr D7DF7 , 04h
L7DE0: MOV SI , 0001h
MOV BX , Word Ptr D7C0E
DEC BX
MOV Word Ptr D7DF3 , BX
MOV Byte Ptr D7EB2 , 0FEh
JMP short L7E00
D7DF3 DW 1
D7DF5 DW 000Ch
D7DF7 DB 1 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> -<2D> <> <EFBFBD> <EFBFBD> :
; 0000 0001 - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
; 0000 0010 - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> INT 08
; 0000 0100
D7DF8 DB 00 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> : 0 - A:, 1 - B:, ...
D7DF9 DW 274h ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
DB 00
DW 1357h ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> !!!!!!!!
DW 0AA55h ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> BOOT <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;***********************************************************;
; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ;
; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> bad sector <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ;
;***********************************************************;
L7E00: INC Word Ptr D7DF3
MOV BX , Word Ptr D7DF3
ADD Byte Ptr D7EB2 , 02h
call L7C9D
JMP short L7E4B
L7E12: MOV AX , 0003h
TEST Byte Ptr D7DF7 , 04h
JE L7E1D
INC AX
L7E1D: MUL SI
SHR AX , 1
SUB AH , Byte Ptr D7EB2
MOV BX , AX
CMP BX , 01FFh
JNC L7E00
MOV DX , Word Ptr D8000 [ BX ]
TEST Byte Ptr D7DF7 , 04h
JNE L7E45
MOV CL , 04h
TEST SI , 0001h
JE L7E42
SHR DX , CL
L7E42: AND DH , 0Fh
L7E45: TEST DX , 0FFFFh
JE L7E51
L7E4B: INC SI
CMP SI , DI
JBE L7E12
RET
L7E51: MOV DX , 0FFF7h
TEST Byte Ptr D7DF7 , 04h
JNE L7E68
AND DH , 0Fh
MOV CL , 04h
TEST SI , 0001h
JE L7E68
SHL DX , CL
L7E68: OR Word Ptr D8000 [ BX ], DX
MOV BX , Word Ptr D7DF3
call L7C98
MOV AX , SI
SUB AX , 0002h
MOV BL , Byte Ptr D7C0D
XOR BH , BH
MUL BX
ADD AX , Word Ptr D7DF5
MOV SI , AX
MOV BX , 0000h
call L7C9D
MOV BX , SI
INC BX
call L7C98
L7E92: MOV BX , SI
MOV Word Ptr D7DF9 , SI
PUSH CS
POP AX
SUB AX , 0020h
MOV ES , AX
call L7C98
PUSH CS
POP AX
SUB AX , 0040h
MOV ES , AX
MOV BX , 0000h
call L7C98
RET
D7EB0 DW 0EEF0h
D7EB2 DB 0
;=======================================================;
; <09> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> int 08, <20> <> <EFBFBD> <20> <> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ;
;=======================================================;
L7EB3: TEST Byte Ptr D7DF7 , 02h
JNE L7EDE
OR Byte Ptr D7DF7 , 02h
assume ds : BIOS_SEG
MOV AX , 0000h ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> INT 8
MOV DS , AX
MOV AX , Word Ptr D0020
MOV BX , Word Ptr D0022
MOV Word Ptr D0020 , offset NewINT08
MOV Word Ptr D0022 , CS
assume ds : SEG 0000
PUSH CS
POP DS
MOV Word Ptr D7FC9 , AX ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> INT 8
MOV Word Ptr D7FCB , BX
L7EDE: RET
;=====================================================================;
; <09> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> int 08 ;
;=====================================================================;
NewINT08:
PUSH DS ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
PUSH AX
PUSH BX
PUSH CX
PUSH DX
PUSH CS ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> DS
POP DS
MOV AH , 0Fh ;Get current video mode
INT 10h
MOV BL , AL
CMP BX , Word Ptr D7FD4 ;mode = <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> mode
JE L7F27 ;<3B> <> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;---- <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> . <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ----;
MOV Word Ptr D7FD4 , BX ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> mode
DEC AH
MOV Byte Ptr D7FD6 , AH ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> char_per_line-1
MOV AH , 01h
CMP BL , 07h ;mode = text b/w MGA, EGA?
JNE L7F05 ;<3B> <>
DEC AH
L7F05: CMP BL , 04h ;mode = graphics?
JNC L7F0C ;<3B> <>
DEC AH
L7F0C: MOV Byte Ptr D7FD3 , AH
MOV Word Ptr D7FCF , 0101h
MOV Word Ptr D7FD1 , 0101h
MOV AH , 03h ;Read cursor position and size
INT 10h
PUSH DX ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
MOV DX , Word Ptr D7FCF
JMP short L7F4A
;---- <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (mode) <20> <> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ----;
L7F27: MOV AH , 03h ;Read cursor position and size
INT 10h
PUSH DX ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> cursor pos & size
MOV AH , 02h ;Set cursor position
MOV DX , Word Ptr D7FCF
INT 10h
MOV AX , Word Ptr D7FCD ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
CMP Byte Ptr D7FD3 , 01h ;mode = GRAPF?
JNE L7F41 ;<3B> <>
MOV AX , 8307h
L7F41: MOV BL , AH ;Write character & attribute
MOV CX , 0001h
MOV AH , 09h
INT 10h
;---- <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ----;
L7F4A: MOV CX , Word Ptr D7FD1
CMP DH , 00h ;Up
JNE L7F58
XOR CH , 0FFh
INC CH
L7F58: CMP DH , 18h ;Down
JNE L7F62
XOR CH , 0FFh
INC CH
L7F62: CMP DL , 00h ;Left
JNE L7F6C
XOR CL , 0FFh
INC CL
L7F6C: CMP DL , Byte Ptr D7FD6 ;Right
JNE L7F77
XOR CL , 0FFh
INC CL
L7F77: CMP CX , Word Ptr D7FD1
JNE L7F94
MOV AX , Word Ptr D7FCD
AND AL , 07h
CMP AL , 03h
JNE L7F8B
XOR CH , 0FFh
INC CH
L7F8B: CMP AL , 05h
JNE L7F94
XOR CL , 0FFh
INC CL
L7F94: ADD DL , CL
ADD DH , CH
MOV Word Ptr D7FD1 , CX
MOV Word Ptr D7FCF , DX
MOV AH , 02h
INT 10h ;Set cursor position
MOV AH , 08h ;Read character & attribute
INT 10h
MOV Word Ptr D7FCD , AX
MOV BL , AH
CMP Byte Ptr D7FD3 , 01h ;mode = GRAPH?
JNE L7FB6 ;<3B> <>
MOV BL , 83h
L7FB6: MOV CX , 0001h ;Write character & attribute
MOV AX , 0907h
INT 10h
POP DX ;Restore cursor position
MOV AH , 02h
INT 10h
POP DX ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
POP CX
POP BX
POP AX
POP DS
D7FC9 = $ + 1
D7FCB = $ + 3
JMP INTERR8 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> INT 08
D7FCD DW 0
D7FCF DW 0101h ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
D7FD1 DW 0101h
D7FD3 DB 0 ; 1 - mode = graph, b800
; 0 - mode = text, b800
;-1 - mode = 7, text b/w EGA,HGA
D7FD4 DW 0FFFFh ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> mode
D7FD6 DB 50h ;<3B> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD>
DB 0B7h , 0B7h , 0B7h , 0B6h , 040h , 040h , 088h , 0DEh
DB 0E6h , 05Ah , 0ACh , 0D2h , 0E4h , 0EAh , 0E6h , 040h
DB 050h , 0ECh , 040h , 064h , 05Ch , 060h , 052h , 040h
DB 040h , 040h , 040h , 064h , 062h , 05Eh , 062h , 060h
DB 05Eh , 070h , 06Eh , 040h , 041h , 0B7h , 0B7h , 0B7h
DB 0B6h
;*************************************************************
; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
D8000 = $
SEG0000 ends
END