Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Freescale 6812

Status
Not open for further replies.

oompster

Programmer
Apr 25, 2007
1
US
I am trying to use this loop to print out the word error to a segmented display in the simulation software I am working with. After the message is print out it is to wait a little then automatically clear the display. Right now it is erroring out when it trys to load null into a register so that I can compare it to $00 to break out of the loop. Below is the code in question. This is for the Freescale 6812.

ErrorMsg
movb #$80,Ln1Cnt Sets counter line 1
movb #$C0,Ln2Cnt Sets counter line 2
ldy #ErrMsg
OutMsg ldaa Ln1Cnt ; moves cursor back to 1st line
jsr LCDOutCmd ; Displays cursor on 1st line
ldaa 0,y
jsr LCDOutChar
ldaa Ln2Cnt ; moves cursor to 2nd line
jsr LCDOutCmd ; Displays cursor on 2nd line
ldaa 0,y
jsr LCDOutChar
inc Ln2Cnt ; Increments line 2 counter
inc Ln1Cnt ; Increments line 1 counter
ldaa Ln1Cnt ; moves cursor back to 1st line
jsr LCDOutCmd ; Displays cursor on 1st line
iny
ldaa 0,y
cmpa #$00
bne OutMsg
jsr LCDWaitLong
jsr Clear
rts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top