; Generated by holtek-gcc v3.19, Tue Jan 14 16:58:23 2025
; 
; Configuration:
;       with long instruction
;       Single ROM, Multi-RAM
;       bits_per_rom_unit:16
;       with mp1
;       with tbhp, address(0x9)
;          Use tabrd-const
;       
; SFR address of long-instruction arch:
;    mp0 = -1,1,0
;    mp1 = 4,3,2
;    mp2 = 14,13,12
;    tbp = 9,7,8
;    acc = 5
;    pcl = 6
;    status = 10
;    bp = 11
;    intc = 32
;       
;       
; use 'tabrdc' instead of 'tabrd'
;       

#pragma translator "holtek-gcc 4.6.4" "3.19" "build 20130711"
; Rebuild 718

ir equ [2]
mp equ [3]
sbp equ [4]
acc equ [5]
bp equ [11]
tblp equ [7]
tbhp equ [9]
status equ [10]
c equ [10].0
ac equ [10].1
z equ [10].2
ov equ [10].3
cz equ [10].6
sc equ [10].7
intc equ [32]

extern ra:byte
extern rb:byte
extern rc:byte
extern rd:byte
extern re:byte
extern rf:byte
extern rg:byte
extern rh:byte
extern _Crom2Prom:near
extern _Crom2PromNext:near

RAMBANK 0 @BITDATASEC, @BITDATASEC1
@HCCINIT	.section 'data'
@HCCINIT0	.section 'data'
@BITDATASEC	 .section 'data'
@BITDATASEC1	 .section 'data'

#pragma debug scope 1 1
	extern __DELAY3:near
	extern __DELAYX3:near
	extern __DELAYX6:near
	extern __DELAYY5:near
	extern __DELAYY3:near
	extern _builtin_holtek_delay_2:byte
___status equ [10]
public _main
#pragma debug scope 2 1
#line 31 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
IFDEF WITH_DEFAULT_STARTUP
extern _main_initial0:near
extern _main_startup:near
ENDIF

ROMBANK 0 @start
@start .section com_l 'code'
_main_startup1:
@start .section com_e 'code'
	jmp _main

_main .section 'code'
_main proc
    local _main_2 db 5 dup(?)
#line 33 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
	snz [10].5
	jmp _L2
#line 33 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
	sz [10].4
	jmp _L3
_L2:
#pragma debug scope 3 2
;begin block, line: 33.-1
#pragma debug struct_begin 42 ""
#pragma debug field 0 8 "haltMode"
#pragma debug field 0 8 "irc2"
#pragma debug struct_end
#pragma debug variable 42 3 _main_2+0 "oscCfg"
#pragma debug variable 7 3 _main_2+4 "i"
#line 37 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
	clr _main_2[0]
#line 38 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
	mov a,1
	mov _main_2[1],a
#line 39 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
	mov a,low offset _main_2
	mov _Oscillators_Cfg_2[0],a
	mov a,high offset _main_2
	mov _Oscillators_Cfg_2[1],a
	call _Oscillators_Cfg
#line 42 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
	call _Ram_Clear
	clr _main_2[2]
	clr _main_2[3]
#line 46 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
	clr _main_2[4]
_L5:
#line 48 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
	mov a,_main_2[4]
	mov _Eeprom_WriteByte_2[2],a
	mov a,_main_2[2]
	mov _Eeprom_WriteByte_2[0],a
	mov a,_main_2[3]
	mov _Eeprom_WriteByte_2[1],a
	call _Eeprom_WriteByte
#line 49 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
	mov a,low offset _readData
	add a,_main_2[2]
	mov _Eeprom_ReadByte_2[2],a
	mov a,high offset _readData
	adc a,_main_2[3]
	mov _Eeprom_ReadByte_2[3],a
	mov a,_main_2[2]
	mov _Eeprom_ReadByte_2[0],a
	mov a,_main_2[3]
	mov _Eeprom_ReadByte_2[1],a
	call _Eeprom_ReadByte
