Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

10
MS Basic "calculator" on the BE6502 with LCD
Post Body

i'm sure someone can do better (more efficient) but I was just dusting off my MSBASICS skills from 35 years ago. is there a way to make the LCDPRINT in just one line by combining the OUTPUT? I would love to see improvements/variations on this

5 PRINT "Welcome to Joe's Amazing Calculator"

9 REM GET USER INPUT

10 INPUT "PICK OPERATION ( , -, *, /)"; A$

30 INPUT "Enter First # "; X

40 INPUT "Enter Second # "; Y

99 REM WHICH CALCULATION

100 IF A$ = " " THEN RESULT = X Y:GOTO 200

110 IF A$ = "-" THEN RESULT = X-Y:GOTO 200

120 IF A$ = "*" THEN RESULT = X*Y:GOTO 200

130 IF A$ = "/" THEN RESULT = X/Y:GOTO 200

140 PRINT A$ " IS NOT A VALID OPERATION, PLEASE TRY AGAIN"

150 GOTO 10

199 REM OUTPUT TO LCD

200 LCDCMD 1

210 LCDPRINT X

215 LCDPRINT " "

220 LCDPRINT A$

230 LCDPRINT Y

240 LCDPRINT " ="

250 LCDPRINT RESULT

260 REM PRINT TO MONITOR

270 PRINT X;A$;Y;"="; RESULT

299 REM TRY AGAIN?

300 PRINT "ANOTHER CALCULATION (YES = 1, NO = 0)";

310 INPUT A

320 IF A = 1 THEN 10

Author
Account Strength
80%
Account Age
4 years
Verified Email
Yes
Verified Flair
No
Total Karma
76
Link Karma
27
Comment Karma
49
Profile updated: 1 week ago
Posts updated: 5 days ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 month ago