Code:
DEFINE LOADER_USED 1
DEFINE OSC 20
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_SPBRG 129 ' 9600 Bauds
@CSize=CODE_SIZE ; get the PIC Codespace size
CSize con ext ' make it available in PBP
LookupSize con 50
ZAData VAR word
ZAAddr VAR word
LookupStart var word
LookupStart=(CSize*1024)-512 ' get the Lookup first address
' As i used the bootloader i just move
' the adress to a x place
Start:
FOR ZAAddr=LOOKUPSTART TO LOOKUPSTART+lookupsize
READCODE zaaddr, zadata
zadata=zadata&$FF
HSEROUT [dec zadata,13,10]
pause 500
NEXT
pause 500
goto start
asm
org ((CODE_SIZE*D'1024')-D'512')
dt 10 ,20 ,30 ,40 ,50
dt 60 ,70 ,80 ,90 ,100
dt 110,120,130,140,150
dt 160,170,180,190,200
dt 210,220,230,240,250
dt 240,230,220,210,200
dt 190,180,170,160,150
dt 140,130,120,110,100
dt 90 ,80 ,70 ,60 ,50
dt 40 ,30 ,20 ,10 ,0
endasm
even there, there's no gain in time and on nothing about typing IMHO. You should do a cute app in VB or else who write the whole LOOKUP line for you and send it to the clipboard... then just paste it to your code. It's still easy to read any ACCESS or EXCEL speadsheet from VB.
Bookmarks