-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workflow for doing multi-file BASIC build - reusable BASIC Libs #66
Comments
Interesting; it's not possible for BASIC yet. You could of course do a lot of trickery in the Pre and custom build events to manually combine the single files in a full file. I'm thinking about doing a sort of meta macro (with the # comments). What would be your preferred way? Manually put the macro to include a specific BASIC file, or let C64Studio combine the files itself (order by numbering for example). |
Thanks for the feedback! Yea I just discovered the Prebuild/Build/Postbuild and sat with in yesterday. What is the command for building a BASIC-file if I want to create a custom build step for BASIC? Maybe an example of such a multi-file BASIC build setup would be a good addition to all your current examples. I couldn't figure it out yesterday. #INCLUDE The problem with "#include" here would of course be that, if you put the numbers in the wrong number the current build process would complain? But I guess that could be overridden when doing these kind of builds, or limited to only checking that rule within each file. If not, I think this would be confusing. Of course, if all files used LABEL-mode that wouldn't be a problem anymore. But that would make my other suggestion even more useful (freely named labels) C64STUDIO NUMBERING I guess the first idea would be easier to implement? Regardless of which that would be a "killer"-feature for bigger BASIC-programs. Maybe having the possibility to actually see the result BASIC file output for clarity and trouble-shooting. |
I actually have to check whether it's possible at all to do a manual BASIC compile. There's the command line C64Ass, but I can't remember out of my head if it actually does support BASIC as well. The generic #INCLUDE would be easy to implement. It should work for label mode directly, the numbering might cause an issue. |
I've updated the WIP link (https://www.georg-rottensteiner.de/webmisc/C64StudioRelease.zip) with a version that does have an include statement. On a (rather simple) example it works fine. It has no auto-renumbering yet though. To use: #INCLUDE "OTHERFILENAME.BAS" It's simply inserting the lines of the other file at that location. Let me know if that fits your requirements. Could well be that there are issues I didn't encounter yet, so please make a backup of your code. |
Thanks for the WIP! Yes I like that! It does not change the original files, create a sum of all code and it does the job, great work! Currently it only works in Line Numbering Mode I guess, when swtiching both to Label Mode , it currently crashes the program with "Unhandled Exception: The path is not of a legal form" But numbering is what I currently use so that is OK. I'm gonna test this some more, with my big Chip8 Emulator. Renumbering all my files to non-overlapping ranges and making sure they are ordered in the correct (increasing) order. Other suggestions? Either a working user-definable naming of label (as my other improvement suggestion) or possibly a simpler solution using a pre-processor named alias for a referring to a line number/numbers like: IDEA 1 - SPECIFICALLY FOR LABELS
IDEA 2 - GENERALIZED BASIC DEFINES LIKE C
|
Hello again! Mostly for testing this function but also somewhat functional my main basic program now looks like this. It still works the same, executing a full Chip8 program with 100 opcodes!! The solution has gone from 1 file to 18 files using the #INCLUDE directive, really nice! The main BASIC file went from 443 lines to 53 lines! Maybe a good thing would be to be able to comment on the same line, so I could at least manually write the range of lines included in the file. |
It would be nice if the tool supported Mulit-file BASIC build. Is this possible today?
If selected wisely (either as labelled listing without duplicate labels or with non-overlapping Start/Range-addresses per file), all files could be automatically added to one file before build. For example I'm writing a Chip8 Emulator as we speak. It will be alot of lines of BASIC. I've already created 13 different files to test different parts of the application.
The text was updated successfully, but these errors were encountered: