i wrote a small program in windows to edit my source code's, made for the Masm syntax, but masm is ( for as far as i know) not suitable for non-Windows programming.

so i was wondering if there is another compiler, whit the Masm syntax so my editor supports the code, for dos-programming or non-OS programming, something like Nasm (just then whit the Masm syntax).

i hope u guys can help me out

Posted on 2004-06-10 07:17:46 by pyr0_mathic
Firstly it is an assembler, not a compiler.
Secondly, there are DOS-versions of MASM aswell.
Thirdly, non-OS programming (I assume you mean you want raw code) is possible with MASM if you use a linker that can generate raw binaries (for example .com files), or if you create your own tool that extracts the code from a .exe.
Posted on 2004-06-10 07:31:01 by Scali
you could even use masm for linux development, if you build a version of binutils with ms-coff input support... and if you wanted to develop under linux, you could run masm under w(h)ine :)
Posted on 2004-06-10 08:52:00 by f0dder
Thank u for your reply's.

btw: another (mayby to simple) sollution
What when i would compile (or Assembler) my program as a .DLL-file and write a simple program (the bootloader), that loads the DLL into memory like window's would do, when u call loadlibrary. This should work.

Now: i got another question, how can u set where a segment is loaded too (so the Base Adress), so for example:

.data ; start @ adress 0xF001000
var1 dd 4

.code ; Start @ adress 0xF000000
mov eax,var1 ; assembled == mov eax,dword ptr [0xF001000+offset var1]

Posted on 2004-06-14 05:51:19 by pyr0_mathic
Of course you can solve the problem by using an ELF linker. There's one coded by Ancev http://www.asmcommunity.net/board/index.php?topic=15587
Posted on 2004-06-14 06:42:33 by roticv
You can't change the the base address per section, at least with masm+link, but you can set the "global" load address with the /BASE argument to link.
Posted on 2004-06-14 09:05:31 by f0dder
Thx for the reply's

i think ill just stick whit normal masm+link (whit a differnt Global base adress) and will code a small program in nasm to load the masm program into memory.

Posted on 2004-06-17 02:39:45 by pyr0_mathic