EER-018
Introduction to Digital Computers
 Lecture 27

Program Data

Hand assemble the following code:

         org ROM
data:    fcb %01000111
         fcb %11001011
begin:   LDA #$FF
         STA DDRA
               LDX #data
loop:    LDA ,X
         STA PORTA
         LDA 1,X
         STA PORTA
         BRA loop
         org $7FE
         fdb ______

What address goes in the blank?
What does this program do?

Another Example:

Given that we have a 7-segment display connected to PORTA so the following output on bits 7 downto 1 results in the patterns shown:
1110111 - A
0011111 - b
1001110 - C
0111101 - d
1001111 - E
1000111 - F
0110110 - H
0110000 -  I
0111100 -  J

  1. Write a program that will continuously output first "H" and then "I", with each character held long enough to be read (about 1 second).
  2. Write a program that will output any string of these characters over and over. Hint: the characters can be stored in memory as data with a special terminating character.