[ prog / sol / mona ]

prog


Is it weird to learn asm as your first programming language?

33 2021-06-09 14:16

The whole "assembly language is hard/bad for beginners/obsolete/<some other trendy buzzword with negative connotations>" is nothing more than a meme. There are only two actual problems with this approach. First: the program has to be re-implemented for any other architecture - a bit overblown case, since as long as the programmer has the reference material, which he/she already understands (block diagrams, the algorithms in mathematical form, documentation), he/she does not really starts from scratch. The already written code, while not directly portable, still has a value in hinting the steps, flow and structure. The second problem that we are facing currently is that the most common microprocessor architecture is 8086-derived.

The original Intel 8086 is already fucked up, and if one adds everything introduced over the last 43 years, much of which being just bloat that addressed immediate market needs and trends, the result is an extremely convoluted programming model. Too bad that much more well-thought architectures like MIPS, Motorola's 680?? line or SPARC did not manage to achieve comparably wide adoption - so was the power of IBM. The Motorola 6809 is another piece of beauty, unfortunately crippled by the 64 kB address space. So far I did not find time to check ARM.

Back to the original subject, learning assembly language simultaneously teaches one about the way the microprocessor works. It offers the programmer much bigger flexibility when it comes to structuring the program. I do not know what software platform the OP uses; what however may be off-putting for many beginners is the fact that a lot of the tutorials available target DOS (not a bad thing by itself, but it is no longer a popular platform) and, what is much worse, 16 b real mode. So below three URLs that target something more contemporary:

https://stackoverflow.com/questions/1023593/how-to-write-hello-world-in-assembler-under-windows/1032422

http://bogdro.byethost18.com/index-en.php

http://web.archive.org/web/20180930075429/https://www.oocities.org/gotcomputer/

38


VIP:

do not edit these