汇编网首页登录博客注册
arg123654789的学习博客
博客首页博客互动【做检测题】论坛求助

我的博客

个人首页 |  我的文章 |  我的相册 |  我的好友 |  最新访客 |  文章收藏 |  论坛提问 |  友情链接 |  给我留言  
图片载入中
学习动态
最新留言
好友圈
文章收藏
友情链接

[2013-08-31 11:25] 实验17

图片载入中
;测试程序将data段中的数据写入软盘A的0面0道1扇区

assume cs:code

data segment
        db 32 dup('practise(theory)')
data ends

code segment
        start:mov ax,0
        mov es,ax
        mov di,200h
        mov ax,code
        mov ds,ax
        mov si,offset softdisk_io
        cld
        rep movsb
        
        cli
        mov word ptr es:[7ch*4],200h
        mov word ptr es:[7ch*4+2],0
        sti
        
        mov ax,data
        mov es,ax
        mov bx,0
        mov ah,1
        mov dx,0
        int 7ch
        
        mov ax,4c00h
        int 21h
        
        softdisk_io:push ax
        push dx
        push es
        push bx
        push cx
        push di
        mov di,bx
        mov bx,ax
        add bh,2
        mov cx,1440
        mov ax,dx
        div cx
        push ax                        ;al表示面号
        mov cx,8
        shr ax,cl
        mov cx,18
        div cx
        add ah,1                ;ah表示扇区号;al表示磁道号
        mov ch,al
        mov cl,ah
        pop ax
        mov dh,al
        mov dl,0
        mov ah,bh
        mov al,1
        mov bx,di
        sti
        int 13h
        pop di
        pop cx
        pop bx
        pop es
        pop dx
        pop ax
        iret
        
code ends
end start
评论次数(0)  |  浏览次数(440)  |  类型(汇编作业) |  收藏此文  | 
 
 请输入验证码  (提示:点击验证码输入框,以获取验证码