;--------------------------------------------------------
; File Created by ChiponCC : ChipON  inc.
; Version 3.0.4#6752 (Feb 19 2019 20:27:19) (MSVC)
; This file was generated Fri Aug 02 17:42:42 2019
;--------------------------------------------------------
; chipon port for the 16-bit core
;--------------------------------------------------------
;	.file	"../Flash.c"
	.radix dec
	.include "KF8A100EON.inc"
;--------------------------------------------------------
; external declarations
;--------------------------------------------------------
	.extern	_PSW_bits
	.extern	_P0_bits
	.extern	_P2_bits
	.extern	_P1_bits
	.extern	_P3_bits
	.extern	_PCH_bits
	.extern	_INTCTL_bits
	.extern	_EIF1_bits
	.extern	_EIF2_bits
	.extern	_T1CTL_bits
	.extern	_T2CTL0_bits
	.extern	_PWMCTL_bits
	.extern	_BANK_bits
	.extern	_ADSCANCTL_bits
	.extern	_C1CTL_bits
	.extern	_VDACS_bits
	.extern	_AMPCTL_bits
	.extern	_ANSEH_bits
	.extern	_ADCCTL0_bits
	.extern	_AMPDT_bits
	.extern	_OPTR_bits
	.extern	_IP0_bits
	.extern	_IP1_bits
	.extern	_IP2_bits
	.extern	_TR0_bits
	.extern	_TR2_bits
	.extern	_TR1_bits
	.extern	_OSCSTA_bits
	.extern	_IP3_bits
	.extern	_VRECTL_bits
	.extern	_EIE1_bits
	.extern	_EIE2_bits
	.extern	_PCTL_bits
	.extern	_OSCCTL_bits
	.extern	_ANSEL_bits
	.extern	_PUR0_bits
	.extern	_IOCL_bits
	.extern	_ADCCTL1_bits
	.extern	_P0LR_bits
	.extern	_P2LR_bits
	.extern	_P1LR_bits
	.extern	_P3LR_bits
	.extern	_TR3_bits
	.extern	_EIE3_bits
	.extern	_EIF3_bits
	.extern	_T3CTL_bits
	.extern	_T3CTL1_bits
	.extern	_PWM5CTL0_bits
	.extern	_PWM5CTL1_bits
	.extern	_P5ASCTL_bits
	.extern	_PSTRCTL_bits
	.extern	_PUR1_bits
	.extern	_PUR2_bits
	.extern	_INTEDGCTL_bits
	.extern	_VBIASCTL_bits
	.extern	_VBIAS1EN_bits
	.extern	_VBIAS2EN_bits
	.extern	_PWM5OC_bits
	.extern	_T2CTL1_bits
	.extern	_VDAC_bits
	.extern	_PWM5CTL2_bits
	.extern	_PWM5PC_bits
	.extern	_RSCTL_bits
	.extern	_BRCTL_bits
	.extern	_TSCTL_bits
	.extern	_SSCICTL0_bits
	.extern	_SSCICTL1_bits
	.extern	_SSCISTA_bits
	.extern	_SSCIMSK_bits
	.extern	_WDTPS_bits
	.extern	_MULCTL_bits
	.extern	_DIVCTL_bits
	.extern	_LEDCTL_bits
	.extern	_LEDPRE_bits
	.extern	_LEDDATA0_bits
	.extern	_LEDDATA1_bits
	.extern	_LEDDATA2_bits
	.extern	_LEDDATA3_bits
	.extern	_LEDDATA4_bits
	.extern	_LEDDATA5_bits
	.extern	_LEDDATA6_bits
	.extern	_LEDDATA7_bits
	.extern	_C1FILTCTL_bits
	.extern	_C1FILTPRE_bits
	.extern	_LEDOMS1_bits
	.extern	_CCPCTL_bits
	.extern	_LEDODS0_bits
	.extern	_LEDOMS0_bits
	.extern	_LEDODS1_bits
	.extern	_LEDLUM_bits
	.extern	_PWM5FC_bits
	.extern	_T4CTL_bits
	.extern	_T0
	.extern	_PCL
	.extern	_PSW
	.extern	_P0
	.extern	_P2
	.extern	_P1
	.extern	_P3
	.extern	_PCH
	.extern	_INTCTL
	.extern	_EIF1
	.extern	_EIF2
	.extern	_T1L
	.extern	_T1H
	.extern	_T1CTL
	.extern	_T2L
	.extern	_T2CTL0
	.extern	_PWM1L
	.extern	_PWM1H
	.extern	_PWMCTL
	.extern	_PP1
	.extern	_BANK
	.extern	_ADSCANCTL
	.extern	_C1CTL
	.extern	_VDACS
	.extern	_AMPCTL
	.extern	_ANSEH
	.extern	_ADCDATA0H
	.extern	_ADCCTL0
	.extern	_AMPDT
	.extern	_OPTR
	.extern	_IP0
	.extern	_IP1
	.extern	_IP2
	.extern	_TR0
	.extern	_TR2
	.extern	_TR1
	.extern	_OSCSTA
	.extern	_IP3
	.extern	_VRECAL1
	.extern	_VRECTL
	.extern	_EIE1
	.extern	_EIE2
	.extern	_PCTL
	.extern	_OSCCTL
	.extern	_OSCCAL0
	.extern	_ANSEL
	.extern	_PP2
	.extern	_PWM2L
	.extern	_PWM2H
	.extern	_PUR0
	.extern	_IOCL
	.extern	_OSCCAL1
	.extern	_NVMDATAH
	.extern	_NVMDATAL
	.extern	_NVMADDRH
	.extern	_NVMADDRL
	.extern	_NVMCTL0
	.extern	_NVMCTL1
	.extern	_ADCDATA0L
	.extern	_ADCCTL1
	.extern	_T2CCRH
	.extern	_T2H
	.extern	_PP5H
	.extern	_PWM5H0
	.extern	_PWM5H1
	.extern	_P0LR
	.extern	_P2LR
	.extern	_P1LR
	.extern	_P3LR
	.extern	_TR3
	.extern	_EIE3
	.extern	_EIF3
	.extern	_OSCCAL2
	.extern	_OSCCAL3
	.extern	_T3CTL
	.extern	_T3L
	.extern	_PP5L
	.extern	_T3CTL1
	.extern	_T2CCRL
	.extern	_PWM5L0
	.extern	_PWM5L1
	.extern	_PWM5CTL0
	.extern	_PWM5CTL1
	.extern	_P5ASCTL
	.extern	_PSTRCTL
	.extern	_T3H
	.extern	_PUR1
	.extern	_PUR2
	.extern	_INTEDGCTL
	.extern	_VBIASCTL
	.extern	_VBIAS1EN
	.extern	_VBIAS2EN
	.extern	_PWM5OC
	.extern	_T2CTL1
	.extern	_VDAC
	.extern	_PWM5CTL2
	.extern	_PWM5PC
	.extern	_RSCTL
	.extern	_TXSDR
	.extern	_RXSDR
	.extern	_BRCTL
	.extern	_TSCTL
	.extern	_EUBRGL
	.extern	_EUBRGH
	.extern	_SSCICTL0
	.extern	_SSCICTL1
	.extern	_SSCISTA
	.extern	_SSCIBUFR
	.extern	_SSCIADD
	.extern	_SSCIMSK
	.extern	_WDTPS
	.extern	_MULAH
	.extern	_MULAL
	.extern	_MULBH
	.extern	_MULBL
	.extern	_MULCTL
	.extern	_MULRES3
	.extern	_MULRES2
	.extern	_MULRES1
	.extern	_MULRES0
	.extern	_DIVCTL
	.extern	_DIVAH
	.extern	_DIVAL
	.extern	_DIVB
	.extern	_DIVQH
	.extern	_DIVQL
	.extern	_DIVR
	.extern	_LEDCTL
	.extern	_LEDPRE
	.extern	_LEDDATA0
	.extern	_LEDDATA1
	.extern	_LEDDATA2
	.extern	_LEDDATA3
	.extern	_LEDDATA4
	.extern	_LEDDATA5
	.extern	_LEDDATA6
	.extern	_LEDDATA7
	.extern	_C1FILTCTL
	.extern	_C1FILTPRE
	.extern	_LEDOMS1
	.extern	_CCRL
	.extern	_CCPCTL
	.extern	_CCRH
	.extern	_LEDODS0
	.extern	_LEDOMS0
	.extern	_LEDODS1
	.extern	_VRECAL2
	.extern	_VRECAL3
	.extern	_LEDLUM
	.extern	_PWM5FC
	.extern	_T4L
	.extern	_T4H
	.extern	_T4REL
	.extern	_T4REH
	.extern	_T4CTL
	.extern	_RC32KCAL

	.extern I0R1
	.extern I0R7
	.extern I0PSW
	.extern I0PCH
	.extern I1R1
	.extern I1R7
	.extern I1PSW
	.extern I1PCH
	.extern STK11
	.extern STK10
	.extern STK09
	.extern STK08
	.extern STK07
	.extern STK06
	.extern STK05
	.extern STK04
	.extern STK03
	.extern STK02
	.extern STK01
	.extern STK00
