I'll have to check my version of PST. It's probably out-of-date.
RE: file behavior. What would really be nice is if you could detect if an opened file has been saved elsewhere. I realize that's a HUGEEEE ask, but it's one of the things I love about Notepad++. I'd imagine it's a nightmare to implement though.
I like your ideas regarding debug. It doesn't really need to take input but having an easy way to view output would be really sweet.
The improvements to find are great. This is shaping up to be a great tool indeed!
But I am having trouble loading to P2 ES Rev B (EEPROM), and I'm getting the attached response.
Can someone tell me what I am doing wrong?
clues:
the DIP switches are set to OFF, except for FLASH, which is set to ON
Code compiles OK
The same code compiles and loads OK using FlexGUI.
command line is /C loadp2.exe -m 010c1f08 -p COM3 "E:\propeller\P2\code\Spin2Edit2.binary" > loadp2.out
but note:
If I flip the FLASH switch to OFF and load to RAM, all is OK.
If I then flip the FLASH switch back to ON and load to EEPROM, it works. But once only.
All subsequent loads to EEPROM fail as described above.
Found an issue how SpinEdit finds the compiler & loader... Depending on what directory SpinEdit is located, the compiler & loader cannot be found. I receive errors like:
fastpin.exe is not recognized as an internal or external command
as, SpinEdit thinks the compiler is in my Desktop directory. Since I'm running WIN 10 in a Parallels VM, the problem may be made worse (I have file sharing across macOS & WIN 10 turned on).
When I update the Command Line Viewer field "Working Folder", to point to the bin directory, where fastspin.exe is located, it works "one time". I have to re-edit that file for each compile.
Should there be a Preference that sets compiler & loader paths that become permanent, as in SimpleIDE or PropellerIDE? It would help especially on atypical systems like WIN VMs!
Since WIN is a mystery to me (as macOS is a mystery to others), where should apps like SpinEdit be installed? Apps with installers get placed in Programs or Programs x86, but apps that are just downloaded as a single .exe are less determinant in location (as far as I can see:-). I copied SpinEdit.exe into flexgui's bin directory, in order for it to use fastspin, loadp2, etc... But, that was only partially successful for compiling C, Spin & BASIC sources. I still needed to mod the Command Line Viewer for C & Spin libraries. flexgui allows a list of library directories to be input. Perhaps that's a good model.
I think the files can be put anywhere. But, if you manually put them in a "Program Files" place, strange things may happen if you don't do it as Administrator...
So, I think I'd avoid putting them in Program Files, until I maybe make an installer one day.
For now, I'd just make a folder anywhere else and put all the files there.
Can you try the attached and see if you can specify a "tool" folder where the .exe files are using the "Options" dialog?
@ersmith I just found a little gem. Eric is likely sitting there going "well.. yeah... of course that works!", but I was pleased to find this works in FlexBASIC.
You can copy the entire contents of a structure (defined as a class) from one instance of the class to another with one line of "magic" code. Consider this code:
CLASS myTimeStruct
dim time as long
dim date as long
dim GMTOffset as long
END CLASS
dim Time1 as myTimeStruct
dim Time2 as myTimeStruct
Time1.time = 5000
Time1.date = 7429522
Time1.GMTOffset = -6
Time2 = Time1 '<-- "magically" copy Time1 into Time2
We expect stuff like this in the "big machine" implementations of a languange, but I sure wasn't expecting this in FastBASIC. Ya gotta put this gem in the manual!
But, is it really copying the contents of the structure?
Or, is it merely making Time2 point to the same existing data?
I just verified it, because you raised a point that I didn't initially test for (and in the process I found a bug I need to report to ERSmith).
I can say with certainty that Time2=Time1 is actually copying the data, and not just adjusting changing a pointer. After we set Time2=Time1, we can still manipulate the data fields in each independently of the other. Changes made (after the copy occurs) to Time1 don't propagate to Time2, and vice versa.
The assignment does do a copy (it turns into the equivalent of bytemove() under the hood). @JRoark , the example you posted doesn't compile as-is in FlexBASIC, as you found out:
(a) fastspin doesn't like the variable declarations in the CLASS (it wants them prefixed by DIM). This some laziness on my part in the parser and it's easy to fix it so that inside CLASS the DIM isn't required, so I'll do that
(b) there's a bug in handling objects of sizes between 5 and 11 bytes (inclusive) due to some unfinished code to convert between structures and multiple values. That's in the "todo" queue but it's not finished yet.
Getting back on topic a little bit, @Rayman are you building fastspin and loadp2 yourself from source or do you rely on my pre-built binaries? If the latter then PM me and I can send you a more recent build for you to try in SpinEdit. I don't think anything has changed in fastspin that should affect the editor, but the new loadp2 features like scripts and multiple binary downloads might be useful for you.
The assignment does do a copy (it turns into the equivalent of bytemove() under the hood). @JRoark , the example you posted doesn't compile as-is in FlexBASIC, as you found out.
Yup. You must have seen the post before I corrected it. I later added the DIMs to make it cut/copy/run properly. My bad.
(a) fastspin doesn't like the variable declarations in the CLASS (it wants them prefixed by DIM). This some laziness on my part in the parser and it's easy to fix it so that inside CLASS the DIM isn't required, so I'll do that
Actually, if my vote counts, I prefer that any variable that gets declared anywhere should be prefaced by DIM for clarity. Maybe make DIM optional within a CLASS? (Confession: I have an external parser that does some housekeeping things like identifying variables and making a list of them. It is a lot easier to trigger on VAR and DIM than it is to have to do intelligent parsing like a compiler would).
(a) fastspin doesn't like the variable declarations in the CLASS (it wants them prefixed by DIM). This some laziness on my part in the parser and it's easy to fix it so that inside CLASS the DIM isn't required, so I'll do that
Actually, if my vote counts, I prefer that any variable that gets declared anywhere should be prefaced by DIM for clarity. Maybe make DIM optional within a CLASS?
Sorry yeah, I should have been clearer -- I'm planning to make the DIM optional within a CLASS (so FreeBasic declarations would work). So your existing code should continue to work, and you can continue to use DIM everywhere if you want to.
Now that Spin2 is out, there may be major changes coming to FastSpin.
So, I just posted current version of SpinEdit to top post, while things are stable.
Now has Flow Indicators, font size control and brightness slider.
The brightness slider is nice if you can't find your mouse cursor... Making it brighter makes it easier to see the cursor.
Also, this is a "release" build instead of "debug". Should be better for very large files.
BTW: I'm glad to hear that Parallax is going to come out with a new Propeller Tool with P2 support.
Takes the pressure off of me to fix whatever bugs might be here...
Hi all, I'm having a problem with indentation with nested repeat loops (see attached).
The last 3 statements belong to the middle repeat loop but the editor doesn't show them as such and they don't execute as such.
Am I doing something wrong with the indenting?
I added red dots where I expected the indentation marking to appear.
Comments
RE: file behavior. What would really be nice is if you could detect if an opened file has been saved elsewhere. I realize that's a HUGEEEE ask, but it's one of the things I love about Notepad++. I'd imagine it's a nightmare to implement though.
I like your ideas regarding debug. It doesn't really need to take input but having an easy way to view output would be really sweet.
The improvements to find are great. This is shaping up to be a great tool indeed!
But I am having trouble loading to P2 ES Rev B (EEPROM), and I'm getting the attached response.
Can someone tell me what I am doing wrong?
clues:
the DIP switches are set to OFF, except for FLASH, which is set to ON
Code compiles OK
The same code compiles and loads OK using FlexGUI.
command line is /C loadp2.exe -m 010c1f08 -p COM3 "E:\propeller\P2\code\Spin2Edit2.binary" > loadp2.out
but note:
If I flip the FLASH switch to OFF and load to RAM, all is OK.
If I then flip the FLASH switch back to ON and load to EEPROM, it works. But once only.
All subsequent loads to EEPROM fail as described above.
any help welcome
cheers, Mark
Yes, flash loading needs to be fixed for rev.b silicon...
Should have it done very soon.
New version in top post with new loadp2.exe, spinedit.exe and flashloader.bin
Update: Just fixed something with the C options dialog...
When I update the Command Line Viewer field "Working Folder", to point to the bin directory, where fastspin.exe is located, it works "one time". I have to re-edit that file for each compile.
Should there be a Preference that sets compiler & loader paths that become permanent, as in SimpleIDE or PropellerIDE? It would help especially on atypical systems like WIN VMs!
dgately
So, I think I'd avoid putting them in Program Files, until I maybe make an installer one day.
For now, I'd just make a folder anywhere else and put all the files there.
Can you try the attached and see if you can specify a "tool" folder where the .exe files are using the "Options" dialog?
Thanks,
dgately
You can copy the entire contents of a structure (defined as a class) from one instance of the class to another with one line of "magic" code. Consider this code:
We expect stuff like this in the "big machine" implementations of a languange, but I sure wasn't expecting this in FastBASIC. Ya gotta put this gem in the manual!
But, is it really copying the contents of the structure?
Or, is it merely making Time2 point to the same existing data?
I just verified it, because you raised a point that I didn't initially test for (and in the process I found a bug I need to report to ERSmith).
I can say with certainty that Time2=Time1 is actually copying the data, and not just adjusting changing a pointer. After we set Time2=Time1, we can still manipulate the data fields in each independently of the other. Changes made (after the copy occurs) to Time1 don't propagate to Time2, and vice versa.
Pretty cool!
(a) fastspin doesn't like the variable declarations in the CLASS (it wants them prefixed by DIM). This some laziness on my part in the parser and it's easy to fix it so that inside CLASS the DIM isn't required, so I'll do that
(b) there's a bug in handling objects of sizes between 5 and 11 bytes (inclusive) due to some unfinished code to convert between structures and multiple values. That's in the "todo" queue but it's not finished yet.
Getting back on topic a little bit, @Rayman are you building fastspin and loadp2 yourself from source or do you rely on my pre-built binaries? If the latter then PM me and I can send you a more recent build for you to try in SpinEdit. I don't think anything has changed in fastspin that should affect the editor, but the new loadp2 features like scripts and multiple binary downloads might be useful for you.
Yup. You must have seen the post before I corrected it. I later added the DIMs to make it cut/copy/run properly. My bad.
Actually, if my vote counts, I prefer that any variable that gets declared anywhere should be prefaced by DIM for clarity. Maybe make DIM optional within a CLASS? (Confession: I have an external parser that does some housekeeping things like identifying variables and making a list of them. It is a lot easier to trigger on VAR and DIM than it is to have to do intelligent parsing like a compiler would).
This uses FastSpin to compile P2, .spin2 code.
FastSpin supports both pure PASM2 and also a Spin with PASM2
So, I just posted current version of SpinEdit to top post, while things are stable.
Now has Flow Indicators, font size control and brightness slider.
The brightness slider is nice if you can't find your mouse cursor... Making it brighter makes it easier to see the cursor.
Also, this is a "release" build instead of "debug". Should be better for very large files.
BTW: I'm glad to hear that Parallax is going to come out with a new Propeller Tool with P2 support.
Takes the pressure off of me to fix whatever bugs might be here...
It's not very useful without any diagnostic output, but I can post a version with it here.
The last 3 statements belong to the middle repeat loop but the editor doesn't show them as such and they don't execute as such.
Am I doing something wrong with the indenting?
I added red dots where I expected the indentation marking to appear.
cheers,
Mark
Maybe one day I’ll fix it....
It’s harder than it looks though..