Beruflich Dokumente
Kultur Dokumente
;
;
;
;
;
;
;
;
;
;
;
;
;
;
; To modify this program to march your own name across the signboard
; you will be aided by the following table of indices for all the
; alphabet letters:
; A B C D E F G H I J K L M N O P Q R S T U V W X Y Z blank
; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
; Note that FontData.txt holds the image data for a blank (space)
; character at the very end of the alphabet.
LJMP Start
INCLUDE "FontData.txt"
Start:
MOV DPTR,#StartOfImageData
; We initialize the DPTR ("data pointer"), a 16 bit
; SFR ("special function register"), to point to
; the first column of font data (the first column
; of the letter 'A') in program memory. The DPTR
; register continues to hold this same value
; throughout this program.
MOV A,#9
; The letter 'J' has alphabet index 9 (indices always
; start from 0)
LCALL Draw1Char
MOV
A,#14
LCALL Draw1Char
MOV
A,#7
LCALL Draw1Char
MOV
A,#13
LCALL Draw1Char
Done:
SJMP Done
Draw1Char:
; This is a subroutine which is responsible for outputting exactly 8
;
;
;
;
;
R0,A
MOV
R1,#0
CharLoop: MOV
MOVC
MOV
INC
INC
CJNE
RET
A,R0
; prepare for upcoming "MOVC A,@A+DPTR" instr
A,@A+DPTR ; the ACC now holds one column of font data
P0,A
; write that column to the sign board
R0
; advance to the next column
R1
; increment the loop counter
R1,#8,CharLoop
; we loop 8 times in order to output 8 columns