- 1、本文档共36页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
汇编电梯程序(国外英文资料)
汇编电梯程序(国外英文资料)
The data segment
Ioport is 0b800h-0280h
Ls273a. Lattice lines selected
(1) the ls273b. 74 ls273 chip address
Io8253a equ ioport + 280 h; Counter 0
Io8253b equ ioport + 281 h; Counter 1
Io8253c equ ioport + 283 h; The 8253 control end
Io8255a equ ioport + 288 h; Pa mouth
Io8255b equ ioport + 289 h; Pb mouth
Io8255c equ ioport + 28 ah; PC port
Io8255 equ ioport + 28 bh. The 8255 control end
Led db 3fh, 06h, 4fh, 66h, 7dh. Seven parts of a digital tube
MENU DB * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *, 0 dh, 0 ah
The DB * elevator paogram *, 0 dh, 0 ah
The db * 8255 cs - 288 h pa0 ~ pa7 -- -- -- -- -- a ~ g *, 0 dh, 0 ah
Db * pc0-8253 out1 *, 0 dh, 0 ah
Db * 8253cs ~ 280h 1mhz - clk0 VCC - gate0, gate1 *, 0Dh, 0Ah
Db * clk1 - out0 *, 0 dh, 0 ah
Db * ls273 ~ 2 b0 *, 0 dh, 0 ah
The db * *, 0 dh, 0 ah
The db * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *, 0 dh, 0 ah
DB: DB 1 ~ 8. , 0 dh, 0 ah
A: DB s * * * * * * * * * * *. , 0 dh, 0 ah
In the early days of the year! , 0 dh, 0 ah
B: DB s * * * * * * * * *. , 0 dh, 0 ah
In the case of DBs? , 0 dh, 0 ah
DB * * * * * * * * * * * * * * * * * * * * * *. , 0DH, 0AH, $
The data ends
Code segment
Assume cs: code, ds: data
Start: mov ax, data
Mov ds, ax
Mov dx, offset the menu
Mov ah, 09
Int 21 h
Mov dx, io8255; 8255 initialization, a, 0, c input
Mov al, 89 h
The out dx, al
Mov cl, 31 h; Cl represents the floor of the current elevator, which is 1 in ASCII
Main: mov al, 0
Call disp. Display current floor
Mov bl, 0; Bl is the floor for the first input
Mov ch, 0; Ch is the floor that is entered again on the middle route
Call disp8led
Mov ah, 01; Keyboard input bl
Int 21 h
CMP al, 1 bh. Is the esc to exit
Je exit1
CMP al, 31 h; The input floor is between 1 and 8? If not re-input
Jl main
CMP al, 38 h
Jg main
Mov bl, al
Call disp8led; 8leds display the floor of the bl
CMP bl, cl;
Bl compared with cl
Je mai
文档评论(0)