# Getting back to BASICs

**URL:** <https://boards.straightdope.com/t/getting-back-to-basics/151824>\
**Category:** Miscellaneous and Personal Stuff I Must Share\
**Created:** [January 31, 2003, 6:03am UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824 "2003-01-31T06:03:35Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![Magickly\_Delicious](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@Magickly\_Delicious](https://boards.straightdope.com/u/Magickly_Delicious)\
**Post date:** [February 1, 2003, 7:23am UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/21 "2003-02-01T07:23:34Z")

</div>

Yay for BASIC!

Double yay for the ol’ Commodore 64!

Load"\*",8,1

🙂

---

<div class="post-metadata">

**Author:** ![petcat](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@petcat](https://boards.straightdope.com/u/petcat)\
**Post date:** [February 1, 2003, 7:38am UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/22 "2003-02-01T07:38:57Z")

</div>

That’s nice…Thanks Desmostylus. Sort of Micky Mouse vs Yogi Bear.

Make’s ya appreciate how far computers have come in our lifetimes.

---

<div class="post-metadata">

**Author:** ![Reuben](https://avatars.discourse-cdn.com/v4/letter/r/54ee81/32.png) [@Reuben](https://boards.straightdope.com/u/Reuben)\
**Post date:** [February 1, 2003, 8:46am UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/23 "2003-02-01T08:46:14Z")

</div>

> [@](#):
>
> \*Originally posted by ftg \*  
> \*\*Yeah, but how many of you have _written_ a BASIC compiler? \*\*

Not me, but I did reverse-engineer the original Altair BASIC written by the 19-year old Bill Gates and Paul Allen and their friend Monte Davidoff.

I was interested to see if Bill could write decent code. Um, yes he certainly could was my conclusion. The interpreter is written in i8080 and the almost-complete annotated disassembly is here :

[http://66.216.21.33/altair/4k32/index2.html](http://66.216.21.33/altair/4k32/index2.html)

---

<div class="post-metadata">

**Author:** ![Desmostylus](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@Desmostylus](https://boards.straightdope.com/u/Desmostylus)\
**Post date:** [February 1, 2003, 11:16am UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/24 "2003-02-01T11:16:28Z")

</div>

That’s pretty cool, **Reuben**. How long did that take?

**Derleth** , I would have transliterated your Basic program into F77 as follows:

```auto

C THIS IS A SIMPLE ITERATION PROGRAM IN FORTRAN
      INTEGER A, I
      A = 5
      DO I = 0, 20, 2
         PRINT *, A*I
      END DO
      END

```

---

<div class="post-metadata">

**Author:** ![Improv\_Geek](https://avatars.discourse-cdn.com/v4/letter/i/b3f665/32.png) [@Improv\_Geek](https://boards.straightdope.com/u/Improv_Geek)\
**Post date:** [February 1, 2003, 1:24pm UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/25 "2003-02-01T13:24:47Z")

</div>

I have reason to believe I was part of a secret government study of young kids and programming because my elementary school class taught me basic computer programming.

I learned some basic Basic (no joke here) in 4th grade and then some more in 5th grade.

I dunno, if I disappear you can assume I was right.

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [February 2, 2003, 9:04am UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/26 "2003-02-02T09:04:52Z")

</div>

**Demo** : END DO? Not in any dialect I’ve used. And the DO statement in every dialect I’ve seen _needs_ the line number of the statement that’s just beyond the end of the loop. Your PRINT looks suspect as well, but I think I remember it from g77.

---

<div class="post-metadata">

**Author:** ![Desmostylus](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@Desmostylus](https://boards.straightdope.com/u/Desmostylus)\
**Post date:** [February 2, 2003, 3:28pm UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/27 "2003-02-02T15:28:20Z")

</div>

A few points:

> [@](#):
>
> \*Originally posted by Derleth \*  
> **Demo**

The abbreviation doesn’t worry _me_, but **Demo** is the actual username of another active poster.

> [@](#):
>
> \*Originally posted by Derleth \*  
> **END DO? Not in any dialect I’ve used. And the DO statement in every dialect I’ve seen _needs_ the line number of the statement that’s just beyond the end of the loop.**

I thought you were a PDP fan. The “END DO” _isn’t_ part of the original F77 spec, but was one of the first things added by DEC to their versions, and widely adopted into others, including MS.

> [@](#):
>
> \*Originally posted by Derleth \*  
> \*\*Your PRINT looks suspect as well, but I think I remember it from g77. \*\*

“PRINT f”, where “f” can be “\*” or something like “’(1X, 2F3.2, I4)’” _is_ part of the [standard](http://www.fortran.com/fortran/F77_std/rjcnf0001-sh-12.html#sh-12.8).

---

<div class="post-metadata">

**Author:** ![Q.E.D](https://avatars.discourse-cdn.com/v4/letter/q/51bf81/32.png) [@Q.E.D](https://boards.straightdope.com/u/Q.E.D)\
**Post date:** [February 2, 2003, 4:47pm UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/28 "2003-02-02T16:47:17Z")

</div>

10 DATA 89,79,85,32,65,76,76,32,83,85,67,75,0  
20 READ X  
30 IF X \<\> 0 THEN PRINT CHR$(X); ELSE STOP  
40 GOTO 20  
99 END

😃

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [February 3, 2003, 3:44am UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/29 "2003-02-03T03:44:50Z")

</div>

**Demostylus** : I’m a fan, not a freak. 😉 My books deal with standard F77, so END DO passed over my little head.

(Of course, I know that FORTRAN was only standardized rather loosely compared to C. I’ve just never seen that particular extension.)

Anyway, I’m more interested in PDPs for their assembly language. A decent CISC machine, as opposed to what Intel creates, can hold my interest almost as much as a good RISC machine. My local library has a book that is a tutorial introduction to VAX-11 assembly, BTW, not to mention something else that just makes me smile: A book that steps you through the implementation of a _portable_ (:D) LISP compiler in C. (Published 1989, came with an unfortunately unreadable 5.25" floppy formatted for IBM compatibles.)

And I have probably heard of **Demo** , but such things don’t usually impugn on the purity of my laziness. 😉

---

<div class="post-metadata">

**Author:** ![TVGuy](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TVGuy](https://boards.straightdope.com/u/TVGuy)\
**Post date:** [February 3, 2003, 5:18am UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/30 "2003-02-03T05:18:16Z")

</div>

Oh my.

I’m having flashbacks …

typing … hundreds … of

```auto

10 lines
20 of
30 code
40 from
50 PC
60 magazines

```

just to draw a frog on screen …

(I’m going back to my C++ compiler now - I need an aspirin)

---

<div class="post-metadata">

**Author:** ![Reuben](https://avatars.discourse-cdn.com/v4/letter/r/54ee81/32.png) [@Reuben](https://boards.straightdope.com/u/Reuben)\
**Post date:** [February 3, 2003, 11:19am UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/31 "2003-02-03T11:19:33Z")

</div>

> [@](#):
>
> \*Originally posted by Desmostylus \*That’s pretty cool, **Reuben**. How long did that take?

About six months of occasional work - an hour here an hour there, about an hour a day. It would have taken an awful lot longer if Monte Davidoff himself hadn’t greatly helped me with the floating-point math areas. The i8080 of course had no floating-point support, so it had to be done in software. Very expensive too… a full third of the run-time. The project _still_ needs finishing off though, to my shame, better overview pages and a permanent home on the web.

Because it took so long to do just 4K of optimised assembly, I have spent most of the last year working on software tools to make reverse-engineering a lot easier.

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [February 3, 2003, 11:56am UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/32 "2003-02-03T11:56:41Z")

</div>

\<wipes tear from eye\>

Ahh, crouching over a ZX81 (with 16K RAMpack), gingerly pressing the ‘dead flesh’ keyboard, praying that ‘wobble’ wouldn’t cause the whole thing to crash, losing a whole afternoon’s work…

We won’t see the likes of those days again.

---

<div class="post-metadata">

**Author:** ![samarm](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@samarm](https://boards.straightdope.com/u/samarm)\
**Post date:** [February 3, 2003, 12:02pm UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/33 "2003-02-03T12:02:45Z")

</div>

Ahh… memories… anyone remember monster maze?

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [February 3, 2003, 12:25pm UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/34 "2003-02-03T12:25:51Z")

</div>

YES! It was the second tape I bought for my ZX81. The first was a compilation of about six or seven games written in BASIC (“Sea Wolf” was the only one I can remember).

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [February 3, 2003, 12:27pm UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/35 "2003-02-03T12:27:08Z")

</div>

And perhaps more amazing than Monster Maze was 1K chess; an enterprising programmer actually wrote a playable chess game (with a computer opponent) to run on an unexpanded ZX81.

---

<div class="post-metadata">

**Author:** ![Nanoda](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@Nanoda](https://boards.straightdope.com/u/Nanoda)\
**Post date:** [February 3, 2003, 2:47pm UTC](https://boards.straightdope.com/t/getting-back-to-basics/151824/36 "2003-02-03T14:47:35Z")

</div>

Despite many people’s disdain for BASIC, I have to give it some credit. BASICA and QuickBasic came “free” with DOS for the longest time, they were procedural and thus easily understood, and (the biggest for me even now), you could do _graphics_ with it! I’ve used Pascal, Prolog, Lisp, Java, C, Smalltalk (_shudder_), Visual Foo, etc. since then and DOS BASIC is still the only language in which I can do [munching squares.](http://www.science.uva.nl/~mes/jargon/m/munchingsquares.html) (see below also)  
My friends and I used to stay behind after school to do 3-D MagicEye, rotating palette and other tricks. (um… I’m sure most of you did that for fun too, so I expect no laughter. :p)

SCREEN 12  
FOR t = 0 TO 511  
FOR x = 0 TO 500  
PSET (x, x XOR t), 6  
NEXT x: NEXT t

[Previous page](https://boards.straightdope.com/t/getting-back-to-basics/151824.md?page=1)