;--------------------------------------------------------
; global declarations
;--------------------------------------------------------
	.global	_FLASH_WRITE_ONE
	.global	_FLASH_WRITE_FUN
	.global	_FLASH_READ_FUN
	.global	_FLASH_READ_ONE
	.global	_FLASH_READ_BUF
	.global	_FLASH_BUFFER

;--------------------------------------------------------
; global definitions
;--------------------------------------------------------
UD_Flash_0	.udata
_FLASH_READ_BUF	.res	2

UD_Flash_1	.udata
_FLASH_BUFFER	.res	32

;--------------------------------------------------------
; absolute symbol definitions
;--------------------------------------------------------
;--------------------------------------------------------
; compiler-defined variables
;--------------------------------------------------------
UDL_Flash_0	.udata
r0x1030	.res	1
UDL_Flash_1	.udata
r0x1031	.res	1
UDL_Flash_2	.udata
r0x1023	.res	1
UDL_Flash_3	.udata
r0x1022	.res	1
UDL_Flash_4	.udata
r0x1024	.res	1
UDL_Flash_5	.udata
r0x1028	.res	1
UDL_Flash_6	.udata
r0x1027	.res	1
UDL_Flash_7	.udata
r0x102A	.res	1
UDL_Flash_8	.udata
r0x1029	.res	1
UDL_Flash_9	.udata
r0x102B	.res	1
UDL_Flash_10	.udata
r0x102C	.res	1
UDL_Flash_11	.udata
r0x102D	.res	1
;--------------------------------------------------------
; initialized data
;--------------------------------------------------------
;--------------------------------------------------------
; overlayable items in internal ram 
;--------------------------------------------------------
;	.udata_ovr


