cmp al,73h;s 键断电待修
je uprepair
cmp al,70h;p 键急停键
je urgent
cmp al,31h;在 1-8 之间?如不是继续上行
jl gotoup
cmp al,38h
jg gotoup
mov ch,al
call disp8led;显示 cl 对应楼层 led
call delay2;两秒计时时间到
call disp;显示当前楼层
call blequcl;判断 bl 与 cl 是否相等
cmp ch,cl;比较 ch 与 cl 的区别
je stopupbl;相等着在该层停,等待运行信号输入
jl upbldownch;ch 小于 cl 则先上行至 bl 在下行至 ch
cmp ch,bl;ch 大于 cl 则在判断 ch 与 bl 的大小关系
je jmpupbl;相等则一直上行至 bl
jl upchupbl;ch 大于 cl 小于 bl 则先上行到 ch 在上行到 bl
jg toupblupch;ch 大于 bl 则先上行到 bl 在上行到 ch
gotoup:call delay2
jmp goup
uprepair:mov al,0;验收时未用
mov ah,1
int 21h
cmp al,73h
jne uprepair
call delay2
call disp
jmp goup
urgent: call delay2;急停功能