N and V column

Column #120: You Can’t Touch That: Non-contact Access Control
The Nuts and Volts of BASIC Stamps (Volume 6) Page 83
#ENDSELECT
LastTag CON 3 ' three known tags
#DEFINE __No_SPRAM = ($STAMP < BS2P) ' does module have SPRAM?
' -----[ Variables ]-------------------------------------------------------
#IF __No_SPRAM #THEN
buf VAR Byte(10) ' RFID bytes buffer
#ELSE
chkChar VAR Byte ' character to test
#ENDIF
tagNum VAR Nib ' from EEPROM table
idx VAR Byte ' tag byte index
char VAR Byte ' character from table
' -----[ EEPROM Data ]-----------------------------------------------------
Tag1 DATA "0F0184F20B" ' valid tags
Tag2 DATA "0F01D9D263"
Tag3 DATA "04129C1B43"
Name0 DATA "Unauthorized", CR, 0
Name1 DATA "George W. Bush", CR, 0
Name2 DATA "Dick Cheney", CR, 0
Name3 DATA "Condoleeza Rice", CR, 0
' -----[ Initialization ]--------------------------------------------------
Reset:
HIGH Enable ' turn of RFID reader
LOW Latch ' lock the door!
' -----[ Program Code ]----------------------------------------------------
Main:
LOW Enable ' activate the reader
#IF __No_SPRAM #THEN
SERIN RX, T2400, [WAIT($0A), STR buf\10] ' wait for hdr + ID
#ELSE
SERIN RX, T2400, [WAIT($0A), SPSTR 10]
#ENDIF
HIGH Enable ' deactivate reader