Mail Archives: djgpp/2000/05/28/06:24:23
On Sun, 28 May 2000, Steamer wrote:
> >PUBLIC _setText
> >_setText PROC C
> > mov ah, 0
> > mov al, 3
> > int 10
> > ret
> >_setText ENDP
>
> You can't call real-mode BIOS interrupts directly from 32-bit protected
> mode and expect it work.
Actually, you can. The interrupt gets reflected to real mode, and if the
function is register-based (i.e., does not involve any buffers), like in
this case, it will work.
It *is* true that calling interrupts via DPMI is the recommended way,
though.
> >gcc vgatest.c vga.obj -Wall -g -o vgatest.exe
>
> Probably you need to rename vga.obj to vga.o, as I'm not sure that
> gcc recognises .obj as an object file extension.
I don't think this matters: any file with an unknown extension is
handled as if it were an object file.
I think running objdump with different switches on vga.obj will reveal
what does the compiler and the linker think about that file.
- Raw text -