SN8P2501D
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD Page 16 Version 1.5
Example: Modify above example by “INC_YZ” macro.
; To set lookup table1’s middle address
; To set lookup table1’s low address.
; To lookup data, R = 00H, ACC = 35H
; Increment the index address for next address.
; To lookup data, R = 51H, ACC = 05H.
; To define a word (16 bits) data.
The other example of look-up table is to add Y or Z index register by accumulator. Please be careful if “carry” happen.
Example: Increase Y and Z register by B0ADD/ADD instruction.
; To set lookup table’s middle address.
; To set lookup table’s low address.
; To lookup data. If BUF = 0, data is 0x0035
; If BUF = 1, data is 0x5105
; If BUF = 2, data is 0x2012
; To define a word (16 bits) data.