name free page 60,132 title free --- report free space on disk . free --- a utility to report free space on
. the default or 0selected disk drive. . . requires pc-dos or ms-dos 2.0. . . used in the form: . a> free [unit:] . (item in square brackets is optional) . . version 1.0 july 4, 1984 . copyright (c) 1984 by ray duncan . may be freely reproduced for non-commercial use. cr equ 0dh .ascii carriage return lf equ 0ah .ascii line feed blank equ 20h .ascii space code eom equ $ .end of string marker . here we define a dummy segment containing labels . for the default file control block and the command tail buffer, . so that the main program can access those locations. . psp segment para public psp org 05ch fcb label byte .default file control block org 080h command label byte .default command buffer psp ends cseg segment para public code assume cs:cseg,ds:psp,es:data,ss:stack get_drive proc near .get drive 0selection, if any, .otherwise obtain the identity .of the current disk drive. .return drive (1=a, 2=b, etc) in al. . mov al,fcb .pick up the drive code, parsed .by dos into the default file .control block. or al,al .is it the default? jnz get_drive1 .no, use it