主题:怎么回事?
晚上没事写了一个小小的程序,是关于小写字母转化成大写字母的,怎么老是不成功呢?
不过把相关的dos调用信息去掉后时能转化成功的,发个帖子找老手或者是有经验的给修正一下
谢谢
相关代码如下:
stack segment stack
db 200 dup (?)
stack ends
data segment
buf1 db 'please input the xiao xie char:$'
buf2 db 0ah,0dh,'$'
buf3 db 'the da xie char is:$'
code segment
assume cs:code,ss:stack,ds:data
start:
mov ax,data
mov ds,ax
mov dx,offset buf1
mov ah,9
int 21h
mov dx,offset buf2
mov ah,9
int 21h
mov ah,1
int 21h
mov dx,offset buf2
mov ah,9
int 21h
mov dx,offset buf3
mov ah,9
int 21h
mov dx,offset buf2
mov ah,9
int 21h
sub al,20h
mov dl,al
mov ah,2
int 21h
mov ah,4ch
int 21h
code ends
end start
不过把相关的dos调用信息去掉后时能转化成功的,发个帖子找老手或者是有经验的给修正一下
谢谢
相关代码如下:
stack segment stack
db 200 dup (?)
stack ends
data segment
buf1 db 'please input the xiao xie char:$'
buf2 db 0ah,0dh,'$'
buf3 db 'the da xie char is:$'
code segment
assume cs:code,ss:stack,ds:data
start:
mov ax,data
mov ds,ax
mov dx,offset buf1
mov ah,9
int 21h
mov dx,offset buf2
mov ah,9
int 21h
mov ah,1
int 21h
mov dx,offset buf2
mov ah,9
int 21h
mov dx,offset buf3
mov ah,9
int 21h
mov dx,offset buf2
mov ah,9
int 21h
sub al,20h
mov dl,al
mov ah,2
int 21h
mov ah,4ch
int 21h
code ends
end start