Well, first I would like to say hello all. I am new to assembly and specially, I am new to this community. I hope not to be bothering anyone right now and I am not really sure if this topic belongs to this category or else. Anyway, I hope on your understanding...
I have a question that maybe might look unusual for you since after taking a hit on the forum search I really found no results... But here it is: I've been looking at the MASM license and somewhere it says that I can only use MASM to build windows programs. This is fine for me but now I've got some kind of doubt about it. Some sort of equipments (like some handhelds) use other brands of Microsoft products. In that case is it forbidden or is it extended to all Microsoft products?
For instance: I want to produce a calculator for Windows CE or I want to make a scene node for X-Box. Would I be able to use MASM for those means or should I be restricted about the traditional Win32 environment?
I've been wondering about it after reading about the link option SUBSYSTEM. I suppose if it is there it has a meaning.
Thanks for the help and once more, hello.
I have a question that maybe might look unusual for you since after taking a hit on the forum search I really found no results... But here it is: I've been looking at the MASM license and somewhere it says that I can only use MASM to build windows programs. This is fine for me but now I've got some kind of doubt about it. Some sort of equipments (like some handhelds) use other brands of Microsoft products. In that case is it forbidden or is it extended to all Microsoft products?
For instance: I want to produce a calculator for Windows CE or I want to make a scene node for X-Box. Would I be able to use MASM for those means or should I be restricted about the traditional Win32 environment?
I've been wondering about it after reading about the link option SUBSYSTEM. I suppose if it is there it has a meaning.
Thanks for the help and once more, hello.
Welcome :)
The limitation to MASM is to write code that will only be run "on a Microsoft operating system". So, you can make XBox games in MASM. And apps for UMPC (UltraMobile PC). And you could make apps for PocketPC...
But there isn't any x86-based PocketPC. And MASM can only handle x86 code.
Not all Pocket PC?s have the same processor type. Earlier Pocket PC 2000 devices sported MIPS, SH3 and ARM processors whilst the latter Pocket PC 2002 devices have standardized on the ARM processor chipset, most of which happen to be of the StrongARM variety.
The link.exe "/subsystem" option puts info in the generated binary file (exe,com,dll) which type of environment the executable needs: WINDOWS|CONSOLE|WINDOWSCE|POSIX. Also note the option "/machine": {ALPHA|ARM|IX86|MIPS|MIPS16|MIPSR41XX|PPC|SH3|SH}. This means that link.exe can handle .obj files, compiled for any of these 9 cpus. But first you need someone to compile those .obj files - and MASM can't handle anything but x86 :).
So, for PocketPC, instead of MASM, you have to use the ARMASM.EXE, provided with "embeddedVisualC" (freeware).
The limitation to MASM is to write code that will only be run "on a Microsoft operating system". So, you can make XBox games in MASM. And apps for UMPC (UltraMobile PC). And you could make apps for PocketPC...
But there isn't any x86-based PocketPC. And MASM can only handle x86 code.
Not all Pocket PC?s have the same processor type. Earlier Pocket PC 2000 devices sported MIPS, SH3 and ARM processors whilst the latter Pocket PC 2002 devices have standardized on the ARM processor chipset, most of which happen to be of the StrongARM variety.
The link.exe "/subsystem" option puts info in the generated binary file (exe,com,dll) which type of environment the executable needs: WINDOWS|CONSOLE|WINDOWSCE|POSIX. Also note the option "/machine": {ALPHA|ARM|IX86|MIPS|MIPS16|MIPSR41XX|PPC|SH3|SH}. This means that link.exe can handle .obj files, compiled for any of these 9 cpus. But first you need someone to compile those .obj files - and MASM can't handle anything but x86 :).
So, for PocketPC, instead of MASM, you have to use the ARMASM.EXE, provided with "embeddedVisualC" (freeware).
codename,
Welcome on board.
You can have a look at Pelle's Macro Assembler PoAsm, it's a Masm compatible assembler coming with Pelle's C development tool package :
http://www.smorgasbordet.com/pellesc/index.htm
Welcome on board.
You can have a look at Pelle's Macro Assembler PoAsm, it's a Masm compatible assembler coming with Pelle's C development tool package :
http://www.smorgasbordet.com/pellesc/index.htm
Keep in mind that the MASM license depends on how you obtained MASM. The various "freely available" (MASM32 package, VC6 processor pack, Windows DDK) have slightly differing licenses. And there's been a freaking lot of controversy on this topic in the past.
The safe part: if you're developing just for yourself, don't worry. If you're going to do anything commercial, get a commercial (no-stupid-rules) version of MASM (you have that if you have Visual Studio).
Or perhaps check out some of the other assemblers :)
The safe part: if you're developing just for yourself, don't worry. If you're going to do anything commercial, get a commercial (no-stupid-rules) version of MASM (you have that if you have Visual Studio).
Or perhaps check out some of the other assemblers :)
Thanks for all your replys. You guys seem to be real friendly.
Well actually I dont really want to make any commercial software and as I said, I am new to it so even if I was to make any commercial software (I guess for my experience in asm:none) this software quality could be put in question right now isnt it? 8) I am just one of those many hobbyists who roam across the cyberspace.
Thanks for the resources you point me up to. I will for sure check them all. I initially took a long read in NASM and sure, I will use it too. I have only windows boxes at the moment but I am interested in getting other different setups in the future especially some weird one shipping for instance Solaris or Mac OS. MASM in that case looks like wont be useful for me.
@Ultrano, you said for ARM processors I need to use ARMASM? Cant I use other assemblers? Yes because in that case, I wonder about the let's say "real plataform independence" of assembly programming language. I am not sure if thats correct but besides other things, each assembler also appear to have different procedures sometimes.
I have been taking a look at some papers, books, Intel processors instruction tables but couldnt find too much information about arm. In Arm site they say all its specifications and all that propaganda about its power saving features yet I didnt know I would need a different assembler to program for it. In the case I need to download those tools, do you know if I can use them for other projects or they are like MASM, limited to a single environment?
Well all in all, thanks so much for your help.
Well actually I dont really want to make any commercial software and as I said, I am new to it so even if I was to make any commercial software (I guess for my experience in asm:none) this software quality could be put in question right now isnt it? 8) I am just one of those many hobbyists who roam across the cyberspace.
Thanks for the resources you point me up to. I will for sure check them all. I initially took a long read in NASM and sure, I will use it too. I have only windows boxes at the moment but I am interested in getting other different setups in the future especially some weird one shipping for instance Solaris or Mac OS. MASM in that case looks like wont be useful for me.
@Ultrano, you said for ARM processors I need to use ARMASM? Cant I use other assemblers? Yes because in that case, I wonder about the let's say "real plataform independence" of assembly programming language. I am not sure if thats correct but besides other things, each assembler also appear to have different procedures sometimes.
I have been taking a look at some papers, books, Intel processors instruction tables but couldnt find too much information about arm. In Arm site they say all its specifications and all that propaganda about its power saving features yet I didnt know I would need a different assembler to program for it. In the case I need to download those tools, do you know if I can use them for other projects or they are like MASM, limited to a single environment?
Well all in all, thanks so much for your help.
For ARM, you can use Microsoft's armasm.exe (from eVC), PoAsm (from PellesC), GAS ( from GCC), NASM-ARM. These are the free assemblers for ARM code.
"real platform independence" of ASM - don't confuse "platform" with "cpu" :)
The best tutorial on ARM asm on the net is http://www.heyrick.co.uk/assembler/ .
I suggest you download and use "embedded VisualC 4.0" from Microsoft.
"real platform independence" of ASM - don't confuse "platform" with "cpu" :)
The best tutorial on ARM asm on the net is http://www.heyrick.co.uk/assembler/ .
I suggest you download and use "embedded VisualC 4.0" from Microsoft.
Oh all right. Thanks for clearing things up. Hope to read you guys again.
Iirc there's some work on ARM for FASM as well, but you'd need to search the forum as it's not official.
Hello all. Well this is what I have found out so far... If I was to use MASM I only be able to make MS Windows / DOS software ONLY. I cannot even make my own compiler with MASM for another OS.
But if I read this Forum correctly, I CAN make my own compiler AND OS useing Nasm32.
Am I correct here? If so then Yeeeehaaaaaawww.... Thank you goes to you guys.
JM
But if I read this Forum correctly, I CAN make my own compiler AND OS useing Nasm32.
Am I correct here? If so then Yeeeehaaaaaawww.... Thank you goes to you guys.
JM
There's also "PoAsm", a wonderful assembler, 99% compatible with masm.
Just like you can make your own compiler and os with other assemblers as long as their license permits.
I use an old CE2.0 unit with pocketdos and an old debugger/compiler/interpreter to write and compile DOS code snippets.
So you can use a 16Meg CE handheld and do assembly for personal stuff, plus plug in a flashram card for storing data and those inevitable crashes when you do asm.
If memory serves me the CE-sdk was as portable as an elephant, something like 500MB and you needed NT to run it...
The problem with the CE units is truly pathetic battery life and I use a mains or a car umbilical cord to eliminate a pound of dead batteries being added to planet earths waste mountain each week.
My old HP200LX from 1995 is still vastly superior to WinCE stuff, giving me a month of daily use from 2xAA batteries via DOS.
Lie in the grass on a sunny day and do asm with no battery worries.
Pocketdos is pretty much the only decent program that runs on the old WinCE units.
I have yet to even find a shareware blackjack program for CE2.0 although Microsoft did manage to release a gamepack for about $30.
WinCE had a bad start in life, even pocket internet explorer only supported html, multi billion dollar microsoft and its zillion employees didn't even bother with javascript support in the browser.
So if you're only doing personal stuff the pocketdos emulator may be worth bearing in mind.
Otherwise you'll need to hump a nuclear powered NT unit around with you.
So you can use a 16Meg CE handheld and do assembly for personal stuff, plus plug in a flashram card for storing data and those inevitable crashes when you do asm.
If memory serves me the CE-sdk was as portable as an elephant, something like 500MB and you needed NT to run it...
The problem with the CE units is truly pathetic battery life and I use a mains or a car umbilical cord to eliminate a pound of dead batteries being added to planet earths waste mountain each week.
My old HP200LX from 1995 is still vastly superior to WinCE stuff, giving me a month of daily use from 2xAA batteries via DOS.
Lie in the grass on a sunny day and do asm with no battery worries.
Pocketdos is pretty much the only decent program that runs on the old WinCE units.
I have yet to even find a shareware blackjack program for CE2.0 although Microsoft did manage to release a gamepack for about $30.
WinCE had a bad start in life, even pocket internet explorer only supported html, multi billion dollar microsoft and its zillion employees didn't even bother with javascript support in the browser.
So if you're only doing personal stuff the pocketdos emulator may be worth bearing in mind.
Otherwise you'll need to hump a nuclear powered NT unit around with you.
The best tutorial on ARM asm on the net is http://www.heyrick.co.uk/assembler/ .
:D :D
Sanity Warning
Go placidly among the system data areas and hardware vectors, and remember what peace there is in a total system crash.
As far as possible, be on good terms with page zero. Write your code clearly and concisely; and listen to the advice of others when they say that writing everything in SVC mode is a crap idea.
Avoid loud and aggressive compilers, they are usually fur coat and no knickers and output horrid bloated code, and are vexations to the mind.
If you compare your code with a compiler, you may become bitter; for always the code output by a compiler will defy logic, but get the job done.
Enjoy your code, think carefully, and plan it well.
http://www.heyrick.co.uk/assembler/sanity.html
Hey thanks guys / gals ...
I may not even make a compiler. Looks like NASM can do it for me.
I have a lot of ideas. I'll just have to do one at a time. :)
As far as PoAsm, it might be worth looking into. Thanks for the suggestion.
I made a small OS with the 16 Bit version of NASM back in the day WAY before the 32 Bit version came out. It booted up into a TEXT message.
Thanks for your support peeps.. :)
jm
I may not even make a compiler. Looks like NASM can do it for me.
I have a lot of ideas. I'll just have to do one at a time. :)
As far as PoAsm, it might be worth looking into. Thanks for the suggestion.
I made a small OS with the 16 Bit version of NASM back in the day WAY before the 32 Bit version came out. It booted up into a TEXT message.
Thanks for your support peeps.. :)
jm
I made a small OS with the 16 Bit version of NASM back in the day WAY before the 32 Bit version came out. It booted up into a TEXT message.
Don't worry - you can still do the same thign now :D
But if I read this Forum correctly, I CAN make my own compiler AND OS useing Nasm32.
Am I correct here? If so then Yeeeehaaaaaawww.... Thank you goes to you guys.
That is correct. NASM32 is a bunch of include files, macros and other things to help develop 32-bit applications using NASM. The license of the primary product (NASM in this case) is what matters. The NASM license is GPL, so there is no limit as to what you can produce with NASM. Modifying NASM, however, is another story altogether.
NASM32 itself has no license, it is basically freeware, but you still have to respect the licenses of any binaries/programs included in the package.
Thanks guys. I love Nasm. AND I read the Nasm Manual to see how it works. It's still the same as when I used the 16-Bit. (Accept this includes the 32-Bit info.)
I am desinging an OS with a graphical interface. I want to boot up into that interface. However, I can't figure out how to go into a graphics mode other then 320x200 16-Colors only. (or something like that.) I want to use something like 1024x768 with at least 16-Thousand colors. (or something like that..) And ideas or example code to be able to do that?
Again, thanks goes to all of you here on this forum. And I will make sure your names will be in the credits of my software if I get far enough. :D
JM
I am desinging an OS with a graphical interface. I want to boot up into that interface. However, I can't figure out how to go into a graphics mode other then 320x200 16-Colors only. (or something like that.) I want to use something like 1024x768 with at least 16-Thousand colors. (or something like that..) And ideas or example code to be able to do that?
Again, thanks goes to all of you here on this forum. And I will make sure your names will be in the credits of my software if I get far enough. :D
JM
Thanks guys. I love Nasm. AND I read the Nasm Manual to see how it works. It's still the same as when I used the 16-Bit. (Accept this includes the 32-Bit info.)
I am not sure if NASM ever had a 16-bit only release. It has had releases to run on DOS, as well as 32-bit OS' like Windows and Linux. This is different than assembling to a target architecture/format. For example, NASM.EXE (DOS version) and NASMW.EXE (Win32 version) should both have the same assembling capabilities, but utilize different operating systems to achieve program thorough-put. So, it ran on 16-bit but assembled to 16/32-bit. Of course, if you have a 16-bit OS like DOS... you can't practically test your own programs unless you are utilizing some OS development techniques :)
I am desinging an OS with a graphical interface. I want to boot up into that interface. However, I can't figure out how to go into a graphics mode other then 320x200 16-Colors only. (or something like that.) I want to use something like 1024x768 with at least 16-Thousand colors. (or something like that..) And ideas or example code to be able to do that?
Again, thanks goes to all of you here on this forum. And I will make sure your names will be in the credits of my software if I get far enough. :D
JM
You can use VESA (VBE), it is simple and supported on many cards. The downside is that you have to jump back to Real Mode (or VM86) to change the display unless you limit yourself to VBE3, which has a protected mode interface BUT is even less supported.
Each video/graphics card, beyond VGA standard, have their own quirks as to how they should be initialized and the like. I would actually suggest sticking to VESA or start reading up on each major graphics card. It is probably easier to deal with VESA than becoming discouraged/overwhelmed with the massive amount of different graphics card adapters with little to no documentation.
Intel graphics adapters are very well documented. nVidia and ATI like to keep their information controlled, for obvious reasons.
There might be more options, but these two are the main/realistic approaches.
Spook, thanks again. Yea the last time I used Nasm, I could ONLY find the 16-Bit version. If there was a 32-Bit version, it was not where I can find it.
But I have it now.. Thanks !!!
Anyhow, as far as the VESA thing goes, I can't find any info on it. I am going to have to find docs (pdf preferred) on it. It's never been easy to find info on graphic cards. I tried making a graphic interface back in 2000. But it only worked on a couple computers that allowed the old style of graphics (320x...)
I would love to meet you guys. The knowledge on assembly must be kick butt. :D
JM
But I have it now.. Thanks !!!
Anyhow, as far as the VESA thing goes, I can't find any info on it. I am going to have to find docs (pdf preferred) on it. It's never been easy to find info on graphic cards. I tried making a graphic interface back in 2000. But it only worked on a couple computers that allowed the old style of graphics (320x...)
I would love to meet you guys. The knowledge on assembly must be kick butt. :D
JM
Spook, thanks again. Yea the last time I used Nasm, I could ONLY find the 16-Bit version. If there was a 32-Bit version, it was not where I can find it.
But I have it now.. Thanks !!!
Anyhow, as far as the VESA thing goes, I can't find any info on it. I am going to have to find docs (pdf preferred) on it. It's never been easy to find info on graphic cards. I tried making a graphic interface back in 2000. But it only worked on a couple computers that allowed the old style of graphics (320x...)
I would love to meet you guys. The knowledge on assembly must be kick butt. :D
JM
Take a gander over at OSDev.org, it isn't ASM specific... but you'll find everything (or links to everything) that you need for OS Development. Just watch out for certain personalities over there, keep your mind free and make your own decisions :)