Closed gusmanb closed 4 years ago
@gusmanb, before doing any extra work: Does not this help?
https://dotneteer.github.io/spectnetide/getting-started/use-zx-basic#option-comments
Hi.
Ok, missed that option :)
Anyways, it doesn't works as I would expect. If I add the @options REMark then every other setting on the regular options is ignored. I have changed the origin of the basic program and the stack size from the options pane because I'm using hi-res compressed images and it uses "a lot" of memory, if I add the REMark with "@options -D DISABLE_SCROLL" (the "fix" for the bug) then the compiler complains about the program overflowing &FFFF, then if I open the assembler output I can see it has set the origin to 32768 instead of 24000 and ignored the stack size that I have set in the options pane.
If it's intended that any REMark with options disable all the regular options then the "free" field still would be necessary on the options pane, else the REMark system for options has a bug that instead of appending the new options it replaces all the existing ones.
Cheers.
The REMs intentionally override the settings in Tools | Options. I will soon create a prototype that allows you to define your custom command-line options. SpectNetIDE overrides only the --output
option, and uses the --asm
, To make the compilation work, you should keep some rules.
Probably, the best is to allow specifying any options, and document what is "dangerous". Nonetheless, if the developer uses something wrong, the compilation won't work...
Do you have any idea or syntax you'd like to see?
Hmmm... what about adding something like "@optionspreserve" to the REM directive?
It would work something like this:
If you use @options then all the settings are overriden and the user is responsible for adding all the required options to compile the program.
If you use @optionspreserve then the specified options would override only overlapping ones (per example, if I have specified a heap of 1024 bytes and a base address of 24000 and then I add @optionspreserve -S 28000 the parameters passed to the compiler would be "-S 28000 -H 1024")
Also, if a parameter doesn't overlaps any of the known parameters then it would be appended at the end of the command line, per example, following the previous one if I add "@optionspreserve -D DISABLE_SCROLL" the final parameters would be "-S 24000 -H 1024 -D DISABLE_SCROLL"
Do you think this is feasible?
Sorry for the silence, I was pretty busy during this week. Soon I start working on this feature.
I do not think, mixing options set in the Tools | Options dialog with @options in the program is a good idea, as it causes a lot of headaches. So if you use @options in the code, you need declare every command line options and switches you'd pass to ZXB, except --output
. Also, SpectNetIDE sets --asm
for you. It's your responsibility to specify the approriate options. SpectNetIDE does not parse of check the option values you set.
You can use the Z80 Assembler pane in the Output window to check the command line options SpectNetIDE uses when running ZXB:
Here I send you the private build with this fix:
Sorry, I am sick, I've been two weeks really bad. I will try to test it this weekend.
Cheers.
Sorry to hear that :-( Get well!
@gusmanb, I hope you're getting better. I'm soon releasing Preview 8. Please check it!
Hi Istvan! Sorry for the long delay, I'm finally recovered, it has been a nightmare...
I have tested the @options and it works like a charm, I'm using it for custom defines and some other options and it's perfect.
I'm closing the request.
Cheers!
Hi!
I have found a bug in ZX Basic, it's a known bug and there's a beta version which solves the problem but it's needed to add a define to the command line and there's no way to add those, so my request is a field to add it.
Also, it would be useful to add a free field to add custom parameters for the compiler, in this way even if the compiler is updated and adds more options that SpectNetIDE does not expose in concrete properties it would allow you to use them.
Cheers.