comment | Common included routines for BootRest and BootCheck not needed by BootSave. | ; end of comment ReadBootFromFile proc near ; Open a file read the Boot.sav into a buffer lea dx,FileName ; DS:DX point to file xor al,al ; AL=0 is attribute read/only mov ah,03Dh ; DOS open function int 21h jc FileTrouble mov bx,ax ; save handle mov cx,512+4 ; read CX DX + 1 sector lea dx,CXSave ; buffer address mov ah,3fH ; DOS read int 21h jc FileTrouble cmp ax,512+4 jne FileTrouble mov ah,3eh ; DOS close int 21h jc FileTrouble ret ReadBootFromFile endp ;=============================================================== CheckGeom proc near ; Check disk geometry (heads, cyls) ; Ensure we are restoring to a suitable disk mov dx,0080h ; drive no. for c: mov ax,0800h ; ah 08 = get disk parameters int 13h ; into CX/DX jc BootTrouble cmp CX,CXSave jne GeomTrouble cmp DX,DXSave jne GeomTrouble ret CheckGeom endp ;===============================================================