📄 sector.asm
字号:
Hex2BCD 0,_TempSector,CHSBuffer,1,2
GotoXY _CurX,11
mov di,offset CHSBuffer
mov cx,2
TrimBSector:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimBSector
DivCySe [bp+6],[bp+7],_TempCylin,byte ptr _TempSector
Hex2BCD 0,_TempCylin,CHSBuffer,4,5
GotoXY _CurX,12
mov di,offset CHSBuffer
mov cx,5
TrimECylin:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimECylin
mov al,[bp+5]
mov byte ptr _TempHead,al
Hex2BCD 0,_TempHead,CHSBuffer,2,3
GotoXY _CurX,13
mov di,offset CHSBuffer
mov cx,3
TrimEHead:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimEHead
Hex2BCD 0,_TempSector,CHSBuffer,1,2
GotoXY _CurX,14
mov di,offset CHSBuffer
mov cx,2
TrimESector:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimESector
Hex2BCD [bp+10],[bp+8],CHSBuffer,8,9
GotoXY _CurX,15
mov di,offset CHSBuffer
mov cx,9
TrimBootSector:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimBootSector
Hex2BCD [bp+14],[bp+12],CHSBuffer,8,9
GotoXY _CurX,16
mov di,offset CHSBuffer
mov cx,9
TrimSector:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimSector
add _CurX,11
add bp,16
pop cx
dec cx
.if cx!=0
jmp Display4Part
.endif
KeyCheck:
Call GetKey
.if al==1bh ;ESC
jmp Exit
.endif
jmp KeyCheck
Exit:
OpenWin 3,4,76,19,9eh
Call DisplayBuffer
Call State_Sin
ret
TextPart endp
TextBoot proc near
mov bp,offset Diskbuffer
.if byte ptr [bp+54]=="F" && word ptr [bp+57]=="61"
Call TextBoot16
.elseif byte ptr [bp+82]=="F" && word ptr [bp+85]=="23"
Call TextBoot32
.else
ret
.endif
KeyCheck:
Call GetKey
.if al==1bh ;ESC
jmp Exit
.endif
jmp KeyCheck
Exit:
OpenWin 3,4,76,19,9eh
Call DisplayBuffer
Call State_Sin
ret
TextBoot endp
TextBoot16 proc near
OpenWin 6,7,75,17,00h
OpenWin 5,6,74,16,0cfh
Rectangle 5,6,74,16
Call State_ROnly
ShowString_DOS TextBootOEMID,20,7
mov bp,offset Diskbuffer
push bp
add bp,3
ShowString_BIOS 8,29,7,0cfh
pop bp
ShowString_DOS TextBootSectSize,15,8
Hex2BCD 0,[bp+11],CHSBuffer,4,5
GotoXY 29,8
mov di,offset CHSBuffer
mov cx,5
TrimSectSize:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimSectSize
Call GetCursor
inc dl
ShowString_DOS DiskSize,dl,8
mov al,[bp+13]
mov _TempByte,al
ShowString_DOS TextBootSPCluster,7,9
Hex2BCD 0,_TempWord,CHSBuffer,2,3
GotoXY 29,9
mov di,offset CHSBuffer
mov cx,3
TrimSPCluster:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimSPCluster
ShowString_DOS TextBootResSectors,10,10
Hex2BCD 0,[bp+14],CHSBuffer,4,5
GotoXY 29,10
mov di,offset CHSBuffer
mov cx,5
TrimResSect:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimResSect
mov al,[bp+16]
mov _TempByte,al
ShowString_DOS TextBootFATCopies,16,11
Hex2BCD 0,_TempWord,CHSBuffer,2,3
GotoXY 29,11
mov di,offset CHSBuffer
mov cx,3
TrimFATCopies:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimFATCopies
ShowString_DOS TextBootRoot,8,12
Hex2BCD 0,[bp+17],CHSBuffer,4,5
GotoXY 29,12
mov di,offset CHSBuffer
mov cx,5
TrimBootRoot:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimBootRoot
ShowString_DOS TextBootTSectors,13,13
.if word ptr [bp+19]==0
ShowString_DOS TextBootUnused,29,13
.else
Hex2BCD 0,[bp+19],CHSBuffer,4,5
GotoXY 29,13
mov di,offset CHSBuffer
mov cx,5
TrimTSectors:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimTSectors
.endif
push bp
ShowString_DOS TextBootMedia,10,14
mov di,offset CHSBuffer
HexByte2Ascii [bp+21],[di],[di+1]
mov word ptr [di+2],"H "
mov bp,offset CHSBuffer
ShowString_BIOS 4,29,14,0cfh
pop bp
ShowString_DOS TextBootSPFAT,11,15
Hex2BCD 0,[bp+22],CHSBuffer,4,5
GotoXY 29,15
mov di,offset CHSBuffer
mov cx,5
TrimTSPFAT:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimTSPFAT
ShowString_DOS TextBootSPTrack,42,7
Hex2BCD 0,[bp+24],CHSBuffer,4,5
GotoXY 62,7
mov di,offset CHSBuffer
mov cx,5
TrimSPTrack:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimSPTrack
ShowString_DOS TextBootHeads,54,8
Hex2BCD 0,[bp+26],CHSBuffer,4,5
GotoXY 62,8
mov di,offset CHSBuffer
mov cx,5
TrimHeads:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimHeads
ShowString_DOS TextBootHSectors,45,9
Hex2BCD [bp+30],[bp+28],CHSBuffer,8,9
GotoXY 62,9
mov di,offset CHSBuffer
mov cx,9
TrimHSectors:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimHSectors
ShowString_DOS TextBootBTSectors,42,10
.if word ptr [bp+19]!=0
ShowString_DOS TextBootUnused,62,10
.else
Hex2BCD [bp+34],[bp+32],CHSBuffer,8,10
GotoXY 62,10
mov di,offset CHSBuffer
mov cx,9
TrimBTSectors:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimBTSectors
.endif
push bp
ShowString_DOS TextBootDiskNum,48,11
mov di,offset CHSBuffer
HexByte2Ascii [bp+36],[di],[di+1]
mov word ptr [di+2],"H "
mov bp,offset CHSBuffer
ShowString_BIOS 4,62,11,0cfh
pop bp
push bp
ShowString_DOS TextBootEBRS,41,12
mov di,offset CHSBuffer
HexByte2Ascii [bp+38],[di],[di+1]
mov word ptr [di+2],"H "
mov bp,offset CHSBuffer
ShowString_BIOS 4,62,12,0cfh
pop bp
push bp
ShowString_DOS TextBootVSNum,43,13
mov di,offset CHSBuffer
HexWord2Ascii word ptr [bp+41],[di],[di+1],[di+2],[di+3]
HexWord2Ascii word ptr [bp+39],[di+4],[di+5],[di+6],[di+7]
mov word ptr [di+8],"H "
mov bp,offset CHSBuffer
ShowString_BIOS 10,62,13,0cfh
pop bp
push bp
ShowString_DOS TextBootVLabel,47,14
add bp,43
ShowString_BIOS 11,62,14,0cfh
pop bp
ShowString_DOS TextBootFSType,43,15
add bp,54
ShowString_BIOS 8,62,15,0cfh
ret
TextBoot16 endp
TextBoot32 proc near
OpenWin 6,6,75,19,00h
OpenWin 5,5,74,18,0cfh
Rectangle 5,5,74,18
Call State_ROnly
ShowString_DOS TextBootOEMID,20,6
mov bp,offset Diskbuffer
push bp
add bp,3
ShowString_BIOS 8,29,6,0cfh
pop bp
ShowString_DOS TextBootSectSize,15,7
Hex2BCD 0,[bp+11],CHSBuffer,4,5
GotoXY 29,7
mov di,offset CHSBuffer
mov cx,5
TrimSectSize:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimSectSize
Call GetCursor
inc dl
ShowString_DOS DiskSize,dl,7
mov al,[bp+13]
mov _TempByte,al
ShowString_DOS TextBootSPCluster,7,8
Hex2BCD 0,_TempWord,CHSBuffer,2,3
GotoXY 29,8
mov di,offset CHSBuffer
mov cx,3
TrimSPCluster:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimSPCluster
ShowString_DOS TextBootResSectors,10,9
Hex2BCD 0,[bp+14],CHSBuffer,4,5
GotoXY 29,9
mov di,offset CHSBuffer
mov cx,5
TrimResSect:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimResSect
mov al,[bp+16]
mov _TempByte,al
ShowString_DOS TextBootFATCopies,16,10
Hex2BCD 0,_TempWord,CHSBuffer,2,3
GotoXY 29,10
mov di,offset CHSBuffer
mov cx,3
TrimFATCopies:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimFATCopies
ShowString_DOS TextBootRoot,8,11
Hex2BCD 0,[bp+17],CHSBuffer,4,5
GotoXY 29,11
mov di,offset CHSBuffer
mov cx,5
TrimBootRoot:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimBootRoot
ShowString_DOS TextBootTSectors,13,12
.if word ptr [bp+19]==0
ShowString_DOS TextBootUnused,29,12
.else
Hex2BCD 0,[bp+19],CHSBuffer,4,5
GotoXY 29,12
mov di,offset CHSBuffer
mov cx,5
TrimTSectors:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimTSectors
.endif
push bp
ShowString_DOS TextBootMedia,10,13
mov di,offset CHSBuffer
HexByte2Ascii [bp+21],[di],[di+1]
mov word ptr [di+2],"H "
mov bp,offset CHSBuffer
ShowString_BIOS 4,29,13,0cfh
pop bp
ShowString_DOS TextBootSPFAT,11,14
.if word ptr [bp+22]==0
ShowString_DOS TextBootUnused,29,14
.else
Hex2BCD 0,[bp+22],CHSBuffer,4,5
GotoXY 29,14
mov di,offset CHSBuffer
mov cx,5
TrimTSPFAT:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimTSPFAT
.endif
ShowString_DOS TextBootSPTrack,9,15
Hex2BCD 0,[bp+24],CHSBuffer,4,5
GotoXY 29,15
mov di,offset CHSBuffer
mov cx,5
TrimSPTrack:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimSPTrack
ShowString_DOS TextBootHeads,21,16
Hex2BCD 0,[bp+26],CHSBuffer,4,5
GotoXY 29,16
mov di,offset CHSBuffer
mov cx,5
TrimHeads:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimHeads
ShowString_DOS TextBootHSectors,12,17
Hex2BCD [bp+30],[bp+28],CHSBuffer,8,9
GotoXY 29,17
mov di,offset CHSBuffer
mov cx,9
TrimHSectors:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimHSectors
ShowString_DOS TextBootBTSectors,42,6
.if word ptr [bp+19]!=0
ShowString_DOS TextBootUnused,62,6
.else
Hex2BCD [bp+34],[bp+32],CHSBuffer,8,10
GotoXY 62,6
mov di,offset CHSBuffer
mov cx,9
TrimBTSectors:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimBTSectors
.endif
ShowString_DOS TextBootBSPFAT,40,7
.if word ptr [bp+22]!=0
ShowString_DOS TextBootUnused,62,7
.else
Hex2BCD [bp+38],[bp+36],CHSBuffer,8,9
GotoXY 62,7
mov di,offset CHSBuffer
mov cx,9
TrimBSPFAT:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimBSPFAT
.endif
ShowString_DOS TextBootESign,48,8
Hex2BCD 0,[bp+40],CHSBuffer,4,5
GotoXY 62,8
mov di,offset CHSBuffer
mov cx,5
TrimBootSign:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimBootSign
ShowString_DOS TextBootFSVer,40,9
Hex2BCD 0,[bp+42],CHSBuffer,4,5
GotoXY 62,9
mov di,offset CHSBuffer
mov cx,5
TrimFSVer:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimFSVer
ShowString_DOS TextBootCORoot,43,10
Hex2BCD 0,[bp+44],CHSBuffer,4,5
GotoXY 62,10
mov di,offset CHSBuffer
mov cx,5
TrimCORoot:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimCORoot
ShowString_DOS TextBootFSSect,41,11
Hex2BCD 0,[bp+48],CHSBuffer,4,5
GotoXY 62,11
mov di,offset CHSBuffer
mov cx,5
TrimFSSect:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimFSSect
ShowString_DOS TextBootBSect,47,12
Hex2BCD 0,[bp+50],CHSBuffer,4,5
GotoXY 62,12
mov di,offset CHSBuffer
mov cx,5
TrimBSect:
mov al,[di]
.if al!=0
ShowChar_DOS al
.endif
inc di
loop TrimBSect
push bp
ShowString_DOS TextBootDiskNum,48,13
mov di,offset CHSBuffer
HexByte2Ascii [bp+64],[di],[di+1]
mov word ptr [di+2],"H "
mov bp,offset CHSBuffer
ShowString_BIOS 4,62,13,0cfh
pop bp
push bp
ShowString_DOS TextBootEBRS,41,14
mov di,offset CHSBuffer
HexByte2Ascii [bp+66],[di],[di+1]
mov word ptr [di+2],"H "
mov bp,offset CHSBuffer
ShowString_BIOS 4,62,14,0cfh
pop bp
push bp
ShowString_DOS TextBootVSNum,43,15
mov di,offset CHSBuffer
HexWord2Ascii word ptr [bp+69],[di],[di+1],[di+2],[di+3]
HexWord2Ascii word ptr [bp+67],[di+4],[di+5],[di+6],[di+7]
mov word ptr [di+8],"H "
mov bp,offset CHSBuffer
ShowString_BIOS 10,62,15,0cfh
pop bp
push bp
ShowString_DOS TextBootVLabel,47,16
add bp,71
ShowString_BIOS 11,62,16,0cfh
pop bp
ShowString_DOS TextBootFSType,43,17
add bp,82
ShowString_BIOS 8,62,17,0cfh
ret
TextBoot32 endp
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -