Search found 387 matches
- Tue Oct 21, 2008 12:17 pm
- Forum: Article Feedback
- Topic: Exception Handler Bug
- Replies: 10
- Views: 83442
lol - thats what I intended to say - i wasn't very clear. The problem with manually clearing up the stack below EIP/Error is that because of optimization, adding the relevant pop instructions to maintain all the registers sometimes causes the compiler to change which registers it uses, which still l...
- Tue Oct 21, 2008 9:51 am
- Forum: Article Feedback
- Topic: Exception Handler Bug
- Replies: 10
- Views: 83442
Fair enough. I came across this when trying to print out the exact address of the exception for debugging purposes. Since I made this post, I have found a small problem that doesn't have a straight forward solution. Because the register states need to be maintained exactly, and this is not a naked f...
- Mon Oct 20, 2008 6:54 pm
- Forum: Article Feedback
- Topic: Exception Handler Bug
- Replies: 10
- Views: 83442
Exception Handler Bug
Hi, When trying to test my exception handling routines, I had a stack problem and realized that it is a bug current in all the exception handling examples in the tutorials. Here is an explanation and a solution to it. When an interrupt fires, the stack looks like this: ... EFlags CS EIP <-- esp poin...
- Wed Oct 15, 2008 10:52 am
- Forum: Beginning OS Development
- Topic: is it normal to crash when enable interrupts?
- Replies: 4
- Views: 14970
Hi, The reason the bootloader doesn't crash (due to interrupts) is because the bios creates a valid 16bit interrupt table in memory (0x0000 to 0x03FF). When you jump into 32bit mode, this interrupt table becomes invalid and you must make a new one before you can enable interrupts The reason it is a ...
- Tue Oct 07, 2008 10:10 am
- Forum: Beginning OS Development
- Topic: LBA to CHS
- Replies: 6
- Views: 19493
- Sun Oct 05, 2008 11:19 am
- Forum: Beginning OS Development
- Topic: LBA to CHS
- Replies: 6
- Views: 19493
Hi, You seem to have some of your terminology confused. CHS naming, is made of Cylinder, Head and Sector numbers. Cylinder and Track mean almost the same thing, apart from the fact that Track refers to the current disk you are on whereas cylinder refers to all the 'same' tracks across all the disks ...
- Sun Oct 05, 2008 11:08 am
- Forum: Beginning OS Development
- Topic: Bootloader 4 tutorial problem
- Replies: 6
- Views: 19387
hi, There is no advantage to doing PARTCOPY Boot1.bin 0 3 -f0 0 PARTCOPY Boot1.bin 3E 1C2 -f0 3E over partcopy boot.bin 0 200 -f0 so I would suggest you don't bother As for the error, I assume thats an error from the bootloader and not from the BIOS. As Mike's code is doing this as well, it probably...
- Sat Sep 27, 2008 6:03 pm
- Forum: Beginning OS Development
- Topic: Errors when setting up interrupts
- Replies: 5
- Views: 16953
Ok - thats good. I will just give IRQ 0 a null handler that merely returns. A few thing that I am not sure about: Which stack is used for interrupt handlers? I would have thought that it would need its own custom stack so it doesn't corrupt the one currently in use. Also, is this stack pre-cleared b...
- Sat Sep 27, 2008 11:19 am
- Forum: Beginning OS Development
- Topic: Errors when setting up interrupts
- Replies: 5
- Views: 16953
Wow - Thankyou very much. I sorta feel like an idiot now because I ended up defining idtr as: struct idtr { unsigned short limit; unsigned char base; }; No wonder it wasn't working. :P Now I am going to move on to fully enable interrupts. Am I correct in assuming that to do this, I will need to rema...
- Sat Sep 27, 2008 12:21 am
- Forum: Beginning OS Development
- Topic: Errors when setting up interrupts
- Replies: 5
- Views: 16953
Errors when setting up interrupts
Hi, I am currently trying to continue my kernel and keep on hitting the same problem. When I try to install an interrupt descriptor table, I get triple faults when generating any form of interrupt. static struct idt_desc idt_table[256]; static struct idtr idt_reg; void def_handler() { unsigned short...
- Sun Sep 07, 2008 2:10 pm
- Forum: Your Announcements
- Topic: Tutorial 17: Physical Memory Management
- Replies: 2
- Views: 47140
- Fri Sep 05, 2008 11:10 pm
- Forum: Assembly Language
- Topic: Q: how i can print the content of AX register ..plz help.
- Replies: 8
- Views: 58879
- Fri Sep 05, 2008 9:35 pm
- Forum: Beginning OS Development
- Topic: How to build an os?
- Replies: 8
- Views: 23826
- Fri Sep 05, 2008 9:30 pm
- Forum: Assembly Language
- Topic: Q: how i can print the content of AX register ..plz help.
- Replies: 8
- Views: 58879
You will have to convert the number to a string to print with an int 0x10 interrupt. To do this, you need to repeatedly divide the number by the radix that you wish to display it in and store remainders, looping until the number is 0. Take the number 256 as an example. To convert it to a string in b...
- Sat Aug 30, 2008 6:06 pm
- Forum: Beginning OS Development
- Topic: FAT12
- Replies: 4
- Views: 16076
What is not working about it? Is it not writing the correct value into the FAT? Are you writing the file data to the correct clusters? Are you updating the root directory with the file details? I cant see any glaring problems with your code but updating the FAT is not the only thing you need to do t...