📄 up2dsptest1.lst
字号:
03A3 120000 F 919 call RECEI_BYTE ;
03A6 B432EC 920 CJNE A,#'2', FILE_ERR2
03A9 120000 F 921 call RECEI_BYTE ;
03AC B433E6 922 CJNE A,#'3', FILE_ERR2
923
924
925
952
953
954
03AF 120000 F 955 CALL GET_BCD
03B2 B513E0 956 CJNE A, 13H, FILE_ERR2
03B5 120000 F 957 CALL GET_BCD
A51 MACRO ASSEMBLER UP2DSPTEST1 04/12/2006 14:30:29 PAGE 16
03B8 B512DA 958 CJNE A, 12H, FILE_ERR2
03BB 120000 F 959 CALL GET_BCD
03BE B511D4 960 CJNE A, 11H, FILE_ERR2
03C1 120000 F 961 CALL GET_BCD
03C4 B510CE 962 CJNE A, 10H, FILE_ERR2
963
03C7 746F 964 MOV A, #'o'
03C9 120000 F 965 call TRANS_BYTE
966
03CC 80A1 967 JMP FILE_new_seg
968
969 ;***************
03CE 970 FILE_SEG1:
971
03CE 120000 F call RECEI_BYTE
03D1 B441C1 976 CJNE A,#'A', FILE_ERR2
977
978
03D4 120000 F 983 call RECEI_BYTE
03D7 B40DBB 984 CJNE A,#0DH, FILE_ERR2 ; carriage return = 0d0a
985
986
991 ;KK reenable. Can see it from scope
03DA 120000 F 992 call RECEI_BYTE
03DD B40AB5 993 CJNE A,#0AH, FILE_ERR2
994
995 ;***************get DSP address
03E0 120000 F 996 CALL GET_BCD
03E3 F511 997 MOV 11H, A ; checksum
998
03E5 4A 999 ORL A, R2 ; mem flag set in
1000 ; high byte ready
1001
03E6 F583 1002 MOV DPH, A ; remember high byte of address
1003
1007 ; get low byte of address , send in addr 05
03E8 120000 F 1008 CALL GET_BCD ; getting a BCD valued byte in A
1009
03EB F582 1010 MOV DPL, A ; remember low byte of address
1011
03ED F510 MOV 10H, A ; checksum
03EF 751200 1015 MOV 12H, #0 ; checksum
03F2 751300 1016 MOV 13H, #0 ; checksum
1017
1018
03F5 120000 F 1019 call RECEI_BYTE
1020
03F8 B40D0E 1021 CJNE A,#0DH, FILE_ERR3 ; carriage return = 0d0a
1022 ;KK reaenable
03FB 120000 F 1023 call RECEI_BYTE
A51 MACRO ASSEMBLER UP2DSPTEST1 04/12/2006 14:30:29 PAGE 17
03FE B40A08 1024 CJNE A,#0AH, FILE_ERR3
1025
0401 1026 FILE_seg_data:
1027
1028 ;MOV A, #'H'
1029 ;call TRANS_BYTE
1030
1031
1032 ;********this is the GET_BCD routine except that it now also check for #
1033 ;GET_BCD:
0401 120000 F 1034 CALL RECEI_BYTE ;getting first nibble of BCD value
0404 B42305 1035 CJNE A,#'#', FILE_data
0407 808F 1036 JMP FILE_end_seg
1037
1038
0409 1039 FILE_ERR3:
0409 020000 F 1040 jmp FILE_ERR
1041
1042
040C 1043 FILE_data:
1044 ; CALL TRANS_BYTE
040C 120000 F 1045 CALL ASCII_BCD ; input A return A
1046
040F C4 1047 SWAP A ;high nibble now in place
0410 FB 1048 MOV R3,A ;R3= holding output byte
1049
0411 120000 F 1050 CALL RECEI_BYTE ;getting second nibble of BCD value
1051 ; CALL TRANS_BYTE
0414 120000 F 1052 CALL ASCII_BCD ; input A return A
1053
0417 4B 1054 ORL A, R3 ;put low nibble together with high nibble
1055 ;************end of modified GET_BCD
1056
0418 F50C 1057 MOV 0CH, A ; remember high byte of data
1058
1059
041A E583 1064 MOV A, DPH ;check here !!!!!!!!!
041C B4001E 1065 CJNE A, #0, Kcont ;KK
041F E582 1066 MOV A, DPL
0421 B40019 1067 CJNE A, #0, Kcont ;KK
0424 850C35 1068 MOV byte0high, 0CH
1069
0427 804F jmp skip8051_0;
1074
1075
1076
0429 1077 SEEBUF:
0429 F538 1078 MOV 38H, A
042B C4 1079 SWAP A
042C 120000 F 1080 CALL BCD_ASCII
042F 120000 F 1081 CALL TRANS_BYTE
0432 E538 1082 MOV A, 38H
1083
0434 120000 F 1084 CALL BCD_ASCII
0437 120000 F 1085 CALL TRANS_BYTE
043A E538 1086 MOV A,38H
043C 22 1087 RET
1088
1089
A51 MACRO ASSEMBLER UP2DSPTEST1 04/12/2006 14:30:29 PAGE 18
043D 1090 Kcont:
1091 ; now set uP address
1092 ; retrieve high byte of address, 0AH
1093
1094
1095 ; this section not using movx
1096
1097 ; MOV R0, #04H ; R0= external address
043D 758004 1098 MOV P0, #04H
0440 C2B2 1099 CLR P3.2
1100
0442 858380 1101 MOV P0, DPH
0445 C2B6 1102 CLR P3.6
0447 D2B6 1103 SETB P3.6
0449 D2B2 1104 SETB P3.2
1105
1116
1117 ; retrieve low byte of address, 0BH
1118
1119
1120
044B 758005 1121 MOV P0, #05H
044E C2B2 1122 CLR P3.2
1123
0450 858280 1124 MOV P0, DPL
0453 C2B6 1125 CLR P3.6
0455 D2B6 1126 SETB P3.6
0457 D2B2 1127 SETB P3.2
1128
1139
1140
1141 ; send RW request in addr 02
1142 ; do write (1) first and then read (0)
1143
1144 ; MOV A, #1 ; write
1145
1146
1147
0459 758002 1148 MOV P0, #02H
045C C2B2 1149 CLR P3.2
1150
045E 758001 1151 MOV P0, #1 ; write
0461 C2B6 1152 CLR P3.6
0463 D2B6 1153 SETB P3.6
0465 D2B2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -