Professional Documents
Culture Documents
bài tập lớn kiến trúc máy tính
bài tập lớn kiến trúc máy tính
; c:\emu8086\devices\stepper_motor.exe is on port 7
; bin data for clock-wise ;du lieu nhi phan quay theo chieu kim dong ho
; bin data for counter-clock-wise ;du lieu nhi phan quay nguoc chieu kim dong ho
; bin data for clock-wise ;du lieu nhi phan quay theo chieu kim dong ho
; bin data for counter-clock-wise ; du lieu nhi phan quay nguoc chieu kim dong ho
; motor sets top bit when it's ready to accept new command
test al, 10000000b ;kiem tra dong co buoc da san sang hay chua
jz wait ;
jb next_step ;
cmp cx, steps_before_direction_change ;so sanh cx voi dong co truoc khi thay
doi
jb next_step ;
jbe next_step ;
jmp next_step
II Giải thích lưu đồ bài toán:
Delay START
CALL DELAY
Yes
INCREAMENT THE POINTER
RET
DFEPETION SEOUENCE
ECREMDECREMENT THE COUNTER
AND
No CHECK
REPETION
COUNTER-
Yes
RETURN TPROORAMO
MAIN