⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 key.lst

📁 calculator code ,use toshibaor nec LSI
💻 LST
📖 第 1 页 / 共 5 页
字号:
00000099                         +0  789    789 blink_vfd_end:
                                 +0  790    790 ;V4.11	call	disp_to_dbr	;V2.10
                                 +0  791    791 ;V4.11	ret			;V2.10
00000099                         +0  792    792 blink_vfd_off:			;V2.10
                                 +0  793    793 ;V4.11	call	vft_disable	;V2.10
                                 +0  794    794 ;V4.11	@CLB	(F_BLINK)	;V2.10
00000099  FA                     +0  795    795 	ret			;V2.10
                                 +0  796    796 ;------------------------------------V2.05
0000009A                         +0  797    797 wait_100ms:
0000009A  F10000F97D           R +0  798    798 		ld	(DELAY_CT),125		;800usx125 -> 100ms
0000009F  FC05                   +0  799    799 		j	wait_xms
000000A1                         +0  800    800 wait_50ms:
000000A1  F10000F93E           R +0  801    801 		ld	(DELAY_CT),62		;800usx62-> 49.6ms
000000A6                         +0  802    802 wait_xms:
000000A6  E100006700           R +0  803    803 		cmp	(DELAY_CT),0
000000AB  D9F9                   +0  804    804 		j	ne,wait_xms
000000AD  FA                     +0  805    805 		ret
                                 +0  806    806 ;==============================================================================
                                 +0  807    807 ;		Key scan interrupt
                                 +0  808    808 ;==============================================================================
                                 +0  809    809 ;V1.39aKON_TIM		equ	2			;judgement for key press (800us*12scan*2=19.2ms to 19.2ms+800*11scan=28ms)
                                 +0  810    810 ;V1.34KOFF_TIM	equ	4			;judgement for key release (800us*12scan*4=38.4ms to 38.4ms+800*11scan=47.2ms)
                                 +0  811    811 ;V1.39aKOFF_TIM	equ	2
  00000001                       +0  812    812 KON_TIM		equ	1	;V1.39a
  00000003                       +0  813    813 KOFF_TIM	equ	3	;V1.39a
  0000000F                       +0  814    814 MD_TIM		equ	15			;judgement for mode sw moved (800us*12scan*15=144ms)
                                 +0  815    815 ;MD_TIM		equ	10			;judgement for mode sw moved (392us*12scan*10=47.040ms)
                                 +0  816    816 
000000AE                         +0  817    817 key_scan:
000000AE  50                     +0  818    818 	push	wa
000000AF  51                     +0  819    819 	push	bc
000000B0  52                     +0  820    820 	push	de
000000B1  53                     +0  821    821 	push	hl
000000B2  ECD8                   +0  822    822 	push	ix
000000B4  EDD8                   +0  823    823 	push	iy
000000B6  E100006700           R +0  824    824 		cmp	(DELAY_CT),0
000000BB  D804                   +0  825    825 		j	eq,check_delay_time
000000BD  E10000F8             R +0  826    826 		dec	(DELAY_CT)
000000C1                         +0  827    827 check_delay_time:
000000C1  480000               R +0  828    828 	ld	wa,IO_MT
000000C4  E10000FC             R +0  829    829 	test	(IO_MT>>4).a		;bit -reverse-> jump status
000000C8  9F                     +0  830    830 	j	t,key_scan00		;if jump status is 1 -> branch
                                 +0  831    831 ;V3.00		@RST_IN_ON(key_scan99)	;when print reset sign checked in, jump out
                                 +0  832    832 ;V3.12		ei			;V3.00
000000C9                         +0  833    833 key_scan00:
000000C9  E1000040             R +0  834    834 		ld	a,(EP_TIM)	;\
000000CD  D807                   +0  835    835 		j	z,key_scan_01	;|during EEPROM reading and writing, skip to key scan end 
000000CF  E10000F8             R +0  836    836 		dec	(EP_TIM)	;|
000000D3  FE0000               R +0  837    837 		jp	key_scan99	;/
000000D6                         +0  838    838 key_scan_01:
000000D6  480000               R +0  839    839 	ld	wa,EP_ACCES
000000D9  E10000FC             R +0  840    840 	test	(EP_ACCES>>4).a		;bit -reverse-> jump status
000000DD  82FE0000             R +0  841    841 	j	f,key_scan99		;if jump status is 0 -> branch
                                 +0  842    842 ;V2.13		call	feed_check		
