刚开始学习,编制按钮控制的左、右流水灯遇到问题。
重建所有目标文件时出现:
*** FATAL ERROR L210: I/O ERROR ON INPUT FILE:
EXCEPTION 0021H: PATH OR FILE NOT FOUND
FILE: LEDls.obj
不知何故,望大虾赐教,谢谢了!
选的单片机是AT89C51,程序如下:
ORG 00H
START:
MOV A,#0FFH
CLR C
MOV R1,#8
MOV P1,#00H
MOV P3,A
WAIT_A:
JB P3.0,WAIT_B
JMP LEFT
WAIT_B:
JB P3.1,WAIT_A
JMP RIGHT
LEFT:
RLC A
MOV P1,A
CALL DELAY
DJNZ R1,LEFT
JMP START
RIGHT:
RRC A
MOV P1,A
CALL DELAY
DJNZ R1,RIGHT
JMP START
DELAY:
MOV R3,#20
D1: MOV R4,#20
D2: MOV R5,#248
DJNZ R5.$
DJNZ R4,D2
DJNZ R3,D1
RET
END
|