'
' ----- ShowHex: Send Hexadecimal value to PE Terminal -----------------------------------------
'
' Send a byte as hex to terminal on the programming lead
' Send a nibble as hex to terminal on the programming lead
' Alternate "D" entries cause a leading $ sign to be sent
'
' Entry: ShowByte (byte) data to be transmitted
' Exit: ShowByte (byte) unchanged
' Used: Temp (byte)
'
Symbol mskLoNibble = %00001111 'Define nibble mask
'
ShowHexD:SerTxd("$") 'Alternate entry
ShowHex: bTemp = ShowByte >> 4 'Get high nibble
GoSub SHexNib2 'Show it
GoTo SHexNibl
ShowNibD:SerTxd("$") 'Alternate entry
SHexNibl:bTemp = ShowByte And mskLoNibble
SHexNib2:bTemp = bTemp + "0" 'Convert to ASCII
If bTemp > "9" Then 'Separate out and
bTemp = bTemp + 7 ' correct over-
EndIf ' decimal part.
SerTxd(bTemp) 'Display it
Return
'
' ----- ShowHex: Send Hexadecimal value to PE Terminal -----------------------------------------
'
' Send a byte as hex to terminal on the programming lead
' Send a nibble as hex to terminal on the programming lead
' Alternate "D" entries cause a leading $ sign to be sent
'
' Entry: ShowByte (byte) data to be transmitted
' Exit: ShowByte (byte) unchanged
' Used: Temp (byte)
'
Symbol mskLoNibble = %00001111 'Define nibble mask
'
ShowHexD:SerTxd("$") 'Alternate entry
ShowHex: bTemp = ShowByte >> 4 'Get high nibble
GoSub SHexNib2 'Show it
GoTo SHexNibl
ShowNibD:SerTxd("$") 'Alternate entry
SHexNibl:bTemp = ShowByte And mskLoNibble
SHexNib2:bTemp = bTemp + "0" 'Convert to ASCII
If bTemp > "9" Then 'Separate out and
bTemp = bTemp + 7 ' correct over-
EndIf ' decimal part.
SerTxd(bTemp) 'Display it
Return