#line 46 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
	inc _main_2[4]
	inc _main_2[2]
	sz z
	inc _main_2[3]
	mov a,_main_2[4]
	sub a,8
	snz z
	jmp _L5
#line 54 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
	mov a,160
	mov _writeData[0],a
	mov a,161
	mov _writeData[1],a
	mov a,162
	mov _writeData[2],a
	mov a,163
	mov _writeData[3],a
	mov a,164
	mov _writeData[4],a
	mov a,165
	mov _writeData[5],a
	mov a,166
	mov _writeData[6],a
	mov a,167
	mov _writeData[7],a
#line 56 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
	mov a,8
	mov _Eeprom_WriteBuf_2[4],a
	clr _Eeprom_WriteBuf_2[5]
	mov a,low offset _writeData
	mov _Eeprom_WriteBuf_2[2],a
	mov a,high offset _writeData
	mov _Eeprom_WriteBuf_2[3],a
	clr _Eeprom_WriteBuf_2[0]
	clr _Eeprom_WriteBuf_2[1]
	call _Eeprom_WriteBuf
#line 57 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
	mov a,8
	mov _Eeprom_ReadBuff_2[4],a
	clr _Eeprom_ReadBuff_2[5]
	mov a,low offset _readData
	mov _Eeprom_ReadBuff_2[2],a
	mov a,high offset _readData
	mov _Eeprom_ReadBuff_2[3],a
	clr _Eeprom_ReadBuff_2[0]
	clr _Eeprom_ReadBuff_2[1]
	call _Eeprom_ReadBuff
#pragma debug scope 2 1
#line 34 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
	jmp _L11
_L3:
#line 62 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
;# 62 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c" 1
	clr wdt
_L11:
#line 66 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
;# 66 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c" 1
	clr wdt
#line 67 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
;# 67 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c" 1
	nop
	jmp _L11
	jmp $
_main endp

@dummy proc
	call _main
@dummy endp

#line 67 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
#pragma debug scope 1 1
#line 28 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
public _readData
@HCCINIT0_readData .section 'data'
_readData	db 8 dup(0)
#pragma debug array 43 8 8 1
#pragma debug variable 43 1 _readData "readData"

@HCCINIT .section 'data'
#line 27 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
public _writeData
@HCCINIT0_writeData .section 'data'
_writeData	db 8 dup(0)
#pragma debug variable 43 1 _writeData "writeData"

@HCCINIT .section 'data'
#pragma debug struct_begin 44 "__status_bits"
#pragma debug field 21 8 0 1 "__c" ;0,1
#pragma debug field 21 8 0 1 "__ac" ;1,1
#pragma debug field 21 8 0 1 "__z" ;2,1
#pragma debug field 21 8 0 1 "__ov" ;3,1
#pragma debug field 21 8 0 1 "__pdf" ;4,1
#pragma debug field 21 8 0 1 "__to" ;5,1
#pragma debug field 21 8 0 1 "__cz" ;6,1
#pragma debug field 21 8 0 1 "__sc" ;7,1
#pragma debug struct_end
#pragma debug union_begin 45 ""
#pragma debug field 2 44 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 45 1 ___status "__status" 1
#line 31 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\example\eeprom_readwrite\source\main.c"
@code .section at 0 'code'
	jmp _main_startup1

extern _Oscillators_Cfg_2:byte
extern _Oscillators_Cfg:near
extern _Ram_Clear:near
extern _Eeprom_WriteByte_2:byte
extern _Eeprom_WriteByte:near
extern _Eeprom_ReadByte_2:byte
extern _Eeprom_ReadByte:near
extern _Eeprom_WriteBuf_2:byte
extern _Eeprom_WriteBuf:near
extern _Eeprom_ReadBuff_2:byte
extern _Eeprom_ReadBuff:near

; 
; Generated by holtek-gcc v3.19, Tue Jan 14 16:58:23 2025
; Rebuild 718
; end of file
