home *** CD-ROM | disk | FTP | other *** search
- Procedure AbsRead ( var buf; drive, number, logical : Word );
- var
- result : integer;
- begin
- inline (
- $55/ { PUSH BP ; Interrupt 25 trashes all registers }
- $1E/ { PUSH DS ; Store DS }
- $33/$C0/ { XOR AX,AX ; set AX to zero }
- $89/$86/Result/ { MOV Result, AX ; Move AX to Result }
- $8A/$86/Drive/ { MOV AL, Drive ; Move Drive to AL }
- $8B/$8E/Number/ { MOV CX, Number ; Move Number to CX }
- $8B/$96/Logical/ { MOV DX, Logical; Move Logical to DX }
- $C5/$9e/Buf/ { LDS BX, Buf ; Move Buf to DS:BX }
- $CD/$25/ { INT 25h ; Call interrupt $25 }
- $5B/ { POP BX ; Remove the flags value from the stack }
- $1F/ { POP DS ; Restore DS }
- $5D/ { POP BP ; Restore BP }
- $73/$04/ { JNB Done ; Jump ... }
- $89/$86/Result ); { MOV Result, AX ; move error code to AX }
- { Done: }
- If ( Result <> 0 ) Then
- { Error condition... };
- End;
-
- Procedure AbsWrite ( var buf; drive, number, logical : Word );
- var
- result : Word;
- begin
- inline (
- $55/ { PUSH BP ; Interrupt 25 trashes all registers }
- $1E/ { PUSH DS ; Store DS }
- $33/$C0/ { XOR AX,AX ; set AX to zero }
- $89/$86/Result/ { MOV Result, AX ; Move AX to Result }
- $8A/$86/Drive/ { MOV AL, Drive ; Move Drive to AL }
- $8B/$8E/Number/ { MOV CX, Number ; Move Number to CX }
- $8B/$96/Logical/ { MOV DX, Logical; Move Logical to DX }
- $C5/$9E/Buf/ { LDS BX, Buf ; Move Buf to DS:BX }
- $CD/$26/ { INT 25h ; Call interrupt $25 }
- $5B/ { POP BX ; Remove the flags value from the stack }
- $1F/ { POP DS ; Restore DS }
- $5D/ { POP BP ; Restore BP }
- $73/$04/ { JNB Done ; Jump ... }
- $89/$86/Result ); { MOV Result, AX ; move error code to AX }
- { Done: }
- If ( Result <> 0 ) Then
- { Error condition... };
- End;
-
-