"File: Matrix keyboard.c  Assembler  Version HGASM0202      Page 1


   1  0000              ; Generated by holtek-gcc v3.19, Mon Aug 30 16:41:42 2021
   2  0000              ; 
   3  0000              ; Configuration:
   4  0000              ;       with long instruction
   5  0000              ;       Multi-ROM, Multi-RAM
   6  0000              ;       bits_per_rom_unit:16
   7  0000              ;       with mp1
   8  0000              ;       with tbhp, address(0x9)
   9  0000              ;          Use tabrd-const
  10  0000              ;       
  11  0000              ; SFR address of long-instruction arch:
  12  0000              ;    mp0 = -1,1,0
  13  0000              ;    mp1 = 4,3,2
  14  0000              ;    mp2 = 14,13,12
  15  0000              ;    tbp = 9,7,8
  16  0000              ;    acc = 5
  17  0000              ;    pcl = 6
  18  0000              ;    status = 10
  19  0000              ;    bp = 11
  20  0000              ;    intc = 16
  21  0000              ;       
  22  0000              ;       
  23  0000              ; use 'tabrdc' instead of 'tabrd'
  24  0000              ;       
  25  0000              
  26  0000              #pragma translator "holtek-gcc 4.6.4" "3.19" "build 20130711"
  27  0000              ; Rebuild 718
  28  0000              
  29  0000              ir equ [2]
  30  0000              mp equ [3]
  31  0000              sbp equ [4]
  32  0000              acc equ [5]
  33  0000              bp equ [11]
  34  0000              tblp equ [7]
  35  0000              tbhp equ [9]
  36  0000              status equ [10]
  37  0000              c equ [10].0
  38  0000              ac equ [10].1
  39  0000              z equ [10].2
  40  0000              ov equ [10].3
  41  0000              cz equ [10].6
  42  0000              sc equ [10].7
  43  0000              intc equ [16]
  44  0000              mduwr0 equ [59h]
  45  0000              mduwr1 equ [5ah]
  46  0000              mduwr2 equ [5bh]
  47  0000              mduwr3 equ [5ch]
  48  0000              mduwr4 equ [5dh]
  49  0000              mduwr5 equ [5eh]
  50  0000              mduwrctrl equ [5fh]
  51  0000              
  52  0000              extern ra:byte
  53  0000              extern rb:byte
  54  0000              extern rc:byte
  55  0000              extern rd:byte
  56  0000              extern re:byte
  57  0000              extern rf:byte
  58  0000              extern rg:byte
  59  0000              extern rh:byte
"File: Matrix keyboard.ASM  Assembler  Version HGASM0202      Page 2

  60  0000              extern _Crom2Prom:near
  61  0000              extern _Crom2PromNext:near
  62  0000              
  63  0000              RAMBANK 0 @BITDATASEC, @BITDATASEC1
  64  0000              @HCCINIT	.section 'data'
  65  0000              @HCCINIT0	.section 'data'
  66  0000              @BITDATASEC	 .section 'data'
  67  0000              @BITDATASEC1	 .section 'data'
  68  0000              
  69  0000              #pragma debug scope 1 1
  70  0000              	extern __DELAY3:near
  71  0000              	extern __DELAYX3:near
  72  0000              	extern __DELAYX6:near
  73  0000              	extern __DELAYY5:near
  74  0000              	extern __DELAYY3:near
  75  0000              	extern _builtin_holtek_delay_2:byte
  76  0000              ___wdtc equ [62]
  77  0000              ___pc equ [27]
  78  0000              ___pcc equ [28]
  79  0000              public _setup
  80  0000              #pragma debug scope 2 1

  11  0000              #line 11 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  11  0000              _setup .section 'code'
  11  0000              _setup proc
  12  0000              #line 12 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  12  0000  0FAB        	mov a,171
  12  0001  00BE        	mov [62],a
  13  0002              #line 13 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  13  0002  1F1B        	clr [27]
  14  0003              #line 14 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  14  0003  1F1C        	clr [28]
  14  0004  0003        	ret
  14  0005              _setup endp
  14  0005              #line 14 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  14  0005              #pragma debug scope 1 1
  14  0005              ___pf equ [36]
  14  0005              ___pfc equ [37]
  14  0005              ___pfpu equ [38]
  14  0005              public _Scan
  14  0005              #pragma debug scope 3 1
  18  0005              #line 18 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  18  0000              _Scan .section 'code'
  18  0000              _Scan proc
  20  0000              #line 20 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  20  0000  0FFE        	mov a,254
  20  0001  00A4        	mov [36],a
  21  0002              #line 21 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  21  0002  0FF0        	mov a,240
  21  0003  00A5        	mov [37],a
  22  0004              #line 22 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  22  0004  0FF0        	mov a,240
  22  0005  00A6        	mov [38],a
  19  0006              #line 19 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  19  0006  1F00     E  	clr ra
  19  0007              _L7:
  25  0007              #line 25 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  25  0007  3BA4        	snz [36].7
  25  0008  2800     R  	jmp _L3
  27  0009              #line 27 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
