BasEdit.NET
Moderator: Moderators
1.01? I thought your plan was to stop on V1.0 

PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Syntax check will be removed, I think. It simply tokenizes the program and checks if linenumbers exist. It would only report an error if you try to check a source without linenumber or if anything really obscure happens. Something like 10 PRINTFORPRINTI=1OPRINTTO10 would be happily tokenized... Doing a real syntax check would require much more than simply converting PETSCII to tokens...
Proofreader could be done, but is there really any demand. And if so, which proofreader(s) should be implemented?
@Boray: Even the best plans can be busted by circumstances
Proofreader could be done, but is there really any demand. And if so, which proofreader(s) should be implemented?
@Boray: Even the best plans can be busted by circumstances

New version 1.02 uploaded
- added context menu item "Set start address..." which enables changing of load address of the prg file at any time. Load prg file for unexpanded VIC, set start address to 4609 and save as prg file for VIC with 8k or more memory expansion.
- even better: enhanced the EMU-section in the INI file to support different emulator settings for different start addresses:
Place your favourite emulator for your needs her, use Vice for VIC, Emu64 for C64 and Yape for Plus/4 for example!
The emulator to be started with F5 - Save&Run... will be automatically selected upon start address. If start address does not match any predefined address, standard Emu setting (Emu=, EmuParam=") will be used.
- added context menu item "Set start address..." which enables changing of load address of the prg file at any time. Load prg file for unexpanded VIC, set start address to 4609 and save as prg file for VIC with 8k or more memory expansion.
- even better: enhanced the EMU-section in the INI file to support different emulator settings for different start addresses:
Code: Select all
' Emulator settings
' standard emulator, path/exe and commandline (%F=full path to prg file)
Emu=c:\vice\xvic.exe
EmuParams=%F
' special emulator for load address -1 = 1025 --> VIC +3K, PET/CBM series
Emu-1=c:\vice\xvic.exe
EmuParams-1=-config c:\vice\vice_vic3k.ini %F
' special emulator for load address -2 = 2049 --> C64
Emu-2=c:\vice\x64.exe
EmuParams-2=%F
' special emulator for load address -3 = 4097 --> VIC unexp, VIC +SuperExpander, Plus/4, C16
Emu-3=c:\vice\xvic.exe
EmuParams-3=-config c:\vice\vice_vicunexp.ini %F
' special emulator for load address -4 = 4609 --> VIC +8K and more
Emu-4=c:\vice\xvic.exe
EmuParams-4=-config c:\vice\vice_vicfull.ini %F
' special emulator for load address -5 = 7169 --> C128
Emu-5=c:\vice\x128.exe
EmuParams-5=%F
' special emulator for load address -6 = 3 --> CBM II series
Emu-6=c:\vice\xcbm2.exe
EmuParams-6=%F
The emulator to be started with F5 - Save&Run... will be automatically selected upon start address. If start address does not match any predefined address, standard Emu setting (Emu=, EmuParam=") will be used.
I think that a Basic Syntax Check is a real killer application tool...Schlowski wrote:Syntax check will be removed, I think.
... Doing a real syntax check would require much more than simply converting PETSCII to tokens...

The most common was the first 1983 COMPUTE's version for Vic-20 and C64.Proofreader could be done, but is there really any demand. And if so, which proofreader(s) should be implemented?
Mega-Cart: the cartridge you plug in once and for all.
- robinsonmason
- Vic 20 Enthusiast
- Posts: 195
- Joined: Sun Mar 14, 2010 9:17 pm
So the cmb2 has the load address of 3? I have never found any cbm2 programs to test with so there actually is no support for them in PRG Starter (except for the global overrides)...
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
I really don't know for sure, that's what you get if you save with xcbm2So the cmb2 has the load address of 3?

Problem is this would require a real parser and, to make it worse, this parser must be able to react like different Basic extensions. For example Exbasic/Wimbasic allows to omit THEN in most cases, making 10 IFA=1B=2 a valid command whereas this would cause an error in Basic V2. And I do not have the slightest idea what specialities Waterloo Structured Basic or Simons Basic or other Basic dialects have.I think that a Basic Syntax Check is a real killer application tool...
I will take a look at it, thanks for the info.The most common was the first 1983 COMPUTE's version for Vic-20 and C64.
@robinsonmason: I started BasEdit as a simple to use Basic Editor for the PC as I always find it a little bit uncomfortable to edit bigger Basic programs on the VIC. Even if this means I loose some nostalgic feeling during coding. But the better overview over the source due to the bigger editing area and the ease of running through the source up and down makes up for that loss. At least for me.
- robinsonmason
- Vic 20 Enthusiast
- Posts: 195
- Joined: Sun Mar 14, 2010 9:17 pm
Thanks for the info Schlowski, I'll blog about it soon. Too good not to share.Schlowski wrote: @robinsonmason: I started BasEdit as a simple to use Basic Editor for the PC as I always find it a little bit uncomfortable to edit bigger Basic programs on the VIC. Even if this means I loose some nostalgic feeling during coding. But the better overview over the source due to the bigger editing area and the ease of running through the source up and down makes up for that loss. At least for me.
I'll blog about it soon

One thing I forgot to mention in my update infos: Beside starting BasEdit with a prg file as command line parameter you can simply drag and drop a prg file on the open edit window, this file will then be loaded. Both methods try to recognize tokenized files with .prg extension and detect if PETSCII files include line numbers or not to select the adequate editing mode (line# mode / label mode).
I think that a Syntax check for the standard C64/Vic20 Basic V2 version is enoughSchlowski wrote:Problem is this would require a real parser and, to make it worse, this parser must be able to react like different Basic extensions.

Mega-Cart: the cartridge you plug in once and for all.
Ok, I took your word and sacrificed my precious sleeping time for a syntax check.nbla000 wrote:I think that a Basic Syntax Check is a real killer application tool...
I think that a Syntax check for the standard C64/Vic20 Basic V2 version is enough
Some remarks:
1. only works in line# mode
2. requires enhanced tokenfiles, for a first test I enhanced TokenList_BasicV2.txt
Code: Select all
; syntax = "..." description for syntax-check
; t$xx = token with value $xx
; c = command
; f = function - numeric
; f$ = function - string
; <var_any> = any numeric or string variable incl. arrays
; <var_num> = any numeric variable (int/float) incl. arrays
; <var_str> = any string variable incl. arrays
; <var> = any real variable incl. arrays
; <var_any_simple> = any numeric or string variable NO arrays
; <var_simple> = any float variable NO arrays
; <num> = any numeric expression (examples: 1, 2+3, 1+b+c(5), LEN(a$))
; <num_lit> = numeric literal / constant value (examples: 1, 10)
; <str> = any string expression (examples "A", LEFT$(A$,1), MID$(A$,LEN(B$)))
; <str_lit> = string literal / constant (example: "HELLO")
; <log> = logical expression (examples: I=10, X$<>"")
; <skip> = anything until : or line end
; <cmd> = any command (examples: END, A=5)
; <print> = commandlist for print
;
; sample for if-token
if, $8B, syntax="c<log>{t$A7<num_lit>|<cmd>}|{t$89<num_lit>}"
4. I'm sure there are valid constructs my parser will not recognize -> feedback welcome

5. due to complex structure and urgent need of sleep the following "quirks" have to be solved later:
Code: Select all
; incomplete commands
; print : everything until : or end of line is valid, no check!
; print# : everything until : or end of line is valid, no check!
; cmd : everything until : or end of line is valid, no check!
; tab( : missing check for usage only with print!
; spc( : missing check for usage only with print!
Code: Select all
; special:
; sys : ignore everything until : or end of line
8. Waterloo Structured basic won't work because of special 3-byte tokens, will be implemented later
New version 1.03 uploaded...
New version 1.04 uploaded
- Auto number feature added, makes entering programs in line# easier
- Syntax check can be started with shift-F5
- F9 = Save PRG, if filename exists overwrite without question! Good to save every now and then while entering long programs
- fixed bug which prevented start of the specific emulator directly after loading a PRG
- fixed some bugs regarding detection of string expressions for syntax check
- Syntax check: implemented <print> syntax checking, now PRINT "X"A$C+1B$=C$ will be accepted, PRINT"H"NEXT will not
Entered "Tank versus Ufo" from VIC-20 manual with this version and did a successful syntax check
New version 1.05 uploaded
- enhanced string detection for syntax check
- enhanced <log> handling in syntax check
- bug fix: eliminated endless loop in <print> syntax check when encounting unexpected tokens
- if syntax check reports an error, cursor will be placed at offending spot in source
Btw, just made a little tool which scans my *.vb files and counts lines, comments and empty lines resulting in the following values for BasEdit.NET:
As always I'm a little bit short of comments
The old BasEdit had the following values:
(Both lists only take my handwritten code into account, no automatically generated sources by VB6 or VB.NET for the forms etc.)
Ups, ratio comments / code got worse over the years... Who needs comments?
@nbla000: Syntax check occupies round about 1.400 lines of code...
- Auto number feature added, makes entering programs in line# easier
- Syntax check can be started with shift-F5
- F9 = Save PRG, if filename exists overwrite without question! Good to save every now and then while entering long programs
- fixed bug which prevented start of the specific emulator directly after loading a PRG
- fixed some bugs regarding detection of string expressions for syntax check
- Syntax check: implemented <print> syntax checking, now PRINT "X"A$C+1B$=C$ will be accepted, PRINT"H"NEXT will not
Entered "Tank versus Ufo" from VIC-20 manual with this version and did a successful syntax check

New version 1.05 uploaded
- enhanced string detection for syntax check
- enhanced <log> handling in syntax check
- bug fix: eliminated endless loop in <print> syntax check when encounting unexpected tokens
- if syntax check reports an error, cursor will be placed at offending spot in source
Btw, just made a little tool which scans my *.vb files and counts lines, comments and empty lines resulting in the following values for BasEdit.NET:
Code: Select all
7.204 lines total including
310 comment lines
560 empty lines
-----------------------------
6.334 lines of code

The old BasEdit had the following values:
Code: Select all
3.774 lines total including
210 comment lines
520 empty lines
-----------------------------
3.044 lines of code
Ups, ratio comments / code got worse over the years... Who needs comments?

@nbla000: Syntax check occupies round about 1.400 lines of code...
Cool! Does it work for any VB.NET project? Can I download it somewhere?Schlowski wrote: Btw, just made a little tool which scans my *.vb files and counts lines, comments and empty lines resulting in the following values for BasEdit.NET
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)