📄 sub.med
字号:
=1 685 ; DBR_LCD1297_RATE equ (0x0f33<<4)+4 ;LCD DBR matrix point for "RATE"
=1 686 ; DBR_LCD120_RATE equ (0x0f33<<4)+4 ;LCD DBR matrix point for "RATE"
=1 687 ; DBR_LCD1297_GT equ (0x0f32<<4)+2 ;LCD DBR matrix point for "GT"
=1 688 ; ;LCD_PRN equ (0x0f31<<4)+3 ;LCD DBR matrix point for "PRINT"
=1 689 ; ;LCD_FIN equ (0x0f30<<4)+3 ;LCD DEB matrix point for "FIN"
=1 690
=1 691 AUTOOFFTIME equ 31250;1500
692 $list
693
694 public w1_clear,w2_clear,w3_clear,ten_clear,acc_clear,gt_clear,mem1_clear,w1_zerock,ten_zerock
695 public calc_add,calc_mult,calc_div,stg_sfl47,stg_sfr47,stg_sfl49,stg_sfr49
696 public spc_prnbuf,spc_dt,spc_disp,_spaceck
697 public ten_to_w2,ten_to_w2dp,wk_update,ic_update,add_mode,ten_to_w1,ten_to_w1dp
698 public w1_to_ten,w2_to_ten,mem1_to_w2,gt_to_w2,w1_to_w2,acc_to_w2,w2_to_w1,const_to_w1,w1_to_const,w2_to_const,wk_round
699 public exchg_w12,const_to_w2,w2_to_tax,cost_to_w2,w2_to_cost,sell_to_w2,w2_to_sell,marg_to_w2,w2_to_marg,marg_to_w1,sell_to_w1,cost_to_w1
700 public dt_to_prn,prn_to_dt,dp_adjust,_zerock,wk_round_0,wkrnd_zsp0
701 public move_to_w1,move_to_w2,move_9byte,clear_9byte
702 public euro1_to_w2,euro2_to_w2,w2_to_euro1,w2_to_euro2,ten_to_euro1,ten_to_euro2,euro1_to_ten,euro2_to_ten
703 public tax2_to_w1,tax2_to_w2,tax_to_w1,tax_to_w2
704 public w2_to_tax2,w1_to_acc,w2_to_acc,acc_to_ten,wk_round_with_ten_dp
705 public const_clear,wk_round_with_const_dp,wk_round_with_2DP
706 public wk_round_down,wk_round_up
707 public w2_print,w2_round_print,w2_round
708 public w1_print,w1_round_print,w1_round
709 public w1_to_w4,w4_to_w1,w2_to_w4,w4_to_w2,w1_to_ftemp,ftemp_to_w2
710 public move_to_ten
711 extern wk_print
712 ROM section code
713 ;===================================================
714 ; Data clear use resister: hl, c, a
715 ;===================================================
716 ;clear work resister...............
717 const_clear:
718 ld hl,CONST
719 j clear_9byte
720 w1_clear:
721 ld hl,W1
722 j clear_9byte
723 w2_clear:
724 ld hl,W2
725 j clear_9byte
726 w3_clear:
727 ld hl,W3
728 j clear_9byte
729 ten_clear:
730 ld (TEN_CT),0 ;V3.08
731 ld hl,TENKEY
732 j clear_9byte
733 ;clear work resister & item counter...............
734 acc_clear:
735 ;V2.03 @CLB (ACC_STORE) ;V1.26 only used for V1297
736 ld hl,ACC
737 call clear_9byte
738 j ica_clear
739 mem1_clear:
740 ld hl,MEM1
741 call clear_9byte
742 j icm_clear
743 gt_clear:
744 ld hl,MEMGT
745 call clear_9byte
746 j icg_clear
747
748 ;clear item counter.................
749 ica_clear:
750 ld hl,IC_A
751 j clear_2byte
752 icm_clear:
753 ld hl,IC_M
754 j clear_2byte
755 icg_clear:
756 ld hl,IC_G
757 j clear_2byte
758
759 ;space clear.......................
760 spc_dt:
761 ld hl,DT_BUF
762 ld a,0xff
763 j fill_9byte
764 spc_prnbuf:
765 ;V4.03 ld (PRN_BUF_S),P_SPC ;clear prn_buff sign "+" or "-"
766 ld hl,PRN_BUF
767 spc_prnbuf0:
768 ld a,ps_spc
769 ld c,24-1
770 j fill_nb
771
772 spc_disp:
773 ld hl,DISP
774 ld a,D_SPC
775 ld c,14-1 ;fill data from address+13
776 j fill_nb0
777
778 clear_2byte:
779 ld a,0
780 ld c,2-1 ;fill data from address+1
781 j fill_nb0
782 clear_9byte:
783 ld a,0
784 fill_9byte:
785 ld c,9-1 ;fill data from address+8
786 fill_nb:
787 fill_nb0:
788 ld (hl+c),a
789 dec c
790 j f,fill_nb0 ;reg.c is not 0xff? yes->
791 ret
792
793 ;===================================================
794 ; Data transfer use register: ix, iy, c, a
795 ;===================================================
796 ;transfer to W1........................
797 sell_to_w1:
798 ld ix,SELL
799 j move_to_w1
800 cost_to_w1:
801 ld ix,COST
802 j move_to_w1
803 marg_to_w1:
804 ld ix,MARG
805 j move_to_w1
806 tax_to_w1:
807 ld ix,TAXRT
808 j move_to_w1
809 tax2_to_w1:
810 ld ix,TAX2RT
811 j move_to_w1
812 const_to_w1:
813 ld ix,CONST
814 j move_to_w1
815 mem1_to_w1:
816 ld ix,MEM1
817 j move_to_w1
818 gt_to_w1:
819 ld ix,MEMGT
820 j move_to_w1
821 w2_to_w1:
822 ld ix,W2
823 j move_to_w1
824 w3_to_w1:
825 ld ix,W3
826 j move_to_w1
827 ten_to_w1:
828 ld ix,TENKEY
829 j move_to_w1
830
831 ;transfer to W2........................
832 cost_to_w2:
833 ld ix,COST
834 j move_to_w2
835 sell_to_w2:
836 ld ix,SELL
837 j move_to_w2
838 marg_to_w2:
839 ld ix,MARG
840 j move_to_w2
841 tax_to_w2:
842 ld ix,TAXRT
843 j move_to_w2
844 tax2_to_w2:
845 ld ix,TAX2RT
846 j move_to_w2
847 const_to_w2:
848 ld ix,CONST
849 j move_to_w2
850 gt_to_w2:
851 ld ix,MEMGT
852 j move_to_w2
853 mem1_to_w2:
854 ld ix,MEM1
855 j move_to_w2
856 acc_to_w2:
857 ld ix,ACC
858 j move_to_w2
859 w1_to_w2:
860 ld ix,W1
861 j move_to_w2
862 w3_to_w2:
863 ld ix,W3
864 j move_to_w2
865 ten_to_w2:
866 ld ix,TENKEY
867 j move_to_w2
868 euro1_to_w2:
869 push wa
871 +1 ld wa,F_COUNTRY1
872 +1 set (F_COUNTRY1>>4).a
873 pop wa
874 ld ix,EURO_RATE1
875 j move_to_w2
876 euro2_to_w2:
877 push wa
879 +1 ld wa,F_COUNTRY2
880 +1 set (F_COUNTRY2>>4).a
881 pop wa
882 ld ix,EURO_RATE2
883 j move_to_w2
884 ;transfer to W3........................
885 w1_to_w3:
886 ld ix,W1
887 j move_to_w3
888 w2_to_w3:
889 ld ix,W2
890 j move_to_w3
891
892 ;transfer to TENKEY....................
893 w1_to_ten:
894 ld ix,W1
895 j move_to_ten
896 w2_to_ten:
897 ld ix,W2
898 j move_to_ten
899 acc_to_ten:
900 ld ix,ACC
901 j move_to_ten
902 ;transfer to CONST........................
903 w1_to_const:
904 ld ix,W1
905 j move_to_const
906 w2_to_const:
907 ld ix,W2
908 j move_to_const
909 ;-----------------------------------------
910 w2_to_acc: ;V1.26
911 ld ix,W2 ;V1.26
912 j move_to_acc ;V1.26
913 w1_to_acc:
914 ld ix,W1
915 j move_to_acc
916 ;set distination address.........
917 move_to_w1:
918 ld iy,W1
919 j move_9byte
920 move_to_w2:
921 ld iy,W2
922 j move_9byte
923 move_to_w3:
924 ld iy,W3
925 j move_9byte
926 move_to_ten:
927 ld iy,TENKEY
928 j move_9byte
929 move_to_const:
930 ld iy,CONST
931 j move_9byte
932 move_to_acc:
933 ld iy,ACC
934 j move_9byte
935 ;others..........................
936 ten_to_euro1:
937 ld ix,TENKEY
938 ld iy,EURO_RATE1
939 j move_9byte
940 ten_to_euro2:
941 ld ix,TENKEY
942 ld iy,EURO_RATE2
943 j move_9byte
944 euro1_to_ten:
945 push wa
947 +1 ld wa,F_COUNTRY1
948 +1 set (F_COUNTRY1>>4).a
949 pop wa
950 ld ix,EURO_RATE1
951 ld iy,TENKEY
952 j move_9byte
953 euro2_to_ten:
954 push wa
956 +1 ld wa,F_COUNTRY2
957 +1 set (F_COUNTRY2>>4).a
958 pop wa
959 ld ix,EURO_RATE2
960 ld iy,TENKEY
961 j move_9byte
962 w2_to_euro1:
963 ld ix,W2
964 ld iy,EURO_RATE1
965 j move_9byte
966 w2_to_euro2:
967 ld ix,W2
968 ld iy,EURO_RATE2
969 j move_9byte
970 w2_to_tax:
971 ld ix,W2
972 ld iy,TAXRT
973 j move_9byte
974 w2_to_tax2:
975 ld ix,W2
976 ld iy,TAX2RT
977 j move_9byte
978 w2_to_cost:
979 ld ix,W2
980 ld iy,COST
981 j move_9byte
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -