ASM is easier than believed
ASM is easier than believed
It looks like programming purely in assembly is easier than using the GCC, linker and makefile stuff.
I see that people who use compilers too often have more problems than what should be acceptable, or maybe it only happens to uneducated compiler users.
But still so, it looks like using assembly is easier than using a compiler, whenever one has a clear design ready to be programmed and given one has at least 2 years of intensive assembly programming training.
Portability wouldn't be a problem because one would only need to reprogram the design we would already have properly documented so we don't forget not even the smaller details.
Assembly is incredibly easy as opposed to popular belief, and any program can be made to run even with a pure raw binary format, without the need to use a complicated linker, only a structured directory tree in a unified include file and a very few external objects.
I see that people who use compilers too often have more problems than what should be acceptable, or maybe it only happens to uneducated compiler users.
But still so, it looks like using assembly is easier than using a compiler, whenever one has a clear design ready to be programmed and given one has at least 2 years of intensive assembly programming training.
Portability wouldn't be a problem because one would only need to reprogram the design we would already have properly documented so we don't forget not even the smaller details.
Assembly is incredibly easy as opposed to popular belief, and any program can be made to run even with a pure raw binary format, without the need to use a complicated linker, only a structured directory tree in a unified include file and a very few external objects.
Re: ASM is easier than believed
I agree. That is, for osdev.~ wrote:It looks like programming purely in assembly is easier than using the GCC, linker and makefile stuff.
Different systems have different instruction types; You would need to adjust the entire source to whatever system you were porting to.~ wrote:Portability wouldn't be a problem because one would only need to reprogram the design we would already have properly documented so we don't forget not even the smaller details.
Often, however, I do believe that it is difficult to maintain. Moreover, it is often more easy to program something in a high level language than in assembly.~ wrote:Assembly is incredibly easy as opposed to popular belief, and any program can be made to run even with a pure raw binary format, without the need to use a complicated linker, only a structured directory tree in a unified include file and a very few external objects.
C8H10N4O2 | #446691 | Trust the nodes.
Why hard to maintain, if it should be easier once the actual program is coded?
And for the ease of a higher level language, doesn't it seem logical that assembly would be virtually as easy as them if one uses things like heavy documentation and not start programming until the design of a piece of code is complete as well as using C-like pseudocode?
And for the ease of a higher level language, doesn't it seem logical that assembly would be virtually as easy as them if one uses things like heavy documentation and not start programming until the design of a piece of code is complete as well as using C-like pseudocode?
so basically you want to do the compiler's job yourself. Yeah sure go ahead, you'll probably end up with a small, lean, fast, and efficient program that works better than c. But then again if you are already IN a kernel like linux then doing stuff can be pretty hard considering you have to do all that syscall stuff before you can even think about writing a program that actually *does* something.
Re: ASM is easier than believed
Strongly depending on your definition of "easy", and the scope of what you are programming. The standard libraries of high-level languages relieve you of much manual labor. Point in case are C++ <string>, <vector> and <algorithm>.~ wrote:But still so, it looks like using assembly is easier than using a compiler...
But that is not really the point, and you could write quite capable "standard" libraries for ASM, too.
The point is that, even with a single CPU family, what is "good" ASM changes over time, so what might have been efficient code once is sub-par today. Even worse when you ever have to switch to another CPU family. With high-level languages, you can recompile and be done with it. With ASM, you have to invest countless man-hours re-writing, re-testing and re-debugging your code, reverse-engineering your documentation in the process because no documentation is ever good enough to re-write an application with any amount of ease.
At least none I have ever seen.
And if you work in a team, there is the issue of finding qualified people. You will find C / C++ / Java / Perl / ... coders a dime a dozen. But professional grade ASM coders? Erm, for which CPU, please?
ASM looks very easy for those with a strong "techie" streak. But while I can talk someone from my business department through a piece of C++ no problem, with ASM it gets a lot harder...
Every good solution is obvious once you've found it.
- AndrewAPrice
- Member
- Posts: 2299
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
I was reading a book on books24x7.com (my college gives each student a subscription), and there was a chapter in an introduction to assembly book about object oriented programming. It was an interesting read.
My OS is Perception.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
I think theres some equilibrium point for asm to be easier. Compare it to car engines: Petrol engines (=asm) are cheaper, common and easy. Diesel engines (= C) are more complex beasts, yet more powerful and consume less to the mile, with an additional penalty of having to pay more tax. If you dont drive much the petrol engine is the object of choice, whereas if you drive 50 miles a day you quickly earn back the expense of buying a more powerful engine.
To complete the analogy, ASM programs are easier when little code is involved, while C and higher level languages are easier when you have to spend quite a bit of time on it.
.02$
To complete the analogy, ASM programs are easier when little code is involved, while C and higher level languages are easier when you have to spend quite a bit of time on it.
.02$
Okay if coders create "powerful" programs with C which is a "beast", then in Assembly, you create the "beast".
When comparing entity A to B and stating that for example, entity B is more powerful than entity A, it only holds true as long as there is something that entity B can do but A can not and you might try finding such situation, but "to no avail" of course.
When comparing entity A to B and stating that for example, entity B is more powerful than entity A, it only holds true as long as there is something that entity B can do but A can not and you might try finding such situation, but "to no avail" of course.
Last edited by XCHG on Wed Mar 21, 2007 9:59 am, edited 1 time in total.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Can even use used cooking oil on Diesel engines, granted it's not the most fuel efficient approach.. It's apparently a poor mans solution
http://www.google.ca/search?hl=en&q=use ... arch&meta=
http://en.wikipedia.org/wiki/Straight_vegetable_oil
Although there are legal implications in some places: Read Here
http://www.google.ca/search?hl=en&q=use ... arch&meta=
http://en.wikipedia.org/wiki/Straight_vegetable_oil
Although there are legal implications in some places: Read Here
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
You're partially correct.. Only ASM can't offer the portabillity & distribution C can..bubach wrote:In what sense could C possibly be more powerful then assembly? It might have many other good sides, but nothing is more powerful then pure asm.
It is very possible to be a powerful C programmer for a multitude of architectures and Operating Systems..
Alternatively you can be powerful ASM programmer for a handful of specific architectures..
Depending on how many instruction sets you learn..
And how many OS specific syscalls you decide to learn..
I think that's the major assembly killer. Many systems don't make their calls actively available, and you have to rely on linking to their libraries causing more system dependence. Moreover, calling their libraries in anything but C or C++ might be near impossible in assembly.Brynet-Inc wrote:And how many OS specific syscalls you decide to learn..
C8H10N4O2 | #446691 | Trust the nodes.