CPCWiki forum

General Category => Programming => Topic started by: tjohnson on 15:26, 19 August 17

Title: Basic coding ide
Post by: tjohnson on 15:26, 19 August 17
Hi all i was coding a simple game in loco basic yesterday on winape.  It now probably runs to a hundred or so lines and quite difficult to edit and follow being basic and unstructured.  Are there any simple tools or ide to make coding faster and easier?  In winape it seemed possible to bring the basic into the assembler view but not edit and run.  I will share my creation when finished even though its pretty basic and a bit rubbish!  Cheers all Trevor

Sent from my E5823 using Tapatalk

Title: Re: Basic coding ide
Post by: SRS on 21:01, 19 August 17
you may have a look at http://cpcbasic.webcindario.com/CPCBasicEn.html

I did most of  my adventure conversions in "notepad++" with some "basic" highlighting, and dtehn coyp paste it to winape with "autotpye" in "fast emulation mode"

ctrl-f5 or ctrl-f11 with shift-f4 activated
Title: Re: Basic coding ide
Post by: AMSDOS on 22:52, 19 August 17
I try and make my programs look as readable as possible with single commands per line unless they relate.

I also:

Title: Re: Basic coding ide
Post by: tjohnson on 23:05, 20 August 17
Thanks chaps that was pretty much my thoughts about the best way to code.  Printing is definitely an option, I even have a nice 9 pin dot matrix and some continuous paper to keep it old skool.
Title: Re: Basic coding ide
Post by: AMSDOS on 10:54, 21 August 17
I envy you! All printers should be made to sound like a Dot-matrix.
Title: Re: Basic coding ide
Post by: SRS on 21:04, 21 August 17
Quote from: tjohnson on 23:05, 20 August 17
Thanks chaps that was pretty much my thoughts about the best way to code.  Printing is definitely an option, I even have a nice 9 pin dot matrix and some continuous paper to keep it old skool.

I still have my DMP2000 around and  a lot of endless paper - but no more ink for it and dunno how to use it with my modern pc :)
Title: Re: Basic coding ide
Post by: Sykobee (Briggsy) on 21:43, 21 August 17
Well it's a standard parallel port ... and maybe somewhere you can get one of those ribbon re-inker sprays?
Title: Re: Basic coding ide
Post by: EgoTrip on 22:55, 21 August 17
Quote from: AMSDOS on 22:52, 19 August 17
I try and make my programs look as readable as possible with single commands per line unless they relate.

I also:

       
  • use mostly loops and indent those lines to reflect what's happening within them (I find it makes a big difference to the programs readability).
  • avoid using GOTO as much as possible.
  • Print the entire program out onto an old tree (if I have scrap paper I use it), because I find having the entire program in front on me on paper makes a difference instead of trying to read a program by scrolling up and down all the time, though the way I go about printing the program out is truly unconventional and I don't expect anyone to follow it.


Doesn't using spaces to indent lines eat up memory though? With long programs, every byte counts.
Title: Re: Basic coding ide
Post by: tjohnson on 09:00, 22 August 17
Quote from: EgoTrip on 22:55, 21 August 17

Doesn't using spaces to indent lines eat up memory though? With long programs, every byte counts.
That's a good question my program is 6k on disk at they moment,  i have put a number of contents into the program Rem which i would assume uses some memory even if the interpreter ignores them.  i also moved the code out to notepad ++ and edited in there before autotyping back into winape which worked quite well.   Spent over an hour trying to fix a bug but can't work out why a piece of course isn't working but have given up a slept on it.

Sent from my E5823 using Tapatalk

Title: Re: Basic coding ide
Post by: tjohnson on 09:08, 22 August 17
Quote from: SRS on 21:04, 21 August 17
I still have my DMP2000 around and  a lot of endless paper - but no more ink for it and dunno how to use it with my modern pc :)
Get a usb to parallel port cable if your computer doesn't have a parallel port, ribbons are probably easily available on ebay or Amazon and i expect an Epson driver in windows will work, assuming you are on Windows

Sent from my E5823 using Tapatalk

Title: Re: Basic coding ide
Post by: AMSDOS on 11:12, 22 August 17
Quote from: EgoTrip on 22:55, 21 August 17

Doesn't using spaces to indent lines eat up memory though? With long programs, every byte counts.


Unsure, after reading the BASIC Tokens Table, it appears it &20 or 32 is used for a space. Hisoft Pascal overcomes the spacing issue by reserving a byte following the Line Number with a number which represents the number of spaces, though Hisoft Pascal only allows 19Kb of space to work with for your program as opposed to the 42k BASIC gives you. However, I was mainly writing regarding how it would help to make a BASIC program become more readable. The Winape Assembler can simply be used to transfer a BASIC program to it, which could then be edited that way, transferred to a program for Printing, but could see how my dot-points could be seen as points I apply while coding and have applied those things while presenting short BASIC snippets. I was just trying to make the code readable.
Title: Re: Basic coding ide
Post by: AMSDOS on 11:26, 31 August 17
I had a look at one of my BASIC examples with the Indented Spaces on the lines in-between a Loop, what I noticed was the initial space following Line Number  doesn't get counted in Memory as a space, though for every additional space added byte &20 is used. It's probably not a big deal using that with a single loop, though it helps when dealing in Nested Loops, just to show which code is being handled in which Loop.
Powered by SMFPacks Menu Editor Mod