{"id":990,"date":"2009-12-18T00:01:30","date_gmt":"2009-12-18T08:01:30","guid":{"rendered":"http:\/\/www.wambooli.com\/blog\/?p=990"},"modified":"2009-12-17T14:28:10","modified_gmt":"2009-12-17T22:28:10","slug":"why-i-learned-assembly-language","status":"publish","type":"post","link":"https:\/\/www.wambooli.com\/blog\/?p=990","title":{"rendered":"Why I Learned Assembly Language"},"content":{"rendered":"<p>Back in the early days of computers, when PCs were called microcomputers, most of the software you used was written by the computer operator. That&#8217;s <em>you<\/em>!<br \/>\n<!--more--><br \/>\nFor years, the IBM PC, as well as Compaq PCs, came with the BASIC programming language in ROM. If you bought another PC, then you could use the BASIC programming language that came with DOS.<\/p>\n<p>Including a programming language with the operating system was more-or-less normal back in the early days. The programming language of choice was BASIC.<\/p>\n<p>In fact, the only computer I recall that didn&#8217;t come with a programming language was the Macintosh back in 1984.<\/p>\n<p>You needed a programming language to write your own software, and lots of people did just that.<\/p>\n<p>In addition to BASIC, you could buy other language. C wasn&#8217;t that popular back  then, Pascal was. In fact, the Borland company made its fame and fortune by selling a Pascal compiler for $49. The competition sold their Pascal compiler for $499.<\/p>\n<p>One cheap language you could get into was Assembly.<\/p>\n<p>With Assembly language, you&#8217;re programming the processor directly. The code you write translates directly into the binary language used by the processor. Unlike BASIC or other higher level languages, Assembly didn&#8217;t need to be translated or compiled down to the machine code.<\/p>\n<p>The advantages of programming in Assembly were that the code you wrote was very tiny and ran very fast. For example, a program in BASIC may occupy 48K of memory. The same program in Assembly may run in at 2K.<\/p>\n<p>Back in the early 1980s, memory and speed were issues. Some software couldn&#8217;t run because of &#8220;Out of memory&#8221; errors. So it paid to write the code in Assembly, plus you got the advantage of speed.<\/p>\n<p>The drawbacks to Assembly were many. Primarily Assembly takes a long time to code. You have to write all the functions yourself. So if I wrote an Assembly language program that displayed text on the screen, I had to write the function that displayed the text. That takes time.<\/p>\n<p>Further, Assembly is not the easiest thing to learn. It&#8217;s time-consuming and intricate. Mistakes are extremely difficult to hunt down. A good debugger goes hand-in-hand with an assembler. In fact, I couldn&#8217;t have learned Assembly if it weren&#8217;t for a top-notch debugger I used. It really opened my eyes as to what was going on inside the computer.<\/p>\n<p>Then again, I loved programming in Assembly. Doing so really made me feel like I was in charge of the computer.<\/p>\n<p>I wouldn&#8217;t recommend learning Assembly today. Sure, it&#8217;s still fun and all that, but over it&#8217;s impractical for developing today&#8217;s larger programs. Yeah, I&#8217;ve done Assembly on the PC, and it&#8217;s fun to reminisce. But otherwise, it was an interesting expedition for me back in the early days of PC history.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back in the early days of computers, when PCs were called microcomputers, most of the software you used was written by the computer operator. That&#8217;s you!<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-990","post","type-post","status-publish","format-standard","hentry","category-main"],"_links":{"self":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/990","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=990"}],"version-history":[{"count":4,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/990\/revisions"}],"predecessor-version":[{"id":994,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/990\/revisions\/994"}],"wp:attachment":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}