© 2000 Scenix Semiconductor, Inc. All rights reserved.
85
SX Users Manual Rev. 3.1
www.scenix.com
Chapter 3 Instruction Set
Cycles:
3
Example:
mov
W,#$03
;load W with the value 03h
mov
M,W
;move value 03h into MODE register
mov
W,#$80
;load W with the value 80h
iread
;read program address 380h into W & MODE
mov
$0E,W
;move lower byte of data to reg 0Eh
mov
W,M
;move upper 4 bits of data to W
mov
$0F,W
;move upper 4 bits of data to reg 0Fh
This example reads the 12-bit data stored the program address 380h. The program
first loads the MODE register and W with the 12-bit program address, 380h. After
the iread instruction, the MODE register and W contain the 12-bit value stored in
the program memory at address 380h. The program then stores the lower eight bits
of the result into file register 0Eh and the upper four bits of the result into file
register 0Fh.