📄 display.med
字号:
=1 627 ;V3.00S_PRN equ 0x62 ;'<> '
=1 628 ;V3.00S_EUR equ 0x22 ;' '
=1 629 ;V3.00S_EUEQ equ 0xc2 ;'= '
=1 630 ;V3.00S_COST equ 0x2b ;' C'
=1 631 ;V3.00S_SELL equ 0x26 ;' <>'
=1 632 ;V3.00S_M equ 0x2a ;' M'
=1 633 ;V3.00S_MARG equ 0xa1 ;'M%'
=1 634 ;V3.00S_PERMARG equ 0x1a ;'%M'
=1 635 ;V3.00S_TAXA equ 0x27 ;' *'
=1 636 ;V3.00S_ICG equ 0x29 ;' G'
=1 637 ;V3.00S_ICGV equ 0x29 ;' G'
=1 638 ;V3.00S_ICM equ 0x2a ;' M'
=1 639 ;V3.00S_ASM equ 0x7a ;'*M'
=1 640 ;V3.00S_ASC equ 0x7b ;'*C'
=1 641 ;V3.00S_ASDL equ 0x78 ;'*'+delta
=1 642 ;V3.00S_MIPL equ 0x03 ;'-+'
=1 643 ;V3.00S_MIMI equ 0x00 ;'--'
=1 644 ;V3.00S_MIST equ 0x06 ;'-S'
=1 645 ;V3.00S_MITL equ 0x07 ;'-T'
=1 646 ;V3.00S_EUROS equ 0x29 ;' euro'
=1 647 ;V3.00S_G equ 0x9f ;'G '
=1 648 ;V3.00S_GPL equ 0x93 ;'G+'
=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 edit_disp,disp_to_dbr,init_vft;V2.00,init_lcd,lcd_display_exp,lcd_display_symbol,lcd_display_symbol,lcd_display_exp
694 public vft_disable,vft_enable
695 extern spc_disp
696
697 ROM section code
698
703 ;--------------------------------
708 ;------------------------------
713 ;---------------------
718 ;------------------------
723 ;--------------------------
732 ;==============================================================================
733 ; Name: init_lcd
734 ; Function: set lcd control resister and initialize DBR
735 ; Input: non
736 ;==============================================================================
737
738 ;==============================================================================
739 ; Name: disp_to_dbr
740 ; Function: DISP data convert and store to LCD DBR(Data Buffer Register)
741 ; Input: DISP +0~+13 (set character code, DP and commma flag)
742 ; used register: wa, bc, de, hl, ix, iy
743 ;==============================================================================
744 ; Name: init_vft
745 ; Function: set VFT control resister and initialize DBR
746 ; Input: non
747 ;==============================================================================
748 ;
749 ;set 256us refresh interval(under 8MHz clock).....
750 init_vft:
751 ld (VFTCR1),0y11000000 ;BLK-blanking, SDT1-10, VSEL-(V31~V0) <--8MHz
752 ld (VFTCR2),0y00101110 ;DIM-14/16, STA-(T14~T0)
753 ld (VFTCR3),0y01110000 ;OWSEL-(Grid P60~P76 Seg P80~PD4), HVTR1-0, HVTR0-0, SDT2-0
754
755 ld (P6DR),0y00000000
756 ld (P7DR),0y00000000
757 ld (P8DR),0y00000000
758
759 ld ix,tbl_vft_ini ;set grid pattern to DBR(F80h to F9Eh)
760 ld iy,DBR_TOP ;0f80
761 init_vft_00:
762 ld a,(ix)
763 ld (iy),a
764 inc ix
765 inc iy
766 cmp ix,tbl_vft_ini_end
767 j lt,init_vft_00
768
769 ld a,0 ;clear other DBR area
770 init_vft_02:
771 ld (iy),a
772 cmp iy,DBR_BOT
773 j ge,init_vft_09
774 inc iy
775 j init_vft_02
776 init_vft_09:
777 call spc_disp
778 vft_enable:
779 ld (VFTCR1),0y01000000 ;BLK-enable 8M
780 ret
781
782 vft_disable:
783 ld (VFTCR1),0y11000000 ;BLK-blanking, SDT1-10, VSEL-(V31~V0) 8M
784 ret
785
786 ;V2.10-------------------------------------
787 ;V4.13dbr_clear:
788 ;V4.13 ld hl,0x0fa0 ;V2.12
789 ;V4.13 ld c,0 ;V2.12
790 ;V4.13dbr_clear0: ;V2.12
791 ;V4.13 ld (hl+c),0 ;V2.12
792 ;V4.13 inc c ;V2.12
793 ;V4.13 cmp c,0x02f ;V2.12
794 ;V4.13 j le,dbr_clear0 ;V2.12
795 ;V4.13 ret ;V2.12
796
797 ;==============================================================================
798 ; Name: disp_to_dbr
799 ; Function: DISP data convert and store to DBR
800 ; Input: DISP +0~+13 (set character code, DP and commma flag)
801 ;==============================================================================
802
803 disp_to_dbr:
804
805 ld ix,DISP_LSD
806 ld iy,DBR_SEG
807 ld hl,tbl_vft_seg
808 ;set segment data and DP to DBR(FA0h~FAFh)
809 disp_to_dbr0:
810 ld c,(ix) ;DISP data load
811 and c,0y00111111
812 ld a,(hl+c) ;convert to segment data
813 ;V4.13 @F_BLINK_OFF (disp_to_dbr1) ;V2.12
814 ;V4.13 and a,0y00000000 ;V2.12
815 disp_to_dbr1: ;V2.12
816 ld c,(ix) ;DISP data load
817 ;V3.00 @RTC_SET_ON (disp_to_dbr2) ;V2.07
818 ;V4.13 @F_ICDSP_ON (disp_to_dbr2) ;V2.07
819 ;V3.01 @F_BLINK_ON (disp_to_dbr2) ;V2.12
820 and c,0y01000000 ;DP bit(bit6) check
821 j z,disp_to_dbr2 ;no DP yes->
822 or a,0y10000000 ;set DP segment
823 disp_to_dbr2:
824 ld (iy),a ;store to DBR
825 ;set commma to DBR(FB0h~FBFh)
826 ld a,0y00000000
827 ;V3.00 @RTC_SET_ON (disp_to_dbr4) ;V2.07
828 ;V4.13 @F_BLINK_ON (disp_to_dbr4) ;V2.12
829 ;V4.13 @F_DPIN_ON (disp_to_dbr3) ;V2.13
830 ;V4.13 @F_TNKEY_OFF (disp_to_dbr3) ;V2.13
831 ; @SW_ADM_ON (disp_to_dbr4) ;V2.13
832 disp_to_dbr3: ;V2.13
833 ld c,(ix) ;DISP data load
834 and c,0y10000000 ;Comma bit(bit7) check
835 j z,disp_to_dbr4 ;no Comma yes->
836 ;V3.00 ld a,0y10000000 ;Comma set to DBR
837 set (iy-0x10).7
838 jp disp_to_dbr4_1
839 disp_to_dbr4:
840 clr (iy-0x10).7
841 disp_to_dbr4_1:
842 ;V3.00 ld (iy-0x10),a ;store to DBR(current DBR address + 10h)
843 dec ix ;DISP address move to MSD <-
844 inc iy ;+1 DBR address
846 +1 test (MDFLG_3).3
847 +1 j f,disp_to_dbr4_2
848 cmp ix,DISP_MSD+2 ;V4.03
849 jp disp_to_dbr4_3 ;V4.05
850 ;V4.05 @IS_D14_ON(disp_to_dbr4_2) ;V4.03
851 ;V4.05 cmp ix,DISP_MSD+2
852 disp_to_dbr4_2: ;V4.03
853 cmp ix,DISP_MSD ;V4.05
854 disp_to_dbr4_3: ;V4.05
855 j ge,disp_to_dbr0
856 disp_symbol: ;V2.10
857 ;set 'E','-','M' sign to symbol digit...........
858 ld c,0y00000000
860 +1 ld wa,ICON_E
861 +1 test (ICON_E>>4).a ;bit -reverse-> jump status
862 +1 j t,disp_to_dbr5 ;if jump status is 1 -> branch
863 set c.2 ;set 'E'
864 disp_to_dbr5:
865 ;V3.00 @BBS (RTC_ON,disp_to_dbr9) ;RTC display? yes ->
866 ;V3.00 @BBS (RTC_SET,disp_to_dbr9)
868 +1 ld wa,ICON_MIN
869 +1 test (ICON_MIN>>4).a ;bit -reverse-> jump status
870 +1 j t,disp_to_dbr6 ;if jump status is 1 -> branch
871 set c.1 ;set '-'
872 disp_to_dbr6:
874 +1 ld wa,ICON_M
875 +1 test (ICON_M>>4).a ;bit -reverse-> jump status
876 +1 j t,disp_to_dbr7 ;if jump status is 1 -> branch
877 set c.0 ;set 'M'
878 disp_to_dbr7:
879 ;V3.00 ld (iy),c ;store to DBR(G15)
880 ;V3.00 ld c,0 ;V2.06
881 ;V3.00 @BBC (ICON_GT,disp_to_dbr8) ;V2.06
882 ;V3.00 ld c,0y00000001 ;V2.06 set "GT"
883 ;V3.00disp_to_dbr8:
884 ld (iy),c ;V2.06
885 ret
886 disp_to_dbr9: ;V2.06
887 ld (iy),c ;V2.06
888 ld c,0 ;V2.06
889 ld (iy+0x10),c ;V2.06
890 ret ;V2.06
891
892
893 tbl_vft_seg:
894 ; PPPPPPPP
895 ; 88888888
896 ; 76543210
897 ; .decgfba
898 db 0y01110111 ;00h '0'
899 db 0y00010010 ;01h '1'
900 db 0y01101011 ;02h '2'
901 db 0y01011011 ;03h '3'
902 db 0y00011110 ;04h '4'
903 db 0y01011101 ;05h '5'
904 db 0y01111101 ;06h '6'
905 db 0y00010111 ;07h '7'
906 db 0y01111111 ;08h '8'
907 db 0y01011111 ;09h '9'
908 db 0y00111111 ;0ah 'A'
909 db 0y01111100 ;0bh 'b'
910 db 0y01100101 ;0ch 'c'
911 db 0y01111010 ;0dh 'd'
912 db 0y01101101 ;0eh 'E'
913 db 0y00101101 ;0fh 'F'
914 db 0y00101111 ;10h 'P'
915 db 0y00111110 ;11h 'H '
916 db 0y00001000 ;12h '-'
917 db 0y01100100 ;13h 'L'
918 db 0y00110111 ;14h 'M'
919 db 0y00111000 ;15h 'n'
920 db 0y01001000 ;16h '='
921 db 0y00101000 ;17h 'r'
922 db 0y01110110 ;18h 'U'
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -