回 帖 发 新 帖 刷新版面

主题:用汇编中断实现gotoxy

我的怎么有错误
大家帮忙写一个把 
/*
void Interface::gotoxy(int x, int y)
{
    _asm
    {
        mov dh, x
        mov dl, y
        mov bh, 0
        int 10h
    }
}*/

回复列表 (共6个回复)

沙发

mov dh, x ;行
mov dl, y ;列
mov bh, 0
mov ah, 2
int 10h

板凳

operand size conflict
vc报错

3 楼

既然用VC就别考虑用int 10h了

4 楼

你怎么把所有代码都注释掉了?

5 楼

/*
void Interface::gotoxy(int x, int y)
{
    _asm
    {
        mov edh, word ptr x
        mov edl, word ptr y
        mov ebh, 0
        int 10h
    }
}*/
 不知道行不行

6 楼

在vc里不可以使用中断

我来回复

您尚未登录,请登录后再回复。点此登录或注册