Splicing Xlib into a program
Moderator: tr1p1ea
- L4E_WakaMol-King
- Maxcoderz Staff
- Posts: 342
- Joined: Tue 01 Nov, 2005 6:34 am
Splicing Xlib into a program
Ok, I'm new to this site and relativly unfamiliar with Xlib, so if this suggestion makes no sense, feel free to ignore it. I haven't programmed anything in BASIC in a long time, so perhaps times have changed.
Right now, if I understand this project correctly, one needs to have Xlib on one's calculator to use the Xlib functions, right? If so, I had an interesting idea for a neat feature you might add. I don't know if it's even possible, but it would be cool if it were.
Could you create a program that splices the Xlib code into a basic program itself? Instead of having two programs, the actual program and Xlib, could they be combined into 1? Perhaps you could create a program that takes a finished BASIC program, write-protects it, and then adds the Xlib code right into the BASIC program itself, so that the Xlib functions could be used without another program present, and so that the developer could distribute just one single program?
I'm no expert with Z80, and I don't know much about apps (Xlib is an app now, right?)... so I don't know if this is even possible. But if it is, I think it would be a really neat addition.
The real questions at hand are: Can you put ASM and BASIC code into a single program? Obviously, you can't just cut and paste code, but is there any way that the two could be mixed into one unit? The other question is whether or not this would actually be useful enough to do, even if it were possible. That's up to you and the developers that use Xlib.
Anyway, I may look like a total moron for saying this, but if it's possible, I think it would be quite neat.
Right now, if I understand this project correctly, one needs to have Xlib on one's calculator to use the Xlib functions, right? If so, I had an interesting idea for a neat feature you might add. I don't know if it's even possible, but it would be cool if it were.
Could you create a program that splices the Xlib code into a basic program itself? Instead of having two programs, the actual program and Xlib, could they be combined into 1? Perhaps you could create a program that takes a finished BASIC program, write-protects it, and then adds the Xlib code right into the BASIC program itself, so that the Xlib functions could be used without another program present, and so that the developer could distribute just one single program?
I'm no expert with Z80, and I don't know much about apps (Xlib is an app now, right?)... so I don't know if this is even possible. But if it is, I think it would be a really neat addition.
The real questions at hand are: Can you put ASM and BASIC code into a single program? Obviously, you can't just cut and paste code, but is there any way that the two could be mixed into one unit? The other question is whether or not this would actually be useful enough to do, even if it were possible. That's up to you and the developers that use Xlib.
Anyway, I may look like a total moron for saying this, but if it's possible, I think it would be quite neat.
![Image](http://img222.imageshack.us/img222/3711/forumsig6ww.gif)
- dysfunction
- Calc Master
- Posts: 1454
- Joined: Wed 22 Dec, 2004 3:07 am
- Location: Through the Aura
- dysfunction
- Calc Master
- Posts: 1454
- Joined: Wed 22 Dec, 2004 3:07 am
- Location: Through the Aura
- L4E_WakaMol-King
- Maxcoderz Staff
- Posts: 342
- Joined: Tue 01 Nov, 2005 6:34 am
If it were, you might be able to implement some functions to run basic programs from the archive (or at least some sort of memory management program to copy only what is needed to RAM at a time).
Limited RAM combined with the inability to archive programs from other BASIC programs was always the thing I hated most about BASIC.
Limited RAM combined with the inability to archive programs from other BASIC programs was always the thing I hated most about BASIC.
![Image](http://img222.imageshack.us/img222/3711/forumsig6ww.gif)
Actually, although I don't know the practicallity of L4E_WakaMol-King's idea, it sounds good. I give games to many people at my school, and they know very little about the calc. If a game's controlls are not immediately obvious, or the purpose of the game not very clear, no one will play it. Because of this, I can only give out the most basic and common games like phantom star, phenix, mario, uncle worm, tetris, etc. I would hate for many people to miss out on great xlib games because you have to install something.
In Memory of the Maxcoderz Trophy ![Image](http://img88.imageshack.us/img88/9374/4x5yrtrophytg1.gif)
![Image](http://img88.imageshack.us/img88/9374/4x5yrtrophytg1.gif)
- L4E_WakaMol-King
- Maxcoderz Staff
- Posts: 342
- Joined: Tue 01 Nov, 2005 6:34 am
That was why I made the suggestion... Using Xlib is easy if you know what you are doing with a Calc, but if you dont know--and the majority of people who just fiddle with their calcs in math class don't--it can be troublesome.
![Image](http://img222.imageshack.us/img222/3711/forumsig6ww.gif)