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
  •  | 
  •  

문제

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,

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top