Write assembler directives to build a table to hold the ASCII codes of the capital letters A-Z

StackOverflow https://stackoverflow.com/questions/12849260

  •  06-07-2021
  •  | 
  •  

Question

Write assembler directives to build a table to hold the ASCII codes of the capital letters A-Z. The table should be store in the memory locations $00 to $19? (68HC11)

I think the response would be like, can you tell if my response is correct? and if it's wrong why?

TABLE ORG $00

      LDAA #26
LOOP  LDD  #$41
      STD  TABLE
      DECA 
      BNE  LOOP
      END

Thanks in advance,

Was it helpful?

Solution

You need to do LDD #$41 before the start of the loop, and then increment that register before the BNE instruction.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top