my dog learned polymorphism*
The moose likes Beginning Java and the fly likes Assembly and Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Assembly and Java" Watch "Assembly and Java" New topic

Assembly and Java

Mike Shn
Ranch Hand

Joined: May 26, 2001
Posts: 149
I want to ask one question. I really don’t understand the idea why programmers need C, C++ or Java. Assembly what is need for programmers. Right? Assembly is faster and directly communicate with hardware. No need JDK, or linker or etc.
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Your absolutley right Mike, now go design a GUI in assembly and I'll see you in a few months when you get a text box in a window that prints "HI THERE".


Joined: Feb 04, 2002
Posts: 6
it is really not easy to work with assembly language . reason is they r near to machine language .
Jason Ford
Ranch Hand

Joined: Aug 02, 2001
Posts: 54
And when you're done writing that nifty program for Dave's machine, I'd like a copy of it, too. Just make sure that you rewrite it so that it will work on my platform.

Greg Brouelette
Ranch Hand

Joined: Jan 23, 2002
Posts: 144
OK, my sarcastic answer is "Coding in assembler isn't a job, it's a career."
I was going to then give a non-sarcstic explaination of why assembler is not the best tool for all task (neither is Java. In fact no language is the best tool for all task) but I have a feeling this question wasn't posted in order to get a serious response.

For a good Prime, call:<br />29819592777931214269172453467810429868925511217482600306406141434158089
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
You wimps!! :roll: Using a fancy language like assember!!
REAL Programmers write code in Machine Language. NOW you are really talking to the hardware.
WHAT, you can't read all those ones and zeros??? tsk tsk
John Dale
Ranch Hand

Joined: Feb 22, 2001
Posts: 399
It helps to have the right tools for working with assembly language, although there are even more lightweight approaches. Except for very small programs, you need a linker. Of course, it is easierto write and maintain programs if you use an assember, although that gets you further from the machine language (hex). A debugger is a big help too. However, some of what gets done in assembler needs to be debugged with a logic analyzer, or, if you have more time than money, an oscilloscope.
If you don't have an assembler, you can write one. I've always done this in a higher level language, although I've seen in done in machine language.
If you want something that gets you fairly close to the hardware, but requires a minimum of tools, consider FORTH. It requires just a few lines of processor-specific code be written, and then you just have to type several kb of machine independent numbers, checking carefully enough to be sure you didn't get a digit wrong anywhere. (It was either 4k or 8k, I don't remember which.) That includes all the tools, a disk operating system (sort of), editor, etc. On second thought, I think I did the actual disk sector seek/read/write and the serial port handlers in assembly language -- just cannot get away from that assembly language. Anyway, typing in all those numbers correctly doesn't take as much time as you might think, once you figure how how to do it carefully enough.
And lest we forget, the old PC Basic from Dr. Dobb's Journal of Computer Calisthentics and Orthodontia, "running light without overbyte", was a much smaller programming environment than you usually need for assembly language work. I think that was originally developed in hex, without an assembler.
But I prefer Java.
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
We would really do well to get back to the basics - way before assembly languages. I prefer to grunt and groan to communicate.
uh - uh - huh - arg

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Tim Voet
Ranch Hand

Joined: Jan 30, 2002
Posts: 30
be sure and not foget about banging rocks to get attention, and communication by beat your chest and slapping your hands on the ground....

---<br />Nothing is impossible, only improbable !!!
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
The fact of the matter is that folks who write in Assembler have VERY low productivity. Almost NONE of the code is re-usable.
The HUGE advantage of OO languages is the savings in man-power. It is very expensive to pay programmers, and frankly that is a bigger issue to businesses even than performance.
Plus try getting the same version of an assembler program to run on more than one platform. It just is not good enough for an internet society, or an application that may have to run on both a Windows PC or a UNIX machine. So in assemble you end up paying people AGAIN to re-write code for each environment, and you have dual or more maintenance costs.
One of the pluses of Java over C++ is that it is faster to learn, easier to code in (ie. faster development time) and less bug prone because many of the biggest causes for bugs in C++ were omitted in Java. All of this means less cost to develop an application.
THAT is why you need the most man-power efficient language possible.
Mike Shn
Ranch Hand

Joined: May 26, 2001
Posts: 149
Thanks a lot Cindy
It is sorta covered in the JavaRanch Style Guide.
subject: Assembly and Java
Similar Threads
Why 0 based arrays?
forum description
Java programmers lack mental agility ?
Informal poll: What are the most popular 1st languages?