DELAY1MSMACROTIME;延时宏命令LOCALAALOCALBBPUSHCXMOVCX,TIMEAA:PUSHCXMOVCX,1000BB:NOPLOOPBBPOPCXLOOPAAPOPCXENDMDATASEGMENTTABADB01H,03H,02H,06H,04H,05H;正转的模型TABBDB05H,04H,06H,02H,03H,01H;反转的模型DATAENDSCODESEGMENTZZPROCNEARPUSHDSMOVAX,DATAMOVDS,AXMOVAX,0PUSHAXMOVDX,203HMOVAL,80HOUTDX,AL;8255的控制字设定MOVDX,200HMOVAL,0OUTDX,AL;先输出制动命令MOVCX,360;设定正转步数DD:MOVBL,6;六拍MOVDX,200HLEADI,TABA;指针指向正转的数字模型CC:MOVAL,[DI]OUTDX,ALDELAY1MS10INCDI;指针加1,指向下一步的数字模型DECBL;拍数减1JNZCC;六拍未结束,则继续循环LOOPDD;360个周期的六拍未结束,继续循环ZZENDPFZPROCNEARMOVCX,400;设定反转步数FF:MOVBL,6MOVDX,200HLEADI,TABB;指针指向反转的数字模型EE:MOVAL,[DI]OUTDX,ALDELAY1MS10DECDI;指针减1,指向反转下一步数字模型DECBLJNZEELOOPFFFZENDPMOVDX,200HMOVAL,0OUTDX,AL;结束后,输出制动命令RETMAINENDPCODEENDSENDSTART