"File: setup.h       Assembler  Version HGASM0202      Page 3

  27  0009  3F24        	sz [36].6
  27  000A  2800     R  	jmp _L4
  26  000B              #line 26 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  26  000B  1480     E  	inc ra
  26  000C  2800     R  	jmp _L3
  26  000D              _L4:
  29  000D              #line 29 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  29  000D  3EA4        	sz [36].5
  29  000E  2800     R  	jmp _L5
  28  000F              #line 28 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  28  000F  0F02        	mov a,2
  28  0010  0380     E  	addm a,ra
  28  0011  2800     R  	jmp _L3
  28  0012              _L5:
  31  0012              #line 31 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  31  0012  3E24        	sz [36].4
  31  0013  2800     R  	jmp _L6
  30  0014              #line 30 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  30  0014  0F03        	mov a,3
  30  0015  0380     E  	addm a,ra
  30  0016  2800     R  	jmp _L3
  30  0017              _L6:
  32  0017              #line 32 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  32  0017  0F04        	mov a,4
  32  0018  0380     E  	addm a,ra
  33  0019              #line 33 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  33  0019  0724        	mov a,[36]
  33  001A  03A4        	addm a,[36]
  23  001B              #line 23 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  23  001B  0700     E  	mov a,ra
  23  001C  0A10        	sub a,16
  23  001D  390A        	snz z
  23  001E  2800     R  	jmp _L7
  23  001F              _L3:
  36  001F              #line 36 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  36  001F  0700     E  	mov a,ra
  36  0020  0003        	ret
  36  0021              _Scan endp
  36  0021              #line 36 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  36  0021              #pragma debug scope 1 1
  36  0021              public _Delay1ms
  36  0021              #pragma debug scope 4 1
  39  0021              #line 39 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  39  0000              _Delay1ms .section 'code'
  39  0000              _Delay1ms proc
  39  0000              public _Delay1ms_2
  39  0000  0002[           local _Delay1ms_2 db 2 dup(?)	; 2,0
            00
            ]
  39  0002              #pragma debug variable 10 4 _Delay1ms_2+0 "delay"
  41  0002              #line 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  41  0000  1F00     E  	clr rb
  41  0001  1F00     E  	clr rc
  41  0002  2800     R  	jmp _L13
  41  0003              _L14:
  41  0003              #line 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF 2000>263690
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	ERRMESSAGE 'the value 2000of the argument exceeds the maxinum 263690'
"File: setup.h       Assembler  Version HGASM0202      Page 4

  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF 2000<0
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	ERRMESSAGE 'the value 2000 of the argument exceeds the mininum 0'
  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF 2000==0
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	JMP $
  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF (2000>=1) AND (2000<( 4 + __PBP__ * 2))
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	NOP
  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF (2000>=2) AND (2000<( 4 + __PBP__ * 2))
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	NOP
  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF (2000>=3) AND (2000<( 4 + __PBP__ * 2))
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	NOP
  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF (2000>=4) AND (2000<( 4 + __PBP__ * 2)) AND ( __PBP__ > 0 )
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	NOP
  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF (2000>=5) AND (2000<( 4 + __PBP__ * 2)) AND ( __PBP__ > 0 )
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	NOP
  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF (2000>=6) AND (2000<( 4 + __PBP__ * 2))  AND ( __PBP__ > 1 )
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	NOP
  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF (2000>=7) AND (2000<( 4 + __PBP__ * 2))  AND ( __PBP__ > 1 )
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	NOP
  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF (2000>=8) AND (2000<( 4 + __PBP__ * 2))  AND ( __PBP__ > 2 )
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	NOP
  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF (2000==9)  AND ( __PBP__ > 2 )
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	NOP
  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF (2000< ( 8 + __PBP__ * 2)) AND (2000>( 3 + __PBP__ * 2))
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	fcall __DELAY3 + ( 7 + __PBP__ * 2) -2000
"File: setup.h       Assembler  Version HGASM0202      Page 5

  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF (2000< ( 0404h + __PBP__ * 2)) AND (2000>( 7 + __PBP__ * 2))
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	MOV A,(2000-( 4 + __PBP__ * 2))/4
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	fcall __DELAYX3 + 3 -((2000-( 4 + __PBP__ * 2)) MOD 4) 
  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF (2000< ( 040bh + __PBP__ * 2)) AND (2000> ( 0403h + __PBP__ * 2))
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	MOV A,0 
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	fcall __DELAYX6 + ( 040ah + __PBP__ * 2) -2000
  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF (2000 >= ( 040bh + __PBP__ * 2)) AND ((((2000-( 9 + __PBP__ * 2))%0402h)/4+1)>256)
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	MOV A,(2000-( 9 + __PBP__ * 2))/0402h
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	MOV _builtin_holtek_delay_2,A
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	MOV A,0
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	fcall __DELAYY5 +5- (((2000-( 9 + __PBP__ * 2))%0402h)%6) 
  41  0003              	ENDIF
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003              	IF (2000 >= ( 040bh + __PBP__ * 2)) AND ((((2000-( 9 + __PBP__ * 2))%0402h)/4+1)<=256)
  41  0003              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0003  0F01        	MOV A,(2000-( 9 + __PBP__ * 2))/0402h
  41  0004              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0004  0080     E  	MOV _builtin_holtek_delay_2,A
  41  0005              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0005  0FF0        	MOV A,((2000-( 9 + __PBP__ * 2))%0402h)/4+1
  41  0006              ;# 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  41  0006              	fcall __DELAYY3 +3-(((2000-( 9 + __PBP__ * 2))%0402h)%4) 
  41  000D              	ENDIF
  41  000D  1480     E  	inc rb
  41  000E  3D0A        	sz z
  41  000F  1480     E  	inc rc
  41  0010              _L13:
  41  0010  0700     E  	mov a,rb
  41  0011  0200     R  	sub a,_Delay1ms_2[0]
  41  0012  0700     E  	mov a,rc
  41  0013  1200     R  	sbc a,_Delay1ms_2[1]
  41  0014  3B0A        	snz cz
  41  0015  2800     R  	jmp _L14
  41  0016  0003        	ret
  41  0017              _Delay1ms endp
  41  0017              #line 41 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  41  0017              #pragma debug scope 1 1
  41  0017              public _Delay10ms
  41  0017              #pragma debug scope 5 1
  45  0017              #line 45 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  45  0000              _Delay10ms .section 'code'
  45  0000              _Delay10ms proc
  45  0000              public _Delay10ms_2
  45  0000  0002[           local _Delay10ms_2 db 2 dup(?)	; 2,0
            00
            ]