func._FLASH_WRITE_ONE	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _FLASH_WRITE_ONE	;Function start
; 2 exit points
;has an exit
;functions called:
;   _FLASH_READ_FUN
;   _FLASH_WRITE_FUN
;   _FLASH_READ_FUN
;   _FLASH_WRITE_FUN
;11 compiler assigned registers:
;   r0x1027
;   STK00
;   r0x1028
;   STK01
;   r0x1029
;   STK02
;   r0x102A
;   r0x102B
;   r0x102C
;   r0x102D
;   r0x102E
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_FLASH_WRITE_ONE	;Function start
; 2 exit points
;	::->op : RECEIVE
;	.line	388; "../Flash.c"	void FLASH_WRITE_ONE(unsigned int address,unsigned int value)
	BANKSEL	r0x1027
	MOV	r0x1027, R0
	BANKSEL	r0x102C
	MOV	r0x102C, R0
	BANKSEL	STK00
	MOVZ	R0, STK00
	BANKSEL	r0x1028
	MOV	r0x1028, R0
;	::->op : RECEIVE
	BANKSEL	STK01
	MOVZ	R0, STK01
	BANKSEL	r0x1029
	MOV	r0x1029, R0
	BANKSEL	STK02
	MOVZ	R0, STK02
	BANKSEL	r0x102A
	MOV	r0x102A, R0
;	::->op : BITWISEAND
;	.line	391; "../Flash.c"	FLASH_READ_FUN(address&0xFFE0,FLASH_BUFFER_MAX);
	MOV	R0,# 0xe0
	BANKSEL	r0x1028
	AND	R0, r0x1028
	BANKSEL	r0x102B
	MOV	r0x102B, R0
;;106	MOVZ	R0, r0x1027
;	::->op : SEND
;	::->op : SEND
;	::->op : CALL
	MOV	R0,# 0x10
	BANKSEL	STK01
	MOV	STK01, R0
	BANKSEL	r0x102B
	MOVZ	R0, r0x102B
	BANKSEL	STK00
	MOV	STK00, R0
	BANKSEL	r0x102C
	MOVZ	R0, r0x102C
	PAGESEL	_FLASH_READ_FUN
	CALL	_FLASH_READ_FUN
	PAGESEL	$
