This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - Runer112
Pages: 1 ... 69 70 [71] 72 73 ... 153
1051
« on: September 01, 2011, 02:04:36 pm »
Quigibo, perhaps that could be changed? You could change the arbitrary address calling routine to this:
p_CallHL: .db 6 pop ix ex (sp),ix jp (ix)
At the cost of 3 bytes for the entire program and only 12 cycles per use, you could pass arguments directly to arbitrary functions. I pass arguments in hl to functions all the time, so this would actually save bytes. That, combined with the fact that it would result in more uniform code effects, makes me believe that this would be a nice change.
1052
« on: August 31, 2011, 01:50:24 pm »
Automagically checking for an opening parenthesis in the token string would be very cool. But why would you need to throw an error for the 0-argument case if the token has an opening parenthesis? I would imagine that commands should be parsed like this: :Z-Test( | | 0 arguments | :Z-Test(→A | | 1 argument | :Z-Test() | | 0 arguments | :Z-Test(() | | 1 argument | :Z-Test(ʳ | | Error | :T-Test | | 0 arguments | :T-Test →A | | 0 arguments | :T-Test ) | | Error | :T-Test () | | 1 argument | :T-Test ʳ | | 0 arguments |
1053
« on: August 31, 2011, 01:24:45 pm »
Hmm I guess I see the dilemma. But you get around it by having commands like DrawInv (BUF). Can this style of argument addition be used for Axioms as well? You'd probably need an extra bit or two of metadata per command, which could be piled into the command type byte.
1054
« on: August 31, 2011, 12:06:14 pm »
I think there's a problem with the Axiom system. It looks like if you have two versions of a command, one which accepts 0 arguments and one which accepts 1 argument, whichever is first in the Axiom will always be the one used. I think that if a command is followed by an r modifier, colon, newline, or period (or any number of spaces followed by one of these), it should be treated as having 0 arguments. Otherwise, it should be treated as having at least 1 argument.
1055
« on: August 30, 2011, 02:45:57 am »
I think I just performed the most ridiculous, impressive optimization I've ever performed on an Axe command. 27 bytes optimized down to 60% of its size: 17 bytes! p_DKeyVar: .db __DKeyVarEnd-1-$ dec l ld a,l rra rra rra and %00000111 inc a ld b,a ld a,%01111111 rlca djnz $-1 ld h,a ld a,l and %00000111 inc a ld b,a ld a,%10000000 rlca djnz $-1 ld l,a ret __DKeyVarEnd:
| | p_DKeyVar: .db __DKeyVarEnd-1-$ ld a,l ld hl,%0111111111110111 rlc h adc a,l jr c,$-3 ld l,%0000001 rrc l inc a jr nz,$-3 ret __DKeyVarEnd:
|
1056
« on: August 29, 2011, 10:55:00 pm »
Returnr needs an alternate version for applications. I believe jp $4083 would work.
1057
« on: August 28, 2011, 05:03:45 pm »
These are pretty rare finds, but I discovered a bug with the app and not the language. Axe doesn't unset G-T mode upon opening, only Horiz mode. There's a simple fix for this, and it's actually an optimization! Changing res grfSplit,(iy+sGrFlags) to B_CALL(_ForceFullScreen) should do the trick.
Also, when I was inspecting the first few instructions of the app to see what code should be changed to fix this, I saw 2 copies of set textWrite,(iy+sGrFlags). Any reason for this?
EDIT: Regarding screen modes, B_CALL(_ClrScrnFull) in the ClrHome command should probably be B_CALL(_ClrScrn). It's exactly the same as B_CALL(_ClrScrnFull) when the calculator is in full screen display mode, which is 99% of the time anyway, but it will correctly clear the homescreen if it's not in full screen mode as well.
EDIT 2: Also, perhaps there should be an Axe command for B_CALL(_ForceFullScreen)? Axe programmers could run into this problem of not being in full screen mode and then their program displaying very strangely, especially if they're printing text to the homescreen. Perhaps another Fix command would work, but you'd need to branch into 2-digit numbers. This would also require changing how multiple options can be chained together with Fix, but I didn't really like the old way anyways. And on a similar note of OS settings that can mess stuff up, how about adding the ability to enable/disable APD as well?
1058
« on: August 27, 2011, 02:51:34 pm »
Nice to see that you added the faster archive reading commands in 1.0.3. And using port 7 for applications was pretty smart, not sure why I didn't think of that. But there's one slight problem with your adaptation. You hijack p_Safety at a point where a should equal zero, but you don't set a to zero. Inserting a simple xor a before the call to p_Safety should fix this problem.
1059
« on: August 26, 2011, 03:21:55 pm »
* Runer112 found the problems! The first problem is the !If L-C-1 line. The fact that you typoed and actually meant !If L-C+1 is a problem, but not the main problem. The main problem is that you don't want the ! in front of the If. The second problem is that, if a bullet is removed, the last bullet in the list is then moved into its place. But because the for loop just finished with that position in the bullet array, it moves to the next element, skipping the updating and drawing of the bullet that took the deleted bullet's place. To remedy this, tag on an L-- to go along with the C-- in the bullet removal code. EDIT: Also, these aren't actually problems, but some of this code is unnecessary and could be simply be omitted. Want me to point out what pieces of code could be removed?
1060
« on: August 26, 2011, 11:06:19 am »
It looks like you were in the middle of changing the multiplication routine when you released Axe 1.0.3. If I had to guess, I'd say you were going to make a separate routine for simple multiplication that doesn't worry about the high 16 bits of the result, while using the old routine for *^ and **. This sounds like a great idea to me. It would save about 300 cycles for most multiplications and save 5 bytes if neither *^ nor ** is used in the program, which probably fits many programs. If you wanted to go even further with this optimization, you could split off yet another routine that doesn't worry about the high 8 bits of the result for fixed point multiplication. I would personally do this because I love speed, but it's up to you.
But enough of that, back to the actual bug. Right now the two separate multiplication routines are lumped into one, resulting in an unnecessarily big multiplication routine, as the second copy is useless. *^ and ** will not work properly either, since the first routine and thus the routine that is called for multiplications is the simplified routine that disregards the high 16 bits of the result.
1061
« on: August 24, 2011, 04:39:11 pm »
Being able to fill a block with one number (possibly words as well as bytes) is all I ever really wanted. I think the more complicated data insertion should be handled at a later date when you add macro support.
1062
« on: August 24, 2011, 12:17:22 pm »
Zeros() should immediately throw an error if the size argument contains a constant that has not yet been defined. Using a constant that has not yet been defined in the size argument can cause multiple problems. And while we're on the topic of the Zeros(), any chance this old feature request could be implemented? Can we have a feature like "Zeros()," but for any data. For instance, something like this: Command(1,12) would be the same as [010101010101010101010101] Command([56],4) would be the same as [56565656] Command(127,6) would be the same as Data(127,127,127,127,127,127) Potentially, this command could even be used for repeating sets of data. For instance: Command([010203],12) would be the same as [010203010203010203010203] Command("Text"[00],15) would be the same as "Text"[00]"Text"[00]"Text"[00]
So, what do you think? Could this be a command? I think it's a good idea, to avoid situations like this.
I really like that idea. What about changing Zeros( (det() to something more universal?
I would suggest changing the token replacement to Block(). Feeding 1 argument would create a block of the specified size filled with zeroes. Feeding 2 arguments would create a block of the specified size filled with a specified value. Maybe you could even add a Block()r command for creating a block filled with a specified word while you're at it, although this probably isn't as necessary as a normal byte-filling block command.
1063
« on: August 24, 2011, 12:07:13 pm »
I'm not sure why everyone has been using Zeros(pointer,size) in their code. This is not valid syntax. Zeros() only takes a single argument, and that is size. You want to use Zeros(size)→pointer instead.
1064
« on: August 20, 2011, 12:32:16 am »
In that case, this portion looks suspicious:
{Q-2}ʳ→W "appvNYMTEMP"→Str2 GetCalc(Str2,W)→V Copy(Q,V,W) Copy(P,V+W,length(P))
You create an appvar pointed to by V of size W, and then copy data to V+W. This would be copying data outside of the appvar you created, overwriting other data. I'm guessing you wanted to make the appvar larger, perhaps length(P)+W bytes?
Also, this problem probably hasn't cropped up yet for you, but when making these new/temp appvars, you should really check that the creation was successful and throw an error if it wasn't.
1065
« on: August 20, 2011, 12:16:18 am »
Assuming you're experiencing this problem with Axe 1.0.0 or above, see: http://ourl.ca/4072/236963
Pages: 1 ... 69 70 [71] 72 73 ... 153
|