Download 78K0 Coding - Renesas Electronics
Transcript
CubeSuite+ V1.01.00
CHAPTER 3 COMPILER LANGUAGE SPECIFICATIONS
push
ax
movw
ax, #01234H
/* Stack is passed via the argument*/
; 4660
/* The first argument that is passed
via a register */
call
!_func0
5 :
}
/* Function call */
/* Stack is not corrected here */
; line
ret
; line
6 :
__pascal
void func0 ( register int p1, int p2 ) {
push
hl
xch
a, x
xch
a, _@KREG12
xch
a, x
xch
a, _@KREG13
_func0 :
/* Allocate a register argument p1 to
_@KREG12 */
push
ax
/* Saves the saddr area for register
movw
ax, _@KREG00
push
ax
arguments */
/* Saves the saddr area for register
variable */
push
ax
movw
ax, sp
/* Reserves the area automatic variable a */
movw
hl, ax
; line
7 :
register int
; line
8 :
int
; line
9 :
r = p2 ;
mov
a, [hl+10]
xch
a, x
mov
a, [hl+11]
; p2
movw
_@KREG00, ax
; r
r ;
a ;
; p2
/* Stack transfer argument p2 */
/* Assign to register variable
_@KREG00 */
; line
; line
10 :
a = p1 ;
movw
ax, _@KREG12
; p1
mov
[hl+1], a
; a
xch
a, x
mov
[hl], a
11 :
}
pop
ax
pop
ax
movw
_@KREG00, ax
pop
ax
movw
_@KREG12, ax
; a
/* Register argument _@KREG12 */
/* Assign to automatic variable a */
/* Releases the automatic variable a area */
/* Restore the saddr area for register
variable */
/* Restore the saddr area for register
argument */
pop
R20UT0782EJ0100 Rev.1.00
Oct 01, 2011
hl
Page 236 of 836
Related documents
CubeSuite Ver.1.30 Integrated Development Environment 78K0
uPD78F0828B 8-bit Single-Chip Microcontroller Flash Self
CA850 Ver. 3.20 C Compiler Package C Language UM
78K0/Kx2 8-Bit Single-Chip Microcontrollers Flash Memory
Renesas Starter Kit for RSK+RX64M Code Generator Tutorial Manual
RL78,78K0R Coding - Renesas Electronics
CubeSuite+ V1.00.00 Integrated Development Environment User`s
CubeSuite Ver.1.40 Integrated Development Environment User`s
CubeSuite+ V2.00.00 Integrated Development Environment User`s
RH850 Build - Renesas Electronics