Category Archives: Programming

Try and try and…

Wherein, I outline my intention to present completely biased and unfair reviews of a few books designed to teach readers how to program in 6502 machine language, and perhaps learn a thing or two along the way.

I’ve complained at length in the past (don’t go looking for the posts here – I never bothered to restore any blog entries after that extended period of downtime) about the tendency of most 6502 assembly tutorial authors to simply throw the reader face-first at the brick wall of learning binary maths, usually within the first five to ten pages.

These “introductions” usually kick off with dire warnings in bold font of failure, destruction, and the promise of the fiery overturning of buses full of nuns and kittens, if the lessons are skipped without fully understanding them.  Following these proclamations of imminent doom, the reader is presented a paragraph or two of brief explanation and a couple of exercises one can use to show off their new-found prowess to friends.

But what if you didn’t understand something?  What if the answers you come up with to the exercises don’t match what’s in the book?  You could try to read the lesson again, but without a corrective guide, you’re probably going to end up at the same conclusions.

You could plunge ahead, but… Well, you *do* remember those warnings, don’t you?

And so over the years, I’ve accumulated a pile of books, all of which have fifteen to twenty pages of well-worn material, and are retail-shelf new that point.  As I look through them again, one thing is clear above all else: the information is presented in a nearly-identical and uniform manner: learn this binary math stuff before you proceed.  There’s a reason for this, and it’s a simple one: it works.  Or it works well enough to get budding assembly language programmers on their way to greater coding fame.  Countless Apple II programmers have followed these well-trodden paths before me and have emerged at the other end, wiser, smarter and with optimized code flowing forth from them like a river.

The inevitable conclusion is the problem must be with me.  This is a challenge I’ve been unable to overcome.  I haven’t been able to make the connection between the lesson and the problems.  The data seems to make perfect sense as I read through it, but my answers to the exercises are invariably wrong and I can’t tell you how I got there, or where the error was made.  Whether it’s that I’m not processing the lessons logically, or that this is a thing I’m simply not smart enough to learn, one of the flyrods is going out of skew on the treadle between the page and how my brain processes what I’m seeing.

One solution then is to try again, this time taking care to analyze the lessons and try to divine how I absorb what I think is being taught, and see if a single point of failure emerges.

These are the books I’ve got on my shelf and I’ll be trying each one, documenting as I go.  And who knows?  Maybe I’ll get lucky and it will just click on one day like a light-switch…  Nah, nothing is ever that easy.

  • Apple Machine Language for Beginners, Mansfield
  • Assembly Lines: The Book, Wagner
  • Programming the 6502, Zacks
  • Apple Machine Language, Inman & Inman
  • How to Program the Apple II Using 6502 Assembly Language, Hyde
  • 6502 Assembly Language Programming, Fernandez, Tabler & Ashley
  • The Visible Computer: 6502

And a few other online resources and guides, such as Nick Morgan’s Easy6502 guide. I’m going to have a go at Wagner’s book tonight, since someone recommended it in the comments of the my previous post about this topic.  I expect I’ll have more to say tomorrow.

No awesome Retrochallenge 2014WW prizes for me

Sadly, another year has slipped by and I wasn’t able to get to my intended 2014WW project.  This is partly because January is always a crazily busy month for me – work picks up, and an entire weekend and most of the preceding week is lost to an anniversary getaway with my wife – and partly because I wasn’t able to locate the Apple /// BOS disk that I’d pre-configured to work with my CFFA card and I didn’t adequately organize my time to devote the necessary 90 uninterrupted minutes (give or take) to start over.  So there it is… My dreams of Retrochallenge glory lie in ruins.  We’ll get ‘em next year.

One last dance with 6502 assembly language

Way back when (2012 or something?) I posted my intention to learn 6502 assembly language, and explained that my roadblock to this point has been an inability to get my head around binary math-by-hand.  Life, site hacks and other stuff got in the way, but I’m back to this again.  I still do think it’s possible to do without being able to multiply 1101011101011101 by 101010111110110111 without the aid of a calculator.  Someone pointed out to me that it helps to have a goal, in this case an “end-product” program that I want to write, so I’ve come up with an idea that I want to make real, or as “real” as any program code can be, I suppose.

Some people want to run a marathon before they die, or climb Everest.  I want to learn 6502 assembly language.

Retrochallenge 2014WW

