Can you give a code fragment of where you are using it?
Thanks
Search found 387 matches
- Thu Feb 07, 2008 8:44 am
- Forum: Your Announcements
- Topic: Tutorial 14: Programming the Kernel 1
- Replies: 20
- Views: 110426
- Mon Feb 04, 2008 11:22 am
- Forum: Article Feedback
- Topic: Tutorials
- Replies: 5
- Views: 46297
In school we see some things about the pc and how the tables work and basic segment protection, protected mode, etc.. Where do you go to school? Even in OS lectures at Cambridge, we don't cover anything in this much detail. We do a lot of theory such as paged vs segmented memory management and poll...
- Mon Jan 28, 2008 12:30 am
- Forum: Your Announcements
- Topic: Tutorial 14: Programming the Kernel 1
- Replies: 20
- Views: 110426
- Thu Jan 24, 2008 10:17 pm
- Forum: Beginning OS Development
- Topic: "Protected Mode" tutorial question
- Replies: 3
- Views: 13800
I am not totally sure but I believe that this is why. When you specify a selector, the CPU/MMU does some checks. First it makes sure that you are not using an instruction that is more privileged than your current Ring Level. The Table flag may be something to do with paging/virtual memory (I'm not s...
- Thu Jan 24, 2008 10:03 pm
- Forum: Advanced OS Development
- Topic: Nasm - Useful IDT Interface
- Replies: 13
- Views: 79778
Yes - you are totally correct. As it was, it was resetting the loop counter every loop so it would never end. It should have the mov ecx,0FFh before the loop. That way the loop will run 255 times then end. Just to note - this loop will load the 255th gate first and the 1th last. This shouldn't make ...
- Wed Jan 23, 2008 3:36 pm
- Forum: Advanced OS Development
- Topic: Nasm - Useful IDT Interface
- Replies: 13
- Views: 79778
- Wed Jan 23, 2008 3:31 pm
- Forum: Beginning OS Development
- Topic: question about "Bootloaders 4"
- Replies: 2
- Views: 11584
In theory (and practice), it is perfectly possible to set AL to something other than 1. However, you get into problems if you try to read past the end of a track. e.g. reading 10 sectors starting at sector 15. Some floppy drives will automatically adjust to move to the next logical sector when you t...
- Mon Jan 21, 2008 9:14 pm
- Forum: Advanced OS Development
- Topic: Nasm - Useful IDT Interface
- Replies: 13
- Views: 79778
First you need an array of pointers to the IRQ functions. Then you just use a normal loop such as: (this code isn't tested but it should work) IRQ_0: ... IRQ_1: ... IRQ_TABLE: dd IRQ_0 dd IRQ_1 ... Load_IRQs: pusha Load_Loop: mov edi,IRQ_TABLE ;Get array pointer xor eax,eax ;Zero eax mov ecx,0FFh ;L...
- Mon Jan 21, 2008 11:49 am
- Forum: Advanced OS Development
- Topic: Query about GDT entries
- Replies: 5
- Views: 44045
Query about GDT entries
I have a query that is not clear in the tutorials. In the GDT, there are 32 bits for the base address but only 20 bits for the limit. As 2^32 is 4GB, I can see that it is possible to have a segment starting anywhere in memory. However, only having 20 bits for the limit doesn't allow you to have a se...
- Tue Jan 15, 2008 5:01 pm
- Forum: Beginning OS Development
- Topic: tutorial - bootloaders4
- Replies: 2
- Views: 11731
I have no experience with linux but I do have a couple of suggestions. Firstly, is the floppy.img file 1.44meg? That sometimes results in a problem under windows. Secondly, Are you sure you got the BPB correct at the start of the bootloader. If you had the totalsectors entry set to something less th...
- Sat Jan 12, 2008 11:50 pm
- Forum: Advanced OS Development
- Topic: Virtulization
- Replies: 15
- Views: 91181
- Sat Jan 12, 2008 7:02 pm
- Forum: Lounge
- Topic: Introduction
- Replies: 15
- Views: 93420
I feel that it is time I introduced myself, I'm Andrew Cooper, currently in my first year studying Computer Science at Cambridge University. I am primarily a C++ programmer, having done 2 (small) professional jobs and numerous personal projects (most notably a Graphics Engine and a symbolic calculus...
- Sat Jan 12, 2008 12:49 pm
- Forum: Advanced OS Development
- Topic: Virtulization
- Replies: 15
- Views: 91181
Buy a full copy of Windows Vista Ultimate costing 326 GBP and get an upgrade edition of Windows Home Premium free. :shock: Lol - how stupid do they think we are?? Only for methods, properties etc that are exposed as public should really be checked otherwise your cutting a (possibilly big) performan...
- Fri Jan 11, 2008 5:49 pm
- Forum: Advanced OS Development
- Topic: Virtulization
- Replies: 15
- Views: 91181
Honestly, I'm not quite that diligent about validation for personal projects. However, I probably go OTT on any project that i am not making specifically for myself. I spose this is good in a way because it makes it less likely that exploits exist but it can sometimes lead to very messy code. There ...
- Fri Jan 11, 2008 12:16 pm
- Forum: Advanced OS Development
- Topic: Virtulization
- Replies: 15
- Views: 91181
One way that bugs like this can occur by accident is when a programmer writes a small utility for his/her own use. As its for personal use, the programmer doesn't bother to check all inputs because they know that only they are going to use it, and know how to use it correctly. However, months later ...