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 - Quigibo
Pages: 1 ... 29 30 [31] 32 33 ... 135
451
« on: May 17, 2011, 05:43:40 pm »
Just wanted to mention one other thing to add to the list; I turned the DispStrApp and TextStrApp inline routines into subroutines.
452
« on: May 17, 2011, 01:27:54 am »
The nibble reading and writing commands have opposite endianness again. I would suggest changing p_NibSto to be big-endian like the reading commands currently are, since a lot of people complained about the nibble commands being little-endian. Which makes sense, because big-endian style is a lot better for things like reading from nibble tilemaps. Big-endian nibble order better corresponds with how hex data is added and displayed. Why does that keep reversing? I don't remember the last time I changed it... I'll fix it once again. p_Safety is, well, I have no idea. It works, but it has lots of code that serves no apparent purpose. I'll post what I think the routine should probably look like following this list. Haha! I wish it could be that simple. But as I mentioned in another thread and on Cemetech, there is actually a bug in the z80 hardware where if an interrupt occurs during a ld a,i instruction it will erroneously set the flags as if there was no interrupts, so a more robust test is needed unfortunately. The one I'm using was invented by calc84maniac. This was a bug I had for a long time; that custom interrupts would suddenly stop working after a minute or so. And I'm so glad I finally fixed it! Probably not a big deal, but if either p_FastCopy or p_DrawAndClr were called immediately after sending data to the LCD, the initial row setting would fail. This could be fixed by moving the safety call after the ld hl,plotSScreen and adding some waste instructions after the initial row setting. Hmmm... I will double check this and change it if its as simple as moving a few instructions around. I want to try to avoid waste instructions though. Commands.htm still says that DispGraphr and DispGraphrr will not work at 15MHz. I'll fix that. But on the topic of constant optimizations, although For() loops with a constant upper bound got a slight upgrade, it missed the much larger upgrade that the constant comparisons received. Any chance of sneaking that into For() loops as well?
I'll get to that hopefully... I think I might have mentioned this bug a while ago, and it's been around for a long time, but since it isn't fixed yet I'll mention it again. {CONST}rr, →{CONST}rr, and →{EXPR}rr are all broken. The first two compile into incorrect code, while the third won't compile. How could something this big go unnoticed for so long! I'll fix it right away.
453
« on: May 16, 2011, 04:21:55 am »
Axe Parser Epsilon 0.5.2
Lots of fixing and polishing. Should be ready for a stable release very soon! New Features:- All DispGraph variants now work with every speed and every interrupt mode!
- Fix command can have multiple modes on the same line.
- Jump table added with API documentation for external parsing.
- rand is dereferencable.
- A few new error codes for better clarification.
- Left and right arrows can be used to change settings.
- Same arrows can also change the shell form the compile menu.
- Define constants in your code as static variables.
- Data defined in Axioms is more intuitive and works as expected.
Changed:- GetCalc now consistently returns proper float pointers.
- Fixed credits to RabbitSign (GNU).
- Fixed dereferencing bug.
- Fixed bug with Pt-Mask().
- Fixed bug with multi-line comments.
- Fixed parenthesis issue on last line.
- Optimized for loops when the third parameter is constant.
- Optimized all unsigned comparisons against constants.
- Optimized and, or, and xor when applied to constants.
- Optimized various other commands.
454
« on: May 14, 2011, 09:57:20 pm »
Well, we used it for typing, which is assigning types to variables through inference rather than user specification. Its also great for relational databases (like SQL) and it definitely has a lot of application with artificial intelligence and extracting meaning from sentences.
455
« on: May 14, 2011, 09:31:29 pm »
I know prolog and had to learn it for my compilers class. Its probably one of the coolest languages ever since its so radically different than any other language I've ever seen. Basically, you tell it rules about what a function should do and it will automatically find the algorithm to produce that solution! It takes a while to get used to though since its such a huge paradigm switch.
456
« on: May 14, 2011, 06:41:42 am »
Basically, Text( lets you set the coordinates before displaying text, while Text uses the current coordinates and takes only a single argument (the string).
Actually, you can have as many arguments as you want for Text also, it just skips having to specify the X and Y value since you've presumably already set that. The idea is to be exactly the same mapping from "Disp " and "Output(" to "Text " and "Text(". The first set is for the cursor and the second set is for the pen.
457
« on: May 12, 2011, 11:50:45 pm »
By the way, I finished adding the request for constants. It was only about 10 lines of code extra. It works really nicely too! You can even add, subtract, multiply, and divide constants with each other to make new constants, all with nothing added to the executable code! I've added so many new features and bug fixes, probably the largest update so far, but I don't know if I'll have time for everything I was planning by tomorrow's release. Of the most complicated new additions that I have yet to make and am not sure about making yet are: stack operators, alternative referencing syntax, and native register operations.
458
« on: May 12, 2011, 08:05:46 pm »
Actually, constant definitions would be very easy to do and are already implemented, kind of. That's exactly what Str1, Pic1, GDB1 are! They just hold a constant value that happens to be a ram location. But I could easily allow the programer to specify other values for these constants and the syntax would be very intuitive: 9001->Str1This would use symbol space though, so its still limited to ~150 static variables including the regular static pointers. Bun nonetheless, still generally useful since I don't think that many people actually run out of symbol space. EDIT:Question: What exactly happens if I leave a parenthesis open? Obviously, it'll start glitching the program up, but in what ways? What precisely does it do to the code?
Axe will add the parenthesis for you at the end of the line. So if you had: sin(A+cos(B->CIt becomes: sin(A+cos(B->C))Instead of what you might be trying to do: sin(A+cos(B))->C
459
« on: May 12, 2011, 02:16:40 pm »
Yeah I fixed that. Also happened with #Realloc() and all commands that enforce constants as their last arguments.
460
« on: May 11, 2011, 08:51:38 pm »
Oh wait a minute, I think that's the bug. That was something I changed last minute and I forgot to remove it from the Axe.inc. As you can tell by the Axiom SDK, that bit isn't even documented because I had removed it and replaced it with the Token indicator instead. I shall remove it. Either that, or more usefully, It can be the same thing as AXM_SUB except it parses as "ld hl,yourAxiom" instead of "call yourAxiom". But then argument count for that would have to be restricted to 0 or 1.
461
« on: May 11, 2011, 05:26:40 pm »
Are you using "tok_Data" for the token (which tells Axe not to do auto-replacements)? All AXM_DATA does is add the routine to the end of the program instead of inline (like a subroutine) except it skips the call to it. Maybe I should rename that AXM_NOCALL or something like that for clarity...
462
« on: May 10, 2011, 01:22:32 pm »
That link is outdated for the Axiom SDK. The current revision can be found in the "Developers" folder that comes with Axe 0.5.1. This will be a lot harder to write in Asm by the way than it would be in pure Axe and I wouldn't attempt something this complicated unless you have a good asm background.
I think your library is the fine the way it is though. If you want to make it more memory efficient, you can split it into sub-libraries. For instance, you can have "LIB7CORE" for the core routines, "LIB7BUT" for all routines pertaining to buttons, and "LIB7WIND" for window routines. That way, you only need to include the ones you are going to use.
463
« on: May 09, 2011, 11:53:39 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.
That's true, I guess I could do that. Axe itself doesn't have side effects, but at the assembly level, the registers change around every time Axe does a native command. Sometimes you can use these values for optimization. Like if you knew the b register was always 0 after a Pt-On() for instance, you could use this knowledge to save some bytes. However, I am simply warning against this because I could change the built-in routines at any time and an optimization like that might not work anymore.
464
« on: May 09, 2011, 11:36:35 pm »
I'm planning a major feature addition soon which I am dubbing "Axsembly" (Please excuse my lack of creativity with portmanteaus ). Basically, it will allow direct assembly commands to be integrated directly into Axe... but while keeping the syntax looking almost exactly like regular Axe. I will be using the lowercase letters for the registers and will allow a wide range of arithmetic instructions. The major difference with Normal Axe syntax is that assignments are done with the equal sign instead of the store arrow (like in most programming languages) and only a limited range of instructions are allowed. Both of these are to make Parsing on my side possible. Everything else is basically the same as you're used to already. There will also be a simple interface to transfer an Axe variable into a register for manipulation and then bring it back up. For instance, the instruction "a=a+a" or "a=a*2" will both translate to the assembly instruction "add a,a". However, "a=a*3" does not correspond to a single instruction, and therefore must be made by hand using 3 instructions like "b=a : a=a*2 : a=a+b". There will also be some new operators like ++ which acts as an "inc" when used in a unary operation or an "add with carry" in a binary operation. Different kinds of rotation will also be supported. All these commands can be interwoven with current syntax, but I wouldn't rely on abusing the side effects because they can change from version to version. This does have one conflict with Axe's current syntax however: The binary number prefix which is currently "b" will have to be changed to something else, but I think that command is used infrequently enough to not anger anyone who would be affected by this change. I am hoping this will be a great introduction to assembly for new programmers who want to play around with it while staying in Axe's feature-rich environment. This was a feature I was panning to add at the beginning, but then gave up, but just now thought of a way I could do it efficiently.
465
« on: May 09, 2011, 06:17:20 pm »
I think its better to include libraries at the top of the program. It allows you to do some initialization and then when you're done with that (or don't have any) just add a jump to the end of the library. Axe cannot auto-detect unused subroutines because it is a single pass parser. The 2 passes Axe does are actually the same but fill in different parts of the of the code.
Pages: 1 ... 29 30 [31] 32 33 ... 135
|