Mail Archives: djgpp/1998/05/12/07:15:59
Hello
I have problem with inline assembler in DJGPP.
I write this procedure in Borland C++ and I don`t how can I rewrite it
to DJGPP. Please help me.
This procedure draw point in any VESA mode.
void drawxy(unsigned x, unsigned y, unsigned char Col)
{
asm { mov ax,0a000h
mov es,ax
mov ax,y
mov cx,scanlength
mul cx
add ax,x
adc dx,0
push dx
push ax
mov ax,dx
xor dx,dx
mov cx,granul
mul cx
cmp al,bank
je dale
mov bank,al
mov dx,ax
mov bx,0
mov ax,4f05h
int 10h
}
dale:
asm { pop ax
pop dx
mov di,ax
mov al,Col
mov es:[di],al
}
}
ToM
- Raw text -