I have been seeing here and there a debate.. I need someone to clarify this.. Apparently you can make an OS as long as you do not sell it.. and that is the only thing you can do with masm or masm32. Is this correct ? So in otherwords... MS does not allow you to make an OS with MASM or MASM32 to be able to sell ??
Any insight would be helpful. Its the reason I been using NASM ( Netwide Assembler ) is because of the operating system creation ability it has.. AND no restrictions. So I am trying out MASM and I come to find out you are not allowed to do with it as you want like you can with NASM.. so please.. help me understand. Thank you.
JMan
Quote
What you CANNOT do with the MASM32 Project.
4. You cannot use the MASM32 Project to write software for Non-Microsoft Operating Systems.
http://www.masm32.com/license.htm
I guess you should use JWASM (if you still want the MASM feel), or NASM/FASM/etc
JwAsm is a good way to fly
it is almost 100% compatible with masm and you may use it for whatever you like
of course, if you are going to write an OS, an assembler of your own should be a cakewalk, and you can include it in the OS package :bg
FAT12/FAT16 should be relatively straight forward, but I've seen plenty of screwed up implementations.
With the exception of accessing the FAT both 12/16 are sufficiently similar that any rationally thought out solution could do both. FAT32 is somewhat more complicated, but can certainly be integrated with a little thought and a modular design.
If you don't like Microsoft stance on the uses of MASM, you should be concerned about the patents on FAT, Long Filenames, etc
There is an element of myth in the question, no-one writes an OS in assembler as of the last 20 years or so and what most pass off as a private OS is a bootable floppy or similar. i seriously doubt that Microsoft care about bootable floppies and all of the commercial versions of MASM that I owned of old had DOS and similar code that you could use to make them.
What Microsoft licencing prevents is anyone competing with their commercial OS products so if you can produce enough code to shift from a bootable floppy to a disk based OS, unless you OWN a licenced copy of MASM you cannot use their free software to compete with their commercial products. You have options that have various levels of support.
NASM. Well supported but does not have historical Intel notation.
GNU AS (GAS) Later versions have an Intel notation option.
FASM. Well written and well supported but has hybrid NASM/TASM notation.
JWASM. Highly MASM compatible but effectively unsupported.
All are capable of producing both the real mode boot code and the protected mode switching.
Have look also at SolAsm and PoAsm.
SolAsm is a very powerful assembler maintained by Bogdan Ontanu. Poasm is Pelle's macro assembler. It comes with the Pelles C developmen suit :
http://www.smorgasbordet.com/pellesc/download.htm
Also, you can find Poasm in your Masm32 installation : \masm32\bim\poasm.exe
Jwasm is an almost perfect masm clone, so that's what you want.
Hi,
I have some comments on this topiic
Quote
Thank you all for your ideas and answers. Truely lots to look at. I think FASM is the way to go for me though. :)
I think this is a good choice - although you didn't really reveal why your think that your current choice, NASM, is inferior to FASM. Good luck and good bye!
Quote
QUOTE :
JWASM. Highly MASM compatible but effectively unsupported.
END QUOTE
of which I would have to agree.
I guess it depends somewhat how you are going to define "effectively unsupported". AFAICS you can report bugs and feature requests for JWasm, and there is a probability of > 0% that your bug is getting fixed and your feature request implemented ( if it is "reasonable") in a relatively short time frame. This is a lot better than the M$/Masm case IMO. As for feature requests, I agree that the support of FASM or NASM might be better. After all, they are targeted to be compatible with themselves only, so there is probably more freedom to extend the syntax.
Quote from: janequorzar on September 13, 2010, 11:22:05 AM
Wow, why the hostility ?
Don't take it personally, it was triggered by "effectively unsupported".
JWasm is an excellent Masm clone, and fully compatible with Masm 9.0 (at least - I don't have 10.0).
Problems with different assemblers may arise
- when you embark on higher SSE levels (and Jwasm handles them excellently...)
- with exotic macros.
The latter should never be a problem when writing an OS, but from my experience with one of the most exotic macro collections around (MasmBasic (http://www.masm32.com/board/index.php?topic=12460)) Jwasm chokes only in very rare cases, and even for them there are workarounds.
Quote from: janequorzar on September 13, 2010, 12:00:32 PM
Quote from: jj2007
( ** Changes: AutoSave for the RichMasm editor - we do produce crashes, don't we? :green
Hahahahahahahaha
Well, you've got a sense of humor, don't you?
That helps a lot when writing a new OS, and afterwhile being
sued by MS for doing it. :lol
janequorzar, if you are in the educational field probably you can have some
special "permission" from MS to use MASM for building a new OS, just
tell them it is "only for educational purpose". :bg
Quote from: janequorzar on September 13, 2010, 11:54:40 AM
so its a typo on the JWasm website then ?
No, but you misread it apparently. Masm v6.14 is the one that comes with the Masm32 package, and the majority of forum members probably still use that one, which does not even know what SSE2 is. In contrast, Jwasm says "Instructions up to SSE4.2 are supported" - you need a recent Masm version to get SSE4.2 support.
Trust me and Dave - go for JWasm if you are worried about the licence. I use it "by default" since my longer sources are getting assembled much faster with JWasm.
Quote from: jj2007 on September 13, 2010, 12:12:47 PM
Quote from: janequorzar on September 13, 2010, 11:54:40 AM
so its a typo on the JWasm website then ?
No, but you misread it apparently. Masm v6.14 is the one that comes with the Masm32 package, and the majority of forum members probably still use that one, which does not even know what SSE2 is. In contrast, Jwasm says "Instructions up to SSE4.2 are supported" - you need a recent Masm version to get SSE4.2 support.
Trust me and Dave - go for JWasm if you are worried about the licence. I use it "by default" since my longer sources are getting assembled much faster with JWasm.
I tend to agree.
JWASM = written in C/Open source/MASM compatible/updated regularly/not many docs should not be a problem for you as well. :U
I'm waiting for the 64bit windows.inc to start experimenting with it. As an Assembly n00bbyst I'd like to have more tuts and docs, but
you can't have everything all together. :P
Quote from: janequorzar on September 13, 2010, 12:00:32 PM
Quote from: jj2007
( ** Changes: AutoSave for the RichMasm editor - we do produce crashes, don't we? :green
Hahahahahahahaha
MS Word has the same feature :wink
I use RichMasm for all my assembly and JavaScript work, and crashes are very rare indeed, it's not as easy to crash the OS as it was in the old Win98 days. But on some occasions the autosave helped me a lot...
janequorzar,
With JWASM, what you see is what you get, you have a fully buildable source so there are no secrets or limitations with it but the author has made it clear over time that he will not provide support for JWASM nor will he provide documentation for it and you have to rely on Microsoft documentation to use it.
I build JWASM with a batch file using Microsoft VC 2003 (VCTOOLKIT) and it works correctly so while you are short on documentation for JWASM, at least you know what is in it as far as source code, its an interesting choice, pick what suits you.
Quote from: janequorzar on September 13, 2010, 12:19:02 PM
Quote from: frktons on September 13, 2010, 12:16:06 PM
JWASM = written in C/Open source/MASM compatible/updated regularly/not many docs should not be a problem for you as well. :U
I'm waiting for the 64bit windows.inc to start experimenting with it. As an Assembly n00bbyst I'd like to have more tuts and docs, but
you can't have everything all together.
lol not many docs.. well there was the selling point.. my students don't need info on how to use it.. naaaa.. lmao
Actually, I have been wondering about that too. I have found some OSes that are full 64 Bit only OSes and they work too. But nothing on being compatible with Windows. ( speaking only of 64-Bit of course. )
The good thing with JWASM is that you can write 16 bit code for the BIOS, 32 bit code for
windows, and 64 bit code as well, with some know how of the calling conventions for 64bit
windows. The coming soon windows.inc for 64 bit will complete the job. :U
Don't miss GOASM, look at the subforum in this forum, there are many fans around here. :U
Quote from: janequorzar on September 13, 2010, 12:39:43 PM
JWasm. But .. con is no docs.
There are many docs. Just google for
MASM :wink
Quote from: janequorzar on September 13, 2010, 11:22:05 AM
Wow, why the hostility ?
That wasn't hostile. Or, if it was, then it was my usual level of hostility.
Quote
and yes I did mention why I cannot use nasm. Its in an earlier posting in this thread, its because I wanted to find a compiler that can use the more recent MASM syntax. NASM does not support MASM and it says in their NASM documents they do not plan on it, and since FASM can use the syntax and it wont stop you from creating anything you want, it was the choice of all the compilers to use.
This is a misconception, at least if I understand you correctly. FASM does not support Masm syntax, its syntax is relatively similar to NASM's - but has superior Macro capabilities.
Quote from: japheth on September 13, 2010, 12:48:38 PM
Quote from: janequorzar on September 13, 2010, 11:22:05 AM
Wow, why the hostility ?
That wasn't hostile. Or, if it was, then it was my usual level of hostility.
Quote
and yes I did mention why I cannot use nasm. Its in an earlier posting in this thread, its because I wanted to find a compiler that can use the more recent MASM syntax. NASM does not support MASM and it says in their NASM documents they do not plan on it, and since FASM can use the syntax and it wont stop you from creating anything you want, it was the choice of all the compilers to use.
This is a misconception, at least if I understand you correctly. FASM does not support Masm syntax, its syntax is relatively similar to NASM's.
Better to add that japheth is JWASM developer, in case you have some direct question to ask. :P
Quote from: janequorzar on September 13, 2010, 02:14:08 PMIs there a set of INC files in assembly that has nothing to do with being REQUIRED to have MS libraries ?
In otherwords for OS creation and still using the MASM syntax.
Try this:
.486
.model flat, stdcall
option casemap :none
.code
start: mov eax, 12345678h
ret
end start
Assembler without the OS. You can still look at it through Olly (http://ollydbg.de/version2.html)'s eyes
Quote from: janequorzar on September 14, 2010, 01:13:46 PM
Now that is impressive stuff. I even registered with the guy because it makes my job a LOT easier now. I cannot believe in all my years of assembly programming that I never came across this before. Thank you for the heads up. :U
:lol this is the
ultimate stand for Assembly programmers, here they joined
to stay, no matter what. :lol
janequorzar,
this much, if you are going to work on an OS you won't be worried about system include files, you will be writing your own. Without DOS, BIOS or Win32 functions you will be writing your own with whatever library support you can find that don't assume an OS behind them.
Quote from: hutch-- on September 12, 2010, 03:24:59 AM
There is an element of myth in the question, no-one writes an OS in assembler as of the last 20 years or so...
Well, not quite true... I did. Or should I say, my former employer - Eyring corporation did. (I was the lead engineer and wrote the kernel core.) Although it did not compete with MS and was never a commercial success (the company folded in late 2001). It was called "EYRX" and was written in 100% assembly language using MASM. It was designed to be a super-lean, yet very powerful embeddable real-time operating system that would take advantage of the i386/PC-AT architecture. Among other things, it featured an advanced timing sub-system (http://localhost/domains/jmrware.com/web/public/articles/2001/pc_rtos_timing/PC_RTOS_Timing.html) that allowed very precise task scheduling in the absolute time domain.
If anyone is interested in checking it out, I just repackaged the latest (and last) demo disk release - (the demo was provided as a bootable floppy). You can download it here: EYRX_DEMO_20010308.zip (http://jmrware.com/downloads/EYRX_DEMO_20010308.zip) (2.5MB). The zip file contains a bootable CD ISO image. I've also posted a copy of its documentation here so you can check it out first: Eyrx Demo Disk Documentation (http://jmrware.com/articles/2001/eyrx_demo_doc/INDEX.HTM). Here is the checksum of the download file :
EYRX_DEMO_20010308.zip - SHA1=BFAED9C6AF9407DDA97FE5E413CF7BF016958147
Eyrx was something only a hard core ASM programmer could truly appreciate. I wish I had known about you guys back then before we went out of business. Maybe we could have generated more interest.
Cheers,
Jeff Roberson
Hi Jeff,
Good to hear from you. Sounds like it was an interesting toy. Interestingly enough it is now possible for someone to package a complete OS development kit using JWASM as it can easily handle about 99.999^% of MASM code including most MASM macros but it has a cute capacity that is useful for OS dev people with its BIN output option. I have been playing with it to build single algos with no externals and writing the results as a BIN file as this is very useful if you wish to embed a working block of binary in another application.
Quote from: ridgerunner on October 02, 2010, 05:51:46 PM
If anyone is interested in checking it out, I just repackaged the latest (and last) demo disk release - (the demo was provided as a bootable floppy). You can download it here: EYRX_DEMO_20010308.zip (http://jmrware.com/downloads/EYRX_DEMO_20010308.zip) (2.5MB). The zip file contains a bootable CD ISO image. I've also posted a copy of its documentation here so you can check it out first: Eyrx Demo Disk Documentation (http://jmrware.com/articles/2001/eyrx_demo_doc/INDEX.HTM). Here is the checksum of the download file :
EYRX_DEMO_20010308.zip - SHA1=BFAED9C6AF9407DDA97FE5E413CF7BF016958147
Hi!
I tried to load OS in VM, by ISO image and by floppy image, but loading is stopped at "synchronizing clock...".
I saw, what in distribution is not included core.dll also.
This OS is not compatible with VMs, in particular - with VPC2007?
Alex
Its best to boot the Eyrx demo from a real floppy (or real CD), on a real computer (preferably an old box you have lying around). From my (very limited) experience, VMs don't always provide perfect hardware emulation and Eyrx employs native 32-bit protected-mode drivers which talk directly to the hardware (completely bypassing the BIOS and never droping down into real-mode). And Eyrx uses some non-standard hardware chip configurations which not all VMs emulate correctly. e.g. The PIC interrupt controller chip has an "automatic-EOI" mode, which worked great on many real boxes (and shaved some "critical code" time off ISRs), but this mode did not work in VMware (late 90's version), so we had to ditch using that mode. I'm not sure about VPC2007 (never used it), but I've been able to get Eyrx to run successfully under a VirtualBox VM, but note that it does not recognize the floppy or HD controllers in the VM environment. Not sure about the recent versions of VMware either.
p.s. Sorry about hijacking this thread. I was going to start a new thread, but was unsure which forum this would fall under. ???
Quote from: ridgerunner on October 04, 2010, 02:42:46 AM
Its best to boot the Eyrx demo from a real floppy (or real CD), on a real computer (preferably an old box you have lying around).
Thank you for reply!
Alex