CylSecEncode proc far
;          DX = Cylinder
;          BX = Sector
; Output :
;          AX = Cylinder/Sector
;
      mov  ax, dx
      and  ax, 0fh
      shl  ax, 8
      mov  cx, ax
      mov  ax, dx
      and  ax, 0f0h
      shl  ax, 6
      or   ax, cx
      or   ax, bx
      ret 
; Function CylSecEncode(Cylinder, Sector : Word) : Word;
; Begin
;     CylSecEncode := (Lo(Cylinder) shl 8) or (Hi(Cylinder) shl 6) or Sector;
; End;
CylSecEncode endp

CylSecDecode proc far
;          AX = ClySec
; Output : 
;          DX = Cylinder
;          BX = Sector
;      
      mov  dx, ax
      and  bx, 03fh   
      ;
      mov  dx, ax
        
      
      ret 
; Procedure CylSecDecode(Var Cylinder, Sector : Word; CylSec : Word);
; Begin
;     Cylinder := Hi(CylSec) or ((Lo(CylSec) and $C0) shl 2);
;     Sector := (CylSec and $3F);
; End;
      ret
; Cylinder Bits 7 to 0 	Cylinder Bits 9+8 	Sector Bits 5 to 0
CylSecDecode endp




