Page 1 of 1
compilers for os
Posted: Wed Apr 23, 2003 11:00 pm
by iotas
i used to use tasm and turbo c but these are nopw limiting me on my os due to being only 16bit
would it be posible for me to easly move over to using djgpp and nasm or would i be better using masm also can masm be used for os dev i would like to be able to use masm, nasm and djgpp for my os dev would this be posible
regard
leon pegg aka iota
RE:compilers for os
Posted: Thu Apr 24, 2003 11:00 pm
by carbonBased
Of course masm can be used for osdev. _ANY_ assembly can be used for osdev.
Switch to DJGPP should be fairly effortless, although much of the code you've previously written (such as video routines, interrupts, etc) will probably be rendered useless.
Basically, though, if you write portably, you wont have a problem.
As for assemblers... nasm's free, and works well. Masm's not free (afaik) and is microsoft... blah. Tasm's a better assembler (than masm), I think, but I'd even use nasm over tasm; free software gets updated more then once a year
Jeff
RE:compilers for os
Posted: Fri Apr 25, 2003 11:00 pm
by mindvnas
i think you are wrong, because masm IS free... just go to
www.movsd.com, and you get it
along with some win32 programming stuff, but you can ignore that and use the binaries only...
i think it is better than tasm 3.x (dont have 5.x, does anyone?), and knows more than nasm (dont know nasm very much).
and uses intel synax, not that reversed at&t one.
RE:compilers for os
Posted: Sat Apr 26, 2003 11:00 pm
by carbonBased
Wasn't aware masm was now free... doesn't quite seem like a microsoft tactic, but, anyway...
As for the assemblers, they _ALL_ use Intel syntax, so I don't see how that's relavent. The only major assembler that uses AT&T syntax is GAS, and it also supports Intel syntax as well, now. (and as a side note on AT&T syntax; once you get used to it, it's a better, more intuitive, and "portable" syntax...)
Tasm runs in different modes, and has a "masm quircks" mode, which renders the two relatively indifferent, so I don't know what exactly you find in masm that's "better" then tasm, but if it's syntactic, then tasm can probably do it too.
And what do you mean by masm "knowing more" than nasm? I wouldn't be surprised if masm makes assumptions about what you're trying to do... that's a microsoft trademark, and typically results in lost time due to misinterpretation. It's true that nasm is a basic assembler, that's it. However, it supports a wide range of object formats, and has a straight up syntax which I've never had an issue with. I think it's perfect for osDev.
Again, though, just my opinion.
Jeff
RE:compilers for os
Posted: Sat Apr 26, 2003 11:00 pm
by Brill
If i get errors in my code, nasm tells me. Which im thankful for. If masm assumed stuff i would be knackered basically with not wondering why code isnt working, and not being all too good at debugging code, i would have probably given up in osdev some time ago if i used masm.
Nasm is also available under linux, which is always a good thing
.
Brill.