"File: setup.h       Assembler  Version HGASM0202      Page 6

  45  0002              #pragma debug variable 10 5 _Delay10ms_2+0 "delay"
  47  0002              #line 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  47  0000  1F00     E  	clr rb
  47  0001  1F00     E  	clr rc
  47  0002  2800     R  	jmp _L16
  47  0003              _L17:
  47  0003              #line 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF 20000>263690
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	ERRMESSAGE 'the value 20000of the argument exceeds the maxinum 263690'
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF 20000<0
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	ERRMESSAGE 'the value 20000 of the argument exceeds the mininum 0'
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF 20000==0
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	JMP $
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF (20000>=1) AND (20000<( 4 + __PBP__ * 2))
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	NOP
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF (20000>=2) AND (20000<( 4 + __PBP__ * 2))
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	NOP
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF (20000>=3) AND (20000<( 4 + __PBP__ * 2))
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	NOP
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF (20000>=4) AND (20000<( 4 + __PBP__ * 2)) AND ( __PBP__ > 0 )
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	NOP
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF (20000>=5) AND (20000<( 4 + __PBP__ * 2)) AND ( __PBP__ > 0 )
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	NOP
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF (20000>=6) AND (20000<( 4 + __PBP__ * 2))  AND ( __PBP__ > 1 )
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	NOP
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF (20000>=7) AND (20000<( 4 + __PBP__ * 2))  AND ( __PBP__ > 1 )
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	NOP
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF (20000>=8) AND (20000<( 4 + __PBP__ * 2))  AND ( __PBP__ > 2 )
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
"File: setup.h       Assembler  Version HGASM0202      Page 7

  47  0003              	NOP
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF (20000==9)  AND ( __PBP__ > 2 )
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	NOP
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF (20000< ( 8 + __PBP__ * 2)) AND (20000>( 3 + __PBP__ * 2))
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	fcall __DELAY3 + ( 7 + __PBP__ * 2) -20000
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF (20000< ( 0404h + __PBP__ * 2)) AND (20000>( 7 + __PBP__ * 2))
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	MOV A,(20000-( 4 + __PBP__ * 2))/4
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	fcall __DELAYX3 + 3 -((20000-( 4 + __PBP__ * 2)) MOD 4) 
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF (20000< ( 040bh + __PBP__ * 2)) AND (20000> ( 0403h + __PBP__ * 2))
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	MOV A,0 
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	fcall __DELAYX6 + ( 040ah + __PBP__ * 2) -20000
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF (20000 >= ( 040bh + __PBP__ * 2)) AND ((((20000-( 9 + __PBP__ * 2))%0402h)/4+1)>256)
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	MOV A,(20000-( 9 + __PBP__ * 2))/0402h
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	MOV _builtin_holtek_delay_2,A
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	MOV A,0
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	fcall __DELAYY5 +5- (((20000-( 9 + __PBP__ * 2))%0402h)%6) 
  47  0003              	ENDIF
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003              	IF (20000 >= ( 040bh + __PBP__ * 2)) AND ((((20000-( 9 + __PBP__ * 2))%0402h)/4+1)<=256)
  47  0003              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0003  0F13        	MOV A,(20000-( 9 + __PBP__ * 2))/0402h
  47  0004              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0004  0080     E  	MOV _builtin_holtek_delay_2,A
  47  0005              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0005  0F7B        	MOV A,((20000-( 9 + __PBP__ * 2))%0402h)/4+1
  47  0006              ;# 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h" 1
  47  0006              	fcall __DELAYY3 +3-(((20000-( 9 + __PBP__ * 2))%0402h)%4) 
  47  000D              	ENDIF
  47  000D  1480     E  	inc rb
  47  000E  3D0A        	sz z
  47  000F  1480     E  	inc rc
  47  0010              _L16:
  47  0010  0700     E  	mov a,rb
  47  0011  0200     R  	sub a,_Delay10ms_2[0]
  47  0012  0700     E  	mov a,rc
  47  0013  1200     R  	sbc a,_Delay10ms_2[1]
  47  0014  3B0A        	snz cz
  47  0015  2800     R  	jmp _L17
  47  0016  0003        	ret
  47  0017              _Delay10ms endp
