questions, and looking for tutorials

Started by ninjarider, August 22, 2005, 01:52:37 PM

Previous topic - Next topic

ninjarider

i've read all of the tutorials i have found by adam and found them interesting and i have been reading on all the dos interrupts that i have found on the internet. is there any other resources that would help with in depth learning of 16-bit.

what is this that i hear about unreal processor mode?
i read it was possible to run 32-bit code in 16-bit mode. How is this done?
i also read that it is possible to run 16-bit code in 32-bit mode. How is the done also?

Tedd

Quote from: ninjarider on August 22, 2005, 01:52:37 PM
what is this that i hear about unreal processor mode?
i read it was possible to run 32-bit code in 16-bit mode. How is this done?
i also read that it is possible to run 16-bit code in 32-bit mode. How is the done also?

'Unreal' mode just means that you get the 4GB of memory while still in real mode. (It actually works by switching to 32-bit mode, mapping the memory, and then switching back to 16-bit.) So no, it doesn't mean you can run 32-bit code in 16-bit mode. Though you can use 32-bit registers (but this is normal anyway.)
Running 16-bit code in 32-bit mode is possible, but it uses a virtual machine approach (see VM86 mode.)

There are lots of resources for 16-bit if you manage to find them ::)
Have a look for "Ralph Brown's Interrupt List" :wink
No snowflake in an avalanche feels responsible.

ninjarider

how would u switch back and forth between the modes

Tedd

Bit zero of control register 0 (CR0) indicates protected-mode when set.
However simply setting (or unsetting) this bit will result in a reboot :bdg
There are lots of tables and data structures to set up first -- too much to go into here.
Read the intel system programming manuals for excessive info :wink
No snowflake in an avalanche feels responsible.

ninjarider

what i downloaded was 4 files totaling 10 megs. any idea were to start looking

Tedd

4 files? .... any files in particular? ::)
No snowflake in an avalanche feels responsible.

ninjarider

Ia-32 intel architecture software developer's manual volume 1, 2a, 2b, and 3

Tedd

Okay, thats what I thought :wink
So 1 is more of a general overview of the architecture - useful to read, but doesn't tell much that the others don't.
2a and 2b cover the instruction set - very good as reference, but I wouldn't suggest reading cover-to-cover ::)
And 3 is your system programming friend! So this is the one to explore especially the parts about protected-mode (and switching to/from real-mode.)
Happy reading :bdg
No snowflake in an avalanche feels responsible.