Indirect Addressing Program Example 1
data .section
adres1
db ?
adres2
db ?
adres3
db ?
adres4
db ?
block
db ?
code .section
org 00h
start:
mov a, 04h
mov block, a
mov a, offset adres1
mov mp0, a
loop:
clr IAR0
inc mp0
sdz block
jmp loop
continue:
Indirect Addressing Program Example 2
data .section at 01F0H ´data´
adres1
db ?
adres2
db ?
adres3
db ?
adres4
db ?
block
db ?
code .section at 0 ´code´
org00h
start:
mov a,04h
mov block,a
mov a, 01h
mov mp1h, a
mov a,offset adres1
mov mp1l,a
loop:
clr IAR1
inc mp1l
sdz block
jmp loop
continue:
The important point to note here is that in the example shown above, no reference is made to specific
Data Memory addresses.
Rev. 1.21
'data'
at 0 code
; setup size of block
; Accumulator loaded with first RAM address
; setup memory pointer with first RAM address
; clear the data at address defined by MP0
; increment memory pointer
; check if last memory location has been cleared
; setup size of block
; setup the memory sector
; Accumulator loaded with first RAM address
; setup memory pointer with first RAM address
; clear the data at address defined by MP1L
; increment memory pointer MP1L
; check if last memory location has been cleared
28
HT66F488/HT66F489
A/D Flash MCU with EEPROM
�ove��e� ��� 2�1�
Need help?
Do you have a question about the HT66F488 and is the answer not in the manual?