"File: setup.h       Assembler  Version HGASM0202      Page 8

  47  0017              #line 47 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
  47  0017              #pragma debug scope 1 1
  47  0017              public _main
  47  0017              #pragma debug scope 6 1

  15  0017              #line 15 "c:\users\edenlai\desktop\esk310\matrix keyboard\Matrix keyboard.c"
  15  0017              IFDEF WITH_DEFAULT_STARTUP
  15  0017              extern _main_initial0:near
  15  0017              extern _main_startup:near
  15  0017              ENDIF
  15  0017              
  15  0017              ROMBANK 0 @start
  15  0000              @start .section com_l 'code'
  15  0000              _main_startup1:
  15  0000              @start .section com_e 'code'
  15  0000  0F00     R  	mov a,bank _main
  15  0001  008B        	mov bp,a
  15  0002  2800     R  	jmp _main
  15  0003              
  15  0000              _main .section 'code'
  15  0000              _main proc
  16  0000              #line 16 "c:\users\edenlai\desktop\esk310\matrix keyboard\Matrix keyboard.c"
  16  0000              	fcall _setup
  16  0007              _L20:
  23  0007              #line 23 "c:\users\edenlai\desktop\esk310\matrix keyboard\Matrix keyboard.c"
  23  0007              	fcall _Scan
  23  000E  0080     E  	mov ra,a
  24  000F              #line 24 "c:\users\edenlai\desktop\esk310\matrix keyboard\Matrix keyboard.c"
  24  000F  0700     E  	mov a,ra
  24  0010  0A10        	sub a,16
  24  0011  3D0A        	sz z
  24  0012  2800     R  	jmp _L20
  26  0013              #line 26 "c:\users\edenlai\desktop\esk310\matrix keyboard\Matrix keyboard.c"
  26  0013  0F00     R  	mov a,low offset _SEGMENT_TAB
  26  0014  0300     E  	add a,ra
  26  0015  0083        	mov mp,a
  26  0016  0F00     R  	mov a,high offset _SEGMENT_TAB
  26  0017  1F04        	clr sbp
  26  0018  1384        	adcm a,sbp
  26  0019              	fcall _Crom2Prom
  26  0020  009B        	mov [27],a
  27  0021              #line 27 "c:\users\edenlai\desktop\esk310\matrix keyboard\Matrix keyboard.c"
  27  0021  2800     R  	jmp _L20
  27  0022  2800     R  	jmp $
  27  0023              _main endp
  27  0023              
  27  0023              @dummy endp
  27  0023              
  27  0023              #line 27 "c:\users\edenlai\desktop\esk310\matrix keyboard\Matrix keyboard.c"
  27  0023              #pragma debug scope 1 1
  27  0023              public _SEGMENT_TAB
  27  0000              @crom	.section 'crom'

   6  0000              #line 6 "c:\users\edenlai\desktop\esk310\matrix keyboard\setup.h"
   6  0000              @crom	.section	'crom'
   6  0000              _SEGMENT_TAB:
   6  0000              #pragma debug array 42 8 16 1
   6  0000              #pragma debug array 42 8 16 1
   6  0000              #pragma debug variable 42 1 _SEGMENT_TAB "SEGMENT_TAB"
   6  0000              	db 63
