LCD_RS equ P1.4; LCD_E equ P1.5; ; LCD_DAT = P1.0 .. P1.3 ;Input: A = byte ; lcd_command: ; write command to LCD clr LCD_RS jmp lcd_byte ;Input: A = byte ; lcd_data: ; write data byte to LCD setb LCD_RS ;Input: A = byte ; lcd_byte: ; sub: write byte to LCD call lcd_nibble ;Input: a = byte ;Output: a = byte * 16 ; lcd_nibble: ; sub: write nibble to LCD swap a push acc anl p1, #0F0h anl a, #00Fh orl p1, a setb LCD_E pop acc clr LCD_E ret end