On Mon, 5 Jan 1998 18:31:06 +0100 Rob Aerts <spam_OUTrob.aertsTakeThisOuTTIP.NL> writes:
>in a program, i have 16 bytes (in ram)
>i want to read and modify these bytes using a counter
>(witch points to the specified byte)
All the PIC instructions access RAM directly. But the PIC has special
hardware to indirectly access RAM. It works through two special function
registers: FSR and INDF.
The FSR (File Select Register) register holds the address of the RAM byte
to be accessed. It is the pointer or index register.
The INDF (INDirect File) register acts as a 'shadow' copy of the register
selected by FSR. Reading the INDF register returns a copy of the data
found at the RAM location [FSR]. Writing to the INDF register stores the
data at the location indexed by FSR. For example:
table equ h'10' ;Start of the table in RAM.
; Store some values in the table using direct access.
movwf table ;Entry 0 in the table = 1
movwf table+2 ;Entry 1 in the table = 2
; Read entries in the table sequentially using indirect access.
movlw table ;Address of entry 0 in table.
; Now INDF is a copy of entry 0.
movfw INDF ;Get data from entry 0
call output ;Send data out (for example)
movfw INDF ;Get data from entry 1.
To access any byte in the table, compute the true address in RAM and
write it to FSR. Then read or write the table data to INDF.
; Read a byte from the table. Table index (0-16) in W.
addlw table ;Offset to start of table.
movwf FSR ;Point to desired data in table.
movfw INDF ;Read it.
At home I use Eudora, which understands these kinds of messages, but the
point I'm making is that some people don't ever see your messages because
they are so non-standard(perhaps Microsoft).
I presume you are referring to MSN which up to now has been a somewhat
non-standard mail interface. Although I have had no trouble with this list,
one partner on Netcom seemed unable to read my attachments.
Well, the wait is over -- the new upgrades to 2.5 of MSN makes it a
(seemingly) totally compliant mail interface. The upgrade ain't for the
faint of heart if you want to keep using Outlook for your groupware, but it
has cured all the previous problems.