Moderators: phlip, Moderators General, Prelates
3.14159265... wrote:What about quantization? we DO live in a integer world?
crp wrote:oh, i thought you meant the entire funtion was f(n) = (-1)^n
i's like girls u crazy
adlaiff6 wrote:Not practical? Certainly not, as long as you never touch a microcontroller or embedded system in your life, or try to write firmware drivers, or try to speed up your speed-critical C, or want to really really understand what you're doing, or....
Assembly is pretty non-cross-platform. It doesn't respect Windows/Mac/Linux boundaries at all...
EvanED wrote:adlaiff6 wrote:Not practical? Certainly not, as long as you never touch a microcontroller or embedded system in your life, or try to write firmware drivers, or try to speed up your speed-critical C, or want to really really understand what you're doing, or....
Basically, here's I think what it comes down to. If you want to program things on a regular basis, assembly is very useful as a mechanism for learning how the processor operates. It's very difficult to understand what is going on behind the scenes without learning assembly along the way.
Reading assembly is also useful all too often if you are in a debugger and things are not behaving in a way you expect.
But in terms of who being a good assembly programmer is applicable to: basically, if you want the title 'systems programmer', you might very well have to get intimate with assembly (though very possibly not as well; the amount of assembly in, say, Linux or Windows is a tiny percentage); if you want the title 'application programmer', you won't.
EvanED wrote:You also have to be very careful if you start thinking "oh, this is performance critical; I'll write it in assembly." Compilers any more are very good at optimization; to pull a number out of my ass, I'd guess 90% of the time they are probably better than 3/4 of the people who have both the know-how and the will to actually do the above.
iw wrote:I see it like this: there's no good reason not to learn assembly.
3.14159265... wrote:What about quantization? we DO live in a integer world?
crp wrote:oh, i thought you meant the entire funtion was f(n) = (-1)^n
i's like girls u crazy
torne wrote:Though x86 does have the delightful property that it's possible to write useful programs using only a text editor. Just create a file called "foo.com" in the editor of your choice and type away! (in real-mode x86 assembled instructions, to be executed under DOS or a DOS emulator of some kind). There are quite a few instructions that can't be represented using printable characters, but you can work around this without much hassle most of the time.
EvanED wrote:evilbeanfiend wrote:im sure there must be an emacs mode to do that sort of thing
I think this statement is a tautology.

Rysto wrote:That'd be a contradiction.
torne wrote:x86 assembly bears a *mild* resemblance to stabbing oneself in the face. With lasers.
Amnesiasoft wrote:torne wrote:x86 assembly bears a *mild* resemblance to stabbing oneself in the face. With lasers.
I always thought that was z80 assembly. So does that make z80 the equivalent of stabbing oneself in the face with laser guns that shoot swords, followed by stuffing yourself in a blender?
Rysto wrote:Itanium
3.14159265... wrote:What about quantization? we DO live in a integer world?
crp wrote:oh, i thought you meant the entire funtion was f(n) = (-1)^n
i's like girls u crazy
adlaiff6 wrote:Rysto wrote:Itanium
LOL
pete wrote:torne wrote:Though x86 does have the delightful property that it's possible to write useful programs using only a text editor. Just create a file called "foo.com" in the editor of your choice and type away! (in real-mode x86 assembled instructions, to be executed under DOS or a DOS emulator of some kind). There are quite a few instructions that can't be represented using printable characters, but you can work around this without much hassle most of the time.
Technically that wouldn't be assembly, that would be machine code (and insane). Remembering that a MOV command is B4 hex or ALT-180 is hardly practical.
torne wrote:pete wrote:torne wrote:Though x86 does have the delightful property that it's possible to write useful programs using only a text editor. Just create a file called "foo.com" in the editor of your choice and type away! (in real-mode x86 assembled instructions, to be executed under DOS or a DOS emulator of some kind). There are quite a few instructions that can't be represented using printable characters, but you can work around this without much hassle most of the time.
Technically that wouldn't be assembly, that would be machine code (and insane). Remembering that a MOV command is B4 hex or ALT-180 is hardly practical.
Yah, it's assembled bytes, which might be called machine code, depending on your particular opinion as to whether that term is meaningful
It's not insane, it's a fun challenge! Doing it with just an editor, the assumption is that you only use printable characters (things you can type without doing ALT-foo), so you don't need to remember that many opcodes - makes it less impractical. When I used to do this in competition, the rules were to only use bytes 0x20 to 0x7E, which is the US-ASCII printable range. A popular challenge was to write a flying-through-space starfield simulation that way, or Life, or some other graphical toy.
Sadly you're stuck with .COM, since all DOS/Windows formats of EXE require nonprintable characters in their headers (as does ELF and even a.out).
As for how to learn, I picked up ARM assembly from a course resembling http://www.cl.cam.ac.uk/teaching/current/CompDesign/ (this is from a later year than the one I took, but hey, Dr. Moore's pretty great). I already knew a couple of other assemblys, but it should be fine for new folks too...
EvanED wrote:Rysto wrote:That'd be a contradiction.
Yes... and no. In logic, a tautology is a preposition that can be proved no matter the premises. A contradiction is an incompatibility between two prepositions. There is only one preposition here; thus there can't be a contradiction.
By a more popular definition it might fit. Personally, I think "oxymoron" is closer to being the right word, but it too doesn't have the right shade of meaning. You could say self-contradiction, but that sounds stupid.
Xanthir wrote:Unless you are designing a compiler, or doing something for which there is simply nothing *but* low-level code (like coding a microprocessor), there is absolutely no reason to ever learn assembly.
After all, why do you think all processors are RISC (Reduced Instruction Set) rather than CISC (Complex) like they all used to be? I mean, there was even a chip with a factorization command built in! Now, you're lucky to get a MOV instruction - it's likely that you're actually just using a mask for an XOR against 0x0000 0000.
EvanED wrote:5. You are looking at security, and need to dip down to the low levels to figure out if something is an exploit
3.14159265... wrote:What about quantization? we DO live in a integer world?
crp wrote:oh, i thought you meant the entire funtion was f(n) = (-1)^n
i's like girls u crazy
Xanthir wrote:Assembly coders are like audiophiles, or wine tasters.
Rysto wrote:And, of course, anybody who's writing any kind of compiler to machine code(not just C) will be writing assembly.
Users browsing this forum: Rosewinsall and 9 guests