this programm here works exactly how it should
it puts a X on the upperleftcorner of the screen
char *video=(char*)0xb8000;
void main()
{
char a='X';
__asm__("
cli
movw $0x8, %ax
movw %ax, %ds
movw %ax, %es
movw $0x18, %ax
movw %ax, %ss
");
video[0]=a;
}
__________________________________
but this programm doesn´t work
#include "video.c"
void main()
{
char a='X';
__asm__("
cli
movw $0x8, %ax
movw %ax, %ds
movw %ax, %es
movw $0x18, %ax
movw %ax, %ss
");
write(a);
to: goto to;
}
______________________
video.c:
char *video=(char*)0xb8000;
void write(char zeichen)
{
video[0]=zeichen;
}
*********************************
selektor 0x8 is a hugedataselector within the 0xb8000
and 0x18 is a stackframe which i moved into the ss
this programm does only reboot
i think the stack didn´t work probably or so
plz help