English
Language : 

CC78K0S Datasheet, PDF (412/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
Register Direct Reference Function
#pragma realregister
(Output object of compiler)
_main :
; line 5 : _ _seta (c) ;
/* Sets the variable of C in A register */
mov a, !_c
; line 6 : _ _shla () ;
/* Logically shift 1 bit to left
*/
add a, a
; line 7 : d = _ _geta () ; /* Sets value of A register in variable d */
mov !_d, a
; line 8 : if (_ _getcy () ) {/* Refers CY (checks overflow)
*/
bnc $?L0003
; line 9
e = 1 ; /* Sets e to 1 when CY = = 1
*/
mov a, #01H
;1
mov !_e, a
?L0003 :
; line 10 : }
; line 11 : }
ret
[Register direct reference function list]
(1) unsigned char _ _geta (void) ;
Obtains the value of the A register.
(2) void _ _seta (unsigned char x) ;
Sets x in the A register.
(3) unsigned int _ _getax (void) ;
Obtains the value of the AX register.
(4) void _ _setax (unsigned int x) ;
Sets x in the AX register.
(5) bit _ _getcy (void) ;
Obtains the value of the CY flag.
(6) void _ _setcy (unsigned char x) ;
Sets the lower 1 bit of x in the CY flag.
(7) void _ _set1cy (void) ;
Generates the set1 CY instruction.
412
User’s Manual U14872EJ1V0UM