鱼C论坛

 找回密码
 立即注册
查看: 2404|回复: 1

[技术交流] 实验131,2题记录

[复制链接]
发表于 2012-3-15 11:28:31 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
assume cs:code
data segment
db "welcome to masm!",0
data ends
code segment
start:
mov ax,cs
mov ds,ax
mov si,offset do7c
mov ax,0
mov es,ax
mov di,200h
mov cx,offset do7cend - offset do7c
cld
rep movsb
mov ax,0
mov ds,ax
mov word ptr ds:[7ch*4],200h
mov word ptr ds:[7ch*4+2],0
jmp short start1
do7c:
push ax
push bx
push si
push dx

s:
mov ah,2
mov bh,0
int 10h
mov al,byte ptr ds:[si]
mov cl,al
jcxz ok
mov ah,9
mov bl,7
mov bh,0
mov cx,1
int 10h
inc si
inc dl
jmp short s
ok:
pop dx
pop si
pop bx
pop ax
iret

do7cend:nop
start1:
mov dh,10
mov dl,10
mov cl,2
mov ax,data
mov ds,ax
mov si,0
int 7ch

mov ax,4c00h
int 21h

code ends
end start
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
 楼主| 发表于 2012-3-15 11:29:58 | 显示全部楼层
第2课题
assume cs:code
code segment
start:
mov ax,cs
mov ds,ax
mov si,offset do7c
mov ax,0
mov es,ax
mov di,200h
mov cx,offset do7cend - offset do7c
rep movsb
mov ax,0
mov ds,ax
mov word ptr ds:[7ch*4],200h
mov word ptr ds:[7ch*4+2],0
jmp short start1
do7c:

push bp
mov bp,sp
dec cx
je ok
add [bp+2],bx
ok:
pop bp
iret

do7cend:nop

start1:mov ax,0b800h
mov es,ax
mov di,160*12
mov bx,offset s - offset se
mov cx,80
s:mov byte ptr es:[di],'!'
add di,2
int 7ch
se:nop
mov ax,4c00h
int 21h
code ends
end start
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-11-19 22:24

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表