000000E1  480000               R +0  843    843 	ld	wa,F_KON
000000E4  E10000FC             R +0  844    844 	test	(F_KON>>4).a		;bit -reverse-> jump status
000000E8  A5                     +0  845    845 	j	f,key_scan_02		;if jump status is 0 -> branch
                                 +0  846    846 ;V1.39key_scan_01x:				
000000E9  FD0000               R +0  847    847 		call	mdsw_scan		
000000EC  FD0000               R +0  848    848 		call	update_mdsw		;for remove mode sw chattaring
000000EF                         +0  849    849 key_scan_02:
                                 +0  850    850 ;V4.11		@BBS	(SW_OFF_RT,key_scan90)	;power sw move to OFF mode? yes -> exit
                                 +0  851    851 ;V4.11		@BBS	(F_OFF,key_scan90)	;if OFF mode? yes -> exit
000000EF  480000               R +0  852    852 	ld	wa,IO_MT
000000F2  E10000FC             R +0  853    853 	test	(IO_MT>>4).a		;bit -reverse-> jump status
000000F6  DF1A                   +0  854    854 	j	f,key_scan_03		;if jump status is 0 -> branch
000000F8  480000               R +0  855    855 	ld	wa,F_DOFF
000000FB  E10000FC             R +0  856    856 	test	(F_DOFF>>4).a		;bit -reverse-> jump status
000000FF  DF11                   +0  857    857 	j	f,key_scan_03		;if jump status is 0 -> branch
00000101  E100006700           R +0  858    858 		cmp	(OFF_CT),0		
00000106  D807                   +0  859    859 		j	eq,key_scan_030		
00000108  E10000F8             R +0  860    860 		dec	(OFF_CT)		
0000010C  FE0000               R +0  861    861 		jp	key_scan_03		
0000010F                         +0  862    862 key_scan_030:
0000010F  FD0000               R +0  863    863 		call	vft_enable		
00000112                         +0  864    864 key_scan_03:		
00000112  E00043               R +0  865    865 		ld	b,(P1PRD)	
00000115  480000               R +0  866    866 	ld	wa,F_KON
00000118  E10000FC             R +0  867    867 	test	(F_KON>>4).a		;bit -reverse-> jump status
0000011C  DF34                   +0  868    868 	j	f,key_scan20		;if jump status is 0 -> branch
0000011E  EB643F                 +0  869    869 		and	b,0y00111111		;
00000121  D903FE0000           R +0  870    870 		j	z,key_scan90		;no key press   yes->
                                 +0  871    871 
                                 +0  872    872 ;Detect key press...............................
00000126  1AFF                   +0  873    873 		ld	c,0xff;V1.01
                                 +0  874    874 ;V3.00		swap	b
                                 +0  875    875 		;--------------------------------------------------------------
00000128                         +0  876    876 key_scan12:;V1.01		
                                 +0  877    877 ;V3.00		shlc	b		;shift current key return
00000128  EBF5                   +0  878    878 		shrc	b
0000012A  22                     +0  879    879 		inc	c		;count which bit is high in register b
0000012B  DBFB                   +0  880    880 		j	cc,key_scan12	
                                 +0  881    881 		;--------------------------------------------------------------
0000012D  4B0000               R +0  882    882 		ld	hl,tbl_rtndt	;\
00000130  E743                   +0  883    883 		ld	b,(hl+c)	;|key return (matrix vertical)-->RET_BK
00000132  F100007B             R +0  884    884 		ld	(RET_BK),b	;/
00000136  E1000040             R +0  885    885 		ld	a,(SCAN_CT)	;\
0000013A  F1000078             R +0  886    886 		ld	(SCAN_BK),a	;/key scan (matrix horizontal)-->SCAN_BK 
0000013E  F10000F901           R +0  887    887 		ld	(KI_CT),KON_TIM
00000143  480000               R +0  888    888 	ld	wa,F_KON
00000146  E10000F2             R +0  889    889 	set	(F_KON>>4).a
0000014A  F10000F900           R +0  890    890 		ld	(BLK_CT),0	
0000014F  FE0000               R +0  891    891 		j	key_scan90
                                 +0  892    892 
                                 +0  893    893 ;Key on check...................................
00000152                         +0  894    894 key_scan20:
00000152  E1000040             R +0  895    895 		ld	a,(SCAN_CT)		;whether the same key keep in pressing
00000156  E1000007             R +0  896    896 		cmp	a,(SCAN_BK)		;//
0000015A  D803FE0000           R +0  897    897 		j	ne,key_scan90		;/different scan line?  yes-> exit
0000015F  480000               R +0  898    898 	ld	wa,F_KOFF
00000162  E10000FC             R +0  899    899 	test	(F_KOFF>>4).a		;bit -reverse-> jump status
00000166  DF56                   +0  900    900 	j	f,key_scan30		;if jump status is 0 -> branch
00000168  EB643F                 +0  901    901 		and	b,0y00111111		;reg.b = current key return
0000016B  D862                   +0  902    902 		j	z,key_scan32		;for make sure
0000016D  E100001C             R +0  903    903 		and	b,(RET_BK)		;previous key on continue?
00000171  D85C                   +0  904    904 		j	z,key_scan32		;If chataling?  yes->
00000173  E10000F8             R +0  905    905 		dec	(KI_CT)
00000177  D967                   +0  906    906 		j	nz,key_scan90		
00000179  F10000F903           R +0  907    907 		ld	(KI_CT),KOFF_TIM	;detect key on?
0000017E  480000               R +0  908    908 	ld	wa,F_KOFF
00000181  E10000F2             R +0  909    909 	set	(F_KOFF>>4).a
                                 +0  910    910 		
                                 +0  911    911 ;Key code calculation...........................
00000185  1AFF                   +0  912    912 		ld	c,0xff
00000187                         +0  913    913 key_scan22:	
00000187  EBF5                   +0  914    914 		shrc	b	;shift current key return
00000189  22                     +0  915    915 		inc	c		;reg.c = lower 2bit of key code
0000018A  DBFB                   +0  916    916 		j	cc,key_scan22
0000018C  E1000040             R +0  917    917 		ld	a,(SCAN_CT)
                                 +0  918    918 ;V3.00		shlc	a		;--ax4
                                 +0  919    919 ;V3.00		shlc	a		;/
                                 +0  920    920 ;V3.00		or	a,c		;reg.a = key code
00000190  1906                   +0  921    921 		ld	w,6		;V3.00
00000192  E8F2                   +0  922    922 		mul	w,a		;V3.00
00000194  04                     +0  923    923 		clr	cf		;V3.00
00000195  EA01                   +0  924    924 		add	a,c		;V3.00
00000197  42                     +0  925    925 		ld	c,a
00000198  4B0000               R +0  926    926 		ld	hl,key_conver_tbl
0000019B  E740                   +0  927    927 		ld	a,(hl+c)
0000019D  E100006740           R +0  928    928 		cmp	(KEY_CT),64	;\
000001A2  DB2B                   +0  929    929 		j	ge,key_scan32	;/key buffer over flow?
000001A4  E1000042             R +0  930    930 		ld	c,(KEY_WPTR)
000001A8  EA643F                 +0  931    931 		and	c,0x3f
000001AB  4B0000               R +0  932    932 		ld	hl,KEY_BUF	;key buffer first address-->hl
000001AE  F778                   +0  933    933 		ld	(hl+c),a	;store key code to KEY_BUF
000001B0  22                     +0  934    934 		inc	c
000001B1  EA643F                 +0  935    935 		and	c,0x3f
000001B4  F100007A             R +0  936    936 		ld	(KEY_WPTR),c
000001B8  E10000F0             R +0  937    937 		inc	(KEY_CT)
000001BC  FC22                   +0  938    938 		j	key_scan90
                                 +0  939    939 		
                                 +0  940    940 ;Key off check..................................
000001BE                         +0  941    941 key_scan30:
                                 +0  942    942 ;---------------------------------------------------
000001BE  EB643F                 +0  943    943 		and	b,0y00111111		;reg.b = current key return
000001C1  E100001C             R +0  944    944 		and	b,(RET_BK)		;previous key on continue?
000001C5  D802                   +0  945    945 		j	z,key_scan_h9		; key released ->
                                 +0  946    946 		;-------------------------------------
                                 +0  947    947 ;V3.00		@BBC	(RTC_ON,key_scan_set0)	;V1.23
                                 +0  948    948 ;V3.00		cmp	b,RET_SET
                                 +0  949    949 ;V3.00		j	eq,key_scan_h1
                                 +0 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -