I built an assembly program using mpasm for the pic 10f322, and I want the program to read off all characters in my TABLE: by placing these values back into my WREG. When my code executes, it is suppose to read off the value stored in register FSR and fetch the value stored at the address pointed to. This FSR value then increments to get the next character. However, when I run the program, the pointer is incrementing correctly but the code is grabbing junk values since there doesn't seem to be any values stored in memory. Why are my directives not working?
org 0x0000
FSR Equ 0x04
INDF Equ 0x00
START
movlw TABLE
movwf FSR ; move w value int address FSR
Loop: movf INDF, 0 ; move character pointed in table back to w reg
incf FSR ; increment incfg
goto Loop
TABLE:
db "HELLO"
db "Man"
END
I don't want data to be stored in program memory. Instead I would like to put data in data memory. Are there assembly directives that allow me to do this easily like DB? My assembler is MPASM.