;	::->op : BITWISEAND
;	.line	393; "../Flash.c"	FLASH_BUFFER[address&0x1F] = value;
	MOV	R0,# 0x1f
	BANKSEL	r0x1028
	AND	R0, r0x1028
	BANKSEL	r0x102B
	MOV	r0x102B, R0
	BANKSEL	r0x102C
	CLR	r0x102C
;	::->op : LEFT_OP
	CLR	PSW, 0
	BANKSEL	r0x102B
	RLCR	r0x102B
	BANKSEL	r0x102D
	MOV	r0x102D, R0
	BANKSEL	r0x102C
	RLCR	r0x102C
;;1	MOV	r0x102E, R0
;	::->op : +
	BANKSEL	r0x102D
	MOV	R0, r0x102D
	ADD	R0,# (_FLASH_BUFFER + 0)
	BANKSEL	r0x102B
	MOV	r0x102B, R0
;	::->op :*  =
	BANKSEL	r0x102A
	MOVZ	R0, r0x102A
	BANKSEL	r0x102B
	MOV	R1, r0x102B
	BANKSEL	_FLASH_BUFFER
	ST	[R1], R0
	INC	R1
	BANKSEL	r0x1029
	MOVZ	R0, r0x1029
	BANKSEL	_FLASH_BUFFER
	ST	[R1], R0
;	::->op : BITWISEAND
;	.line	395; "../Flash.c"	FLASH_WRITE_FUN(address&0xFFE0,FLASH_BUFFER_MAX);
	MOV	R0,# 0xe0
	BANKSEL	r0x1028
	AND	r0x1028, R0
;	::->op : SEND
;	::->op : SEND
;	::->op : CALL
	MOV	R0,# 0x10
	BANKSEL	STK01
	MOV	STK01, R0
	BANKSEL	r0x1028
	MOVZ	R0, r0x1028
	BANKSEL	STK00
	MOV	STK00, R0
	BANKSEL	r0x1027
	MOVZ	R0, r0x1027
	PAGESEL	_FLASH_WRITE_FUN
	CALL	_FLASH_WRITE_FUN
	PAGESEL	$
;	::->op : LABEL
;	::->op : ENDFUNCTION
	CRET	
; exit point of _FLASH_WRITE_ONE



func._FLASH_WRITE_FUN	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _FLASH_WRITE_FUN	;Function start
; 2 exit points
;has an exit
;7 compiler assigned registers:
;   r0x1022
;   STK00
;   r0x1023
;   STK01
;   r0x1024
;   r0x1025
;   r0x1026
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_FLASH_WRITE_FUN	;Function start
; 2 exit points
;	::->op : RECEIVE
;	.line	234; "../Flash.c"	void FLASH_WRITE_FUN(unsigned int address,unsigned char length)
	BANKSEL	r0x1022
	MOV	r0x1022, R0
	BANKSEL	STK00
	MOVZ	R0, STK00
	BANKSEL	r0x1023
	MOV	r0x1023, R0
;	::->op : RECEIVE
	BANKSEL	STK01
	MOVZ	R0, STK01
	BANKSEL	r0x1024
	MOV	r0x1024, R0
;	::->op : RIGHT_OP
;;105	MOVZ	R0, r0x1022
;;103	MOV	r0x1025, R0
;;1	CLR	r0x1026
;	::->op : CAST
;;104	MOVZ	R0, r0x1025
;	.line	238; "../Flash.c"	NVMADDRH=(unsigned char) (address>>8);
	BANKSEL	r0x1022
	MOVZ	R0, r0x1022
	BANKSEL	_NVMADDRH
	MOV	_NVMADDRH, R0
;	::->op : CAST
;	.line	239; "../Flash.c"	NVMADDRL=address;
	BANKSEL	r0x1023
	MOVZ	R0, r0x1023
	BANKSEL	_NVMADDRL
	MOV	_NVMADDRL, R0
;	::->op : INLINEASM
	;
	BANKSEL _INTCTL
	MOV R1,_INTCTL
	;
	CLR _INTCTL,_PUIE
	CLR _INTCTL,_AIE
	JNB _INTCTL,_AIE
	JMP $-2
	;
	MOV R0,#0x30
	MOV R2,_OSCCTL
	MOV _OSCCTL,R0
	;
	MOV R3,#_FLASH_BUFFER
	
