本帖最后由 电子write_cai 于 2011-5-28 08:51 编辑
第一次用汇编,别笑话我啊,请指教
//××××××××××call程序怎么循环不到time里面?××××××××××
call START
time:
movia 200
movar Time_count
loop:
decrsz Time_count,1 //判断Time_count=0,if=0,skip跳到第二行
goto loop
movar Time_count
loop1: decrsz Time_count,1
goto loop1
return
START:
movia 0x0c //给A_pin配置0 0 0 0 1 1 0 0 B
movar PORTA
movia 0xE0 //给B脚配置1 1 1 0 0 0 0 0 B
movar PORTB
call time
movia 0xD0 //给B脚配置1 1 0 1 0 0 0 0 B
movar PORTB
call time
movia 0xB0 //给B脚配置1 0 1 1 0 0 0 0 B
movar PORTB
call time
movia 0x70 //给B脚配置0 1 1 1 0 0 0 0 B
movar PORTB
call time
movia 0x00 //给A脚配置 0 0 0 0 0 0 0 0 B ,端口A清零。
movar PORTA
return |