English
Language : 

CC78K4 Datasheet, PDF (418/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
Changing the Method of Calculating the Offset of Arrays and Pointers -QH
(Output object of compiler)
When -ML, -QH is not specified (1/3)
@@CODE CSEG
_main :
push
push
push
; line 6:
movw
subw
; line 7:
movw
; line 8:
mov
; line 9:
; line 10 :
movw
mov
cvtbw
mov
addg
addg
movw
movw
; line 11 :
mov
cvtbw
movw
mov
addg
mov
mov
; line 12 :
movw
mov
mov
addg
addg
movw
movw
uup
rp3
vvp
long I = 50;
rp3,#032H
;50
vp,vp
int i = 30;
up,#01EH
;30
char c= 2;
c,#02H
;2
hl,up
a,h
tabi [i] = 1;
w,a
whl,whl
whl,#_tabi
ax,#01H
;1
[hl],ax
tabc [c] = 2;
a, c
hl,ax
w,a
whl,#_tabc
a, c
[hl],a
tabi [l] = 3;
hl,rp3
a,r8
w,a
whl,whl
whl,#_tabi
ax,#03H
;3
[hl],ax
/* unsigned offset calculation, 64 KB or less */
/* unsigned offset calculation, 64 KB or less */
/* signed offset calculation */
418
User’s Manual U15556EJ1V0UM