assemblyascii68hc11

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


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,


Solution

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