鱼C论坛

 找回密码
 立即注册
查看: 1462|回复: 5

王爽汇编第十五章实验,求问我的代码哪里有问题?

[复制链接]
发表于 2013-4-8 17:05:18 | 显示全部楼层 |阅读模式
3鱼币
assume cs:code,ss:stack
stack segment para stack 'stack'
        db 128 dup (0)
stack ends
code segment
start:
        mov ax,stack
        mov ss,ax
        mov sp,128
        mov ax,0
        mov es,ax       
        push cs
        pop ds
        mov si,offset int9
        mov di,204h
        mov cx,offset int9_end - offset int9
        cld
        rep movsb
        push es:[9*4]
        pop es:[200h]
        push es:[9*4+2]
        pop es:[202h]
        cli
        mov word ptr es:[9*4],204h
        mov word ptr es:[9*4+2],0
        sti
;        mov cx,120
;lp:        mov ah,0
;        int 16h
;        loop lp
        mov ax,4c00h
        int 21h
int9:
        push ds
        push si
        push ax
        push cx
        in al,60h
        pushf
        call dword ptr cs:[200h]
        cmp al,9eh
        jne int9_ok
        mov ax,08b00h
        mov ds,ax
        mov si,0
        mov cx,2000
        mov al,'A'
        int9_s:
                mov ds:[si],al
                add si,2
                loop int9_s
        int9_ok:
                pop cx
                pop ax
                pop si
                pop ds
                iret
int9_end: nop
code ends
end start


想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
发表于 2013-4-8 17:39:15 | 显示全部楼层
真是难得给力的帖子啊。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2013-4-8 17:58:05 | 显示全部楼层
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2013-4-8 21:57:18 | 显示全部楼层
哈哈哈哈,帮顶,还没看汇编
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2013-4-9 17:03:03 | 显示全部楼层
楼主给2楼的回复戳中了我的笑点
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2013-4-9 18:01:11 | 显示全部楼层
我去了,知道了,0b800h写成08b00h了。哭了……这都可以,干看也没看出来,因为是中断也没法debug查看~这么弱智的问题……
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-5-12 17:04

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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