BASIC code editor...

Hardware Hacking, Programming and Game Solutions/Cheats
Post Reply
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

BASIC code editor...

Post by jedie »

Does anyone knowns a good BASIC code editor for linux/windows with this features:

* automatic line numbering / renumbering lines
* variable unique checking
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: BASIC code editor...

Post by jedie »

Now, DragonPy is usable as a rudimentary BASIC IDE :P

With the updates from today: https://github.com/jedie/DragonPy/compa ... ...ce12148 the Editor is usable and send to emulator and back works fine.

Also the "renumbering" seems to work as expected...

First missing thing is a "Auto invert shift" solution, so you must not use shift to insert uppcase characters... As in DragonPy Emulator. Just type and use shift to make lowercase characters...
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: BASIC code editor...

Post by jedie »

Currently it looks like this:
Image


To give it a try:

Code: Select all

# clone the repro:
~$ git clone https://github.com/jedie/DragonPy.git

# Alternative download as .zip: https://github.com/jedie/DragonPy/archive/master.zip

~$ cd DragonPy

# Download all ROM files:
~/DragonPy$ ./download_ROMs.sh

# start with Dragon 32 ROM:
~/DragonPy$ python2 ./Dragon32_test.py
Use "BASIC editor / open" in the main menu to open the editor.

You can load/save ASCII .bas files from you local drive or just type a BASIC listing ;)
With "inject into DragonPy" you send the current listing from the Editor to the Emulator and with "load from DragonPy" back from emulator to editor.
Note: The is currently no "warning" that un-saved content will be "overwritten" and there is no "auto-backup" ;)

The "renumbering" tool can be found in the editor window under "tools"

(Currently only the "Dragon 32" ROM worked with the editor)
Last edited by jedie on Wed Aug 20, 2014 10:31 pm, edited 1 time in total.
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: BASIC code editor...

Post by jedie »

With the latest commits from today, it also worked now with CoCo Color BASIC 1.3...

Just start: /path/to/DragonPy$ ./CoCo_test.py
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: BASIC code editor...

Post by jedie »

New Updates to the BASIC editor in DragonPy:

To run the BASIC Editor without the Emulator:

Code: Select all

...path/to/DragonPy$ DragonPy_CLI.py editor
A rudimentary BASIC source code highlighting is available and looks like this:

Image

Special feature: The Line number that are used in GOTO, SOGUB etc. are extra marked on the left side.

Currently the code are only differate into:
* DATA
* Strings
* Comments
* Code

TODO: parse the code, to coloring it differently.
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: BASIC code editor...

Post by jedie »

With https://github.com/jedie/DragonPy/commi ... 9bcd5ad9a6 i use http://pygments.org/ syntax highlighter.

Looks like this:

Image
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Post Reply