Instruction Set ArchitectureIP2022 Users Manual
164
www.ubicom.com
Example:
mov w,#0x00;load W with 0x00
mov addrx,w;copy W to ADDRX
mov w,#0x03;load W with 0x03
mov addrh,w;copy W to ADDRH
mov w,#0x80;load W with 0x80
mov addrl,w;copy W to ADDRL
mov w,0x1FE;copy 0x1FE to W
mov datal,w;copy W to DATAL
mov w,0x1FF;copy 0x1FF to W
mov datah,w;copy W to DATAH
iwrite
;write program RAM
This example writes the contents of the
DATAH/DATAL register to address 0x000380 in
program
RAM.
First,
the
ADDRX/ADDRH/ADDRL register is loaded with
0x000380. Then, the DATAH/DATAL register is
loaded from 0x1FE and 0x1FF. Finally, the
iwrite instruction loads program RAM from
DATAH/DATAL.