lib/chs.js
function CHS( cylinder, head, sector ) {

  if( !(this instanceof CHS) )
    return new CHS( cylinder, head, sector )

  if( Buffer.isBuffer( cylinder ) )
    return CHS.fromBuffer( cylinder )

  /** @type {Number} Cylinder */
  this.cylinder = cylinder & 0x03FF
  /** @type {Number} Head */
  this.head = head & 0xFF
  /** @type {Number} Sector */
  this.sector = sector & 0x3F

}
function CHS( cylinder, head, sector ) {

  if( !(this instanceof CHS) )
    return new CHS( cylinder, head, sector )

  if( Buffer.isBuffer( cylinder ) )
    return CHS.fromBuffer( cylinder )

  /** @type {Number} Cylinder */
  this.cylinder = cylinder & 0x03FF
  /** @type {Number} Head */
  this.head = head & 0xFF
  /** @type {Number} Sector */
  this.sector = sector & 0x3F

}
function CHS ( cylinder , head , sector ) { if ( ! ( this instanceof CHS ) ) return new CHS ( cylinder , head , sector ) if ( Buffer . isBuffer ( cylinder ) ) return CHS . fromBuffer ( cylinder ) /** @type {Number} Cylinder */ this . cylinder = cylinder & 0x03FF /** @type {Number} Head */ this . head = head & 0xFF /** @type {Number} Sector */ this . sector = sector & 0x3F }
Cylinder-Head-Sector Address
@constructor
@param {(Number|Buffer)} [cylinder=1023]
@param {Number} [head=254]
@param {Number} [sector=63]
Cylinder - Head - Sector Address