program SEEK_VOL_LABEL; const Disk = 0; (* 0 = текущий, 1 = A:, 2 = B:, ... *) type Registers = record case boolean of False : (AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags : integer); True : (AL, AH, BL, BH, CL, CH, DL, DH : byte) end; EFCBtype = record FlagEFCB : byte; Reserved : array [1..05] of byte; FileAttr : byte; DriveNum : byte; FileName : array [1..08] of char; FileExt : array [1..03] of char; CurrentBlock : integer; RecordSize : integer; FileSizeLo : integer; FileSizeHi : integer; Date : integer; AreaDOS : array [1..10] of byte; CurrentRec : byte; RandomRecLo : integer; RandomRecHi : integer end; var Regs : Registers; EFCB : EFCBtype; begin TextColor (LightGray); TextBackGround (Black); FillChar (EFCB, SizeOf (EFCB), 0); with EFCB do begin FlagEFCB := $FF; FileAttr := $08; DriveNum := Disk; FileName := 'MY_DISK!'; FileExt := ' ' end; Regs.AH := $11; Regs.DS := Seg (EFCB); Regs.DX := Ofs (EFCB); MsDos (Regs); if Regs.AL = $00 then WriteLn ('***Метка тома обнаружена***') else WriteLn ('***Метка тома не найдена***'); Halt (0) end. (* SEEK_VOL_LABEL *)
Вернуться к статье