Page 2 of 2
Re: screen
Posted: Fri Feb 08, 2002 1:13 pm
by K.J.
I don't think that the full source would help much but I was looking at your code and saw:
;videoseg base 0xB8000 limit 4000
descriptor 48, 0FA0h, 08000h, 0Bh, 092h, 040h, 0
If your kernel is in real mode the videoseg base should be 0xB800 I think(anyone know for sure?). I suggest that maybe you should just use one of John Fine's bootsectors:
http://www.execpc.com/~geezer/johnfine/index.htm
K.J.
Re: screen
Posted: Sat Feb 09, 2002 3:29 am
by mansonbound
hey you dont need a gdt for realmode.
Re: screen
Posted: Sun Feb 17, 2002 8:48 am
by mansonbound
ok guys...heres what i found out:
i tried this:
Code: Select all
char *message="H A L L O ";
int main()
{
movedata(DATA_SEL, message, SCREEN_DATA_SEL, 0, 3000);
while(1);
}
and saw:
HALLO in the 4th line of the screen. The start of the 4zh Line has the offset 0x1E0. Had alook with a hexeditor:
0x1E0: H A L L O . So instead of the adress of message the function is called with 0 instead of message.
Any comments?
Re: screen
Posted: Sun Feb 17, 2002 10:19 am
by K.J.
Yeah, I don't get it.
K.J.
Re: screen
Posted: Fri Mar 01, 2002 11:12 am
by mansonbound
ok...its going on:
i threw away all the c code
and did something in asm.
so i reserved mem for a variable:
a: DW 0x721
;(gray '!')
and i move it to the 1st characer of the vidmem.
mov eax, 0xB8000-0x80000
mov dx, [a]
mov [eax], dx
It works, when the variable is declared at an offset below 0x200. (moved the position of a with TIMES .... nop and looked at it in a hexeditor)
Re: screen
Posted: Mon Mar 04, 2002 1:40 am
by Tim
Is this code in a boot sector, or is it a file loaded by your boot sector code. Either way, it looks like you're only loading one sector.
Re: screen
Posted: Mon Mar 04, 2002 6:55 am
by mansonbound
It is a file loaded by the bootsector code.
And no! not just 512b are loaded, cause the Code (Also higher than 0x200 WORKS)
Re: screen
Posted: Mon Mar 04, 2002 7:06 am
by mansonbound
"ok...guess we can close the file on that one"
Hmm....i thought....everything above 0x200 is nil, but code over 0x200 works....so i had another look in the bootsectorcode, where the file is loaded and 512 is added to the adress after loading a sector:
mov bx, es
add bx, word [bps] ;<<-----------heres the error
mov es, bx
so i fixed it and now it works.
TY for all the trouble that i've done to you