element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
element14 presents
  • Challenges & Projects
  • More
element14 presents
e14 presents blogs Sample BASIC Programs For The RC2014
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
element14 presents requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: airbornesurfer
  • Date Created: 23 Jun 2020 10:56 PM Date Created
  • Views 986 views
  • Likes 2 likes
  • Comments 2 comments
  • retro computers
  • rc2014
  • retro computer
  • z80
  • basic
  • retro computing
Related
Recommended

Sample BASIC Programs For The RC2014

airbornesurfer
airbornesurfer
23 Jun 2020

Here are the BASIC programs I included in my demo of the RC2104 project on element14 presents

 

10 PRINT TAB(30);"SINE WAVE"
20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
25 PRINT TAB(15);"ADAPTED FOR ELEMENT14 PRESENTS M. EARGLE 2020"
30 PRINT: PRINT: PRINT: PRINT: PRINT
50 B=0
100 REM START LONG LOOP
110 FOR T=0 TO 40 STEP .25
120 A=INT(26+25*SIN(T))
130 PRINT TAB(A);
140 IF B=1 THEN 180
150 PRINT "element14"
160 B=1
170 GOTO 200
180 PRINT "Presents"
190 B=0
200 NEXT T
999 END

 

10 PRINT TAB(30);"POETRY"
20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
30 PRINT:PRINT:PRINT
90 ON I GOTO 100,101,102,103,104
100 PRINT "MIDNIGHT DREARY";:GOTO 210
101 PRINT "FIERY EYES";:GOTO 210
102 PRINT "BIRD OR FIEND";:GOTO 210
103 PRINT "THING OF EVIL";:GOTO 210
104 PRINT "PROPHET";:GOTO 210
110 ON I GOTO 111,112,113,114,115
111 PRINT "BEGUILING ME";:U=2:GOTO 210
112 PRINT "THRILLED ME";:GOTO 210
113 PRINT "STILL SITTING....";:GOTO 212
114 PRINT "NEVER FLITTING";:U=2:GOTO 210
115 PRINT "BURNED";:GOTO 210
120 ON I GOTO 121,122,123,124,125
121 PRINT "AND MY SOUL";:GOTO 210
122 PRINT "DARKNESS THERE";:GOTO 210
123 PRINT "SHALL BE LIFTED";:GOTO 210
124 PRINT "QUOTH THE RAVEN";:GOTO 210
125 IF U=0 THEN 210
126 PRINT "SIGN OF PARTING";:GOTO 210
130 ON I GOTO 131,132,133,134,135
131 PRINT "NOTHING MORE";:GOTO 210
132 PRINT "YET AGAIN";:GOTO 210
133 PRINT "SLOWLY CREEPING";:GOTO 210
134 PRINT "...EVERMORE";:GOTO 210
135 PRINT "NEVERMORE";
210 IF U=0 OR RND(1)>.19 THEN 212
211 PRINT ",";:U=2
212 IF RND(1)>.65 THEN 214
213 PRINT " ";:U=U+1:GOTO 215
214 PRINT : U=0
215 I=INT(INT(10*RND(1))/2)+1
220 J=J+1 : K=K+1
230 IF U>0 OR INT(J/2)<>J/2 THEN 240
235 PRINT " ";
240 ON J GOTO 90,110,120,130,250
250 J=0 : PRINT : IF K>20 THEN 270
260 GOTO 215
270 PRINT : U=0 : K=0 : GOTO 110
999 END

 

10 PRINT TAB(34);"STARS"
20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
30 PRINT:PRINT:PRINT
100 REM *** STARS - PEOPLE'S COMPUTER CENTER, MENLO PARK, CA
140 REM *** A IS LIMIT ON NUMBER, M IS NUMBER OF GUESSES
150 A=100:M=7
170 INPUT "DO YOU WANT INSTRUCTIONS";A$
190 IF LEFT$(A$,1)="N" THEN 280
200 REM *** INSTRUCTIONS ON HOW TO PLAY
210 PRINT "I AM THINKING OF A WHOLE NUMBER FROM 1 TO";A
220 PRINT "TRY TO GUESS MY NUMBER. AFTER YOU GUESS, I"
230 PRINT "WILL TYPE ONE OR MORE STARS (*). THE MORE"
240 PRINT "STARS I TYPE, THE CLOSER YOU ARE TO MY NUMBER."
250 PRINT "ONE STAR (*) MEANS FAR AWAY, SEVEN STARS (*******)"
260 PRINT "MEANS REALLY CLOSE! YOU GET";M;"GUESSES."
270 REM *** COMPUTER THINKS OF A NUMBER
280 PRINT
290 PRINT
300 X=INT(A*RND(1)+1)
310 PRINT "OK, I AM THINKING OF A NUMBER, START GUESSING."
320 REM *** GUESSING BEGINS, HUMAN GETS M GUESSES
330 FOR K=1 TO M
340 PRINT
350 PRINT "YOUR GUESS";
360 INPUT G
370 IF G=X THEN 600
380 D=ABS(G-X)
390 IF D>=64 THEN 510
400 IF D>=32 THEN 500
410 IF D>=16 THEN 490
420 IF D>=8 THEN 480
430 IF D>=4 THEN 470
440 IF D>=2 THEN 460
450 PRINT "*";
460 PRINT "*";
470 PRINT "*";
480 PRINT "*";
490 PRINT "*";
500 PRINT "*";
510 PRINT "*";
520 PRINT
530 NEXT K
540 REM *** DID NOT GUESS IN M GUESSES
550 PRINT
560 PRINT "SORRY, THAT'S";M;"GUESSES. THE NUMBER WAS";X
580 GOTO 650
590 REM *** WE HAVE A WINNER
600 PRINT:FOR N=1 TO 79
610 PRINT "*";
620 NEXT N
630 PRINT:PRINT
640 PRINT "YOU GOT IT IN";K;"GUESSES!!! LET'S PLAY AGAIN..."
650 GOTO 280
660 END

  • Sign in to reply
  • phoenixcomm
    phoenixcomm over 2 years ago

    airbornesurfer BASIC?  LOL learn C, you have basics the  there

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dubbie
    dubbie over 2 years ago

    I started my programming experience with a main frame Basic, batch mode with overnight execution and wide continuous paper printouts.

     

    Dubbie

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube