<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
	<channel>
		<title>10th Part: &#x22;Nostalgia&#x22; &#x22;Old&#x22; Basic Language interpreters, Commodore 64 Basic Interpreter # 1.</title>
		<link>/blogentry/53301</link>
		<atom:link href="https://www.lotterypost.com/rss/blogcomments/53301" rel="self" type="application/rss+xml" />
		<description>LANTERN's Blog: 10th Part: &#x22;Nostalgia&#x22; &#x22;Old&#x22; Basic Language interpreters, Commodore 64 Basic Interpreter # 1.</description>
		<dc:language>en-us</dc:language>
		<generator>Lottery Post RSS Generator</generator>
		<item>
			<title>Comment #4</title>
			<link>/blogentry/53301#c61581</link>
			<guid isPermaLink="true">/blogentry/53301#c61581</guid>
			<pubDate>Fri, 15 Apr 2011 16:55:06 GMT</pubDate>
			<dc:creator>LANTERN</dc:creator>
			<description><![CDATA[<p>So far as seen I am doing well enough on this all by myself, but this is just text based programming so far and it is very limited, but there are other  basic interpreters and more advanced old basics.</p>]]></description>
			<category>LANTERN</category>
		</item>
		<item>
			<title>Comment #3</title>
			<link>/blogentry/53301#c61580</link>
			<guid isPermaLink="true">/blogentry/53301#c61580</guid>
			<pubDate>Fri, 15 Apr 2011 16:12:34 GMT</pubDate>
			<dc:creator>LANTERN</dc:creator>
			<description><![CDATA[<p>The second download site worked O.K. but it was a lot of trouble downloading it from there, some other time I will look for a better place, for other such files if I make them.</p>]]></description>
			<category>LANTERN</category>
		</item>
		<item>
			<title>Comment #2</title>
			<link>/blogentry/53301#c61579</link>
			<guid isPermaLink="true">/blogentry/53301#c61579</guid>
			<pubDate>Fri, 15 Apr 2011 16:03:43 GMT</pubDate>
			<dc:creator>LANTERN</dc:creator>
			<description><![CDATA[<p>&#x3c;br /&#x3e;http://www.filefactory.com/file/cbcb753/n/CalculatorOnly+-.exe&#x3c;br</p>]]></description>
			<category>LANTERN</category>
		</item>
		<item>
			<title>Comment #1</title>
			<link>/blogentry/53301#c61578</link>
			<guid isPermaLink="true">/blogentry/53301#c61578</guid>
			<pubDate>Fri, 15 Apr 2011 15:57:58 GMT</pubDate>
			<dc:creator>LANTERN</dc:creator>
			<description><![CDATA[<p>&#x3c;br /&#x3e;http://www.filedropper.com/calculatoronly-&#x3c;br /&#x3e;&#x3c;br /&#x3e;Copy and then paste onto the browser&#x27;s window.</p>]]></description>
			<category>LANTERN</category>
		</item>
		<item>
			<title>Original Blog Entry: 10th Part: &#x22;Nostalgia&#x22; &#x22;Old&#x22; Basic Language interpreters, Commodore 64 Basic Interpreter # 1.</title>
			<link>/blogentry/53301</link>
			<guid isPermaLink="true">/blogentry/53301</guid>
			<pubDate>Fri, 15 Apr 2011 03:07:44 GMT</pubDate>
			<dc:creator>LANTERN</dc:creator>
			<description><![CDATA[<p>Entering Data.<br /><br />-----------------------<br /><br />--------------------------<br /><br />The INPUT keyword<br /><br />This keyword prints a ? mark and positions the cursor 2 spaces to the right of the ?.<br /><br />Samples:<br /><br />String variable A$<br /><br />10 PRINT Input the name of a fruit :INPUT A$<br /><br />20 PRINT You printed A$<br /><br />------------<br /><br />**** COMMODORE 64 BASIC V2 ****<br /><br />64K RAM SYSTEM 38911 BASIC BYTES FREE<br /><br />READY.<br /><br />10 PRINT Input the name of a fruit :INPUT A$<br /><br />20 PRINT You printed A$<br /><br />RUN<br /><br />Input the name of a fruit<br /><br />? Banana<br /><br />You printed Banana<br /><br />READY.<br /><br />----------<br /><br />Numeric variable A<br /><br />10 PRINT Enter a number between 1 and 10 : INPUT A<br /><br />20 PRINT You printed A<br /><br />------------------<br /><br />**** COMMODORE 64 BASIC V2 ****<br /><br />64K RAM SYSTEM 38911 BASIC BYTES FREE<br /><br />READY.<br /><br />10 PRINT Enter a number between 1 and 10 : INPUT A<br /><br />20 PRINT You printed A<br /><br />RUN<br /><br />Enter a number between 1 and 10<br /><br />? 4<br /><br />You printed 4<br /><br />READY.<br /><br />-------<br /><br />**** COMMODORE 64 BASIC V2 ****<br /><br />64K RAM SYSTEM 38911 BASIC BYTES FREE<br /><br />READY.<br /><br />After reading and trying several things I came out with these, it seems to me that people who use the INPUT command don&#x27;t give enough information to people on their programs so they will know what to use as INPUT and also maybe about the output.<br /><br />1 PRINT Type 2 numbers between 1 and 100<br /><br />2 PRINT One number at a time<br /><br />3 PRINT And press the Enter key after typing each number<br /><br />4 INPUT First Number ; A<br /><br />5 INPUT Second Number ; B<br /><br />6 PRINT First A , Second B<br /><br />RUN<br /><br />Type 2 numbers between 1 and 100<br /><br />One number at a time<br /><br />And press the Enter key after typing each number<br /><br />First Number ? 47<br /><br />Second Number ? 16<br /><br />First 47 , Second 16<br /><br />READY.<br /><br />That program of course didn&#x27;t do anything as it is, but it is just a basic example.<br /><br />---------------<br /><br />EXAMPLE 1:<br /><br />100 INPUT A<br /><br />110 INPUT B,C,D<br /><br />120 INPUT PROMPT ;E<br /><br />24<br /><br />~<br /><br />When this program runs, the question mark appears to prompt<br /><br />the operator that the VIC is expecting an input for line 100. Any<br /><br />number typed in goes into A, for later use in the program. If the<br /><br />answer typed was not a number, the ?REDO FROM START<br /><br />message appears, which means that a string was received when a<br /><br />number was expected. If the operator just hit RETURN without<br /><br />typing anything, the variable&#x27;s value doesn&#x27;t change.<br /><br />Now the next question mark, for line 110, appears. If we type only<br /><br />one number and hit RETURN, the VIC will now display 2 question<br /><br />marks (??), which means that more input is required. You can just<br /><br />type as many inputs as you need separated by commas, which<br /><br />prevents the double question mark from appearing. If you type<br /><br />more data than the INPUT statement requested, the ?EXTRA<br /><br />IGNORED message appears, which means that the extra items<br /><br />you typed were not put into any variables.<br /><br />Line 120 displays the word PROMPT before the question mark<br /><br />appears. The semicolon is required between the prompt and any<br /><br />list of variables. Note: The only way to end a program during<br /><br />an INPUT statement is to hold down the RUN/STOP key and<br /><br />hit RESTORE.<br /><br />EXAMPLE 2:<br /><br />10 PRINT INPUT A WORD :INPUT A$<br /><br />20 PRINT YOUR INPUT WAS A$<br /><br />30 GOTO 10<br /><br />------------------<br /><br />That is simple stuff, but when used in programs with other keyword commands the Program&#x27;s logic becomes more complicated<br /><br />That might be seen later maybe.<br /><br />This is all on this for now.<br /><br />Once you know how to use, the keyword commands by themselves more or less, then you can try to put them together into longer and more complex programs, it is all about the logic of what you want done and or trying to do.<br /><br />Look at small and also at long programs and try to follow the Commands Logic , that is the programs&#x27; logic, in other words what is being done in Execution of the commands and how it is being done, for some people like maybe me it might be easier said than done, so it might be better to start slow and small.<br /><br />--------------<br /><br />There are many views, but as Todd says, it might mostly be due to the search engines always making many hits as they index all the data on web pages all over the Internet.<br /><br />I wonder if some people are really reading this posts and trying to learn from them, you know, it is not very easy to come by data such as this, nowdays mostly it being such an old kind of info, not so easy to find and yet it might be basic programming info and still of some use, after all people have to start somewhere and this is not as hard nor as strange as some other programming stuff.<br /><br />After all many people are still using DOS and some form of BASIC programming language.<br /><br />From what I have heard about a lot can still be done with DOS and some form of BASIC by those who are good about it and who also might be good with Math.<br /><br />----------------<br /><br />I also just made this:<br /><br />**** COMMODORE 64 BASIC V2 ****<br /><br />64K RAM SYSTEM 38911 BASIC BYTES FREE<br /><br />READY.<br /><br />1 PRINT Type 2 numbers between 1 and 100<br /><br />2 PRINT One number at a time<br /><br />3 PRINT And press the Enter key after typing each number<br /><br />4 INPUT First Number ; A<br /><br />5 INPUT Second Number ; B<br /><br />6 PRINT First A , Second B<br /><br />7 C = A+B<br /><br />8 PRINT 1ST + 2ND = ; C<br /><br />RUN<br /><br />Type 2 numbers between 1 and 100<br /><br />One number at a time<br /><br />And press the Enter key after typing each number<br /><br />First Number ? 35<br /><br />Second Number ? 60<br /><br />First 35 , Second 60<br /><br />1ST + 2ND = 95<br /><br />READY.<br /><br />It adds the 2 inputs, this is my first real program nowdays, but on the old days maybe on the 80s, I did make 1 or more programs, not too complicated, better than this one, of more use, but nothing really great, it was with the Commodore 64, since then I forgot all that I knew about Basic, but I am relearning a little just now, while making these many posts.<br /><br />Back then I also leared some about assembly language on the C-64, it was not as hard as some people think that it is, at least for the C-64, I probably would not try that with a 386 + Pc, I only learned and tried some little things, I already forgot all about what little I knew about Assembler, the instructions, decimal, hexadecimal and machine code.<br /><br />I made it so you can see how things can be made of more use and also more complicated, always make the logic in your mind and or on paper or Note or WordPad and then try it to see if it works and how, if not make changes until it works.<br /><br />----------<br /><br />Some of the stuff that is learned with Commore basic works with other basic languages, either as it is or changed some.<br /><br />-----------------------<br /><br />I just made the program of more use:<br /><br />1 PRINT Type 2 numbers between 1 and 100<br /><br />2 PRINT One number at a time<br /><br />3 PRINT And press the Enter key after typing each number<br /><br />4 INPUT First Number ; A<br /><br />5 INPUT Second Number ; B<br /><br />6 PRINT First A , Second B<br /><br />7 C = A+B<br /><br />8 PRINT 1ST + 2ND = ; C<br /><br />9 REM Here you would put a code command to clear the screen<br /><br />10 GOTO 1<br /><br />--------------<br /><br />Now it is on a non-ending loop, so you can keep on adding numbers, it only needs the Screen Clear Command that the C-64 has, but that doesn&#x27;t seem to work with this C-64 basic interpreter.<br /><br />---------------------------------------<br /><br />I Just thought about something else and could not let it go, so I have to add it to this:<br /><br />I just remade the program so it is a sort of adding machine, as I said it is all about Logic of execution of commands<br /><br />If it had the Screen Clear Command on it, it would only show the last results of the totals of the additions, but maybe that is not possible to do here with this interpreter, anyhow as it is, is like having a printing tape so we can check the numbers that were added, just in case of any mistakes:<br /><br />**** COMMODORE 64 BASIC V2 ****<br /><br />64K RAM SYSTEM 38911 BASIC BYTES FREE<br /><br />READY.<br /><br />1 PRINT Type a number<br /><br />3 PRINT And press the Enter key after typing the number<br /><br />4 INPUT A<br /><br />5 A = A + C<br /><br />6 PRINT A<br /><br />7 C = A<br /><br />10 GOTO 1<br /><br />RUN<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />? 1<br /><br />1<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />? 1<br /><br />2<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />? 1<br /><br />3<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />? 1<br /><br />4<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />? 1<br /><br />5<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />? 0<br /><br />5<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />? 5<br /><br />10<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />? 5<br /><br />15<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />? 5<br /><br />20<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />? 5<br /><br />25<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />?<br /><br />-----------------------<br /><br />Not too bad for somebody who knows next to nothing about programming?<br /><br />Try it yourself:<br /><br />0 REM Adding Machine.<br /><br />1 PRINT Type a number<br /><br />3 PRINT And press the Enter key after typing the number<br /><br />4 INPUT A<br /><br />5 A = A + C<br /><br />6 PRINT Totals A<br /><br />7 C = A<br /><br />10 GOTO 1<br /><br />--------------------<br /><br />The more that you learn, the more that you will be able to do.<br /><br />--------------<br /><br />2 PRINT This is the front end of a very simple unfinished calculator<br /><br />4 PRINT 1 = + , 2 = - , 3 = x , 4 = /<br /><br />6 PRINT Type: 1, 2, 3 OR 4<br /><br />8 INPUT Type one of the 4 functions and then press Enter ;X<br /><br />30 IF X = 1 THEN 50<br /><br />31 IF X = 2 THEN 60<br /><br />32 IF X = 3 THEN 70<br /><br />33 IF X = 4 THEN 80<br /><br />34 END<br /><br />50 PRINT Addition : REM GOTO (Line number)<br /><br />55 END<br /><br />60 PRINT Substraction : REM GOTO (Line number)<br /><br />65 END<br /><br />70 PRINT Multiplication : REM GOTO (Line number)<br /><br />75 END<br /><br />80 PRINT Division : REM GOTO (Line number)<br /><br />85 END<br /><br />----------<br /><br />Try it but as I said it is unfinished it is only the Front or first portion, the rest might follow sometime later maybe.<br /><br />It would use maybe routines such as the one on the program before this one above.<br /><br />-------------------<br /><br />It uses very simple logic, but also effective, can you follow it and can you also follow the next unfinished portions (Routines)?<br /><br />By the way for this particular program those who know how, don&#x27;t post your own routines , later I want to try to figure them out myself, once I post mine when and if I do then you can post your own, for now keep them to yourself.<br /><br />--------------------------<br /><br />I just added the Addition Routine portion to it:<br /><br />1 REM Front or Top Routine<br /><br />2 PRINT This is the front end of a very simple unfinished calculator<br /><br />4 PRINT 1 = + , 2 = - , 3 = x , 4 = /<br /><br />6 PRINT Type: 1, 2, 3 OR 4<br /><br />8 INPUT Type one of the 4 functions and then press Enter ;X<br /><br />30 IF X = 1 THEN 50<br /><br />31 IF X = 2 THEN 60<br /><br />32 IF X = 3 THEN 70<br /><br />33 IF X = 4 THEN 80<br /><br />34 END<br /><br />50 PRINT Addition : GOTO 100<br /><br />55 END<br /><br />60 PRINT Substraction<br /><br />65 END<br /><br />70 PRINT Multiplication<br /><br />75 END<br /><br />80 PRINT Division<br /><br />85 END<br /><br />90 REM Calculator Addition Routine<br /><br />100 PRINT Type a number<br /><br />102 PRINT And press the Enter key after typing the number<br /><br />104 INPUT To use other function enter 0 (Zero) ; A<br /><br />106 IF A = 0 THEN 4<br /><br />108 A = A + C<br /><br />110 PRINT Totals A<br /><br />112 C = A<br /><br />114 GOTO 100<br /><br />Can you still see the execution logic? It is very easy!<br /><br />----------------------<br /><br />**** COMMODORE 64 BASIC V2 ****<br /><br />64K RAM SYSTEM 38911 BASIC BYTES FREE<br /><br />READY.<br /><br />1 REM Front or Top Routine<br /><br />2 PRINT This is the front end of a very simple unfinished calculator<br /><br />4 PRINT 1 = + , 2 = - , 3 = x , 4 = /<br /><br />6 PRINT Type: 1, 2, 3 OR 4<br /><br />8 INPUT Type one of the 4 functions and then press Enter ;X<br /><br />30 IF X = 1 THEN 50<br /><br />31 IF X = 2 THEN 60<br /><br />32 IF X = 3 THEN 70<br /><br />33 IF X = 4 THEN 80<br /><br />34 END<br /><br />50 PRINT Addition : GOTO 100<br /><br />55 END<br /><br />60 PRINT Substraction<br /><br />65 END<br /><br />70 PRINT Multiplication<br /><br />75 END<br /><br />80 PRINT Division<br /><br />85 END<br /><br />90 REM Calculator Addition Routine<br /><br />100 PRINT Type a number<br /><br />102 PRINT And press the Enter key after typing the number<br /><br />104 INPUT To use other function enter 0 (Zero) ; A<br /><br />106 IF A = 0 THEN 4<br /><br />108 A = A + C<br /><br />110 PRINT Totals A<br /><br />112 C = A<br /><br />114 GOTO 100<br /><br />RUN<br /><br />This is the front end of a very simple unfinished calculator<br /><br />1 = + , 2 = - , 3 = x , 4 = /<br /><br />Type: 1, 2, 3 OR 4<br /><br />Type one of the 4 functions and then press Enter ? 1<br /><br />Addition<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />To use other function enter 0 (Zero) ? 1<br /><br />Totals 1<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />To use other function enter 0 (Zero) ? 4<br /><br />Totals 5<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />To use other function enter 0 (Zero) ? 4<br /><br />Totals 9<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />To use other function enter 0 (Zero) ? 10<br /><br />Totals 19<br /><br />Type a number<br /><br />And press the Enter key after typing the number<br /><br />To use other function enter 0 (Zero) ? 0<br /><br />1 = + , 2 = - , 3 = x , 4 = /<br /><br />Type: 1, 2, 3 OR 4<br /><br />Type one of the 4 functions and then press Enter ? 2<br /><br />Substraction<br /><br />READY.<br /><br />------------<br /><br />Well now I seem to have 2 of the calculator&#x27;s routines working, the addition and the substraction, this is hard for me as I am just learning or relearning how to do such things, use the Commodore interpreter and give them a try and see if you can follow the Execution logic, I even added some Safe Guards for Fool Proofing , but only up to a reason able point:<br /><br />While some others can do much better, this is not bad for somebody kind of new at this, like me, I know some people can do a lot worse than this, maybe some other time I will try to add the multiplication and the division routines, one of them at a time, it is hard for me to make such things.<br /><br />So far it looks as if addition and substraction are working O.K.<br /><br />1 REM Front or Top Routine<br /><br />2 PRINT This is the front end of a very simple unfinished calculator<br /><br />4 PRINT 1 = + , 2 = - , 3 = x , 4 = /<br /><br />6 PRINT Type: 1, 2, 3 OR 4<br /><br />8 INPUT Type one of the 4 functions and then press Enter ;X<br /><br />30 IF X = 1 THEN 50<br /><br />31 IF X = 2 THEN 60<br /><br />32 IF X = 3 THEN 70<br /><br />33 IF X = 4 THEN 80<br /><br />34 IF X 1 THEN 40<br /><br />35 IF X 4 THEN 40<br /><br />36 REM<br /><br />40 PRINT Wrong Number, Try again : GOTO 4<br /><br />45 REM<br /><br />50 PRINT Addition : GOTO 100<br /><br />55 REM<br /><br />60 PRINT Substraction : GOTO 200<br /><br />65 REM<br /><br />70 PRINT Multiplication is unsupported for now : GOTO 2<br /><br />75 END<br /><br />80 PRINT Division is unsupported for now : GOTO 2<br /><br />85 END<br /><br />90 REM Calculator Addition Routine<br /><br />100 PRINT Right now you have : PRINT C<br /><br />101 PRINT Type a number<br /><br />102 PRINT And press the Enter key after typing the number<br /><br />104 INPUT To use other function enter 0 (Zero) ; A<br /><br />106 IF A = 0 THEN 4<br /><br />108 A = A + C<br /><br />112 C = A<br /><br />114 GOTO 100<br /><br />115 REM<br /><br />200 REM Substraction Routine<br /><br />201 PRINT Right now you have : PRINT C<br /><br />202 PRINT Type a number<br /><br />203 PRINT And press the Enter key after typing the number<br /><br />204 INPUT To use other function enter 0 (Zero) ; A<br /><br />206 IF A = 0 THEN 4<br /><br />207 IF C A THEN 210<br /><br />208 IF C A THEN 213<br /><br />210 C = C - A<br /><br />211 GOTO 201<br /><br />212 END<br /><br />213 PRINT Can&#x27;t substract from a lower number<br /><br />214 GOTO 201<br /><br />215 END<br /><br />... &#x5b;&#xa0;<a href="/blogentry/53301">More</a>&#xa0;&#x5d;</p>]]></description>
			<category>Blog Entry</category>
			<category>LANTERN</category>
			<wfw:comment>https://www.lotterypost.com/blogentry/53301</wfw:comment>
		</item>
	</channel>
</rss>

