- [titanlxf] 谢谢指正,在code ends之前少了两句: mov ax,4c00h int 07/06 18:10
- [lwbfq] 博主的程序在XP下的cmd下运行还有问题。 07/05 20:18
- [tomato] 加油!^V^ 07/01 09:08
- [titanlxf] 谢谢,我说怎么编译的时候出现了1个error,昨晚时间仓促就没仔细去查看,应该再精简改正一下。 06/27 15:58
- [starrynight] 程序编译报错 XX.ASM(44): warning A4016: Reserved word u 06/27 08:56
- [younggay] I can not see your picture clearly ! but your pro 06/18 14:47
- [titanlxf] to sysnap: 你说的很对,应该把子函数设置的指令放在调用函数的上方,不但比较清晰,而 06/17 21:07
- [younggay] 不错!! 发现高手越来越多了。。 06/08 13:26
- [sysnap] 程序看了看,没有运行,思路没什么问题。博主可以自己把运行后的图片也抓上来,放到作业的前面,这样一下就 06/03 17:07
- [yuppy] 汇编学这么好...C不是问题了 ~~呵呵 06/01 18:28
[2008-06-17 20:54] Test 11 Sub program design
assume cs:codesg
datasg segment
db "Beginner's All-purpose Symbolic Instruction Code.",0
datasg ends
codesg segment
start:mov ax,datasg
mov ds,ax
mov ax,0b800h
mov es,ax
mov si,0
mov di,0
mov bp,0
call letterc
mov ax,4c00h
int 21h
letterc:mov al,ds:[si]
mov es:[bp],al
add bp,2
cmp al,0
je ok
cmp al,61h
jna s
sub al,20h
mov es:[di+0a0h],al
mov es:[di+0a1h],4 ;red words mean converting the words
add di,2
inc si
jmp short letterc
s:inc si
mov es:[di+0a0h],al
mov es:[di+0a1h],2 ;green words mean no change to it
add di,2
jmp short letterc
ok:ret
codesg ends
end start
datasg segment
db "Beginner's All-purpose Symbolic Instruction Code.",0
datasg ends
codesg segment
start:mov ax,datasg
mov ds,ax
mov ax,0b800h
mov es,ax
mov si,0
mov di,0
mov bp,0
call letterc
mov ax,4c00h
int 21h
letterc:mov al,ds:[si]
mov es:[bp],al
add bp,2
cmp al,0
je ok
cmp al,61h
jna s
sub al,20h
mov es:[di+0a0h],al
mov es:[di+0a1h],4 ;red words mean converting the words
add di,2
inc si
jmp short letterc
s:inc si
mov es:[di+0a0h],al
mov es:[di+0a1h],2 ;green words mean no change to it
add di,2
jmp short letterc
ok:ret
codesg ends
end start
评论次数(1) |
浏览次数(566) |
类型(汇编作业) |
收藏此文 |
[ younggay 发表于 2008-06-18 14:47 ]
I can not see your picture clearly !
but your program is OK!
hehehe