After visiting several assembly programming forums, I got an impression that most of the assembly programmers are using Windows.
Indeed there are lots of assembler available for Windows: MASM32, GoAsm, FASM, NASM, YASM, POASM, TASM, LZASM, etc.
While on non-Windows OSes (Linux, BSD, whatever), you're probably expected to use "C" (and a few assembly).
Is this just because Windows is still the most popular OS (and therefor lots of different assemblers are available) ?
Any other reasons?
::)
unix-based OS's are written in C, for C programmers
a few of them write assembler also - but they have what they need
(i think the Gnu Assembler, aka "Gas", is somehwat common)
also, their C compilers allow inline assembler - that is enough to make them happy
but, you are right - windows is on the majority of computers - more demand for a variety
i dunno about the mac - mac's used to have motorola 68K based CPU's (not sure if that is still true)
Haha, dedndave, you information is a "little" outdated. :green2
Nowadays Macs use Intel (for many years they used PowerPC)
EDIT: yeah, I hate Macs with a passion too
that doesn't surprise me at all - lol
if i start to read something and see the word "mac" i usually close the window :snooty:
EDIT - kind of a shame, though - the 68K was easy code
Quote
Is this just because Windows is still the most popular OS (and therefor lots of different assemblers are available) ?
Any other reasons?
Is there another system ? .At the last news,personnal computers selled without windows was numbered ...none.
Dave,
Quote
EDIT - kind of a shame, though - the 68K was easy code
The 6809e was even better. I still miss it. Imagine a processor with tons of undocumented opcodes (because the specs were stolen, they say) and some that would allow direct interaction of different size registers.
Paul
Portable code is highly regarded in the GNU/Linux culture. C is very portable so it's really the language of choice on these platforms.
I know that GNOME is entirely in C while KDE is QT C++.
If I was to program for Linux, I would just use agner fog's objconv and a good assembler like sol_asm or fasm.
yes Paul - i have written some code for the 6805 microcontrollers - very easy and fun
i think i prefer it over 8051 or PICs (do they even make PICs anymore ? - lol)
it is good to see we have a wide variety of favorite assemblers right here in our group
once i have learned my way around the API a little more, i might give GoAsm a try
although, Fasm and Nasm looked easy to use also (easy is not really what i look for)
there are so many toys out there - a lot to choose from
The Z-80 was also fun to program. It only had about 800 opcodes (quite easy to write your own assembler). The feature I liked the most was that it had two sets of data registers and you could switch at will between the two sets without loosing the data in them.
yes - programming those liitle ones was an interesting challenge - especially if you had to do some math
math on those chips will quickly seperate the real coders from the script-kiddies - no fpu, here, folks
Quote from: dedndave on May 30, 2009, 04:47:22 PM
unix-based OS's are written in C, for C programmers
a few of them write assembler also - but they have what they need
(i think the Gnu Assembler, aka "Gas", is somehwat common)
also, their C compilers allow inline assembler - that is enough to make them happy
but, you are right - windows is on the majority of computers - more demand for a variety
i dunno about the mac - mac's used to have motorola 68K based CPU's (not sure if that is still true)
I've thought quite a bit about why there are so few unix/linux assembly programmers, and upon looking into it, it seems almost like linux and the Gnu Assembler are intended as a punch to the gut of anyone thinking of writing assembly for them.
<rant>The linux kernel has the problem that it tries to avoid assembly at all costs, resulting in massively-complicated chunks of C code to try to avoid just a couple of lines of assembly, and honestly, with the horrible non-standard syntax that Gas uses (made by AT&T, not any company that makes x86 chips), I don't blame them. For examples of this paranoid avoidance of assembly, just look at anything to do with thread scheduling, like sched.c (http://lxr.linux.no/linux/kernel/sched.c). You can write a full thread scheduler in under 400 lines of assembly; why do they use almost 10,000 lines of C for just the thread scheduler
abstraction layer?
Then, there's the added problem of system calls still being implemented with int 80h; it's a throwback to the days of DOS, where you had to put values into registers to indicate what functions you actually wanted to call instead of just calling a function. They could at least have something equivalent to the insertion of jump tables (instead inserting code that puts the constant into a register and does int 80h), but no, they want to make assembly programming as difficult as possible. Apparently linux now supports doing system calls with the syscall/sysret or sysenter/sysexit instructions, but it's still the same issue of hardcoding register values, plus who knows if they even let applications use them directly?</rant>
*sigh* oh well :'(
QuoteThe linux kernel has the problem that it tries to avoid assembly at all costs, resulting in massively-complicated chunks of C code to try to avoid just a couple of lines of assembly
I see a lot of this, complex C code that compared to equivalent assembly code is harder to understand, harder to code, and more likely to contain errors. But it is portable, and it impresses other like-minded C programmers.
I agree that AT&T syntax is horrible, but GAS has supported Intel syntax for years:
http://sourceware.org/binutils/docs-2.19/as/i386_002dSyntax.html#i386_002dSyntax
There is nothing resembling a high-level syntax and compared to MASM the macro system is very weak, but all of the essentials are there, even for creating applications completely in assembly.
Wow! Paul, 6809e processor, that brings back memories. What a fantastic processor, it was used in a 'Dragon' computer in this country (UK) & in Tandy computers in the USA. I 've looked on my bookshelf & I've still got '6809 Assembly Language Programming' by Lance Leventhal, but as you say it was the undocumented stuff that was such great fun.
Quote from: MichaelW on May 31, 2009, 07:47:42 AM
I agree that AT&T syntax is horrible, but GAS has supported Intel syntax for years
Hmm... That begs the question why on earth people still use AT&T syntax... Compatibility, I suppose.
Good points Neo. I think just like you on this matter. Hehe, at least they haven't lost all their sanity.
Here, we can see Linus Torvalds defending the use of the goto (jmp) against a typical second-rate coder straight out of the schools.
http://kerneltrap.org/node/553/2131
Neil,
I once used a 6809e to build a Programmable Controller that was used in a 40 station drop for casting environment. It had 16 forward increments and 16 backward increments with 16 stop positions (pouring head) and a rotary encoded pouring mechanism with 999 possible counts (*2 - for motion pouring and then the final pour). If I remember correctly, it worked out to 9.1 billion permutations and it happen with no discernable hesitation. All that with apsuedo 16 bit processor!
After that, I moved on to the 8085 and worked out a ladder-logic programmer that converted electrical blueprints to workable code. Barbarr-Coleman bought that and PC controllers exploded on the market. Ladder-logic is a lot more sophisticated these days, but BOY was it ever FUN!
Paul
Being 21, I missed this far-west era of computing. Too bad, it looked like a lot fun :green
being 20, i missed it too.
:'(
being 20 would be nice :red
Paul,
From your post it seems like it's your fault I finished up programming PLC's (Ladder Logic) :bg It was extremely boring & I'm glad I'm now retired & can get back to the fun stuff :toothy
lol
i agree Neil
PLC's / PLD's are no fun at all
they made it so a trained monkey could do it
takes all the challenge out of it - lol
i hated writing PLD code
i would much rather design and build a 8051 or 6805 based controller and write that code
6502 was also nice... :bg
Quote from: mitchi on June 01, 2009, 05:13:26 AM
Being 21, I missed this far-west era of computing. Too bad, it looked like a lot fun :green
Be happy :U that you never experienced the "fun" to work with a line-based editor on source files having a few thousand lines, :(
compiling such a beast took a few minutes up to half an hour :dazzled:
i remember waiting in line for up to an hour just to put my stack of hollerith cards into the reader
you better hope you got it right and you better hope the reader doesn't decide to chew up a card
... or the D4 Motorola EPROM programmer burner (from Motorola). A keyboard was a hex pad and output was to LEDs. After a few months with that, I built an RF converter from Heathkit specs and was able to use a TV to see the output.
Gentlemen, I understand your disenchantment with Ladder Logic but it opened up a whole market. The idea WAS to make it idiot proof. It was desiigned to be used by non-programmers who could at least read a schematic. You will certainly have to admit that it did the job anf did it well. Timers and Counters took special considerations but I succeeded by adding a nop here and there. :eek
That was because each command had to have the same size in bytes. Relay coils were the other special consideration. It was fun creating it ...
Paul
lol - i wrote a lot of programs for the 4004/8008 using an eprom programmer
i did the coding on paper
heck, i liked the eprom programmer - it was better than the cards - lol
although, the first ones only allowed forward single-stepping
that means you had to run through the entire address range to get back to a specific address
if you accidently clicked past the address you wanted, you'd be pissed - lol
it didn't take long for them to add a "down" button
Quote from: PBrennick on June 03, 2009, 02:02:53 PM
Gentlemen, I understand your disenchantment with Ladder Logic but it opened up a whole market. The idea WAS to make it idiot proof.
Even that doesn't work.. I had a friend who worked for a PLC (Programmable Logic Array) company and I'd regularly attend their free courses, just to keep up to date. Idiots, or should I say 'non-compliant' attendees would still stuff up ladder logic.
On the last day, the instructor had an expensive bottle of whiskey as a prize for the first person to finish a working version of a ladder logic program, and gave us 30 minutes. I 'whacked it' in 5 minutes and it was the only working version after 30 minutes. That bottle of whiskey stood in my cupboard for 5 years ( I don't drink the stuff - only beer and wine), until we had a party attended by whiskey drinkers (or drunkards) who enjoyed it :bg.
Some people are just not cut out for this stuff, and the funny thing is that they hold positions that they not qualified to hold - office politics :tdown