title MSDOS 2.00 Function Library for Lattice C include mc.ash .model small ;; ;;FUNCTION: Get disk space and free space. ;; ;; ;;CALL: error= _free(drive,array); ;; int error, drive; ;; int array[4]; ;; ;; ;;RETURN: -1 if illegal drive ;; ;; ;;DESCRIPTION: Returns the following info ;; for the specified drive (0 == default, ;; 1 == A:, ...) in the array: ;; ;; array[0] sectors per cluster, ;; array[1] free clusters, ;; array[2] bytes per sector, ;; array[3] total clusters. ;; All indeterminate if error. ;; ;; ;;EXAMPLE: ;; ;; ;;CAUTIONS: ;; ;; ;;ASSUMPTIONS: ;; ;;LONG 32 bits (4 bytes) ;;INT 16 bits (2 bytes) ;;CHAR 8 bits (1 byte) ;; .code func __free mov dl,arg0 mov ah,36h int 21h if long lds si,dword ptr arg1 else mov si,arg1 endif mov [si+0],ax mov [si+2],bx mov [si+4],cx mov [si+6],dx endf __free end