"File: setup.h       Assembler  Version HGASM0202      Page 9

   6  0001              	db 6
   6  0001              	db 91
   6  0002              	db 79
   6  0002              	db 102
   6  0003              	db 109
   6  0003              	db 125
   6  0004              	db 7
   6  0004              	db 127
   6  0005              	db 103
   6  0005              	db 119
   6  0006              	db 124
   6  0006              	db 88
   6  0007              	db 94
   6  0007              	db 121
   6  0008              	db 113
   6  0008              #pragma debug struct_end
   6  0008              #pragma debug struct_end
   6  0008              #pragma debug union_end
   6  0008              #pragma debug union_end
   6  0008              #pragma debug variable 44 1 ___pc "__pc" 1
   6  0008              #pragma debug struct_end
   6  0008              #pragma debug struct_end
   6  0008              #pragma debug union_end
   6  0008              #pragma debug union_end
   6  0008              #pragma debug variable 46 1 ___pcc "__pcc" 1
   6  0008              #pragma debug struct_end
   6  0008              #pragma debug struct_end
   6  0008              #pragma debug union_end
   6  0008              #pragma debug union_end
   6  0008              #pragma debug variable 48 1 ___pf "__pf" 1
   6  0008              #pragma debug struct_end
   6  0008              #pragma debug struct_end
   6  0008              #pragma debug union_end
   6  0008              #pragma debug union_end
   6  0008              #pragma debug variable 50 1 ___pfc "__pfc" 1
   6  0008              #pragma debug struct_end
   6  0008              #pragma debug struct_end
   6  0008              #pragma debug union_end
   6  0008              #pragma debug union_end
   6  0008              #pragma debug variable 52 1 ___pfpu "__pfpu" 1
   6  0008              #pragma debug struct_end
   6  0008              #pragma debug struct_end
   6  0008              #pragma debug union_end
   6  0008              #pragma debug union_end
   6  0008              #pragma debug variable 54 1 ___wdtc "__wdtc" 1

  15  0008              #line 15 "c:\users\edenlai\desktop\esk310\matrix keyboard\Matrix keyboard.c"
  15  0000              @code .section at 0 'code'
  15  0000  1F0B        	clr bp
  15  0001  2800     R  	jmp _main_startup1
  15  0002              
  15  0002              
  15  0002              ; 
  15  0002              ; Generated by holtek-gcc v3.19, Mon Aug 30 16:41:42 2021
  15  0002              ; Rebuild 718
  15  0002              ; end of file


        0 Errors, 0