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 ... 84 85 [86] 87 88 ... 153
1276
« on: May 16, 2011, 01:07:05 pm »
The problem resides in this line:
Copy(P,A,1) ;Get specified length of first progname
It seems that what you want to do is read {P} and put it into A. However, what this is actually doing is reading {P} and putting it into {A}. The reason your debug text always displays 0 is because A retains whatever value it had before your program started, which was probably 0. At the next Copy(), you may think the copy would at least do nothing because A equals 0, but this is not the case. Because of how copying works, it will copy a whopping 65536 bytes from P+1 to L1, horribly corrupting the contents of RAM and causing a certain crash. You want to use this instead:
{P}→A
Also, although this isn't causing any fatal errors, the P+4 in line 4 should be P+5.
1277
« on: May 15, 2011, 12:13:47 pm »
I'll just leave this here...
1278
« on: May 13, 2011, 05:46:40 pm »
ERR: ARGUMENT means that you called a command with too few or too many arguments. However, it should be impossible to call Text() with too many or too few arguments, which would suggest that something else is causing the problem. Try compiling the program with the source code in RAM, and when you get the error, press PRGM. Where does the program editor scroll to?
1279
« on: May 13, 2011, 05:35:40 pm »
If that's your exact code, the coordinates are a problem. The lowercase x and y mean nothing to Axe and will generate errors.
If, however, you just forgot to capitalize them in this post, I don't know what the problem is. Can you elaborate on "doesn't work"?
1280
« on: May 13, 2011, 04:49:47 pm »
You can only have a certain number of nested conditionals before the parser no longer has enough RAM to keep track of them and is forced to throw an ERR: BLOCK. You can manually make ElseIf analogs that don't use nested conditionals by doing something like the following. They will result in the same compiled code too, so you don't have to worry about the fix bloating your code. If -1 .Stuff ElseIf -1 .Stuff ElseIf -1 .Stuff ElseIf -1 .Stuff End
|
| If -1 .Stuff Goto END End If -1 .Stuff Goto END End If -1 .Stuff Goto END End If -1 .Stuff Goto END End Lbl END
|
Alternatively, if you're using 3 or more ElseIfs in a row, it's optimal to turn the whole chain into a subroutine, like this: sub(IF)
Lbl IF If -1 .Stuff Return End If -1 .Stuff Return End If -1 .Stuff Return End If -1 .Stuff Return End Return
1281
« on: May 12, 2011, 10:58:57 pm »
You get ERR: BAD SYMBOL at the first command that isn't compatible with the target shell.
1282
« on: May 12, 2011, 08:24:28 pm »
Quigibo, if you add constant definitions to Axe programming, could you perhaps add it to Axiom programming as well? That's something I always thought would be quite useful. Perhaps add a new command type, AXM_CONST, that has a 2-byte value instead of a routine? And something that would be even more awesome is a type like AXM_VAR, that allows you to define custom variables that are fully compatible with variable auto-optimizations and dereferencing. Again, you'd probably want the routine data to be replaced by a 2-byte value, in this case a pointer to the variable. EDIT: And while I'm talking about Axiom feature requests, I want to bump my request for support for offset calls.
1283
« on: May 12, 2011, 04:28:02 pm »
The problem with this is the limited RAM space Axe has when compiling, and it already uses pretty much all of it. It would be a great feature, but it would be difficult to be implemented.
1284
« on: May 11, 2011, 11:54:21 pm »
Someone correct me if I am wrong, but I believe that RAM usage has nothing to do with battery life. If you're worried about battery life, you should be looking at things like CPU usage, GPU usage, screen brightness, bluetooth/wireless, and external devices.
1285
« on: May 11, 2011, 08:54:04 pm »
That would actually be awesome. That way people could use Axioms to include large amounts of image/pre-calculated data into their program and get a pointer to it for their own uses.
1286
« on: May 11, 2011, 05:42:06 pm »
Ah yes, it looks like that does it. It didn't occur to me that changing the token equate would have any affect on how the command is parsed, which I think is fair to say isn't that strange. But may I ask what exactly the purpose of AXM_DATA is then? Because I'm not sure how having a command that just adds data to the program would be useful. It doesn't return a pointer or anything, so it doesn't allow the data to be used by the programmer. And if the data was needed by another Axiom command, accessing it with something like REP_NET() \ ld hl,sub_Axiom# would add it to the program automatically.
1287
« on: May 11, 2011, 02:03:01 pm »
I think I've mentioned this bug before, but I'll mention it again because it still persists. If the absolute last code in a program getKey(#), with or without the closing parenthesis, Axe throws ERR: PARENTHESIS. This problem does not exist for getKey(EXP), though.
Completely unrelated, but there's an Axiom system bug that's really annoying me. As far as I can tell, there is no way to prevent $7F bytes in data such as a LUT from being parsed as the REP_NEXT() indicator, thus removing them from the data. Specifying the command type as AXM_DATA does not help.
1288
« on: May 09, 2011, 11:44:56 pm »
This sounds pretty awesome, although I am a little worried that this will make programming in Axe less "authentic," if you know what I mean. Although I do see the merits as well. But is it even necessary to change the b prefix for binary to something else? When parsing, if the b is followed by a 1 or 0, treat it as an indicator of binary data. Otherwise, treat it as the b register.
1289
« on: May 08, 2011, 05:47:01 pm »
I think you have 2 problems with the way things work currently: - The screen is only 96 by 64 pixels, yet you use x and y values in excess of 300. The only reason the sprites appear onscreen is because the high byte of these values are being discarded. Although you may eventually have horizontal scrolling and want to have X values in excess of 96, until you have scrolling, you should keep your positions within the bounds of the screen.
- To detect collision, you need to put parentheses around the individual comparisons in your compound and statements:
- If X<409 and X>199 and J=1 should be If (X<409) and (X>199) and (J=1) — You also probably need to do something about the X bounds being 409 and 199, as those values are far offscreen.
- If X<9 and J=1 should be If (X<9) and (J=1)
1290
« on: May 08, 2011, 10:28:11 am »
JosJuice, assembly programs will run at 6MHz by default on every calculator model. They are fully capable of running at either 6MHz or 15MHz on the 83+SE and newer, as chosen by the programmer.
Pages: 1 ... 84 85 [86] 87 88 ... 153
|