diff options
author | William Harrington <kb0iic@berzerkula.org> | 2020-03-20 20:37:52 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2020-03-20 20:37:52 -0500 |
commit | b2f7aeb15bd20efc266971368ac74117fdc30bb5 (patch) | |
tree | c7f75cd9dd8f9f3e42b41b528cd71fc9c9526af9 /addon/sb_vfd | |
parent | d184eba02aecfd2872163b8afdf58469e595435f (diff) |
Add hello world for HD44780 LCD with LCD/VFD board configured for M68 mode.
Diffstat (limited to 'addon/sb_vfd')
-rw-r--r-- | addon/sb_vfd/lcd_m68_HD44780.bas | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/addon/sb_vfd/lcd_m68_HD44780.bas b/addon/sb_vfd/lcd_m68_HD44780.bas new file mode 100644 index 0000000..e9276fb --- /dev/null +++ b/addon/sb_vfd/lcd_m68_HD44780.bas @@ -0,0 +1,30 @@ +10 GOSUB 4000 : REM initialize +20 GOSUB 4100 : REM cursor off +30 T$ = "Hello, World" +40 GOSUB 4500 : REM print string + +999 GOTO 999 + +4000 OUT 0, &H38 : REM 2 lines, 8-bit +4020 GOSUB 4299 +4030 OUT 0, &H0F : REM Display on, cursor blinking +4040 RETURN + +4099 REM turn cursor off +4100 OUT 0, &H0C : REM display on, cursor off +4110 RETURN + +4299 REM clear screen +4300 OUT 0, &H01 : REM Clear display screen +4310 RETURN + +4399 REM goto X, Y +4400 DA = &H80 + (&H40 * Y) + X +4410 OUT 0, DA +4420 RETURN + +4499 REM print string +4500 FOR I=1 to LEN(T$) +4510 OUT 1, ASC(MID$(T$, I, 1)) +4520 NEXT I +4530 RETURN |