on-calc asm compiler
Moderator: MaxCoderz Staff
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
Did you drop it then? It's way cool man!
@chickendude: well it ~should~ be a bit like the normal program menu, except that pressing enter would compile the selected program, if it looks like assmebly source that is (so I'll have to put something headerish that makes executing them impossible on the first line..)
But so far I could only come up with a 7 items long menu, when trying to scroll either up or down all programs disapeared from the list (no it didn't just scroll 7 down with only 7 progrs, there were 10 progs and it should scroll only 1) the numbers in front of the programs is no big deal, but somehow looping over FindAlphaUp untill you hit the first line of hte menu didn't work. (I probebly just messed it up, but I can't get it right )
@chickendude: well it ~should~ be a bit like the normal program menu, except that pressing enter would compile the selected program, if it looks like assmebly source that is (so I'll have to put something headerish that makes executing them impossible on the first line..)
But so far I could only come up with a 7 items long menu, when trying to scroll either up or down all programs disapeared from the list (no it didn't just scroll 7 down with only 7 progrs, there were 10 progs and it should scroll only 1) the numbers in front of the programs is no big deal, but somehow looping over FindAlphaUp untill you hit the first line of hte menu didn't work. (I probebly just messed it up, but I can't get it right )
-
- Extreme Poster
- Posts: 340
- Joined: Fri 07 Jul, 2006 2:39 pm
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
@mike: No. I never posted over at RevSoft, and if someone at RevSoft is making a compiler it will doubtlessly be better.
@ chickendude: well, how do you handle scrolling? do you save to whole menu to saferam? (what if someone has 27 * (37^7) programs? the theoretical maximum of programs, although its allready way over the RAM limit with just the VAT)
@ chickendude: well, how do you handle scrolling? do you save to whole menu to saferam? (what if someone has 27 * (37^7) programs? the theoretical maximum of programs, although its allready way over the RAM limit with just the VAT)
- thegamefreak0134
- Extreme Poster
- Posts: 455
- Joined: Mon 23 Jan, 2006 10:09 pm
- Location: In front of a Computer, coding
- Contact:
I do know that after the numbers in the program menu the icons to the left disappear entirely (no letters like in other menus) so you can just worry about the list. Seems to me like you would read out the program names to saferam somewhere and display from there. Of course, I don't know how to handle like if you wanted to sort the programs or anything of that nature.
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
Well there is this problem with displaying the names from saferam, there are 27 * (37^7) possible names, and suppose someone has "only" 1000 programs, it would terribly overflow all saferam area's together..
So I tried making it loop over a FindAlphaUp the number of programs it has to skip, but somehow it didn't really work, and it any case it would be terribly slow.
So I've been thinking about somehow intergrating it into the normal program menu, with a keyhook which also checks the context thingie, but that's gonna be complicated (how would you know what program the user selected?). In the mean time I'll work on the compiler, and I'll worry about the way to set it into action later (or when someone comes up with a brilliant idea, hey chickendude? )
So I tried making it loop over a FindAlphaUp the number of programs it has to skip, but somehow it didn't really work, and it any case it would be terribly slow.
So I've been thinking about somehow intergrating it into the normal program menu, with a keyhook which also checks the context thingie, but that's gonna be complicated (how would you know what program the user selected?). In the mean time I'll work on the compiler, and I'll worry about the way to set it into action later (or when someone comes up with a brilliant idea, hey chickendude? )
- thegamefreak0134
- Extreme Poster
- Posts: 455
- Joined: Mon 23 Jan, 2006 10:09 pm
- Location: In front of a Computer, coding
- Contact:
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
Try the old tasm-on-calc, the main program is basic, the assembly program is unoptimized, and its very very slow and immensely large. But it works. As does my slightly smaller yet even slower version, which I won't recommend. http://www.ticalc.org/archives/files/fi ... 38467.html
It's include file is far from complete, that it doesnt even have nop ldi cpi etc. etc. and .db gives loads of errors. (I put in 2db00 which will put 00 for every db, and I add in the data later, in the HEX string)
It's include file is far from complete, that it doesnt even have nop ldi cpi etc. etc. and .db gives loads of errors. (I put in 2db00 which will put 00 for every db, and I add in the data later, in the HEX string)
-
- Extreme Poster
- Posts: 340
- Joined: Fri 07 Jul, 2006 2:39 pm
Well for the menu all you have to do is store the first (and the one before it) program in the VAT's address. Then when you scroll down you skip the first program and repopulate the list with the new set of programs. When you want to scroll up, you search from the program that came before the first one you displayed.
Here:
1: prgmB
2: prgmC
3: prgmD
4: prgmE
5: prgmF
6: prgmG
7: prgmH
Have one variable hold the pointer to PrgmB and one to PrgmA. When you scroll down, load the pointer to PrgmB and jump over it (I'm not quite sure how the VAT works, but maybe increment a few bytes until you've jumped past prgmB and it starts searching prgmC on) and repopulate the list.
EDIT: Also, if you need to you can store any information about the programs that you may need (the name, the address that data starts at, etc.) into SafeRAM for each item on the list (you should only hold information for 7 programs at once) and make sure they're all equal in size. Then when you select a program, you can count how many rows down on the screen the cursor was, multiply it by the size of the data stored on each program, and then you have the pointer to the data about the program selected and can easily work with it.
Here:
1: prgmB
2: prgmC
3: prgmD
4: prgmE
5: prgmF
6: prgmG
7: prgmH
Have one variable hold the pointer to PrgmB and one to PrgmA. When you scroll down, load the pointer to PrgmB and jump over it (I'm not quite sure how the VAT works, but maybe increment a few bytes until you've jumped past prgmB and it starts searching prgmC on) and repopulate the list.
EDIT: Also, if you need to you can store any information about the programs that you may need (the name, the address that data starts at, etc.) into SafeRAM for each item on the list (you should only hold information for 7 programs at once) and make sure they're all equal in size. Then when you select a program, you can count how many rows down on the screen the cursor was, multiply it by the size of the data stored on each program, and then you have the pointer to the data about the program selected and can easily work with it.
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
Sounds like a great idea, but the VAT usually isn't sorted in any way (unless you used Sean's VAT insertion sort or an alternative method)
So wouldn't the programs appear in a seemingly random order?
Could I fix this by storing the First and Last names and FindAlphaUp with the Last as input when scrolling down and FindAlphaDown with the First when scrolling up? (and then continue with FindAlphaUp 7 times or CA=1)
So wouldn't the programs appear in a seemingly random order?
Could I fix this by storing the First and Last names and FindAlphaUp with the Last as input when scrolling down and FindAlphaDown with the First when scrolling up? (and then continue with FindAlphaUp 7 times or CA=1)
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
I have been thinking about some things, MenuCurrent+2 is only 1 bytes, thus suggesting one can only have 256 programs. Is this true?
Also this would be a great way to interface with the TIOS, just with a keyhook and a quick check on MenuCurrent+0, then on MenuCurent+1, and then on MenuCurrent+2.
Working on it.
Also this would be a great way to interface with the TIOS, just with a keyhook and a quick check on MenuCurrent+0, then on MenuCurent+1, and then on MenuCurrent+2.
Working on it.