ReadSignatureByte

Purpose: Read one of the three (3) ATmega Signature bytes or the RC Oscillator Calibration Byte.
Assumes:  The value should be one of these four (4) documented values:
    0   the Device Signature Byte 1
    1   the RC Oscillator Calibration Byte
    2   the Device Signature Byte 2
    4   the Device Signature Byte 3
Passed: R24 BYTE bSelect 0, 1, 2, or 4, selected from one of the four values shown above
Returns:   R24 BYTE bResult the value which the MCU reported for the byte selected
Alters: R25 and the FLAGS
Example: 
PrintSignatureByte:
   LDI     R24, 0                ; Specify 0 to read the first Signature Byte
   RCALL   AReadAndPrint         ; Call the subroutine below to read it then
   RCALL   APrintCommaSpace      ;  print it, then print a ", " string
   LDI     R24, 2                ; Specify: read the 2nd Signature Byte
   RCALL   AReadAndPrint
   RCALL   APrintCommaSpace
   LDI     R24, 4                ; Specify: read the 3rd Signature Byte
   RCALL   AReadAndPrint         ; After reading and printing, output a Carriage
   JMP     APrintNewLine         ;  Return and Line Feed; exit to our caller

ReadAndPrint:
   CALL    AReadSignatureByte    ; Read the Signature Byte using R24 then print
   JMP     APrint0xHexBYTE       ;  the value in R24 in "0x##" format

PrintCommaSpace:
   LDI     R24, ','              ; Specify the character to print, then jump to
   JMP     APrint1CHARAnd1Space  ;  output the 2 chars and return to our caller
Notes: For an ATmega328P, the three signature bytes returned should be: Byte 1 = 0x1E, Byte 2 = 0x95, and Byte 3 = 0x0F. The RC Oscillator Calibration Byte value is device-dependant and was set at the Atmel factory.
Also see:  ReadFuseByte and the G commands.