主 题: 高手帮忙看看是什么问题
已阅:412 / 回复:2(楼主)
.MODEL SMALL
.DATA
BUFFER1 DB 81
DB 0
DB 81 DUP('$')
STR1 DB 'please input a string',0AH,0DH,'$'
HUICHE DB 0AH,0DH,'$'
COUNT1 DB 0
.CODE
ASSUME CS:@CODE ,DS:@DATA
MAIN:
MOV AX,@DATA
MOV DS,AX
LEA DX,STR1
MOV AH,09H
INT 21H
LEA DX,BUFFER1
MOV AH,0AH
INT 21H
LEA DX,HUICHE
MOV AH,09H
INT 21H
LEA SI,BUFFER1
ADD SI,2H
MOV CX,[SI]
DEC CX
MOV AX,[SI]
MOV BX ,[SI+1]
MOV [SI],BX
MOV [SI+1],AX
.DATA
BUFFER1 DB 81
DB 0
DB 81 DUP('$')
STR1 DB 'please input a string',0AH,0DH,'$'
HUICHE DB 0AH,0DH,'$'
COUNT1 DB 0
.CODE
ASSUME CS:@CODE ,DS:@DATA
MAIN:
MOV AX,@DATA
MOV DS,AX
LEA DX,STR1
MOV AH,09H
INT 21H
LEA DX,BUFFER1
MOV AH,0AH
INT 21H
LEA DX,HUICHE
MOV AH,09H
INT 21H
LEA SI,BUFFER1
ADD SI,2H
MOV CX,[SI]
DEC CX
MOV AX,[SI]
MOV BX ,[SI+1]
MOV [SI],BX
MOV [SI+1],AX
SHUCHU:
LEA DX,BUFFER1
ADD DX,2H
MOV AH,09H
INT 21H
THEEND: MOV AX,4C00H
INT 21H
END MAIN
交换第一个和第二个字符
为什么我输入2个字符,但是输出的是三个字符啊,而且第三个字符和第二个字符是一样的?
作者:songsfly (2009-12-18 13:34:57)
回复:高手帮忙看看是什么问题
第 1 楼
你怎么交换的字符 MOV Al,[SI]
换成这样试试 MOV Bl ,[SI+1]
MOV [SI],Bl
MOV [SI+1],Al
换成这样试试 MOV Bl ,[SI+1]
MOV [SI],Bl
MOV [SI+1],Al
替换你的 MOV CX,[SI]
DEC CX
MOV AX,[SI]
MOV BX ,[SI+1]
MOV [SI],BX
MOV [SI+1],AX
该帖子被lichao89在2010-2-6 21:02:43编辑过
作者:lichao89 (2010-2-6 21:01:25)
回复:高手帮忙看看是什么问题
第 2 楼
Kenilworth (journalists Christian Louboutin Salelearn to row Xu Fei) yesterday morning, in the first half of the economic analysis Council meetings, municipalGhd CPC Committee, Deputy Secretary of municipal partyGhd Hair Straightener Committee, Liu Qi, Mayor, city people's Congress Standing Committee Guo du deyin, city-Tinh, municipal Christian LouboutinCommittee, Deputy Ghd StraightenersSecretary Wang anshun city leadership, expertise and the meeting was attended by representatives of the guest units, promotingGhd Hair Straighteners the development Christian Louboutin Wedding Shoesof science in the capital.
In recentGhd Straighteners Ireland
years, as the capital's economic and social development of strength, the Central enterprises, universities, research christian louboutin very prive institutions, industry christain louboutin technology Alliance and louboutin wedding shoes the role ofchristian louboutin peep toe private enterprises increasingly, to accelerate the shift of capital and economic development, promotelouboutin rolando the industrial structure upgrade instilled greater dynamism and vitality. Beijing attaches great importance to the Christian Shoesdevelopment of these units, special invitations presence of representatives of these units in the first half of the economic situation analysis, and during the Conference held a forum dedicated to listen to everyone in their own development needs and the economic and social development of the capital city of Bruxelles.
In recentGhd Straighteners Ireland
years, as the capital's economic and social development of strength, the Central enterprises, universities, research christian louboutin very prive institutions, industry christain louboutin technology Alliance and louboutin wedding shoes the role ofchristian louboutin peep toe private enterprises increasingly, to accelerate the shift of capital and economic development, promotelouboutin rolando the industrial structure upgrade instilled greater dynamism and vitality. Beijing attaches great importance to the Christian Shoesdevelopment of these units, special invitations presence of representatives of these units in the first half of the economic situation analysis, and during the Conference held a forum dedicated to listen to everyone in their own development needs and the economic and social development of the capital city of Bruxelles.
Marie Curie
Helen keller
Mitchell Margaret
Emily Bronte
Charlotte Bronte
Anne Bronte
Willa Cather
Jane Austen
Margaret Hilda
Gabriele Munter
个性签名
C
作者:0021111dj (2010-7-28 15:56:49)