From 6b7d88da6907be3353b5f2568861b4e58b0afe43 Mon Sep 17 00:00:00 2001 From: William Moore Date: Sun, 6 Aug 2023 07:24:45 -0500 Subject: [PATCH] Update to output to the LED/7-segment display --- src/1802mc/SCC.bas | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/1802mc/SCC.bas b/src/1802mc/SCC.bas index 146849f..7574cf6 100644 --- a/src/1802mc/SCC.bas +++ b/src/1802mc/SCC.bas @@ -14,8 +14,7 @@ 14 REM You should have received a copy of the GNU General Public License 15 REM along with this program. If not, see . 50 DIM D(5) -55 H=0:C=0:K=0 -60 I=0:G=0:E=0:J=0:B=0 +60 H=0:C=0:K=0:I=0:G=0:E=0:J=0:B=0 61 FOR P=1 TO 5 62 D(P)=0 63 NEXT P @@ -24,10 +23,11 @@ 120 INPUT X$ 130 I=INP(0,4) 140 IF I=1 GOSUB 2000:G=G+1 -150 IF I=2 PRINT "GAME OVER! YOU SCORED: ", B:GOSUB 8000:OUT(0,4,B):END -151 IF G=3 PRINT "GAME OVER! YOU SCORED: ", B:GOSUB 8000:OUT(0,4,B):END -160 IF H=1 IF C=1 IF K=1 B=0:GOSUB 7000 -170 GOTO 110 +150 IF I=2 PRINT "GAME OVER!":GOSUB 8000:GOTO 60 +160 IF I=4 PRINT "GAME OVER!":GOSUB 8000:END +170 IF G=3 PRINT "GAME OVER!":GOSUB 8000:GOTO 60 +180 IF H=1 IF C=1 IF K=1 B=0:GOSUB 7000 +190 GOTO 110 1000 IF H=0 GOSUB 6000:GOSUB 5000 1001 IF H=0 RETURN 1010 IF H=1 GOSUB 1050 @@ -86,4 +86,7 @@ 7030 NEXT P 7040 RETURN 8000 IF H=1 IF C=1 IF K=1 GOSUB 7000 -8010 RETURN \ No newline at end of file +8010 Z=B +8020 IF B>9 Z=#10 + (B-10) +8030 OUT(0,4,Z) +8040 RETURN