Mercurial > public > hwos_code
comparison src/compass_ops.asm @ 386:3c55627d5f8f
some cleanups, jump to 1.90 stable
author | heinrichsweikamp |
---|---|
date | Wed, 07 Oct 2015 14:46:39 +0200 |
parents | 6f3530eb48f9 |
children | eccae727702f |
comparison
equal
deleted
inserted
replaced
385:b075fa71b659 | 386:3c55627d5f8f |
---|---|
920 clrf xHI | 920 clrf xHI |
921 ; lo stores the last item's display position | 921 ; lo stores the last item's display position |
922 clrf lo | 922 clrf lo |
923 clrf xLO | 923 clrf xLO |
924 | 924 |
925 movlw d'14' | |
926 movwf up ; cardinal width in px | |
927 movlw low( d'219' ) ; position of the label | 925 movlw low( d'219' ) ; position of the label |
928 movwf sub_a+0 | 926 movwf sub_a+0 |
929 movlw high( d'219' ) | 927 movlw high( d'219' ) |
930 movwf sub_a+1 | |
931 rcall TFT_dive_compass_label_proc ; check if the label should be on screen | 928 rcall TFT_dive_compass_label_proc ; check if the label should be on screen |
932 btfss print_compass_label ; Yes? | 929 btfss print_compass_label ; Yes? |
933 bra dcr_1 | 930 bra dcr_1 |
934 STRCPY_TEXT_PRINT tSW ; yes - print it | 931 STRCPY_TEXT_PRINT tSW ; yes - print it |
935 dcr_1: | 932 dcr_1: |
936 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker | 933 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker |
937 | 934 |
938 movlw d'14' | |
939 movwf up ; cardinal width in px | |
940 movlw low( d'267' ) ; position of the label | 935 movlw low( d'267' ) ; position of the label |
941 movwf sub_a+0 | 936 movwf sub_a+0 |
942 movlw high( d'267' ) | 937 movlw high( d'267' ) |
943 movwf sub_a+1 | |
944 rcall TFT_dive_compass_label_proc ; check if the label should be on screen | 938 rcall TFT_dive_compass_label_proc ; check if the label should be on screen |
945 btfss print_compass_label ; Yes? | 939 btfss print_compass_label ; Yes? |
946 bra dcr_2 | 940 bra dcr_2 |
947 STRCPY_TEXT_PRINT tW ; yes - print it | 941 STRCPY_TEXT_PRINT tW ; yes - print it |
948 dcr_2: | 942 dcr_2: |
949 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker | 943 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker |
950 | 944 |
951 movlw d'14' | |
952 movwf up ; cardinal width in px | |
953 movlw low( d'309' ) ; position of the label | 945 movlw low( d'309' ) ; position of the label |
954 movwf sub_a+0 | 946 movwf sub_a+0 |
955 movlw high( d'309' ) | 947 movlw high( d'309' ) |
956 movwf sub_a+1 | |
957 rcall TFT_dive_compass_label_proc ; check if the label should be on screen | 948 rcall TFT_dive_compass_label_proc ; check if the label should be on screen |
958 btfss print_compass_label ; Yes? | 949 btfss print_compass_label ; Yes? |
959 bra dcr_3 | 950 bra dcr_3 |
960 STRCPY_TEXT_PRINT tNW ; yes - print it | 951 STRCPY_TEXT_PRINT tNW ; yes - print it |
961 dcr_3: | 952 dcr_3: |
962 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker | 953 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker |
963 | 954 |
964 movlw d'14' | |
965 movwf up ; cardinal width in px | |
966 movlw low( d'358' ) ; position of the label | 955 movlw low( d'358' ) ; position of the label |
967 movwf sub_a+0 | 956 movwf sub_a+0 |
968 movlw high( d'358' ) | 957 movlw high( d'358' ) |
969 movwf sub_a+1 | |
970 rcall TFT_dive_compass_label_proc ; check if the label should be on screen | 958 rcall TFT_dive_compass_label_proc ; check if the label should be on screen |
971 btfss print_compass_label ; Yes? | 959 btfss print_compass_label ; Yes? |
972 bra dcr_4 | 960 bra dcr_4 |
973 STRCPY_TEXT_PRINT tN ; yes - print it | 961 STRCPY_TEXT_PRINT tN ; yes - print it |
974 dcr_4: | 962 dcr_4: |
975 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker | 963 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker |
976 | 964 |
977 movlw d'14' | |
978 movwf up ; cardinal width in px | |
979 movlw low( d'399' ) ; position of the label | 965 movlw low( d'399' ) ; position of the label |
980 movwf sub_a+0 | 966 movwf sub_a+0 |
981 movlw high( d'399' ) | 967 movlw high( d'399' ) |
982 movwf sub_a+1 | |
983 rcall TFT_dive_compass_label_proc ; check if the label should be on screen | 968 rcall TFT_dive_compass_label_proc ; check if the label should be on screen |
984 btfss print_compass_label ; Yes? | 969 btfss print_compass_label ; Yes? |
985 bra dcr_5 | 970 bra dcr_5 |
986 STRCPY_TEXT_PRINT tNE ; yes - print it | 971 STRCPY_TEXT_PRINT tNE ; yes - print it |
987 dcr_5: | 972 dcr_5: |
988 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker | 973 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker |
989 | 974 |
990 movlw d'14' | |
991 movwf up ; cardinal width in px | |
992 movlw low( d'448' ) ; position of the label | 975 movlw low( d'448' ) ; position of the label |
993 movwf sub_a+0 | 976 movwf sub_a+0 |
994 movlw high( d'448' ) | 977 movlw high( d'448' ) |
995 movwf sub_a+1 | |
996 rcall TFT_dive_compass_label_proc ; check if the label should be on screen | 978 rcall TFT_dive_compass_label_proc ; check if the label should be on screen |
997 btfss print_compass_label ; Yes? | 979 btfss print_compass_label ; Yes? |
998 bra dcr_6 | 980 bra dcr_6 |
999 STRCPY_TEXT_PRINT tE ; yes - print it | 981 STRCPY_TEXT_PRINT tE ; yes - print it |
1000 dcr_6: | 982 dcr_6: |
1001 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker | 983 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker |
1002 | 984 |
1003 movlw d'14' | |
1004 movwf up ; cardinal width in px | |
1005 movlw low( d'489' ) ; position of the label | 985 movlw low( d'489' ) ; position of the label |
1006 movwf sub_a+0 | 986 movwf sub_a+0 |
1007 movlw high( d'489' ) | 987 movlw high( d'489' ) |
1008 movwf sub_a+1 | |
1009 rcall TFT_dive_compass_label_proc ; check if the label should be on screen | 988 rcall TFT_dive_compass_label_proc ; check if the label should be on screen |
1010 btfss print_compass_label ; Yes? | 989 btfss print_compass_label ; Yes? |
1011 bra dcr_7 | 990 bra dcr_7 |
1012 STRCPY_TEXT_PRINT tSE ; yes - print it | 991 STRCPY_TEXT_PRINT tSE ; yes - print it |
1013 dcr_7: | 992 dcr_7: |
1014 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker | 993 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker |
1015 | 994 |
1016 movlw d'14' | |
1017 movwf up ; cardinal width in px | |
1018 movlw low( d'538' ) ; position of the label | 995 movlw low( d'538' ) ; position of the label |
1019 movwf sub_a+0 | 996 movwf sub_a+0 |
1020 movlw high( d'538' ) | 997 movlw high( d'538' ) |
1021 movwf sub_a+1 | |
1022 rcall TFT_dive_compass_label_proc ; check if the label should be on screen | 998 rcall TFT_dive_compass_label_proc ; check if the label should be on screen |
1023 btfss print_compass_label ; Yes? | 999 btfss print_compass_label ; Yes? |
1024 bra dcr_8 | 1000 bra dcr_8 |
1025 STRCPY_TEXT_PRINT tS ; yes - print it | 1001 STRCPY_TEXT_PRINT tS ; yes - print it |
1026 dcr_8: | 1002 dcr_8: |
1027 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker | 1003 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker |
1028 | 1004 |
1029 movlw d'14' | |
1030 movwf up ; cardinal width in px | |
1031 movlw low( d'579' ) ; position of the label | 1005 movlw low( d'579' ) ; position of the label |
1032 movwf sub_a+0 | 1006 movwf sub_a+0 |
1033 movlw high( d'579' ) | 1007 movlw high( d'579' ) |
1034 movwf sub_a+1 | |
1035 rcall TFT_dive_compass_label_proc ; check if the label should be on screen | 1008 rcall TFT_dive_compass_label_proc ; check if the label should be on screen |
1036 btfss print_compass_label ; Yes? | 1009 btfss print_compass_label ; Yes? |
1037 bra dcr_9 | 1010 bra dcr_9 |
1038 STRCPY_TEXT_PRINT tSW ; yes - print it | 1011 STRCPY_TEXT_PRINT tSW ; yes - print it |
1039 dcr_9: | 1012 dcr_9: |
1040 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker | 1013 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker |
1041 | 1014 |
1042 movlw d'14' | |
1043 movwf up ; cardinal width in px | |
1044 movlw low( d'627' ) ; position of the label | 1015 movlw low( d'627' ) ; position of the label |
1045 movwf sub_a+0 | 1016 movwf sub_a+0 |
1046 movlw high( d'627' ) | 1017 movlw high( d'627' ) |
1047 movwf sub_a+1 | |
1048 rcall TFT_dive_compass_label_proc ; check if the label should be on screen | 1018 rcall TFT_dive_compass_label_proc ; check if the label should be on screen |
1049 btfss print_compass_label ; Yes? | 1019 btfss print_compass_label ; Yes? |
1050 bra dcr_10 | 1020 bra dcr_10 |
1051 STRCPY_TEXT_PRINT tW ; yes - print it | 1021 STRCPY_TEXT_PRINT tW ; yes - print it |
1052 dcr_10: | 1022 dcr_10: |
1053 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker | 1023 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker |
1054 | 1024 |
1055 movlw d'14' | |
1056 movwf up ; cardinal width in px | |
1057 movlw low( d'669' ) ; position of the label | 1025 movlw low( d'669' ) ; position of the label |
1058 movwf sub_a+0 | 1026 movwf sub_a+0 |
1059 movlw high( d'669' ) | 1027 movlw high( d'669' ) |
1060 movwf sub_a+1 | |
1061 rcall TFT_dive_compass_label_proc ; check if the label should be on screen | 1028 rcall TFT_dive_compass_label_proc ; check if the label should be on screen |
1062 btfss print_compass_label ; Yes? | 1029 btfss print_compass_label ; Yes? |
1063 bra dcr_11 | 1030 bra dcr_11 |
1064 STRCPY_TEXT_PRINT tNW ; yes - print it | 1031 STRCPY_TEXT_PRINT tNW ; yes - print it |
1065 dcr_11: | 1032 dcr_11: |
1066 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker | 1033 rcall TFT_dive_compass_c_mk ; check if label is on the center line or the marker |
1067 | 1034 |
1068 movlw d'14' | |
1069 movwf up ; cardinal width in px | |
1070 movlw low( d'718' ) ; position of the label | 1035 movlw low( d'718' ) ; position of the label |
1071 movwf sub_a+0 | 1036 movwf sub_a+0 |
1072 movlw high( d'718' ) | 1037 movlw high( d'718' ) |
1073 movwf sub_a+1 | |
1074 rcall TFT_dive_compass_label_proc ; check if the label should be on screen | 1038 rcall TFT_dive_compass_label_proc ; check if the label should be on screen |
1075 btfss print_compass_label ; Yes? | 1039 btfss print_compass_label ; Yes? |
1076 bra dcr_12 | 1040 bra dcr_12 |
1077 STRCPY_TEXT_PRINT tN ; yes - print it | 1041 STRCPY_TEXT_PRINT tN ; yes - print it |
1078 dcr_12: | 1042 dcr_12: |
1147 WIN_SMALL dm_custom_compass_rdir_column, dm_custom_compass_head_row | 1111 WIN_SMALL dm_custom_compass_rdir_column, dm_custom_compass_head_row |
1148 STRCPY_PRINT " " | 1112 STRCPY_PRINT " " |
1149 return | 1113 return |
1150 | 1114 |
1151 TFT_dive_compass_label_proc: | 1115 TFT_dive_compass_label_proc: |
1116 movwf sub_a+1 | |
1117 movlw d'14' | |
1118 movwf up ; cardinal width in px | |
1152 ; Input: | 1119 ; Input: |
1153 ; xHI: DD - display'a current position | 1120 ; xHI: DD - display'a current position |
1154 ; xRD: RD - ruler display offset | 1121 ; xRD: RD - ruler display offset |
1155 ; sub_a: RP - item's ruler display offset | 1122 ; sub_a: RP - item's ruler display offset |
1156 ; get the RD abck to sub_b | 1123 ; get the RD abck to sub_b |