You should not try assembly until you're a programming expert. Its very complicated, I recommend python or C/C++
IMO assembly language is very simple. You have very simple instructions that do very simple things. It's when you combine instructions that things get complicated It's kind of like circuit theory. Basic circuit elements like resistors and capacitors are simple, but when you put them together the number of simultaneous equations quickly overwhelms you. (I do believe in Kirchhoff's Laws, I do I do I do.)
Personally, I think one should learn ASM before C. In many ways C is a portable assembly language, and at run time programs fail at the machine language level. If you haven't experienced (or preferably mastered) assembly language, you'll have a dreadful time understanding some bugs like clobbering the run-time stack.
Also, if you're going to write a compiler IMO you should be one for a while first so you know the challenges first-hand.
Write macro's to remove some of the repetitive coding! Just like creating libraries for C code.
I once wrote a recursive macro in PDP-11 Macro-11 just to prove to myself that I could do it. It generated all permutations of a sequence of data bytes. 5 bytes took 1 minute to assemble. 6 bytes took 6 minutes to assemble. Generating them at run time was instantaneous.
Write macro's to remove some of the repetitive coding! Just like creating libraries for C code.
I once wrote a recursive macro in PDP-11 Macro-11 just to prove to myself that I could do it. It generated all permutations of a sequence of data bytes. 5 bytes took 1 minute to assemble. 6 bytes took 6 minutes to assemble. Generating them at run time was instantaneous.
Top Comments