x86 Assembler JWASM Hits Stable Release
Odoital writes "January 2010 is an exciting month for x86 assembly language developers. Software developer Andreas Grech, better known to the x86 assembly language community and the rest of the world by his handle "japheth," has released another version of JWASM — a steadily growing fork of the Open Watcom (WASM) assembler. The main benefit of JWASM, arguably, is the nearly full support of Microsoft's Macro Assembler (MASM) syntax. As those in the assembly language community may already know, Microsoft's desire to continually support the development of MASM has been dwindling over the years — if only measurable by a decreasing lack of interest, updates and bug fixes — and thus the future of MASM remains uncertain. While Intel-style syntax x86 assemblers such as NASM have been around for a while, JWASM opens up a new possibility to those familiar with MASM-style syntax to develop in the domains (i.e. other than Windows) in which assemblers such as NASM currently thrive. JWASM is a welcomed tool that supplements the entire x86 assembly language community and will hopefully, in time, generate new low-level interests and solutions."
To know how abandoned MASM really is... try and make an assembler project in 64 bit under Visual Studio 2008. It's not even supported out of the box - like, they never actually tested the configuration.
But, for all that, I prefer YASM as the assembler. Still, congrats to the OpenWatcom port.. NICE WORK. It's always good to have more hands in an area that so many people see as dead.
This is my sig.
I loved saying in an interview "I see you have x86 assembler on your resume". The color drains from the kid's face, I give 'em a snippet:
cwd
xor ax,dx
sub ax,dx
It's nothing rocket, just some fun with 2s-complement.
-- Rabid
Japheth has a number of rather interesting projects that extend the functionality of DOS.
JEMM, which is his EMM386 replacement: http://www.japheth.de/Jemm.html
HX DOS Extender, which adds Win32 PE & basic API support to DOS to allow the execution of a whole array of apps: http://www.japheth.de/HX.html
We have Java!
Deleted
January 2010 is an exciting month for x86 assembly language developers.
I'm sure the two of them will be pleased.
Programming from the Ground Up
JISM!
What's the difference between all of these different Assemblers? Aren't they all just x86, AMD64, or IA32
I still weep slightly when I think of Watcom and their products. They were, by far, among the best out there in the 1980s and early 1990s. I mean, they made Borland's offerings look like garbage, and Borland was pretty damn good at that time, too.
Their assembler and C and C++ compilers were fucking amazing. Nobody generated faster code than them. I remember once moving some code from Microsoft's C++ compiler to Borland C++, and getting a 5 times speedup. Then we moved it from Borland C++ to Watcom C++, and got an additional 8 times speed improvement! We were totally blown away. Their code generator was just that much better than that of much larger competitors.
Watcom SQL was another gem. So much faster than the competition, but also so much easier to use and develop for. It's good to know that Sybase has kept this product alive and well.
To see such a small shop create some high-quality products is truly a testament to the fantastic talent that they had working there. It saddened me greatly to see them consumed by Powersoft, and then Sybase.
Let's write some nVidia drivers in Java!
Weaselmancer
rediculous.
"January 2010 is an exciting month for x86 assembly language developers"
Somehow I have a hard time imagining a bunch of x86 assembly programmers getting excited. I've done assembly on a lot of different architectures, and I can't say "excitement" was ever a term I'd use to describe any emotions related to it.
"Oh wow! There's a new tool that might make some poor saps lives suck slightly less! This is such an awesome month!"
Looking for a computer support specialist for your small business? Check out
What is primary use of assembly these days? I thought C gave you the same level of control, but with portability and much-improved readability.
And to give you an idea of where this question is coming from, the last app I wrote was a web app runs in JRuby, using DataMapper to free me from dealing with SQL and Sinatra to free me from dealing with HTTP/CGI. It runs on the Google App Engine cloud. My world is so high-level, with so many layers of virtualization and encapsulation, that I can barely see assembly way down there at the bottom of the stack...
A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
Pretty much all of assemblers I know work the same way (despite syntax). You can also add macro functionalities to some, using external preprocessors.
So, if anyone can elucidate me, how does this MASM differ from NASM ? And how does its syntax differs from NASM and AT&T ?
I use AT&T syntax a lot (gas), embedded in gcc (for microcontrollers). Do I get any real benefit by using other variants? If so, which benefits ?
Alvie
How does JWASM compare with Flat Assembler?
JWASM assembles you!
from Wikipedia as "non-notable". It's already tagged for deletion there. The OP should get some award for posting a story with a link that will die on its own instead of the usual Slashdot Effect.
Be warned -- JWASM's Wikipedia article was nominated for deletion, as it was thought that notability was not sufficiently asserted. The flame war there might spill over here as well. :-(
I've done that on ATmega processors, but not x86. With x86 hardware so cheap now, the only reason I have to use ATmega's is power savings, but the loss of CPU power makes it not worth it for my toying around.
I'm interested in doing exactly what you did 20 years ago. Would you know of a decent place to find the documentation required to do this? Like info on video output and such? Just a general basic getting started website or even a book, I don't mind buying something for the knowledge.
I'm a C guy, but as I've said I've done SOME asm for other processors, I just want something with an MMU, and since I can fire up a virtualbox/vmware/parallels machine rather than use actual hardware, x86 seems like the easiest solution.
An alternative would be if anyone knows of a ARM emulator for Windows or preferably OSX that could simulate this sort of thing as well. It'd need to emulate an ARM with an MMU at least, and I don't think theres any 'standard' way of doing video and such on arm, unlike the 'standard pc' kind of thing you can go with on x86 since thats pretty much what all the embedded boards act like anyway.
With the Atmel stuff you have a great emulator to see whats going on with the chip, I don't know of anything like that for x86 other than GDB, is there any sort of 'ASM for cluebies' setup for x86 that would compare to the Atmel IDE/simulator/debugger?
Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
January 2010 is an exciting month for x86 assembly language developers.
What? You mean both of them?
I hadn't the slightest objection to his spending his time planning massacres for the bourgeoisie... (P.G. Wodehouse)
Korea's not exactly the cutting edge of coding, either...
Frankly, optimizing assembly code is a PITA, since there are so much different flavors.
For example, AMD and Intel processors have different types of optimization.
If I were to code in assembly nowadays, I'd prefer to use something like LLVM: http://llvm.org/ which should be able to generate good optimized code for any kind of processors, without the hassle of maintaining one routine per processor.
In some very extreme cases (like coding a RC5 decoder or multiprecision routines), it's still useful to use assembler, but in most other cases, I'm sure that LLVM is able to generate code much better than you could achieve manually in the same amount of time.
pusha
msg db 'Because I kinda like assembly.$'
mov ax, seg msg
mov ds, ax
mov ah, 9
int 21h
popa
mov ax, 4c00h
int 21h
nop
boycott slashdot February 10th - 17th check out: altSlashdot.org
It's far from cheap (let alone free) and it's not an assembler, but IDA Pro is indispensible for anyone who needs to develop, analyze, or debug code in assembler. It can't assemble code for you but it does everything else ( http://www.hex-rays.com/idapro/pix/idalarge.gif) you've thought of and many you haven't.
I used to program anything serious in assembler until, say, 1991. Then I moved to C++/Pascal, but always hand-tuned critical parts with Assembler. Around 1995 I realized compilers are doing better job in optimization of those critical parts then my hand-crafted assembly code. I think currently it is only useful for SIMD instructions and similar cases where it is hard for compiler to figure parallel data manipulation with specialized instructions. With ongoing improvements in compilers, those will go away too, right? Or is there anything compilers definitely cannot figure out?
839*929
Would really like to understand the underlying hardware better, but have found the concepts difficult so far.
Can anyone recommend a good perhaps interactive tutorial that explains these concepts?
If you ignore ACs because they are anonymous - you're an idiot.
This story has only been submitted as a last-ditch attempt to argue for the company's notability on Wikipedia. As such, I encourage slashdot to take down the article as it is a marketing-promo.
As someone mentioned above: http://mirrors.igsobe.com/nongnu/pgubook/ProgrammingGroundUp-1-0-booksize.pdf
Mada mada dane.
GNU, Intel, etcetera have compiler builtins for SIMD instructions that are usable directly from C.
If a thing is not diminished by being shared, it is not rightly owned if it is only owned & not shared. S. Augustine
Let's write some nVidia drivers in Java!
To be serious for a moment, it is certainly possible to write large portions of device drives in a higher level language:
Java
http://en.wikipedia.org/wiki/JNode
http://en.wikipedia.org/wiki/JX_(operating_system)
http://en.wikipedia.org/wiki/JavaOS
C#:
http://en.wikipedia.org/wiki/Singularity_(operating_system)
Lisp:
http://en.wikipedia.org/wiki/Genera_(operating_system)
Smalltalk:
http://www.lesser-software.com/en/content/products/LSWVST_Smalltalk_os.htm
Forth:
http://en.wikipedia.org/wiki/Open_Firmware
I had so much fun reading your comment guys. I start to understand what "normal" people feel when I talk about programming. And I mostly do Ruby and Python sometimes C. Continue to have fun with asm x86, we need you guys !
You can use compiler builtins for SIMD these days (fairly standardized across Intel, GNU, etc. compilers). (And don't complain about portability if you are using hand-coded SIMD....you have to be using #ifdefs or something anyway.)
Aside from using specialized instructions that are usually accessible from C anyway via builtins, it's not like x86 assembly has much relationship anymore to what actually happens in the hardware; you can't even control the real registers anymore (most CPUs have many more physical registers than are exposed in the instruction set, and rename on the fly).
Besides, most useful optimizations are much higher-level than that (besides the obvious question of algorithm choices, performance is typically dominated by memory access and you are better off focusing on locality than instruction-level efficiency).
If a thing is not diminished by being shared, it is not rightly owned if it is only owned & not shared. S. Augustine
I never got a five times speedup over Microsoft, but we consistently got 30% reduction in code size, which on a 640KB machine is not to be sneezed at. A big part of that was the excellent register calling conventions and pragma support.
The reality is that Watcom C++ was crushed by Microsoft Visual C++ which had a slick interface lashed onto appalling C++ language support. This was an era when anything slapped in a box was saleable software.
People forget that before eyeballs displaced profit, fatuousness displaced quality. It didn't matter very much if the feature worked as advertised. Software users, like deluded sports fans, believed that hope springs eternal. Maybe it would work in the next version? Sadly, programmers fell for the hype just as often as the end consumers. RIP Watcom.
The day Watcom packed it in—effectively about a version before their last release—I knew that quality had lost the race for many years to come. I didn't have it in me for a career in jello stacking, so I went off for a while to do my own thing. These days, quality is back on the table, for jobs that no longer exist. But if they did, it would be good times again.
Bill Watterson really knew what he was doing when he drew all those snowmen in the first half of the 1990s.
MASM abstracts too much for my tastes. MASM does a lot of things automatically that you don't necessarily want, and it's irritating. Also, it is sometimes context-sensitive: "mov eax, meow" differs in meaning in MASM depending on whether "meow" is a variable or a label. The former means to read the value stored in "meow" (mov eax, [meow]), and the other means to load the address of "meow" (mov eax, offset meow).
Also, MASM code frequently uses things like ".IF" statements to build conditional blocks for you.
NASM and the clone YASM take a far different approach: they do exactly what you tell them to. "mov eax, meow" always means to load the address of "meow" into eax. NASM and YASM also have many ways to specify exactly which encoding to use for your construction when it is ambiguous. For example, you can say "add eax, byte 4" (83 C0 04) or "add eax, dword 4" (05 04 00 00 00). I'm not sure, but it might even be possible to use the longer variant (81 C0 04 00 00 00).
If you're coding in assembly language, it's probably because you need detailed control of the processor for some operation that must be exactly the way you specify. If you don't need that level of detail, you should do yourself and everyone else a favor and use C.
"Screw Sun, cross-platform will never work. Let's move on and steal the Java language." - Visual J++ Product Manager
Assemblers generate LOUSY code in my experience. I've yet see one assemble any sort of fast code. Overrated for sure.
Pffft... Get out of here with this newfangled assembly. Real men code in native binary.
"Software developer Andreas Grech, better known as the x86 assembly language community"
You're welcome
If there is a Jehovah's Witness Assembler it hasn't come knocking at my door.
can elucidate me
Elucidate applies to the subject here - which is not you. So someone would elucidate the difference for you, but they would not elucidate you. You would not say "make clear me", nor should you say "elucidate me".
Can't I fave or save a headline without posting a reply about if I can't fave or save a headline?
That isn't interactive...
If you ignore ACs because they are anonymous - you're an idiot.
What do you mean by interactive?
Mada mada dane.
I was after some sort of applet or flash animation that explains what is happening as it happens, as simply from reading and doing the practical exercise I am still finding the concepts confusing.
If you ignore ACs because they are anonymous - you're an idiot.