版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、;程序原代碼IRQEQU 0DHIMR1EQU 0DFHIMR2EQU 20HTIMCTLEQU 293HTIMER0EQU 290HTIMER1EQU 291HTIMER2EQU 292HP55CTLEQU 283HPA55EQU 280HPB55EQU 281HPC55EQU 282HDATASEGMENTMES00DB-Stepping Motor Control System !- MES01DBPRESS 1 TO SPEED SET !MES02DBPRESS 2 TO DIRECTION SET !MES03DBPRESS 3 TO TURN REQUIRED STEPS ! M
2、ES04DBPRESS 4 TO START RUNING !MES05DBPRESS 5 TO EXIT !MES06DB0AND0MES11DB*PRESS F1-F8 TO SELECT SPEED !*MES12DBF1 :r/s OR 1p/sMES13DBF2 :r/s OR 3p/sMES14DBF3 :r/s OR 5p/sMES15DBF4 :r/s OR 15p/sMES16DBF5 :r/s OR 25p/sMES17DBF6 :r/s OR 75p/sMES18DBF7 :r/s OR 125 p/sMES19DBF8 :r/s OR 375 p/sMES20DBPRE
3、SS ESC TO CANSEL !MES24DB*SPEED SET*MES21DBPRESS L : CLOCKWISE !MES22DBPRESS R : ANTI-CLOCKWISE !MES23DBPRESS ESC TO CANCEL !MES30DBRUNNING MES31DB PRESS ESC TO PAUSE !MES32DBSPEED = :MES33DBDIRECTION = :MES40DB 0001 p/s , 0003 p/s , 0005 p/s , 0015 p/s , 0025 p/s ,DB0075 p/s , 0125 p/s , 0375 p/sME
4、S41DBCLOCKWISEMES42DB ANTI-CLOCKWISE MES3DB PLEASE INPUT STEPS (<1000) : MES4DBTURNING MES5DB ERROR INPUT ! INPUT AGAIN :FLAG0DB0S5:JMPEXITFLAG1DB0STA: JMPSTARTFLAG2DW0FLAG3DB0SERVE1:CALLWIN2NUMDBBLOP1:MOVAH,00HNUM1DB?INT16HNUM2DB?CMP AX,3B00HCSREGDW?JZSET1IPREGDW?CMP AX,3C00HBUF0DB4JZSET2DB?CMP
5、AX,3D00HBUF1DB4 DUP(?)JZSET3DATAENDSCMP AX,3E00HJZSET4STACSEGMENTPARASTACKCMP AX,3F00HDB128 DUP(?)JZSET05STACENDSCMP AX,4000HJZSET06CODESEGMENTCMP AX,4100HASSUMECS:CODE,DS:DA TAJZSET07INIT: CLICMP AX,4200HMOVAX,DATAJZSET08MOVDS,AXCMP AL,27CALLINIT1JZSTAJMPLOP1START:CALLWIN1SET1:MOVNUM1,1BHMOVAH,01HM
6、OVNUM2,0B7HINT21HMOVFLAG2,0CMP AL, 1JMPSET0JZS1SET2:MOVNUM1,09HCMP AL, 2MOVNUM2,3DHJZS2MOVFLAG2,10CMP AL, 3JMPSET0JZS3SET3:MOVNUM1,9FHCMP AL, 4MOVNUM2,24HJZS4MOVFLAG2,20CMP AL, 5JMPSET0JZS5SET4:MOVNUM1,35HJMPSTARTMOVNUM2,0CHS1:JMPSERVE1MOVFLAG2,30S2:JMPSERVE2JMPSET0S3:JMPSERVE3SET05:JMPSET5S4:JMPSER
7、VE4SET06:JMPSET6SET07:JMPSET7JMPSKIPSET08:JMPSET8SKIP:JMPSTARTSET5:MOVNUM1,53HMOVNUM2,07HSERVE3:CALLWIN4MOVFLAG2,40SER3:LEADX,BUF0JMPSET0MOVAH,10SET6:MOVNUM1,71HINT21HMOVNUM2,02HMOVAL,BUF01MOVFLAG2,50CMP AL,1JMPSET0JZASC1SET7:MOVNUM1,77HCMP AL,2MOVNUM2,01HJZASC2MOVFLAG2,60CMP AL,3JMPSET0JZASC3SET8:M
8、OVNUM1,7DHJMPSTARTMOVNUM2,00HMOVFLAG2,70ASC1:MOVAH,0MOVAL,BUF1SET0:MOVDX,TIMER0CALLTESTKMOVAL,NUM1SUBAL,30HOUT DX,ALMOVCX,AXMOVAL,NUM2JMPAGOUT DX,ALASC2:MOVAH,0JMPSTARTMOVAL,BUF1CALLTESTKSERVE2:CALLWIN3SUBAL,30HLOP2:MOVAH,08HMOVBL,10INT21HMUL BLCMP AL, LMOVCX,AXJZSKIP1MOVAH,0CMP AL, lMOVAL,BUF11JZSK
9、IP1CALLTESTKCMP AL, RSUBAL,30HJZSKIP2ADD CX,AXCMP AL, rJMPAGJZSKIP2ASC3:MOVAH,0CMP AL,27MOVAL,BUF1JZSKIPCALLTESTKJMPLOP2SUBAL,30HSKIP1:MOVFLAG1,0MOVBL,100MOVFLAG3,0MUL BLJMPSKIPMOVCX,AXSKIP2:MOVFLAG1,1MOVAH,0MOVFLAG3,1MOVAL,BUF11CALLTESTKLOOPAG1SUBAL,30HJMPSERVE5MOVBL,10MUL BLSTEMS:MOVAX,DSADD CX,AX
10、MOVES,AXMOVAH,0MOVAH,13HMOVAL,BUF12MOVBX,0DHCALLTESTKMOVCX,13SUBAL,30HMOVAL,1ADD CX,AXMOVDX,0D20HJMPAGLEABP,MES4TESTK:CMP AL,30HINT10HJBERRMOVCX,20CMP AL,39HMOVDX,1105HJAERRLEABP,MES31RETINT10HERR: MOVAX,DSRETMOVES,AXMOVAH,13HSERVE4:STIMOVBX,0DHCALLWIN5MOVCX,27MOVDX,PA55MOVAL,1MOVAL,0FFHMOVDX,0B20HO
11、UT DX,ALLEABP,MES5LOP3:HLTINT10HMOVAH,08HJMPSER3INT21HAG:PUSHCXCMP AL,27CALLSTEMSJZSERVE5MOVBL,FLAG0JMPLOP3POPCXMOVDX,PA55SERVE5:CLIMOVAL,0FFHMOVDX,PA55OUT DX,ALMOVAL,00HAG1: CLIOUT DX,ALMOVAH,06HJMPSTARTMOVDL,0FFHEXIT:CLIINT21HMOVAX,CSREGCMP AL,27MOVDS,AXJZSERVE5MOVDX,IPREGSTIMOVAH,25HHLTMOVAL,IRQC
12、MP BL,FLAG0INT21HJZAG1INAL,21HMOVBL,FLAG0ORAL,IMR2OUT 21H,ALSTIINIT1PROCMOVAL,BMOVAX,0003HMOVDX,P55CTLINT10HOUT DX,ALMOVCX,0MOVAL,00HMOVDX,184FHMOVDX,PA55MOVAL,0OUT DX,ALMOVBH,07HMOVAH,6MOVAH,35HINT10HMOVAL,IRQINT21HMOVAX,4C00HMOVAX,ESINT21HMOVCSREG,AXMOVIPREG,BXINTOUT PROCPUSHDSPUSHDSMOVAX,SEG INTO
13、UTPUSHDXMOVDX,OFFSET INTOUTPUSHCXMOVDS,AXPUSHAXMOVAH,25HMOVAL,IRQMOVAX,DATAINT21HMOVDS,AXPOPDSMOVDX,PC55INAL,21HMOVAL,NUMAND AL,IMR1CMP FLAG1,0OUT 21H,ALJZLR1ROR AL,1MOVDX,TIMCTLJMPLR2MOVAL,00110110BLR1: ROL AL,1OUT DX,ALLR2: OUT DX,ALMOVDX,TIMER0MOVNUM,ALMOVAL,1BHMOVAL,FLAG0OUT DX,ALNOT ALMOVAL,0B7
14、HMOVFLAG0,ALOUT DX,ALMOVAL,20HRETOUT 20H,ALINIT1ENDPPOPAXWIN1PROCPOPCXMOVAX,0003HPOPDXINT10HPOPDSMOVCX,0IRETMOVDX,184FHINTOUT ENDPMOVBH,70HMOVAL,0LEABP,MES04MOVAH,6INT10HINT10HMOVDX,0E19HMOVCX,0402HLEABP,MES05MOVDX,144DHINT10HMOVBH,17HRETMOVAL,0WIN1ENDPMOVAH,6INT10HWIN2PROCMOVCX,0304MOVAX,0003HMOVDX
15、,134BHINT10HMOVBH,07HMOVCX,0MOVAL,0MOVDX,184FHMOVAH,6MOVBH,70HINT10HMOVAL,0MOVAH,6MOVAX,DSINT10HMOVES,AXMOVCX,0402HMOVAH,13HMOVDX,144DHMOVAL,1MOVBH,57HCALLSUBMESMOVAL,0MOVAH,6MOVBX,04HINT10HMOVCX,41MOVCX,0304MOVDX,0612HMOVDX,134BHLEABP,MES00MOVBH,07HINT10HMOVAL,0MOVBX,09HMOVAH,6MOVCX,33INT10HMOVDX,0
16、919HLEABP,MES06MOVAX,DSINT10HMOVES,AXMOVBX,02HMOVAH,13HMOVCX,33MOVAL,1MOVDX,0A19HMOVBX,09HLEABP,MES01MOVCX,40INT10HMOVDX,0614HMOVDX,0B19HLEABP,MES11LEABP,MES02INT10HINT10HMOVCX,46MOVDX,0C19HMOVDX,0811HLEABP,MES03LEABP,MES12INT10HINT10HMOVDX,0D19HMOVDX,0911HLEABP,MES13MOVBH,0FHINT10HMOVAL,0MOVDX,0A11
17、HMOVAH,6LEABP,MES14INT10HINT10HMOVDX,0B11HMOVAX,DSLEABP,MES15MOVES,AXINT10HMOVAH,13HMOVDX,0C11HMOVAL,1LEABP,MES16MOVBX,06HINT10HMOVCX,27MOVDX,0D11HMOVDX,0819HLEABP,MES17LEABP,MES24INT10HINT10HMOVDX,0E11HMOVDX,0B19HLEABP,MES18LEABP,MES21INT10HINT10HMOVDX,0F11HMOVDX,0C19HLEABP,MES19LEABP,MES22INT10HIN
18、T10HMOVCX,54MOVDX,0D19HMOVDX,110BHLEABP,MES23LEABP,MES20INT10HINT10HRETRETWIN3ENDPWIN2ENDPWIN4PROCWIN3PROCMOVAX,0003HMOVAX,0003HINT10HINT10HMOVCX,0MOVCX,0MOVDX,184FHMOVDX,184FHMOVBH,70HMOVBH,70HMOVAL,0MOVAL,0MOVAH,6MOVAH,6INT10HINT10HMOVCX,0402HMOVCX,0402HMOVDX,144DHMOVDX,144DHMOVBH,35HMOVBH,27HMOVAL,0MOVAL,0MOVAH,6MOVAH,6INT10HINT10HMOVCX,0304MOVCX,0304MOVDX,134BHMOVDX,134BHMOVBH,07HMOVAL,0MOVAL,1MOVAH,6MOVBX,0001HINT10HPUSHDSMOVAH,13HPOPESMOVAL,1CALLSUBMESMOVBX,0001HMOVCX,20P
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 防水工程設(shè)計(jì)變更協(xié)議
- 學(xué)生犯錯(cuò)字保證書(shū)信譽(yù)
- 物資購(gòu)買合同范本示例
- 教堂配件供需合同
- 網(wǎng)絡(luò)直播主播簽約規(guī)范
- 完整招商服務(wù)合同案例
- 物資選購(gòu)協(xié)議樣式
- 演出合作放心合同
- 高效家居采購(gòu)合同的簽訂要點(diǎn)
- 供水合同協(xié)議書(shū)簽訂流程詳解
- 初中中考?xì)v史試題
- 工程質(zhì)量保證體系和保證措施
- 豐田工作方法精髓-問(wèn)題解決法(八步法)剖析(課堂PPT)
- 水廠管網(wǎng)工程施工管理工作報(bào)告doc
- 綜合美食廣場(chǎng)招商方法
- 排序算法集成-杉杉
- 產(chǎn)品報(bào)價(jià)審批表
- 基于s7200狹窄隧道汽車雙向行的plc控制
- 青年教師培養(yǎng)策略的研究
- 新課程設(shè)計(jì)報(bào)告
- 上海中考考綱單詞和短語(yǔ)詞組(配音標(biāo))
評(píng)論
0/150
提交評(píng)論