mov
a,msg
;
mov
tmp,a
;
mov
a,24h
;line end=24h
xorm
a,msg
;
sz
msg ;if
line
end?
jmp
snd_lin1
;no. show next char
mov
a,LCD_ON_CSR_OFF ;yes. hide cursor
call
snd_cmd
jmp
lp
;goto lp (end)
snd_lin1:
mov
a,tmp
;
call
write_char
;write char to LCM
call
busy_chk
;check busy flag
inc
tblp
;tblp+1
jmp
snd_line
;repeat from snd_line
lp:
jmp
lp
;end program
;--------------------------------------------------------------
holtek_tbl .section at 700h ’code’
;table at last page
htk_tbl:
dc 0048h,004fh,004ch,0054h,0045h,004bh,0020h,0038h,0024h
dc 0020h,0062h,0069h,0074h,0020h,0075h,0043h,0024h
end ;module
;===========
;= LCM.asm =
;===========
include lcm.inc
;--------------------------------------------------------------
;#define four_bit
;define this for 4-bit mode
public busy_chk
;
public delay
;
public write_char
;
public snd_cmd
;
;--------------------------------------------------------------
dataLCM .section ’data’
dtmp
db ?
dtmp2
db ?
;--------------------------------------------------------------
codeLCM .section ’code’
;=== snd_cmd ===
snd_cmd:
;=write instruction code=
ifdef four_bit
;4-bit mode
mov
dtmp,a
and
a,0f0h
;filter high nibble
endif
mov
LCM_DATA,a ;latch
command
clr
LCM_CTRL.RW
;RW=0
clr
LCM_CTRL.RS
;RS=0
HT-IDE User’s Guide
200
Содержание HT-IDE
Страница 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Страница 12: ...HT IDE User s Guide 2 ...
Страница 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Страница 24: ...HT IDE User s Guide 14 ...
Страница 70: ...HT IDE User s Guide 60 ...
Страница 76: ...HT IDE User s Guide 66 ...
Страница 92: ...HT IDE User s Guide 82 ...
Страница 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Страница 94: ...HT IDE User s Guide 84 ...
Страница 148: ...HT IDE User s Guide 138 ...
Страница 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Страница 154: ...HT IDE User s Guide 144 ...
Страница 192: ...HT IDE User s Guide 182 ...
Страница 194: ...HT IDE User s Guide 184 ...
Страница 218: ...HT IDE User s Guide 208 ...
Страница 235: ...P a r t V Appendix Part V Appendix 225 ...
Страница 236: ...HT IDE User s Guide 226 ...
Страница 250: ...HT IDE User s Guide 240 ...