i'm trying to initalize graphics mode in my kernel, but it resets my machine. any ideas why? this is what i'm using:
; Set graphics mode 13h
mov ax, 13h
int 10h
but, i would also prefer C but i can't figure out how to port it to GCC
void graphicsmode()
{
asm("mov 0x13, %%ax "::);
asm("int 0x10 "::);
}
?? is that correct i get an error saying:
c:/djgpp/tmp/ccOK7Jyt.s: Assembler messages:
c:/djgpp/tmp/ccOK7Jyt.s:375: Error: suffix or operands invalid for `int'
c:/djgpp/tmp/ccOK7Jyt.s:545: Error: suffix or operands invalid for `int'
any ideas?
graphics mode?
Re:graphics mode?
GCC is 32-bit PMode...so no ints
set graphics mode 13h before you enter PMode
set graphics mode 13h before you enter PMode
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:graphics mode?
by the by, i think that
movw 0x13, %ax
is the AT&T syntax for
mov ax,[0x13]
you should try
movw $0x13, %ax
...
or write Intel syntax and use nasm/objdump to see the equivalent AT&T code.
movw 0x13, %ax
is the AT&T syntax for
mov ax,[0x13]
you should try
movw $0x13, %ax
...
or write Intel syntax and use nasm/objdump to see the equivalent AT&T code.