HT67F2350/HT67F2360
HT67F2370/HT67F2390
Advanced A/D Flash MCU with LCD & EEPROM
• Example 2
data
.section 'data'
adres1 db ?
adres2 db ?
adres3 db ?
adres4 db ?
block db ?
code .section at 0 'code'
org 00h
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
RAM addresses.
Direct Addressing Program Example using extended instructions
data .section 'data'
temp db ?
code .section at 0 code
org 00h
start:
lmov a,[m]
lsub a, [m+1]
snz c
jmp continue
lmov a,[m]
mov temp,a
lmov a,[m+1]
lmov [m],a
mov a,temp
lmov [m+1],a
continue:
:
Note: Here "m" is a data memory address located in any data memory sectors. For example,
m=1F0H, it indicates address 0F0H in Sector 1.
Rev. 1.60
; 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
; move [m] data to acc
; compare [m] and [m+1] data
; [m]>[m+1]?
; no
; yes, exchange [m] and [m+1] data
73
May 16, 2019
Need help?
Do you have a question about the HT67F2350 and is the answer not in the manual?