OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 23, 2024 9:35 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: screen
PostPosted: Fri Feb 08, 2002 1:13 pm 
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.


Top
  
 
 Post subject: Re: screen
PostPosted: Sat Feb 09, 2002 3:29 am 
hey you dont need a gdt for realmode.


Top
  
 
 Post subject: Re: screen
PostPosted: Sun Feb 17, 2002 8:48 am 
ok guys...heres what i found out:

i tried this:
Code:
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?


Top
  
 
 Post subject: Re: screen
PostPosted: Sun Feb 17, 2002 10:19 am 
Yeah, I don't get it.

K.J.


Top
  
 
 Post subject: Re: screen
PostPosted: Fri Mar 01, 2002 11:12 am 
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)


Top
  
 
 Post subject: Re: screen
PostPosted: Mon Mar 04, 2002 1:40 am 
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.


Top
  
 
 Post subject: Re: screen
PostPosted: Mon Mar 04, 2002 6:55 am 
It is a file loaded by the bootsector code.
And no! not just 512b are loaded, cause the Code (Also higher than 0x200 WORKS)


Top
  
 
 Post subject: Re: screen
PostPosted: Mon Mar 04, 2002 7:06 am 
"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 :-)


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 90 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group