#!/bin/bash
if [ ! -n "$1" ]
then
  echo "bss.sh read/write boot block to/from floppy"
  echo "Usage: `basename $0` [boot.bss]"
  echo "                     raread    "
  echo "                     rawrite [file.img]"
  exit 1
fi  
if [ $1 = "raread" ] 
  then
     dd if=/dev/fd0 of=fd0.img
  exit 0    
fi
if [ $1 = "rawrite" ] 
  then
     dd if=$2 of=/dev/fd0
  exit 0    
fi
if [ -f $1] 
  then
      dd count=1 if=$1 of=/dev/fd0
  exit 0
fi
# doesn't exist, get bss 
dd count=1 if=/dev/fd0 of=$1
#

