whats wrong with text ?

could someone please check and correct this code?
It doesnt print "hallo" to the 2400 baud terminal but rather prints triangulars. What do I do wrong, reading a table with a dptr?
How do I use: Data and DB correct?

;controller 80531
org 100h
endl equ 00h; end of string
mov SCON,#52h
orl PCON ,#80h
orl TMOD, #20h; orl Tmod, #00100000; = 32
mov TH1, #0F3h; 2400 baud 12 MHz
setb TR1
setb EA
setb ES
;------------read out the table--------------
mov r2, #00h;
mov dptr, #Text
bi3: mov a, r2
movc a, @a+dptr
cjne a, #endl, bi1; string end ?
ljmp bi2
bi1: lcall serout
inc r2; next Letter
ljmp bi3
bi2: ljmp bi2
serout: jnb ti, serout
clr ti
mov sbuf, a
Text: db 'hallo'
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!