心态很重要 发表于 2012-1-6 00:28:46

关于int 13h的一些疑惑

assume cs:code
code segment
start:

mov ax,0b800h
mov es,ax
mov bx,0
mov al,8
mov ch,0
mov cl,1
mov dh,0
mov dl,0h
mov ah,3
int 13h
call xians
mov ah,0
int 16h
mov ax,4c00h
int 21h
;;以上部分用于把显存数据写入软盘
;;以下子程序用于查看ah,al状况
xians:
push bx
push es
push si
push cx
push ax
mov bx,0b800h
mov es,bx
mov si,160*20+2*50
mov bp,0
mov cx,9
hhh:
mov byte ptr es:,' '
add bp,2
loop hhh
cmp ah,0
je xxx
mov byte ptr es:,'e'
mov byte ptr es:,2
mov byte ptr es:,'o'
mov byte ptr es:,2
mov byte ptr es:,'r'
mov byte ptr es:,2
mov byte ptr es:,':'
add ah,30h
mov es:,ah
jmp kkk
xxx:
mov byte ptr es:,'r'

mov byte ptr es:,':'

add al,30h
mov byte ptr es:,al

kkk:
pop ax
pop cx
pop si
pop es
pop bx
ret
code ends
end start
以上程序用于把屏幕的内容写入磁盘

assume cs:code
data segment
db 4096 dup (0)
data ends
code segment
start:
mov ax,0b800h
mov es,ax
mov bx,0
mov al,7
mov ch,0
mov cl,1
mov dh,0
mov dl,0h
mov ah,2
int 13h
call xians
mov ah,0
int 16h
mov ax,4c00h
int 21h
;;以上部分用于把显存数据写入软盘
;;以下子程序用于查看ah,al状况
xians:
push bx
push es
push si
push cx
push ax
mov bx,0b800h
mov es,bx
mov si,160*20+2*50
mov bp,0
mov cx,9
hhh:
mov byte ptr es:,' '
add bp,2
loop hhh
cmp ah,0
je xxx
mov byte ptr es:,'e'
mov byte ptr es:,2
mov byte ptr es:,'o'
mov byte ptr es:,2
mov byte ptr es:,'r'
mov byte ptr es:,2
mov byte ptr es:,':'
add ah,30h

mov es:,ah
jmp kkk
xxx:
mov byte ptr es:,'r'

mov byte ptr es:,':'

add al,30h
mov byte ptr es:,al

kkk:
pop ax
pop cx
pop si
pop es
pop bx
ret
code ends
end start
以上程序用于把磁盘内的内容显示在屏幕上
问:我用的virtual pc调试
为什么显示了读写成功,但是没有显示在屏幕上呢
页: [1]
查看完整版本: 关于int 13h的一些疑惑