PreviousNext
setINDF1
Help > OS functions > RAM > setINDF1

Function

 

Write a value in the virtual INDF1 register

Purpose

 

Indirect write to RAM

Syntax

 

void setINDF1(uns8 value)

Parameters

 

value: value to be written

Return value

 

  –

Output values

 

Register addressed by the FSR1H and FSR1L is modified

Preconditions

 

     FSR1 (the FSR1H and FSR1L register pair) must be set before to define a destination. Traditional or linear addressing can be used.

     Avoid writing to RAM areas dedicated to OS and to PIC special function registers otherwise OS can collapse. See IQRF OS User’s guide, RAM map.

Remarks

 

     Simple writing to the INDF1 virtual register is not allowed. Due to security reasons, all instructions using INDF1 are removed during Upload. To avoid unintended behavior all constructions modifying INDF1 (either by the user or by the compiler) should be omitted. Instead of this, IQRF OS allows writing to indirectly addressed RAM using extra system function setINDF1. See Example E06–RAM.

     Another possibility (but more code-consuming) is using the writeToRAM function.

Side effects

 

  –

See also

 

setINDF0, writeToRAM, copyMemoryBlock

Example

 

Similar as for setINDF0.