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 marcov(R), 23.01.2014, 21:57

> Now it seems to work. Do I really need to make branching for 32-bit and
> 64-bit platform? Does it mean that if CPU is in long mode it is not
> compatible with 32b (and 16b) instructions?

Yes. I think flags is simply not subdivided. (can you push 16-bits flags in 32-bit mode?)

> Then how does 64-bit windows
> run older 32-bit apps without recompiling?

The same way that 32-bit win9x runs 16-bits dos.

> then do I need to write all in 64-bit asm (otherwise will I got
> invalid opcode exception)?

No, you can use 32-bit eax for instance. Just not all registers have such legacy subdivisions.

Afaik even the new registers have 32-bit subdivisions (r11d, r11w,r11b etc), but they don't have -H variants.


Complete thread:

Back to the forum
Board view  Mix view
15275 Postings in 1373 Threads, 253 registered users, 18 users online (0 registered, 18 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum