Page 2 of 2

Posted: Tue Mar 11, 2008 6:42 pm
by nekros
billion_boi wrote:Since in the code i haven't used thr LGDT instruction, or called the function that sets up the descriptors.... rather just set the limit and base address in the pointer. Why or how is it that I'm running the GDT?
Advice: Please, RTFM, Practice your programming knowledge, and RTFM :!:

I really can't be much clearer than I,Jeremiah Griffin, and Combuster have been.

List of Things to do:
RTFM
RTFW
STFW
STFF

There are already a million examples of setting up the GDT. The GDT is one of the easier parts of OSDev, if you can't figure that out, you don't belong here.

Posted: Tue Mar 11, 2008 6:48 pm
by jzgriffin
Go read up on Assembly, and memorize the Intel manuals. :-)

Re: Problem with GDT pointer

Posted: Tue Mar 11, 2008 11:21 pm
by Philip
billion_boi wrote:hey,
Ive managed to compile my bootloader using NASM with no errors , but the code doesnt run beyond the GDTpointer that ive marked below...I can print a string befor the line...but not after...Any ideas as to why?

Its not like ive loaded the segment register that my string function uses with the descriptor offsett yet...

Code: Select all

GDT:

.Gdt_null:

	Dw 0

	Dw 0

	Dw 0

	Dw 0

.Gdt_code:

	Dw 1

	Dw 0

	Db 0

	Db 10011010

	Db 11011111

	Db 0

.Gdt_data:

	Dw 1

	Dw 0

	Db 0

	Db 10010010

	Db 11011111

	Db 0

.Gdt_end:

.Gdt_pointer:

	Dw .Gdt_end - .Gdt_code -1 ;****Error here

	Dd .Gdt_code
at the last line: why Dd .Gdt_code instead of Gdt_null?
because Gdt_null is the start point of the gdt

Posted: Wed Mar 12, 2008 3:25 am
by Combuster
homework:
1) follow a series of assembly tutorials
2) write a DOS app in assembly that sets a video mode and draws a nice image.