早教吧 育儿知识 作业答案 考试题库 百科 知识分享

汇编程序中C(1):errorC129:missing';'beforeBit是什么意思,加了分号也不对,怎么回事啊CSBITP1.7CLKBITP1.0DOBITP1.1ADTMPEQU30HADTMP1EQU31HADTMP2EQU32HADTMP3EQ

题目详情
汇编程序中C(1):errorC129:missing';'before Bit是什么意思,加了分号也不对,怎么回事啊
CS BIT P1.7
CLK BIT P1.0
DO BIT P1.1
AD_TMP EQU 30H
AD_TMP_1 EQU 31H
AD_TMP_2 EQU 32H
AD_TMP_3 EQU 33H
AD_TMP1 EQU 34H
ORG 0000H
LJMP MAIN
ORG 0030H
MAIN: CLR P2.0
START: LCALL AD_CONV
LCALL DISPLAY
LJMP START
AD_CONV: SETB CS
CLR CLK
NOP
NOP
CLR CS
NOP
NOP
SETB CLK
NOP
NOP
CLR CLK
NOP
NOP
SETB CLK
NOP
NOP
MOV R0, #08H
AD_READ: CLR CLK
MOV C, DO
RLC A
SETB CLK
NOP
NOP
DJNZ R0, AD_READ
SETB CS
MOV AD_TMP, A
RET
DISPLAY: MOV A, AD_TMP
MOV DPTR, #TAB1
MOVC A, @A+DPTR
CJNE A, #80, S1
SJMP S3
S1: JNC S2
SJMP S4
S2: CLR P3.0
SJMP S4
S3: SETB P3.0
S4: MOV B, #100
DIV AB
MOV AD_TMP_1, A
MOV A, B
MOV B, #10
DIV AB
MOV AD_TMP_2, A
MOV AD_TMP_3, B
MOV DPTR, #TAB
MOV A, AD_TMP_1
MOVC A, @A+DPTR
MOV P0, A
SETB P2.1
LCALL DLY
CLR P2.1
MOV A, AD_TMP_2
MOVC A, @A+DPTR
MOV P0, A
SETB P2.2
LCALL DLY
CLR P2.2
MOV A, AD_TMP_3
MOVC A, @A+DPTR
MOV P0, A
SETB P2.3
LCALL DLY
CLR P2.3
RET
TAB: DB 0C0H, 0F9H, 0A4H,0B0H, 99H, 92H, 82H, 0F8H
DB 80H, 90H, 88H, 83H, 0C6H,0A1H, 86H, 8EH
TAB1:DB 0, 1, 2,3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
DB 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,29 ,30, 31, 32, 33, 34
DB 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,45, 46, 47, 48, 49
DB 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,60, 61, 62, 63, 64, 65, 66
DB 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,77, 78, 79, 80
DB 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,91, 92, 93
DB94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106
DB107, 108, 109, 110, 111, 112, 113, 114, 115, 116
DB117, 118, 119, 120
DLY: MOV R4, #2
D1: MOVR3, #248
DJNZ R3, $
DJNZ R4, D1
RET
END
▼优质解答
答案和解析
这是汇编语言的程序。
存盘时,文件名后缀应该是:.ASM,不要写成:.C。
看了 汇编程序中C(1):erro...的网友还看了以下: