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

📄 prn_edit.med

📁 calculator code ,use toshibaor nec LSI
💻 MED
📖 第 1 页 / 共 5 页
字号:
 =1   649       ;V3.00S_GAST		equ	0x97		;'G*'
 =1   650       ;==============================================================================
 =1   651       P_SPC	equ	0x20	;for print " "
 =1   652       ;-----------------------------------------------------------
 =1   653       ;interrupt enable flag set:
 =1   654       
 =1   655       EF4		equ	4;(EIRL).4 /INT0
 =1   656       EF5		equ	5;(EIRL).5 INTTC1
 =1   657       EF6		equ	6;(EIRL).6 INT1
 =1   658       EF7		equ	7;(EIRL).7 INTTBT
 =1   659       EF8		equ	0;(EIRH).0 INTTC3
 =1   660       EF9		equ	1;(EIRH).1 INTSIO(High speed SIO interrupt)
 =1   661       EF10		equ	2;(EIRH).2 INTTC4
 =1   662       EF11		equ	3;(EIRH).3 INT3
 =1   663       EF12		equ	4;(EIRH).4 INT4
 =1   664       EF13		equ	5;(EIRH).5 INTTC2
 =1   665       EF14		equ	6;(EIRH).6 /INT5
 =1   666       EF15		equ	7;(EIRH).7 INTADC or INT2
 =1   667       ;interrupt request flag set:
 =1   668       IL2		equ	2;(ILL).2 INTSWI 
 =1   669       IL3		equ	3;(ILL).3 INTATRAP
 =1   670       IL4		equ	4;(ILL).4 /INT0
 =1   671       IL5		equ	5;(ILL).5 INTTC1
 =1   672       IL6		equ	6;(ILL).6 INT1
 =1   673       IL7		equ	7;(ILL).7 INTTB
 =1   674       IL8		equ	0;(ILH).0 INTTC3
 =1   675       IL9		equ	1;(ILH).1 INTSIO
 =1   676       IL10		equ	2;(ILH).2 INTTC4
 =1   677       IL11		equ	3;(ILH).3 INT3
 =1   678       IL12		equ	4;(ILH).4 INT4
 =1   679       IL13		equ	5;(ILH).5 INTTC2
 =1   680       IL14		equ	6;(ILH).6 /INT5
 =1   681       IL15		equ	7;(ILH).7 INTADC or /INT2
 =1   682       ;	DBR_LCD_RATE		equ	(0x0f33<<4)+5	;LCD DBR matrix point for "RATE"
 =1   683       ;	DBR_LCD1235_RATE	equ	(0x0f33<<4)+3	;LCD DBR matrix point for "RATE"
 =1   684       ;	DBR_LCD1297_RATE	equ	(0x0f33<<4)+4	;LCD DBR matrix point for "RATE"
 =1   685       ;	DBR_LCD120_RATE		equ	(0x0f33<<4)+4	;LCD DBR matrix point for "RATE"
 =1   686       ;	DBR_LCD1297_GT		equ	(0x0f32<<4)+2	;LCD DBR matrix point for "GT"
 =1   687       ;	;LCD_PRN		equ	(0x0f31<<4)+3	;LCD DBR matrix point for "PRINT"
 =1   688       ;	;LCD_FIN		equ	(0x0f30<<4)+3	;LCD DEB matrix point for "FIN"
 =1   689       
 =1   690       AUTOOFFTIME	equ	31250;1500
      691       	$list
      692       
      693       	public	wk_print,feed_1,kfeed_1,err_print,line_print,wkup_print,ic_print,sym_print_br,print_shpd,print_bk
      694       	public	set_symbol,edit_prn,wk_print91,ic_print00,ic_to_avr,wk_print9,wk_print_alws
      695       	public	test_prn,stg_print,stop_print
      696       	public	message_edit	;v4.04
      697       	extern	spc_prnbuf
      698       	extern	w1_clear,ten_clear,function_end,w2_clear,w4_clear,w1_to_ten
      699       	extern	ten_to_w1,prn_to_dt,dt_to_prn,stg_sfl49,spc_disp
      700       	extern	key_feed,print,hex_to_dec;,cmpl_bc
      701       	extern	RP_CT_P,F_REDBAK,RP_RPTR
      702       
      703       ROM	section	code 
      704       
      705       
      706       ;==============================================================================
      707       ;		Test print (print all character)
      708       ;==============================================================================
      709       test_prn:
      710       ;V4.03		ld	b,0x20
      711       ;V4.03test_prnx:
      712       ;V4.03		call	spc_prnbuf
      713       ;V4.03		ld	hl,PRN_BUF
      714       ;V4.03		ld	c,0
      715       ;V4.03test_prn0:	
      716       ;V4.03		ld	(hl+c),b
      717       ;V4.03		inc	b
      718       ;V4.03		cmp	b,0
      719       ;V4.03		j	eq,test_prn9
      720       ;V4.03		inc	c
      721       ;V4.03		cmp	c,16
      722       ;V4.03		j	lt,test_prn0
      723       ;V4.03		push	b
      724       ;V4.03		call	wk_print91
      725       ;V4.03		pop	b
      726       ;V4.03		j	test_prnx
      727       ;V4.03test_prn9:
      728       ;V4.03		call	wk_print91
      729       		ret
      730       
      731       ;==============================================================================
      732       ;		Item counter print
      733       ;==============================================================================
      734       ;
      735       ; input: hl<- item counter address
      736       ;
      737       ic_print:
      739 +1    	ld	wa,SW_IC
      740 +1    	test	(SW_IC>>4).a		;bit -reverse-> jump status
      741 +1    	j	t,ic_print99		;if jump status is 1 -> branch
      742       ;GT logic..........................................................
      743       ic_print00:
      744       		ld	ix,PRN_BUF_MSD_LTP
      746 +1    	test	(FLG_MODE).0
      747 +1    	j	f,ic_print01
      748       		ld	ix,PRN_BUF	;V4.03
      749       ic_print01:				;V4.03
      750       		push	hl
      751       		call	spc_prnbuf
      752       		call	set_symbol
      753       ;V3.01		cmp	(IC_SYM),P_SPC
      754       ;V3.01		j	eq,ic_print09
      755       ;V3.01		cmp	(IC_SYM),S_ICM
      756       ;V3.01		j	ne,ic_print01
      757       ;V3.01		ld	(ix+22),ps_m
      758       ;V3.01		j	ic_print09
      759       ;V3.01ic_print01:		
      760       ;V3.01		cmp	(IC_SYM),S_ICG
      761       ;V3.01		j	ne,ic_print02
      762       ;V3.01		ld	(ix+22),ps_g
      763       ;V3.01ic_print02:
      764       
      765       ;GT logic..........................................................
      766       ;V3.00		@BBC	(M_694,ic_print09)
      767       ;		cmp	(IC_SYM),S_ICA
      768       ;V3.00		cmp	(IC_SYM),S_ICI
      769       ;V3.00		j	ne,ic_print05
      770       ;V3.00		ld	(ix+22),ps_i
      771       ;V3.00		j	ic_print09
      772       ;V3.00ic_print05:
      773       ;V3.00		cmp	(IC_SYM),S_ICII
      774       ;V3.00		j	ne,ic_print09
      775       ;V3.00		ld	(ix+22),CA_II		;"II"
      776       ;GT logic..........................................................
      777       ic_print09:
      778       		pop	hl
      779       		ld	b,(hl)			;4th 3rd digit of item counter
      780       		ld	c,(hl+1)		;2nd,1st digit of item counter
      781       		ld	a,b
      782       		and	a,0xf0
      783       		cmp	a,0x90			;9xxx?
      784       		j	ne,ic_print20		;no -> positive value
      785       ;V3.00		call	cmpl_bc			;complement bc register if 4th digit is 9
      786       		ld	(ix),ps_min		;top of PRN_BUF <- minus sign
      787       ic_print20:
      788       		ld	a,c			;2nd,1st digit
      789       		and	a,0x0f
      790       ;V4.03		or	a,0x30
      791       		ld	(ix+2),a
      792       		ld	a,c			;2nd,1st digit
      793       		swap	a
      794       		and	a,0x0f
      795       ;V4.03		or	a,0x30
      796       		ld	(ix+1),a
      797       		ld	a,b			;3rd digit
      798       		and	a,0x0f
      799       ;V4.03		or	a,0x30
      800       		ld	(ix),a
      801       		j	wk_print9		;print with check P_NP flag
      802       ic_print99:
      803       		ret
      804       
      805       
      806       		
      807       		
      808       ic_to_avr:
      809       ;V4.11	ld	a,(hl+1)
      810       ;V4.11	ld	(AVR_ITEM+1),a
      811       ;V4.11	ld	a,(hl)
      812       ;V4.11	ld	(AVR_ITEM),a
      813       ;V4.11	ret
      814       	
      815       ten_to_avr:
      816       ;V4.11	ld	a,(TEN_LSD)
      817       ;V4.11	ld	(AVR_ITEM+1),a
      818       ;V4.11	ld	a,(TEN_LSD-1)
      819       ;V4.11	ld	(AVR_ITEM),a
      820       	
      821       ;V4.11	ret
      822       	
      823       ic_to_w2:
      824       ;V4.11	ld	a,(TEN_LSD)
      825       ;V4.11	ld	(W2_LSD),a
      826       ;V4.11	ld	(W4+7),a
      827       ;V4.11	ld	a,(TEN_LSD-1)
      828       ;V4.11	ld	(W2_LSD-1),a
      829       ;V4.11	ld	(W4+6),a
      830       ;V4.11	ld	a,(TEN_S)
      831       ;V4.11	j	eq,ic_exit
      832       ;V4.11	xor	(W2_S),0x01
      833       ;V4.11	xor	(W4),0x01
      834       ;V4.11ic_exit:
      835       	ret
      836       	
      837       set_icsym:
      838       
      839       ;V3.01	ld	hl,tbl_symbol
      840       
      841       
      842       
      843       set_icsym02:
      844       ;V3.01	ld	c,(IC_SYM)
      845       ;V3.01	ld	a,(hl+c)
      846       ;V3.01	ld	(PRN_BUF_SYM),a
      847       	ret
      848       	
      849       	
      850       ;==============================================================================
      851       ;		Fixed string print
      852       ;==============================================================================
      853       stop_print:
      854       ;V4.13		ld	hl,mes_stop
      855       ;V4.13		j	stg_print
      856       line_print:
      857       ;V4.13		ld	hl,mes_line
      858       ;V4.13		j	stg_print
      859       err_print:
      860       		call	spc_prnbuf	;V4.04
      861       		ld	hl,mes_error
      862       		ld	c,4		;V4.04
      864 +1    	ld	wa,M_5514T
      865 +1    	test	(M_5514T>>4).a		;bit -reverse-> jump status
      866 +1    	j	t,stg_print		;if jump status is 1 -> branch
      867       		ld	ix,PRN_BUF_MSD		;V4.07
      868       err_5514_prt:					;V4.07
      869       		ld	(ix),ps_dot		;v4.07
      870       		inc	ix			;V4.07
      871       		cmp	ix,PRN_BUF_LSD		;V4.07
      872       		j	le,err_5514_prt		;V4.07
      873       		jp	print_bk		;V4.07
      874       stg_print:
      875       		call	message_edit
      876       		j	print_bk		;print with black color
      877       mes_error:
      878       ;V4.02		db	"             ERROR"
      879       		db	ps_e,ps_r,ps_r,ps_o,ps_r
      880       mes_line:
      881       ;V4.02	db	"- - - - - - - - - "
      882       mes_stop:
      883       ;V4.02		db	"-*-*-*-*-*-*-*-*-*"
      884       
      885       message_edit:
      886       ;V4.04		ld	c,4
      887       		ld	iy,PRN_BUF_LSD_LTP+3
      889 +1    	test	(FLG_MODE).0
      890 +1    	j	f,message_p0
      891       		ld	iy,PRN_BUF_LSD+3
      892       message_p0:		
      893       		ld	a,(hl+c)
      894       		ld	(iy),a
      895       		dec	iy
      896       		dec	c
      897       ;V4.05		cmp	c,0
      898       ;V4.05		j	lt,message_p0	
      899       		j	f,message_p0
      900       		ret
      901       ;==============================================================================
      902       ;		wakeup print 
      903       ;==============================================================================
      904       wkup_print:
      905       		call	spc_prnbuf
      906       		ld	c,3
      907       		ld	hl,mes_wkup
      908       		ld	iy,PRN_BUF_SYM_LTP+2	;V4.04
      910 +1    	test	(FLG_MODE).0
      911 +1    	j	f,wkup_print_1
      912       		ld	iy,PRN_BUF_SYM+1
      913       ;V4.04		ld	(PRN_BUF_LSD-1),ps_0
      914       ;V4.04		ld	(PRN_BUF_LSD),ps_dot
      915       ;V4.04		ld	(PRN_BUF_SYM),ps_c
      916       ;V4.04		ld	(PRN_BUF_SYM+1),ps_str
      917       ;V4.04		j	print_bk		;print with black color
      918       wkup_print_1:						;V4.03
      919       ;V4.04		ld	(PRN_BUF_LSD_LTP-1),ps_0	;V4.03
      920       ;V4.04		ld	(PRN_BUF_LSD_LTP),ps_dot	;V4.03
      921       ;V4.04		ld	(PRN_BUF_SYM_LTP),ps_c		;V4.03
      922       ;V4.04		ld	(PRN_BUF_SYM_LTP+1),ps_str	;V4.03
      923       		call	message_p0			;V4.04
      924       		j	print_bk			;V4.03 print with black color
      925       mes_wkup:
      926       	db	ps_0,ps_dot,ps_c,ps_str
      927       ;==============================================================================
      928       ;		only symbol print

⌨️ 快捷键说明

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