Comments (5)
Had another think.
If I start my data on first line then put in 528 dummy bytes I can then put as many characters sets into the array as I need after that.
It means having 1/2k of wasted data, but I'm sure most programs would find a use for that. Or I can probably put a small amount of code before the array and just recalculate where my character set data needs to be.
I really should think more before posting a request :)
from fastbasic.
Hi!
It would be great if I could point the location of an arrays data at a specific page in memory to make character sets.
DATA FONT(),40960 BYTE = 0,0,0,etc
This would save on doubling up on memory due to having an array and then needing to move that data to the character set location. And it's a lot easier than creating external data files and loading them directly into memory.
This is not currently possible in the IDE, because the compiler (CONTROL-W) writes all code in one big block and can't produce segmented binaries.
I think that using external data files is not that difficult:
OPEN #1,4,0,"D:CHAR.BIN" : BGET #1, 40960, 1024 : CLOSE #1
There is another option if you want generate a single Atari executable file: you can join multiple loadable parts together so that the OS loads all the data. So, you generate a file with the character data (for example, with DOS 2.5 "write binary data", or with many other tools, the you append the compiled binary file to the data file. Hope it makes sense.
And, using the cross compiler you also can append the data or you can use a custom linker script and place binary data directly in any address with a little assembler file.
Had another think.
If I start my data on first line then put in 528 dummy bytes I can then put as many characters sets into the array as I need after that.
It means having 1/2k of wasted data, but I'm sure most programs would find a use for that. Or I can probably put a small amount of code before the array and just recalculate where my character set data needs to be.
Problem with that is that using different versions of FastBasic will reorder data and change the number of bytes you have to skip, so it won't work.
What I could do is add a "align" command to the DATA statement that automatically adds the correct amount of dummy bytes so that the start of the data is correctly aligned.
Something like this could work:
DATA mychar() byte @1024 = 1,2,3,
In the weekend I could test if this is feasible. Also, the above has the advantage that if you use the cross compiler, I can optimize the location so that a minimum amount of space is wasted.
Have Fun!
from fastbasic.
Since I figured out how to autorun the cross compiler from notepad++ that's all I've been using. I understand that using my system I might have to tweak a program in development, but once it's finalised everything should be ok.
Your final idea sounds cool, would be nice to have if that was an easy update for you.
And, using the cross compiler you also can append the data or you can use a custom linker script and place binary data directly in any address with a little assembler file.
This is probably the best solution if I can figure it out. I'm just being lazy wanting to simply write in notepad++ and get a complete program by press F7 :)
from fastbasic.
This is probably the best solution if I can figure it out. I'm just being lazy wanting to simply write in notepad++ and get a complete program by press F7 :)
I like to compile and run with one key too!
I use Mad Studio but could you please explain how you do the same with Notepad++?
from fastbasic.
I explained what I did in this post on atariage
I'm a million miles away from an expert in this stuff but it worked. It also works in some of my sub folders but not others, I think it has something to do with the .bat file from the cc65 post I link to.
from fastbasic.
Related Issues (20)
- Improvements to DLI ... INTO -- Read from address, simple math operations
- cc65 as submodule HOT 2
- output minified listings HOT 2
- ADR() on string array doesn't seem to work HOT 7
- libstdc++.6 removed in ventura. recompile using libstdc++ HOT 9
- Running cross compiler from PATH HOT 3
- Support for other DOS , problem with blank ATR HOT 2
- Proposed enhancement FUNCTION or DEF FN HOT 1
- Enhancement Request - add Image Get and Put HOT 2
- Enhancement request: support floating point variables in FOR HOT 2
- partial reserved word matching in variables HOT 2
- test fails HOT 2
- clang warnings HOT 2
- Interoperability with Fujinet N: device HOT 6
- Atari BASIC Call "STATUS" for RS232 HOT 5
- Implement NOTE and POINT statements. HOT 3
- Support for TRAP statement
- Editor in FB.COM: Bug when pressing Ctrl-DEL at end of sourcefile HOT 1
- Question on virtual disk access HOT 9
- Calling PROCs with array arguments doesn't work HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastbasic.