...;lcd display for 16 pin
;RS 	:- (12) 	P3.2
;R/W 	:- (13) 	P3.3
;E	:- (14) 	P3.4
;D0 -D7 :- (21-28)	P2
;PIN 15	:-
;PIN 16	:-

rs equ p3.2
rw equ p3.3
enb equ p3.4
dio equ p2

org 0x0000
prog_strt:
;following delay is required
lcall delay
lcall delay
lcall delay
;initialization of a 2 lines 5x7 matrix
clr p1.3
mov a,#0x38
lcall cmnd
lcall delay
lcall delay
;display off cursor off
mov a,#0x0e
lcall cmnd
lcall delay
;clear display screen
mov a,#0x01
lcall cmnd
lcall delay
;shift cursor to right
mov a,#0x06
lcall cmnd
lcall delay
;address of the location on lcd
mov a,#0x84
lcall cmnd
lcall delay
lcall delay
;send 'ready'
mov a,#'a'
lcall daataa
mov a,#'2'
lcall daataa
mov a,#'z'
lcall daataa
setb p1.3
inf:sjmp inf

cmnd:
mov dio,a
clr rs
clr rw
setb enb
nop
nop
nop
nop
nop
clr enb
lcall delay
ret

daataa:
mov dio,a
setb rs
clr rw
setb enb
nop
nop
nop
nop
nop
nop
clr enb
lcall delay
ret

delay:
mov 0x46,#0xff
g1: djnz 0x46,g1
ret

end...