您的位置:首页 > 其它

汇编语言: 缓冲区

2017-05-25 23:58 309 查看
关于缓冲区

s1 segment stack
dw 20h dup(?)
top label word
s1 ends

s2 segment
buf db 100,?,100 dup(?)
s2 ends

s3 segment
assume cs:s3,ds:s2,ss:s1

p proc far
mov ax,s1
mov ss,ax
lea sp,top
;-----------------------------------------
mov ax,s2
mov ds,ax
;-----------------------------------------
lea dx,buf
mov ah,0ah
int 21h
;-----------------------------------------
mov dl,0ah
mov ah,02h
int 21h
;-----------------------------------------
lea si,buf
inc si

mov cl,[si]
inc si
xor ch,ch

l1:     mov dl,[si]
mov ah,2
int 21h

inc si
loop l1

mov ah,4ch
int 21h
p endp
s3 ends
end p
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: