Hi all,

I'm new to assembly programming, and I'm a little stuck. Please forgive my newbieness.

I'm currently working on a project with the Motorola 68HC11. I have a string of 10 numbers, with an EOD character appended to the end. I've expressed this in code as:

NUMBER fcc '1234567890#' number with EOD marker

What I am trying to do is, extract each digit individually, and match it with a 5 bit binary pattern corresponding to each number. Shown in code here:

hexpat fcb %00110 Barcode pattern 0
        fcb    %10001 Barcode pattern 1
fcb %01001 Barcode pattern 2
fcb %11000 Barcode pattern 3
fcb %00101 Barcode pattern 4
fcb %10100 Barcode pattern 5
fcb %01100 Barcode pattern 6
fcb %00011 Barcode pattern 7
fcb %10010 Barcode pattern 8
fcb %01010 Barcode pattern 9

This will be loaded to an index register at runtime.

Once I've done this, I will then output the selected string to a series of 5 LEDs.

Rinse & repeat until the EOD character "#" is reached, by which time all LEDs are switched off and the program ends.

Here are the questions I wish to ask:

1) When using the "FCC" mneumonic, how does one access and manipulate individual bits from there?
2) In order to match the character with the pattern, I'm going to use a comparison mneumonic with respect to the number 9 (in order to determine an offset and store it to an accumulator for the next step). Once I have this comparison, I want to load Index Register X with its current value + the offset. What is the correct syntax for using an Accumulator as the offset?

Any help is appreciated. If I haven't explained something clearly enough, do let me know. As I said I am very very stuck with this, and I'm new to assembly. I'd also prefer if people didn't simply post a solution, but moreso gave me an explanation and hints as to how to achieve what I want. This is for a Uni project, I've banged my head against the wall for hours to get this far, but I'd still like to figure out as much as I can for myself, so hints would be more appreciated. ;)

Posted on 2009-05-27 06:08:52 by Zaraphrax