Thursday, December 18, 2014

Understanding 6502 assembly on the Commodore 64 - (25) Address modes

We've steered of course long enough.  Its time to get back to grass roots.  One of these days I will get all of these chapters in order because addressing modes should definitely be in the first 10.

Click here for Chapter 25

Sunday, December 14, 2014

Understanding 6502 assembly on the Commodore 64 - (24) A better way with NMI

     So far, we've found a less than ideal way to implement our interrupt. So much so that I wanted to simply remove the chapter, but decided to keep it so we can make a comparison.  Lets look at a better way to do this.

Click here for Chapter 24  

Thursday, December 4, 2014

Understanding 6502 assembly on the Commodore 64 - (23) The Ubiquitous Interrupt Request

     Conceptually, the interrupt at its core is easy to understand, yet rarely understood.   Before discussing an interrupt on the computer we must understand being interrupted in general.  To make this apparent we should assume that we are being interrupted from something we're doing or not doing.  We could consider not doing, the act of doing something, which is doing nothing.   Either way,  the interrupt comes as a distraction to what we were doing before we were interrupted.

Click here for Chapter 23

Understanding 6502 assembly on the Commodore 64 - (22) Output Display alternative

     Before we go any further in our program,  lets have a bit more fun.  Though we're still hanging off of our housekeeping interrupt, we're using the screen output addresses to display our code.  It's been effective, but a bit boring.   We can use what we learned in creating sprites to spruce things up a bit.

Click here for Chapter 22

Wednesday, December 3, 2014

Understanding 6502 assembly on the Commodore 64 - (21) Optimizing our interrupt code

     In the last chapter, we modified our code to run our binary converter 60 times per second using the system interrupt, bypassing the address of the usual housekeeping code with our own.  We then Jumped back to the housekeeping code so it could proceed.  We didn't cause an interrupt, we just added our code in as part of the normal system interrupt  But In doing so we ran into a bit of a problem.  

Click here for Chapter 21

Tuesday, December 2, 2014

Understanding 6502 assembly on the Commodore 64 - (20) May I Interrupt?

     In the last few chapters we've had to get through a lot of dry, but necessary stuff.  I figured since this is chapter 20, well do something fun.  Just about every 60th of a second, everything we do it put on hold for the computer to run its own housekeeping chores.  Cursor blink, keyboard input check, screen refresh, that sort of stuff.  To the user it is transparent, as if the 6502 is multitasking and running code in the background.  Arguably it is, but it isn't.  But it is the stuff of genius how this is accomplished.

Click here for Chapter 20

Monday, December 1, 2014

Understanding 6502 assembly on the Commodore 64 - (19) The Truth of the matter

If you haven't done much programming in the past, you will probably still remember Learning Truth tables in mathematics, wondering why you would ever need to know such a thing.  Well,   question answered.   Logical operations are a fundamental part of digital electronics.  The 6502 is no exception.  Before breaking into Mathematics,  we will first learn logical operations.