8051 Controller (BASIC)
8051-controller-20180830-01.jpg

Right now I have the controller configured to run MCS BASIC-52 V1.1.

10     REM TEST LCD
20     GOSUB 510
25     STRING 100,20
30    $(1)="CONTROLLER "
80     GOSUB 605
90     END
200    REM LCD DRIVER
210    REM LCD READY
220    DO
230   F=XBY(8002H)
240    WHILE (F.AND.80H)<>0
250    RETURN
300    REM WRITE DATA
310    GOSUB 220
320   XBY(8000H)=A
330    RETURN
400    REM write command
410    GOSUB 220
420   XBY(8000H)=B
430    RETURN
500    REM init lcd
510   B=38H
520    GOSUB 410
530   B=0CH
540    GOSUB 410
550   B=1
560    GOSUB 410
570    RETURN
600    REM print strings
605   K=1
610    DO
620   A=ASC($(1),K)
630    GOSUB 310
635   K=K+1
640    WHILE A<>20H
650    RETURN