Jerry Feldman wrote:
On 01/01/2010 08:49 AM, Per Jessen wrote:
Would it be possible to convert some of those modules to C. Most C compilers support the ASM() directive.
Certainly possible, but what would I gain? AFAICT, I'd still have a major rewrite to do.
Fortunately, my assembler background is on IBM 370,
Mine too. (MVS and TPF).
The advantage of converting as much as you can to a higher level language is (1) improved readability and maintainability, (2) portability to other chips (i386/i686/x86_64, and others).
Ah, yes, I agree (of course) - I thought you meant just wrapping the assembler code in C-functions, which didn't seem to give me much. A complete rewrite in C is not an option - the vast majority of this code does math and such, and is highly optimized/specialized/tweaked (no pipeline stalls etc).
Certainly the effort needed to rewrite your TASM code is going to be significant especially as the chips continue to change and add more features/instructions. I think that NASM is probably your best bet for TASM compatibility to reduce the effort, but using a higher level language will allow you to take more advantage of the newer chip features.
It seems to me that it's really the other way around? If I want to use e.g. SSEx efficiently, I have to use assembler. Anyway, I have in fact been playing quite a bit with NASM, and I am slowly warming to it. I'm just not so keen on the nasm core idea of simplicity, which is why I started researching the others.
Another possibility is to write a TASM to GAS translator :-).
Yeah, similar thoughts have in fact crossed my mind. yasm also has a new tasm-compatibility module, which I have very seriously considered working on/with. Thanks for your input. /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org