diff options
author | William Harrington <kb0iic@berzerkula.org> | 2019-05-22 16:50:26 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2019-05-22 16:50:26 -0500 |
commit | 23deda800dd486880b96cd26ca2c83c80f5f7b6b (patch) | |
tree | 6b6bed5b4902503ae54a542ebd142c37440450c4 /addon/sb_vfd/vfd.bas | |
parent | b784c8b27801db85c39ae0d613492b603b28e555 (diff) |
Move Scott Baker modules into addon
Diffstat (limited to 'addon/sb_vfd/vfd.bas')
-rw-r--r-- | addon/sb_vfd/vfd.bas | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/addon/sb_vfd/vfd.bas b/addon/sb_vfd/vfd.bas new file mode 100644 index 0000000..aed987c --- /dev/null +++ b/addon/sb_vfd/vfd.bas @@ -0,0 +1,35 @@ +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, &H30 : REM function set - 8 bit +4010 OUT 1, 0 : REM max brightness +4020 OUT 0, 1 : REM clear display +4030 OUT 0, &H0F : REM display on, cursor on, blink on +4040 RETURN + +4099 REM turn cursor off +4100 OUT 0, &H0C : REM display on, cursor off +4110 RETURN + +4199 REM turn cursor on +4200 OUT 0, &H0F : REM display on, cursor on, blin on +4210 RETURN + +4299 REM clear screen +4300 OUT 0, 1 +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 |