{"id":5080,"date":"2013-09-02T00:01:06","date_gmt":"2013-09-02T07:01:06","guid":{"rendered":"http:\/\/www.wambooli.com\/blog\/?p=5080"},"modified":"2013-09-01T09:00:14","modified_gmt":"2013-09-01T16:00:14","slug":"where-i-learned-to-program","status":"publish","type":"post","link":"https:\/\/www.wambooli.com\/blog\/?p=5080","title":{"rendered":"Where I Learned To Program"},"content":{"rendered":"<p>You think Windows sucks? It&#8217;s a vast improvement over the Days of DOS, with its unhelpful, cryptic command line interface. But that was a friendly field of festive flora compared with the dark dingy pre-DOS environment where I learned to program. Yes, I&#8217;m referring to my first computer, the cursed TRS-80.<br \/>\n<!--more--><br \/>\nSpecifically, I had a TRS-80 Model III. It came with 4K of RAM, no disk drives, no printer, just an ugly TV screen monitor that fried my eyeballs after 20 minutes.<\/p>\n<p>Oh, and I purchased a programming manual. That&#8217;s because the computer came with the BASIC programming language in ROM. It was effectively the TRS-80&#8217;s operating system. It was all you could do, unless you paid the $800 for a floppy drive or $70 for a casette player and then purchased programs to load and run. I opted for neither.<\/p>\n<p>That decision left me with what you see below, the TRS-80&#8217;s BASIC interpreter. This emulator is courtesy of Peter Phillips; the original can be found by clicking <a href=\" http:\/\/people.cs.ubc.ca\/~pphillip\/trs80.html\" target=\"_blank\">here<\/a>.<\/p>\n<div align=\"center\"><iframe loading=\"lazy\" src=\"http:\/\/www.wambooli.com\/include\/trs80\/\" width=\"548\" height=\"496\">Your browser apparently doesn&#8217;t support inline frames.<\/iframe><\/div>\n<p>So let&#8217;s get programming, people! Pretend it&#8217;s the early 1980s and you&#8217;re young Danny Gookin, sitting down at your gunboat gray microcomputer, eager to prove that you didn&#8217;t just waste $1080 of your hard-earned minimum wage job money:<\/p>\n<p>Click the Run button to start. At the <code>Cass?<\/code> prompt, press the Enter key. At the <code>Memory Size?<\/code> prompt, press the Enter key. Then behold the stoic brevity of the <code>READY<\/code> prompt.<\/p>\n<p>Try to type whatever you wish and you&#8217;ll probably be greeted by the <code>?SN Error<\/code> prompt. That&#8217;s a syntax error message. Yep: Memory was tight so error messages are precariously brief.<\/p>\n<p>The only thing I could do at the <code>READY<\/code> prompt, as you can do with the Javascript program above, is write BASIC code.<\/p>\n<p>Start your program by typing the word <strong>AUTO<\/strong> and pressing the Enter key:<\/p>\n<p><code>AUTO<\/code><\/p>\n<p>You see the number <code>10<\/code> appear on the screen. That&#8217;s Line 10, the first line of the BASIC program you&#8217;re about to code. The line numbers appear automatically, 10, 20, 30 and so on. Otherwise type the following text, pressing Enter at the end of each line:<\/p>\n<p><code>FOR X = 1 TO 20<br \/>\nPRINT RND(100),<br \/>\nNEXT X<\/code><\/p>\n<p>After you press Enter the last time, you&#8217;ll see line number <code>40<\/code> on the screen. Press the Esc key, which is mapped to the old TRS-80 Break key, to end the Auto mode.<\/p>\n<p>Type the <strong>RUN<\/strong> command and press the Enter key to behold the program&#8217;s output. You see 20 random values in the range from 1 to 100. Yep, that&#8217;s one of the first programs I wrote for the TRS-80. It really impressed me back in 1982. And it ran just a little bit slower than the emulator (above).<\/p>\n<p>Lamentably I don&#8217;t have any full-on examples of programs I wrote on the TRS-80. After I learned BASIC, I took up Z80 assembly language, which was really fun. I coded silly games and some communications programs, mostly because the TRS-80 lacked such programs and utilities. It was fun, but limited.<\/p>\n<p>As the PC took over the market, I shifted to the MS-DOS platform in 1985. The floppy disks were incompatible between the two systems, so everything I wrote on the TRS-80 is gone forever. Even so, the emulator remains a great piece of nostalgia.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You think Windows sucks? It&#8217;s a vast improvement over the Days of DOS, with its unhelpful, cryptic command line interface. But that was a friendly field of festive flora compared with the dark dingy pre-DOS environment where I learned to program. Yes, I&#8217;m referring to my first computer, the cursed TRS-80.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-5080","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\/5080","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5080"}],"version-history":[{"count":14,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5080\/revisions"}],"predecessor-version":[{"id":5104,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5080\/revisions\/5104"}],"wp:attachment":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5080"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5080"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}