Intel NetStructure MPCBL0001 User Manual

Page 78

Advertising
background image

78

Technical Product Specification

Order #273817

Intel NetStructure

®

MPCBL0001 High Performance Single Board Computer

Contents

function PrintUsage()

{

echo

echo "Usage: $0 location"

echo

echo "Where: location = the location to read from (i.e. blade3, blade13, etc)"

echo

echo "This program reads the entire Serial Buffer from the selected location"

echo "and saves it under file name: \'location\'.txt Ex: blade3.tx

t"

echo

exit 1

}

#

# Convert a decimal number 0-15 to a hex digit

#

function DecToHexNibble ()

{

case $1 in

10) echo a ;;

11) echo b ;;

12) echo c ;;

13) echo d ;;

14) echo e ;;

15) echo f ;;

*) echo $1;;

esac;

}

#

# Convert a decimal byte to hex digits

#

function DecToHex ()

{

echo "`DecToHexNibble $((($1&240)>>4))``DecToHexNibble $(($1&15))`"

}

#

# Output the ASCII characters whose decimal values are passed in as

# arguments.

# The first argument is the number of arguments to skip before

# converting.

#

function OutAscii ()

{

shift $(($1+1))

while [ ! -z "$1" ]; do

echo -en "\x`DecToHex $1`"

shift

done

}

#---- correct num of args passed? ----

Advertising