Category : Miscellaneous Language Source Code
Archive   : BDISK10.ZIP
Filename : BDISK.INC

 
Output of file : BDISK.INC contained in archive : BDISK10.ZIP
.XLIST
;========================================================================
; BDISK Library Assembler Interface
;
; Declares all necessary information for easily interfacing with the
; BDISK library routines. Just include the following line in the
; assember source code:
;
; INCLUDE bdisk.inc
;
; AX always returns an error code (0 if no error). All other registers
; are preserved. Note: BP may not be used to pass parameters using
; the macros (it is used in loading the stack). MASM version 5.00 is
; required.

INCLUDE stddef.inc

; Tell linker what library to include.

INCLUDELIB bdisk

; Declare the external routines and data.

.DATA
EXTRN _BootSec:BYTE
.CODE
EXTRN _SetBase:FAR, _ResBase:FAR
EXTRN _SecRed:FAR, _SecVer:FAR, _SecWrt:FAR, _TrkFrm:FAR

; Reset the floppy disk data. Should be used before the other disk
; routines. Data is restored with ResBase.

setbase MACRO trksize, secsize
push bp
ldargs
call _SetBase
pop bp
ENDM

; Restore the floppy disk data. Should be used after SetBase and any
; other BDISK routines, but before disk accesses by DOS or other programs.

resbase MACRO
call _ResBase
ENDM

; Read an absolute sector.

secred MACRO drive, head, track, sector, count, segment, offset
push bp
ldargs
call _SecRed
pop bp
ENDM

; Verify an absolute sector.

secver MACRO drive, head, track, sector, count
push bp
ldargs
call _SecVer
pop bp
ENDM

; Write an absolute sector.

secwrt MACRO drive, head, track, sector, count, segment, offset
push bp
ldargs
call _SecWrt
pop bp
ENDM

; Format a track. The track size and sector size (normal is 9 sec/trk
; and 512 bytes/sec) should be the same as set by SetBase.

trkfrm MACRO drive, head, track, trksize, secsize
push bp
ldargs
call _TrkFrm
pop bp
ENDM
.LIST


  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : BDISK10.ZIP
Filename : BDISK.INC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/