Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

64-bit long mode compatability with 32-bit instructions-GAS (Developers)

posted by alexfru(R), USA, 23.01.2014, 08:34

> Well, about WoW64 I read on wiki and it's clear then that it does CPU mode
> switching so this means that 32b code cannot be executed natively

Why not? It can and does. The switch is needed because the kernel is 64-bit, while the caller (your app) is not and you need to switch between the two modes since 32-bit code won't execute in 64-bit mode correctly and the other way around.

> and I do
> need branching for some cases. BTW can I manipulate AX or AH in long mode?

You surely can, the register is still there for you.

> BTW when WoW64 switches CPU to 32b mode (or what else is "compatibility
> mode") then it should be possible to switch it to v86 mode and execute 16b
> code too?

Unfortunately, no. Once you've got into long/64-bit mode, only 16- and 32-bit protected compatibility modes can coexist with it. V86 and real mode can't. Your only options for real-mode/v86 code are:
- code emulation
- hardware virtualization (note that older Intel's CPUs with VT didn't quite support real/v86 VMs, while AMD's with Pacifica did, not to mention the fact that the two implementations need two different versions of the Hypervisor)
- leaving long/64-bit mode completely (undoing all things that were required to set it up) and either switching to 32-bit protected mode (if you are OK with v86) or going one step further and leaving protected mode altogether.


Complete thread:

Back to the forum
Board view  Mix view
15317 Postings in 1383 Threads, 254 registered users, 14 users online (1 registered, 13 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum