Mail Archives: djgpp/2000/01/05/22:54:36
On Wed, 5 Jan 2000, Charles Wood wrote:
> here's a sample asm function I need to inline in DJGPP please help if you
> can, from this example I should be okay from there on:
>
> this doesn't so anything, it just covers the basics:
>
> char clear_and_v_plus_1(char v) {
> __asm {
> mov ax,0x3
> int 0x10
> mov al,v
> inc al
> mov v,al
> };
> };
>
char ...(char v) {
__asm__ ("movw $0x3, %ax;
int $0x10;
movb v, %al;
incb %al;
movb %al, v;");
}
(untested code)
But calling int 10 like this isn't nice in protected mode.
That's what __dpmi_int is for. What you are doing is
equivalent to the int386 call.
Prashant
---------------------------------------------------
One pound of learning requires ten pounds of common
sense to apply it.
- Raw text -