Menu

Are PC-DOS basic programs supported

2021-03-09
2021-03-10
  • Mike Anderson

    Mike Anderson - 2021-03-09

    I have a folder full of programs written with "basica" on PC-DOS. Their extension is .bas. They are tokenized forms of the programs. I recall that an optional way to save the programs was as an ASCII file - type .asc, but I never did that. Is there a way to open these programs. I'd love to open them and see how (or if) they work. I've attached an example.
    Thanks.

     
    • Marc 'BlackJack' Rintsch

      They may need some tweaking but chances are good. The example can be listed and run, but needs some modification for the joystick values and the FOR loop that's in there to slow the program down.

      Here's what a generated maze looks like:

      ╔───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬   ┬───┬───┬───┬───╖
      │                           │       │               │     ☺ │           │   │
      ├   ┼───┼───┼───┼   ┼───┼   ┼   ┼───┼   ┼   ┼   ┼   ┼   ┼   ┼   ┼───┼   ┼   ┤
      │           │       │   │       │       │   │   │       │   │       │   │   │
      ├───┼───┼   ┼   ┼───┼   ┼   ┼   ┼   ┼───┼   ┼───┼   ┼───┼───┼───┼   ┼   ┼   ┤
      │           │           │   │       │   │       │                   │   │   │
      ├───┼───┼   ┼───┼───┼───┼   ┼───┼───┼   ┼───┼   ┼   ┼───┼───┼───┼───┼   ┼   ┤
      │       │   │   │                   │       │   │   │           │   │       │
      ├   ┼   ┼   ┼   ┼   ┼───┼───┼───┼   ┼───┼   ┼   ┼   ┼   ┼───┼   ┼   ┼───┼   ┤
      │   │   │       │   │           │           │   │   │       │   │   │       │
      ├───┼   ┼   ┼───┼   ┼   ┼───┼   ┼───┼───┼───┼   ┼   ┼───┼   ┼   ┼   ┼   ┼───┤
      │       │       │       │   │           │   │   │   │       │   │   │   │   │
      ├   ┼───┼───┼   ┼───┼───┼   ┼   ┼───┼   ┼   ┼   ┼───┼   ┼───┼   ┼   ┼   ┼   ┤
      │           │   │           │       │   │   │       │   │       │       │   │
      ├───┼───┼   ┼───┼   ┼   ┼   ┼   ┼   ┼   ┼   ┼   ┼   ┼   ┼───┼───┼   ┼───┼   ┤
      │           │       │   │       │   │   │   │   │   │               │       │
      ├   ┼───┼───┼   ┼───┼   ┼───┼───┼   ┼   ┼   ┼───┼   ┼───┼───┼───┼───┼   ┼   ┤
      │   │       │   │       │       │   │           │   │   │               │   │
      ├   ┼   ┼   ┼   ┼   ┼───┼   ┼   ┼───┼───┼───┼   ┼   ┼   ┼   ┼   ┼───┼───┼───┤
      │   │   │       │   │   │   │       │   │       │       │   │               │
      ├   ┼   ┼   ┼───┼   ┼   ┼   ┼───┼   ┼   ┼   ┼───┼───┼   ┼   ┼───┼───┼───┼   ┤
      │       │       │           │           │           │       │               │
      └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴   ┴───┴───┴───┴───╝
      

      In line 3000 the two 80 values need to be replaced by the max value 254 - 20 = 234:

      3000 STUP = 20 : STDOWN = 234 : STLEFT = 20 : STRIGHT = 234 : O = 1
      

      And the 200 in line 3105 needs to be much higher or the smiley is way too fast. I've used 2000:

      3105 FOR ZZ = 1 TO 2000 : NEXT ZZ : X = STICK(0) : Y = STICK(1)
      
       
  • Mike Anderson

    Mike Anderson - 2021-03-10

    This is awesome! Thanks for doing this! I think this means that I can install PC-BASIC and use it with the tokenized versions of the Basic programs. Is that correct?

    Just a little history... My 6 year old son liked mazes, and I found this program somewhere, but it didn't work - the output didn't look anything like a maze. Well, that year (1983) we took our kids on Amtrak from MN to Orlando. We had a whole train car pretty much to ourselves. While my wife and our kids were spread out in different seats with their stuff, I decided to spend part of the train ride figuring out how the program was supposed to work and debugging it. It worked pretty well - I don't recall whether I knew what the limit was, but I remember printing some mazes for my son that were multiple pages. (BTW, as you can imagine, there was no problem with anything being "too fast" back then!)

    Thanks again, Marc!

    Mike Anderson

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.