Quantcast
Channel: x86 Assembly - Programmers Heaven
Viewing all articles
Browse latest Browse all 152

TASM 386+

$
0
0
arg, somehow whenever I try to use 386 mode or higher in TASM, it interprets all ax's as eax's and vice versa for all registers. unfortunately it does this at compile time, so doesnt realise ther is any error.

a bit of debugging shows it adds 66h - the operand size overide prefix to the start of all mov instructions...

does anyone know why this might happen or how I can fix it?


oh yeah, the big problem with it misinterpretting eax's and ax's is as follows.


mov ax, 4c00h -> b8004c

int 21h -> cd21


machine code

HOWEVER, the it compiles it goes

66b8004ccd21


which is interpretted as


mov eax 21cd4c00


or however the little-endian thing goes. basically you see what I'm saying. its chumping up the instructions, so int 21h never gets executed. similarly mov eax, 4c00h makes it move 4c00 into ax, and then exeecute instruction 0000h

as you can see, this is not exactly ideal.


so again, if anyone has any info on how to use protected mode, 386,486 mode etc. with TASM (4.0) please tell me!

basically I just want to compile protected mode programs.


ideas??


thanks, bye for now



Viewing all articles
Browse latest Browse all 152

Latest Images

Trending Articles



Latest Images