English
Language : 

CC78K0S Datasheet, PDF (398/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
Static Model
(Output object of compiler …continued)
;line 6 : j = 2 ;
inc a
mov !?L0004,a
;j ; Automatic variable j
; line 7 : k = i + j ;
add a, !?L0003
mov !?L0005, a
;i ; Add i and j
;k ; Substitute for k
; line 8 : sub (i, j, k) ;
mov hl, ax
; Passes k through register H
mov
movw
movw
a, !?L0004
bc, ax
a, !?L0003
;j
; Passes j through register B
;i ; Passes i through register A
call !_sub
; line 9 : }
ret
; line 10 : void sub (char p1, char p2, char p3)
; line 11 : {
_sub:
mov
_@KREG15, a
; Allocates the 1st argument to the shared area
movw ax, bc
mov _@KREG14, a
; Allocates the 2nd argument to the shared area
movw ax, hl
mov _@KREG13, a
; Allocates the 3rd argument to the shared area
; line 12 : char a1, a2 ;
; line 13 : a1 = p1 ;
mov a,_@KREG15
mov _@KREG12, a
;p1 ; 1st argument p1
;a1 ; Automatic variable a1 is the shared area
; line 14 : a2 = p2 + p3 ;
mov a,_@KREG14
add a,_@KREG13
mov !?L0008, a
;p2 ; 2nd argument p2
;p3 ; Adds 3rd argument p3
;a2 ; Automatic variable a2 is in the specific function area
; line 15 : }
ret
398
User’s Manual U14872EJ1V0UM