;	::->op : =
;	.line	258; "../Flash.c"	while(length--)		// 仅使用R0，不改变R1
	BANKSEL	r0x1024
	MOVZ	R0, r0x1024
	BANKSEL	r0x1023
	MOV	r0x1023, R0
;	::->op : LABEL
;	::->op : =
_00011_DS_
	BANKSEL	r0x1023
	MOVZ	R0, r0x1023
	BANKSEL	r0x1022
	MOV	r0x1022, R0
;	::->op : -
	BANKSEL	r0x1023
	DEC	r0x1023
;	::->op : IFX
	MOV	R0,# 0x00
	BANKSEL	r0x1022
	ORL	R0, r0x1022
	JNB	PSW, 2
	JMP	_00013_DS_
;	::->op : INLINEASM
	;
	BANKSEL _FLASH_BUFFER
	LD R6,[R3]
	INC R3
	LD R7,[R3]
	INC R3
	BANKSEL _NVMDATAH
	MOV _NVMDATAH,R7
	MOV _NVMDATAL,R6
	;
	MOV R5 ,#0x84
	MOV _NVMCTL0,R5
	MOV R5,#0x69
	MOV _NVMCTL1,R5
	MOV R5,#0x96
	MOV _NVMCTL1,R5
	SET _NVMCTL0 , 1 ;
	NOPZ
	NOPZ
	NOPZ
	NOPZ
	NOPZ
	NOPZ ;
	NOPZ
	NOPZ
	NOPZ
	NOPZ
	MOV R5,#0X80
	MOV _NVMCTL0,R5
	;
	BANKSEL _NVMADDRL
	INC _NVMADDRL
	
;	::->op : GOTO
	JMP	_00011_DS_
;	::->op : LABEL
;	::->op : INLINEASM
_00013_DS_
	;
	BANKSEL _OSCCTL
	MOV _OSCCTL,R2
	AND R1,#0xC0 ;
	ORL _INTCTL,R1
	
;	::->op : LABEL
;	::->op : ENDFUNCTION
	CRET	
; exit point of _FLASH_WRITE_FUN



func._FLASH_READ_FUN	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _FLASH_READ_FUN	;Function start
; 2 exit points
;has an exit
;7 compiler assigned registers:
;   r0x1022
;   STK00
;   r0x1023
;   STK01
;   r0x1024
;   r0x1025
;   r0x1026
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_FLASH_READ_FUN	;Function start
; 2 exit points
;	::->op : RECEIVE
;	.line	104; "../Flash.c"	void FLASH_READ_FUN(unsigned int address,unsigned char length)
	BANKSEL	r0x1022
	MOV	r0x1022, R0
	BANKSEL	STK00
	MOVZ	R0, STK00
	BANKSEL	r0x1023
	MOV	r0x1023, R0
;	::->op : RECEIVE
	BANKSEL	STK01
	MOVZ	R0, STK01
	BANKSEL	r0x1024
	MOV	r0x1024, R0
;	::->op : RIGHT_OP
;;102	MOVZ	R0, r0x1022
;;100	MOV	r0x1025, R0
;;1	CLR	r0x1026
;	::->op : CAST
;;101	MOVZ	R0, r0x1025
;	.line	108; "../Flash.c"	NVMADDRH=(unsigned char) (address>>8);
	BANKSEL	r0x1022
	MOVZ	R0, r0x1022
	BANKSEL	_NVMADDRH
	MOV	_NVMADDRH, R0
;	::->op : CAST
;	.line	109; "../Flash.c"	NVMADDRL=address;
	BANKSEL	r0x1023
	MOVZ	R0, r0x1023
	BANKSEL	_NVMADDRL
	MOV	_NVMADDRL, R0
;	::->op : INLINEASM
	;
	BANKSEL _INTCTL
	MOV R1,_INTCTL
	;
	CLR _INTCTL,_AIE
	JNB _INTCTL,_AIE
	JMP $-2
	;
	MOV R0,#0x30
	MOV R2,_OSCCTL
	MOV _OSCCTL,R0
	;
	MOV R3,#_FLASH_BUFFER
	
;	::->op : =
;	.line	127; "../Flash.c"	while(length--)	// 仅使用R0，不改变R1
	BANKSEL	r0x1024
	MOVZ	R0, r0x1024
	BANKSEL	r0x1023
	MOV	r0x1023, R0