I’m off to a bit of a slow start, I’ll admit, but I’m already further along than I got the entire month during the 2012WW.  So far, I’ve dusted off my Apple /// and a monitor (I love the industrial design on that thing) and been able to test the hardware.  Everything passed the diagnostics as expected, but I’ve had little luck getting much further, as I can’t locate the BOS disk that already has the preconfigured drivers to get the /// up and running with my CFFA card.

True, I could skip that for now (and I may have to if I come up empty in the next couple of days) and just boot directly to a Business BASIC disk and work that way, but I’ve come to really appreciate the speed and convenience of working off the CFFA over the past few years. Unfortunately, no one (that I’m aware of) has come up with a work-around for having to boot the /// from a floppy disk in the internal 5.25″ drive.

The other alternative is to build a new bootable BOS driver disk and work from that.  Not impossible, but that takes a fair amount of time and there’s no guarantee that I won’t accidentally wipe the existing data on the CFFA, which includes my half-finished, last-place winning KansasFest 2012 HackFest entry.  As bad as it is, I’d still hate to lose that – it’s one of the few still-existing fragments of code I wrote.

Worse, the rebuild time will have to be uninterrupted as I have a tendency not to be able to get back to a half-finished project like that.  If I don’t complete the process, it will sit incomplete for months and when I do decide to get off my butt and wrap it up, I’ll have forgotten everything I did to that point and have to start over anyway.

Then again, I could just use a blank CompactFlash card.  Still a lot of configuration, but I won’t have to be as careful about ensuring I don’t accidentally wipe it and have to start over.

So, fingers crossed that I can find that bootable disk by my self-imposed Friday deadline.

In the meantime, here’s a picture of my official Retrochallenge 2012WW setup.

2014WW Apple III

Crying wolf

6502Lane is back.  (You’re reading this, aren’t you?)

Exciting news, right?  Probably it has lost a bit of its edge though, considering I take it offline every two or three months in a storm of tears and drama, and then bring it back again, often just hours later.  Lather, rinse, repeat.

Honestly, I didn’t expect to stand it up ever again after the most recent decommissioning: the domain was set to expire after the end of the current registration and I felt I was done.

It had become clear the vintage computing book I was attempting to write wasn’t going anywhere and my entropy in community involvement was making it a more and more attractive prospect to clean out my storage space of Apple II and /// computers and documentation that hadn’t been touched in more than a decade.

The ever-increasing content theft and personal attacks both within the vintage computing hobby and beyond combined with my frustration at the crude nature of today’s blogging tools and a general waning of personal interest in the Apple II platform to dull my passion.  I was happy to move on.

Former readers of this blog, tired of my cry-wolf, rage-quit-and-return antics, agreed and stayed away in droves.

And then a post appeared in the “Apple /// Enthusiasts” group on Facebook.  Another user had come to a similar point in his life and offered up his extensive collection, hoping it would go to someone who would cherish and enjoy it, as he just didn’t have time any more and the focus of his priorities had shifted away from his former interest.  I (and I’m sure about a dozen other collectors, hobbyists and recyclers) immediately contacted him and while I didn’t score the bulk of his holdings (most of which ended up on eBay a short while later for a king’s ransom), I did land a couple of interesting items that I’ll document here at some point.

As the bartering and electronic payments were flying back and forth between us at a furious pace, my RSS reader gently nudged me, reminding me that it was time to sign up for the impending Retrochallenge 2014 Winter Warm Up, or at least make a note of it for an upcoming episode of Open Apple.

Two years ago, I’d entered 2012WW with the intention of doing something – anything – with my Apple ///, but when you reach your 40s, time really begins to slip quickly past and before I knew it, I had less than a week left in the 30-day retro computing competition.  Disappointed, I withdrew but promised myself to return someday.  And that day, I felt, was here so I sent off an email to the organizer, announcing my entry and all was happy.

But there was a snag.  You see, entry into the Retrochallenge requires an active blog, so the community can follow your progress and everyone can join in the fun.  To make an already overlong story slightly less so, 6502Lane is back, apple2scans.net is back (though without most of the previous content … more on that later) and I’m going to be doing something with my Apple /// for the 2014WW.  I’m thinking music and video — something you couldn’t easily do on an Apple II, much like Andy Hertzfeld’s inspiration for the Running Horses demo so many years ago.

There’s more to this sordid tale, but I’m out of practice and winded, so I’ll post more later.