Topic: using yasm in order to mix 32-bit and 64-bit code in the same file.

Hi fellas,

i would like to create a bin that is cross platform for both x86-32 bit & 64 bit...

i've red with a lot of interest the paper by roy g biv intitled "Heaven's Gate: 64-bit code in 32-bit file" available here:
http://vxheavens.com/lib/vrg16.html

he has written:

Best of all, Yasm now allows mixing 32-bit and 64-bit code in the same file. When I was writing Shrug48 (because half-way between 32-bit and 64-bit), this was not possible, so I had two source files that had to be built separately and then concatenated afterwards. Now with Yasm, we can use "bits 32" before the 32-bit code, and "bits 64" before the 64-bit code, anywhere in the file, and we can swap between them as much as we want, like this: [...]

but in the heaven.asm source code there is the compiling option written:
;yasm -m x86 -f win32 -o heaven.obj heaven.asm

and when i read the yasm manual, there are separate options for both win32 & win64 pe files...

am i dumb or what smile
any help or hints would be welcome

Bye

Re: using yasm in order to mix 32-bit and 64-bit code in the same file.

you have to choose a platform for first generation - 32 or 64.  He chose 32, but you can see in the source that there is bits 32 and bits 64, so to change from 32-bit to 64-bit.  Yasm talks about the two different file formats but this is something separate you don't need.
the Heaven virus infects both file formats, just look a bit more.

Re: using yasm in order to mix 32-bit and 64-bit code in the same file.

i've understood, thanks for your answer homie !