Jump to content

Fun? with ECS BASIC


Recommended Posts

I thought it might be amusing to create a spoof Intellivision VIC-20 "emulator", showing the famous one-line maze program.  This is pretty easy to do in IntyBASIC:



ROM and BASIC source code: vic20.zip


However, I had hoped to implement this in ECS BASIC.  Surely this is doable?  Clearly I had forgotten quite how bad ECS BASIC is.  This is as near as I could get:



Implemented with the following "one-liner":

10 CLR
20 SET A$="///////////////////"
30 FOR A=1 TO 19
40 IF(RN(0)>49)A$(A)=60
60 PUT A$
70 GOTO 20

For a language implemented on a machine with reasonable graphics capabilities (for the day) ECS BASIC is poor.  The list of problems I encountered is as follows:

  • As we know ECS BASIC is dog slow because of the synchronisation with VBLANK.  As it turns out this is the least on my concerns...
  • You can't change the border colour!?
  • It takes 18 seconds to set the background of the screen to a consistent colour (white in this case) using the following code:
10 FOR A=0 TO 239
20 BK(A) = 7


  • All tiles can either have a printed character or a background colour, but not both - brings a whole new meaning to foreground / background mode ;)



10 CLR
20 BK(0) = 1
50 BK(20) = 1
60 BK(40) = 1
70 GOTO 70


  • All printed lines are terminated with a newline, so you can't print in the 20th column without generating an empty line



10 PRIN "12345678901234567890"
20 PRIN "12345678901234567890"
30 PRIN "1234567890123456789"
40 PRIN "1234567890123456789"


  • This also means you can't build a line incrementally (so faking someone typing is impossible)




10 PRIN "H"
20 PRIN "HE"
40 SET A$="H"
50 PUT A$
60 SET A$="HE"
70 PUT A$


Oh well, back to the drawing board having learnt some things. ?











Edited by decle
  • Like 3
  • Thanks 1
Link to comment
Share on other sites

Ah, the bad old days!  There were so many games I wish I could have written in ECS BASIC in the late 80s, but I ran into all the problems you listed.


If you think that's bad, wait until you find out your programs can't exceed 2,000 characters!  All of a sudden, code lines are repainted all in grey, signalling an error.  My best workaround was to split the program in two: one to set up the environment with string assignments and all the (animated/linked) sprites, and another for the actual game loop.


Another annoyance is the length of time it takes to output a single 6-digit numeric value, even more so if you enable floating-point arithmetic.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...