Hi all,

I need to write an arbitrary (not real) CPU emulator, and I would like to made it "as much as possible" X86 cross-platform.
The VCPU, by design, is totally unaware of the host system, it only loads-modifies-stores values in a block of memory allocated by its VCU (control unit) that will be platform-specific.
I'm thinking of write a module (.dll, .o, .???) composed of a portable core and a platform (to meet calling conventions) project/library/header.
What, in your opinion, is the most suitable assembler to do this ?
NASM, FASM, other ?
I'm pretty skilled in MASM/TASM and I would like to cover Win32 and Linux at least.

The whole project will be released under (L)GPL so I prefer (for end-users, if possible) a free tool.

Tank's in advance

Davide Nardella
Posted on 2003-10-15 06:25:23 by dan64100
Posted on 2003-10-16 01:14:07 by Ultrano
I would suggest NASM, since it supports a wider range of output formats :alright:

I wrote some macros for NASM to help write a single source file and be able to assemble it for various situations without changes. They are a bit clunky, but check them out if you like.

E.g. get http://www.ibsensoftware.com/files/BriefLZ100.zip which contains the include file 'nasmlcm.inc', and shows how it can be used. The code should work with various DOS and Win32 compilers, and with GCC on Linux, FreeBSD, BeOS, QNX, ..).
Posted on 2003-10-16 02:31:14 by Jibz
Tank's to all,

Jibz, I'm italian and don't know the ecxact meaning of "clunky", but anyway I like your macros ;) tank's for them.

Posted on 2003-10-16 04:16:53 by dan64100