Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Assembly and Java

 
Mike Shn
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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".
 
geet
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it is really not easy to work with assembly language . reason is they r near to machine language .
 
Jason Ford
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
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
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Tim Voet
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
be sure and not foget about banging rocks to get attention, and communication by beat your chest and slapping your hands on the ground....
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike,
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
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Cindy
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic