Problem remapping the PIC

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
modshah

Problem remapping the PIC

Post by modshah »

hi
I tried to remap my PIC within Windows-2000. As I use DJGPP i was running my prg at the command prompt. After running the prg I couldn't do anything else with my DOS editor (None of my keystrokes were responded. I had to close the shell). Could you explain why ?

Thanks
modshah
VE3MTM

RE:Problem remapping the PIC

Post by VE3MTM »

The Windows 2000 "DOS" prompt runs the CPU in v86 mode. You think you're talking to the hardware, but you're not. It looks like DOS, it acts like DOS, but it's not DOS. You can't do anything you could normally do in DOS
CarbonBased

RE:Problem remapping the PIC

Post by CarbonBased »

OS Development inside WinNT+ is not a good idea, dude.  You'd be better off using a virtual machine (such as one provided by Bochs or VMWare).

You, no doubt, remapped the PIC, and didn't map it back.  Which means the vectors that DOS relies on being there (0-0x20) have now been mapped to (0x20-0x40)... perhaps it has issues with such a setup...

Jeff
modshah

RE:Problem remapping the PIC

Post by modshah »

Hi friends,

I am not that crazy to develop an OS using Win NT (I was just playing and trying to find what happened). I have bochs and thats where I am going to try to remap my pic next. Can I have help as to how can I be sure that I have really remapped the pic ?
modshah
CarbonBased

RE:Problem remapping the PIC

Post by CarbonBased »

Bochs is definitly a good idea (especially with the debugging options).  I hear VMWare 4.0 has debugging options, but I haven't yet been able to use it.  If you can splurg on the money it's an _EXCELLENT_ product, however.

As for testing your remap of the pic, just try to implement an interrupt.  The easiest would be the keyboard (simplest ISR on earth, if you ask me :))

I'm assuming you're remapping IRQ's to 0x20+ (as most do), and therefore the keyboard would be 0x21.  So, if you implement a basic keyboard ISR (ie, ouput a letter, and read from port 0x60).  If you've remapped the PIC correctly, then every time to press a character, you will see that letter on the screen.

Alternatively, you can set an ISR for the timer (if you've setup the timer correctly) to output a letter to the screen, and then (if the PIC has been setup correct), you will see that character outputted _at least_ 18.2 times per second.

Cheers,
Jeff
modshah

RE:Problem remapping the PIC

Post by modshah »

Hi Jeff,

I am actually learning about writing ISRs(from net tuts). So once I am ready with that I think I will be able to implement your idea(The keyboard ISR :-) ).

Thanks
modshah
Post Reply