Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lcd_inst = &7800 ;
- lcd_data = lcd_inst + 1 ;
- ORG &8000
- .start_here
- JSR LINIT
- JSR lcd_move_right
- LDA #$50
- STA lcd_data
- LDA #$72
- STA lcd_data
- LDA #$6F
- STA lcd_data
- LDA #$6A
- STA lcd_data
- LDA #$65
- STA lcd_data
- LDA #$63
- STA lcd_data
- LDA #$74
- STA lcd_data
- JSR lcd_move_right
- LDA #$36
- STA lcd_data
- LDA #$35
- STA lcd_data
- .loop
- bne loop
- ; *** LCD initialisation
- .LINIT ;LDX #$04 ;do function set 4 times
- .LINIT0 LDA #$38 ;function set: 8 bit, 2 lines, 5x7
- STA lcd_inst
- ;DEX
- ;BNE LINIT0
- LDA #$06 ;entry mode set: increment, no shift
- STA lcd_inst
- LDA #$0E ;display on, cursor on, blink off
- STA lcd_inst
- LDA #$01 ;clear display
- STA lcd_inst
- LDA #$80 ;DDRAM address set: $00
- STA lcd_inst
- RTS
- .lcd_move_left LDA #$10
- STA lcd_inst
- RTS
- .lcd_move_right LDA #$14
- STA lcd_inst
- RTS
- .lcd_print_g LDA #$47
- STA lcd_data
- RTS
- ORG &FFFA
- equw start_here ; NMI address
- equw start_here ; RESET address
- equw start_here ; IRQ address
- .end
- save "lcd.hex", start_here, end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement