Instruction Set Architecture—IP2022 User’s Manual 146 www.ubicom.com Cycles: 1 Example: mov    w,#0x01;load W with 0x01
mov    addrx,w;copy W to ADDRX
mov    w,#0x83;load W with 0x83
mov    addrh,w;copy W to ADDRH
mov    w,#0x80;load W with 0x80
mov    addrl,w;copy W to ADDRL
fread
;read flash memory ... ;wait for FBUSY = 0 or ... ;delay for longer than ... ;flash access time mov    w,datal;move low byte to W
mov    0x1FE,w;copy W to 0x1FE
mov    w,datah;move high byte to W
mov    0x1FF,w;copy W to 0x1FF
This example reads the 16-bit data stored at byte
address 0x18380  in program flash memory. First,
ADDRH and ADDRL are loaded with 0x018380.
After the  fread instruction, the DATAH/DATAL
register holds the data stored in program memory
at byte address 0x18380. Then, the lower byte is
loaded into data memory location 0x1FE and the
upper byte is loaded into data memory location
0x1FF.