;	::->op : LABEL
;	::->op : =
_00003_DS_
	BANKSEL	r0x1023
	MOVZ	R0, r0x1023
	BANKSEL	r0x1022
	MOV	r0x1022, R0
;	::->op : -
	BANKSEL	r0x1023
	DEC	r0x1023
;	::->op : IFX
	MOV	R0,# 0x00
	BANKSEL	r0x1022
	ORL	R0, r0x1022
	JNB	PSW, 2
	JMP	_00005_DS_
;	::->op : INLINEASM
	;
	BANKSEL _NVMCTL0
	MOV R5,#0x81
	MOV _NVMCTL0,R5
	NOPZ
	NOPZ
	NOPZ ;
	NOPZ
	;
	BANKSEL _NVMDATAL
	MOV R6,_NVMDATAL
	MOV R7,_NVMDATAH
	BANKSEL _FLASH_BUFFER
	ST [R3],R6
	INC R3
	ST [R3],R7
	INC R3
	;
	BANKSEL _NVMADDRL
	INC _NVMADDRL
	JNB _PSW,_Z
	INC _NVMADDRH
	
;	::->op : GOTO
	JMP	_00003_DS_
;	::->op : LABEL
;	::->op : INLINEASM
_00005_DS_
	;
	BANKSEL _OSCCTL
	MOV _OSCCTL,R2
	AND R1,#0xC0 ;
	ORL _INTCTL,R1
	
;	::->op : LABEL
;	::->op : ENDFUNCTION
	CRET	
; exit point of _FLASH_READ_FUN



func._FLASH_READ_ONE	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _FLASH_READ_ONE	;Function start
; 2 exit points
;has an exit
;5 compiler assigned registers:
;   r0x102F
;   STK00
;   r0x1030
;   r0x1031
;   r0x1032
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_FLASH_READ_ONE	;Function start
; 2 exit points
;	::->op : RECEIVE
;;1	MOV	r0x102F, R0
;	.line	12; "../Flash.c"	unsigned int FLASH_READ_ONE(unsigned int address)
	BANKSEL	r0x1031
	MOV	r0x1031, R0
	BANKSEL	STK00
	MOVZ	R0, STK00
	BANKSEL	r0x1030
	MOV	r0x1030, R0
;	::->op : RIGHT_OP
;;99	MOVZ	R0, r0x102F
;;1	CLR	r0x1032
;	::->op : CAST
;	.line	18; "../Flash.c"	NVMADDRH=(unsigned char)(address>>8);
	BANKSEL	r0x1031
	MOVZ	R0, r0x1031
	BANKSEL	_NVMADDRH
	MOV	_NVMADDRH, R0
;	::->op : CAST
;	.line	19; "../Flash.c"	NVMADDRL=(unsigned char)address;
	BANKSEL	r0x1030
	MOVZ	R0, r0x1030
	BANKSEL	_NVMADDRL
	MOV	_NVMADDRL, R0
;	::->op : INLINEASM
	;
	BANKSEL _INTCTL
	MOV R1,_INTCTL
	;
	CLR _INTCTL,_AIE
	JNB _INTCTL,_AIE
	JMP $-2
	;
	MOV R0,#0x30
	MOV R2,_OSCCTL
	MOV _OSCCTL,R0
	;
	BANKSEL _NVMCTL0
	MOV R5,#0x81
	MOV _NVMCTL0,R5
	NOPZ
	NOPZ
	NOPZ
	NOPZ
	;
	MOV _OSCCTL,R2
	AND R1,#0xC0 ;
	ORL INTCTL,R1
	;
	BANKSEL _NVMDATAL
	MOV R6,_NVMDATAL
	MOV R7,_NVMDATAH
	BANKSEL _FLASH_READ_BUF
	MOV (_FLASH_READ_BUF),R6
	MOV (_FLASH_READ_BUF+1),R7
	
;	::->op : RETURN
;	.line	52; "../Flash.c"	return 	FLASH_READ_BUF;
	BANKSEL	_FLASH_READ_BUF
	MOVZ	R0, _FLASH_READ_BUF
	BANKSEL	STK00
	MOV	STK00, R0
	BANKSEL	_FLASH_READ_BUF
	MOVZ	R0, (_FLASH_READ_BUF + 1)
;	::->op : LABEL
;	::->op : ENDFUNCTION
	CRET	
; exit point of _FLASH_READ_ONE


;	code size estimation:
;	   98+   72 =   170 instructions (  484 byte)


	.end
