accessing segments
Posted: Sat Jul 28, 2007 4:02 pm
hi
i have a simple question: ive now written some code that boots the pc, switches over to protected mode and then jumps to some other code writen in c...before jumping there i loaded the ds register with a segment descriptor pointing to b8000 so that when in my c code i do something like
the letter A is displayed in the upper left corner. but of course there are 3 more segment registers (es, fs, gs) that *could* be used for video memory instead of having main data register ds point to video memory...is there any way at all to specify in c that for this or that particular memory reference another data register be used, so i can make use of all the 4 data registers without having to refer to assembly???
thanks
martin
i have a simple question: ive now written some code that boots the pc, switches over to protected mode and then jumps to some other code writen in c...before jumping there i loaded the ds register with a segment descriptor pointing to b8000 so that when in my c code i do something like
Code: Select all
char *video=0;
*video='A'
thanks
martin