用伟福编的下面这段程序说#include <reg51.h> 重复定义,不加#include <reg51.h> 又说P0未定义,我该怎么
#include<reg51.h>ORG0MOVA,#0MOVP1,#0LOOP:INCP1CALLDELASJMPLOOPDELA:MOVR2,#3MOVR1,#0MO...
#include <reg51.h>
ORG 0
MOV A,#0
MOV P1,#0
LOOP:
INC P1
CALL DELA
SJMP LOOP
DELA:
MOV R2,#3
MOV R1,#0
MOV R2,#0
DLP:
DJNZ R0,DLP
DJNZ R1,DLP
DJNZ R2,DLP
RET
END 展开
ORG 0
MOV A,#0
MOV P1,#0
LOOP:
INC P1
CALL DELA
SJMP LOOP
DELA:
MOV R2,#3
MOV R1,#0
MOV R2,#0
DLP:
DJNZ R0,DLP
DJNZ R1,DLP
DJNZ R2,DLP
RET
END 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询