Fat16 DB 'FAT16
标签集:TAGS:
回复Comments() 点击Count()
NTFS DB 'NTFS
标签集:TAGS:
回复Comments() 点击Count()
;-----------------------------
ErrMsg DB 'Invalid Partition Table!
标签集:TAGS:
回复Comments() 点击Count()
DSeg ENDS
;********************************************
CSeg SEGMENT
ASSUME CS:CSeg, DS:DSeg, ES:DSeg
Main PROC FAR
PUSH DS
SUB AX, AX
PUSH AX
CALL INIT
MOV AH,9
LEA DX,TabHead
INT 21h
CALL crlf
CALL ReadMBR
CALL CHECK55AA
MOV DI,42H
CALL SetRec
LEA BX, MBR[DPT2+8]
LEA BP, BlockNum
MOV AX, [BX]
MOV MainCount, AX
MOV [BP], AX
MOV AX, [BX+2]
MOV MainCount+2, AX
MOV [BP+2], AX
ReadExt:
CALL ReadMBR
CALL CHECK55AA
CALL SetRec
LEA BX, MBR[DPT2+8]
LEA BP, BlockNum
MOV AX, [BX]
ADD AX, MainCount
MOV [BP], AX
MOV AX, [BX+2]
ADC AX, MainCount[2]
MOV [BP+2], AX
MOV AL,MBR[DPT2+4]
CMP AL,0
JNZ ReadExt
CALL Exit
Main ENDP
;-----------------------------------
CHECK55AA PROC NEAR
lea bx,mbr
mov ax,[bx+dpt+40h]
cmp ax,0aa55h
jz s
mov ah,9
lea dx,ErrMsg
int 21h
CALL EXIT
s: ret
CHECK55AA ENDP
;-----------------------------------
SetRec PROC NEAR
call Prtparti
mov cx,11
s1: call spa
loop s1
call prtboot
mov cx,6
s2: call spa
loop s2
call getsys
mov cx,4
s3: call spa
loop s3
call prtstartc
mov cx,8
s4: call spa
loop s4
call prtendc
mov cx,8
s5: call spa
loop s5
www.751com.cn
LEA SI, PacketSize
MOV DL, 80h
MOV AH, 42h
INT 13h
RET
ReadMBR ENDP
;-----------------------------------
Init PROC NEAR
MOV AX, DSeg
MOV DS, AX
MOV ES, AX
push ax
push bx
LEA BX, BufferAddr
LEA AX, MBR
MOV [BX], AX
MOV [BX+2], DS
pop bx
上一页 [1] [2] [3] [4] [5] [6] 下一页