| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 543 人关注过本帖
标题:[求助]改一个汇编程序
只看楼主 加入收藏
kave212
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-10-22
收藏
 问题点数:0 回复次数:0 
[求助]改一个汇编程序

把以下8*2的输入E退出的程序改成只剩下数字键的5*2的输入3166退出的程序
会的请帮帮忙 谢谢大侠 !!!!!

DATA SEGMENT
DA55 EQU 318H
DB55 EQU 319H
CTL EQU 31BH
TABLE DW 0101H,0102H,0104H,0108H,0110H,0120H,0140H,0180H
DW 0201H,0202H,0204H,0208H,0210H,0220H,0240H,0280H
DW 0401H,0402H,0404H,0408H
CHAR DB 'CDEFBA9845673210'
CRT DB 'PLAY ANY KEY IN THE SMALL KEYBOARD! ',0AH,0DH
DB 'IT WILL BE ON THE SCREEN! END WITH E',0AH,0DH,'$'
DATA ENDS

STACK SEGMENT PARA STACK 'STACK'
STA DW 50 DUP(?)
STACK ENDS

CODE SEGMENT
MAIN PROC FAR
ASSUME CS:CODE,DS:DATA
START: MOV AX,DATA
MOV DS,AX
MOV DX,OFFSET CRT
MOV AH,09
INT 21H

LOP: CALL KEY
CMP DL,'E'
JNZ LOP
MOV AX,4C00H
INT 21H
RET
MAIN ENDP

KEY PROC NEAR
LP1: MOV AL,82H
MOV DX,CTL
OUT DX,AL

WAIT1: MOV AL,00
MOV DX,DA55
OUT DX,AL
MOV DX,DB55
IN AL,DX
CMP AL,0FFH
JZ WAIT1
PUSH AX
PUSH AX
MOV CX,1000H
LP2: LOOP LP2
MOV DX,CTL
MOV AL,90H
OUT DX,AL
MOV DX,DB55
POP AX
OUT DX,AL
MOV DX,DA55
IN AL,DX
POP BX
MOV AH,BL
NOT AX
MOV SI,OFFSET TABLE
MOV DI,OFFSET CHAR
MOV CX,16
LP3: CMP AX,[SI]
JZ LP4
DEC CX
JZ LP1
ADD SI,2
INC DI
JMP LP3
LP4: MOV DL,[DI]
MOV AH,02
INT 21H
PUSH DX
MOV AL,82H
MOV DX,CTL
OUT DX,AL

WAIT2:MOV AL,00
MOV DX,DA55
OUT DX,AL
MOV DX,DB55
IN AL,DX
CMP AL,0FFH
JNZ WAIT2
POP DX
RET
KEY ENDP
CODE ENDS
END START


2006-10-22 18:36
快速回复:[求助]改一个汇编程序
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015543 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved