+MrFish Posted April 2, 2017 Share Posted April 2, 2017 In the spirit of correcting source code errors in printed material... Back a couple of years ago, I started going through Assembly Language Programming for the Atari using the WUDSN IDE for Eclipse and Mads Assembler. To my surprise, the very first example (chapter 7, page 83, "Clearing Memory" BASIC machine language subroutine) contained a small but important error. I'd planned to go through the entire book and share the Mads versions of all the examples, but only got as far as example #3. Since the correction for example #1 might save beginning learners some headaches, I decided to post what I've got so far. My conversions aren't exact, in that I've taken the liberty to change label, equate, and pointer names to reflect my own personal style. But they're still closely related to the originals, and at least not difficult to discern given the size of these examples. I may have added some comments, and did, in fact, add a comment for where example #1 was changed to correct the error. 1 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted April 3, 2017 Author Share Posted April 3, 2017 There was a typo in example #2 that I posted. It had a letter "O" instead of a "0" (zero) in one of the hex numbers. I just took down the other ZIP file and am posting this one with the corrected file. Assembly Language Programming.zip Quote Link to comment Share on other sites More sharing options...
lbaeza Posted April 4, 2017 Share Posted April 4, 2017 Thanks for sharing this, MrFish. We all know listings on magazines and books where very common back then. This will save us a lot of unpleasant debugging. Kind regards, Louis BQ Quote Link to comment Share on other sites More sharing options...
+MrFish Posted April 4, 2017 Author Share Posted April 4, 2017 Thanks for sharing this, MrFish. No problem... We all know listings on magazines and books where very common back then. Not only then, but nowadays too; recent example being errors noted by phaeron in the jsobola schematics for the Percom RFD-40S1 drive. Quote Link to comment Share on other sites More sharing options...
lbaeza Posted April 4, 2017 Share Posted April 4, 2017 I meant errors on listings Kind regards, Louis BQ Quote Link to comment Share on other sites More sharing options...
+MrFish Posted April 4, 2017 Author Share Posted April 4, 2017 I meant errors on listings Kind regards, Louis BQ Yeah, I knew what you meant. In fact, it adds to my point about errors still being common nowadays. Quote Link to comment Share on other sites More sharing options...
tep392 Posted April 4, 2017 Share Posted April 4, 2017 Thanks for sharing this, MrFish. We all know listings on magazines and books where very common back then. This will save us a lot of unpleasant debugging. Kind regards, Louis BQ So true. I experienced one of these bugs recently. I picked up Computes 1st and 2nd books for Atari and the first program I typed in, a disk menu program in BASIC, had a major bug that I had to fix before it would work. Quote Link to comment Share on other sites More sharing options...
+Stephen Posted April 4, 2017 Share Posted April 4, 2017 The one that got me was Mapping the Atari (revised XL/XE addition even). I was writing independent missile move code in ASM for the 1st time. Took forever to debug my masking code (since it perfectly matches what was specified). Mapping has the bit order wrong - page 169! I hate writing in books, but I made sure to correct this in my copy. 1 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted April 4, 2017 Author Share Posted April 4, 2017 (edited) The one that got me was Mapping the Atari (revised XL/XE addition even). I was writing independent missile move code in ASM for the 1st time. Took forever to debug my masking code (since it perfectly matches what was specified). Mapping has the bit order wrong - page 169! I hate writing in books, but I made sure to correct this in my copy. Ah, I never saw that one before (I always used the map from Compute's 1st Book of Atari Graphics -- see below). Bummer! The nice thing about PDF versions is that the corrections can be made to look good -- if one has proper editors. Edited April 4, 2017 by MrFish 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.