Show Posts

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 ... 53 54 [55] 56 57 ... 135
811
Axe / Re: The input Command
« on: September 22, 2010, 06:55:11 pm »
Well, the uppercase characters and numbers luckily have the same token and ascii values (which might be fine for this purpose), but everything else I wouldn't count on.

812
The Axe Parser Project / Re: Backups
« on: September 22, 2010, 06:51:28 pm »
You would lose them unless you back them up manually.  But you can archive your included programs while working on your main program so they don't need to be in ram in the first place.

813
The Axe Parser Project / Re: Assembly Programmers - Help Axe Optimize!
« on: September 22, 2010, 06:48:29 pm »
The problem with conditional "short-circuit evaluation" is that it has to do a lot of non-linear "look-ahead" parsing to determine if it's okay to get out of the statement early or not.  You might for example have If A≠5 and sub(EQL,B,C) which might need to evaluate the second expression even if the first one is false.  The idea definitely sounds good though, but it seems like it would be really complicated for the compiler to tell whether or not it can actually use that optimization and be completely compatible with previous versions.  And even when it can, I would have to write completely new block code and assembly templates for those conditionals.

814
The Axe Parser Project / Re: Features Wishlist
« on: September 22, 2010, 06:31:14 pm »
What about UNIX style headers?  For instance:

Code: (prgmTESTSRC) [Select]
:.TEST -T MOS -I [123...DEF] -D This is a description

Which can also be defined as:
Code: (prgmTESTSRC) [Select]
:.TEST -D This is a description -I [123...DEF] -T MOS

So the programmer can choose the arguments in any order they like.  And to keep reverse compatibility, if you don't specify a tag, then it defaults to a description.  Also, that escape character would most likely be the negative sign instead of the minus sign because dashes might be used in the description.  This allows for future expansions available for the header as well.

815
Axe / Re: The input Command
« on: September 22, 2010, 06:19:33 pm »
You should never use copy with only one byte:
Copy("appv",L5,1)

More simply, just do:
E15->{L5}

Which is the actual value of the appv token.

816
The Axe Parser Project / Re: Features Wishlist
« on: September 22, 2010, 04:00:53 am »
But what if the description needs a bracket in it?  The problem with just the .[ is that it's likely a commented out sprite rather than the actual header.  Maybe .( .< ..[ or .[[ might work.

817
The Axe Parser Project / Re: Features Wishlist
« on: September 22, 2010, 02:08:32 am »
I was just reminded about the ability to make custom icons for MOS and DCS instead of the default Axe logo.  I've been thinking about it but I'm having a hard time thinking of a good format for this that is easy to use and unambiguous.  I challenge anyone to think of a good format for this.  It should be:

1. Near or at the top of the header.  Must come before program and data.
2. Parsed as a comment or something that is ignored when its not needed.
3. Similar to existing commands/conventions.
4. Relatively simple to implement.
5. No new tokens.
6. Not simply a commented out sprite since many people comment sprites at the start of their code.

818
The Axe Parser Project / Re: Features Wishlist
« on: September 21, 2010, 11:28:05 pm »
Ok, I'm trying to decide if it's better to list the programs with either instant shortcuts like the BASIC menu (but not just 1-9, it would continue onto A-Z) or I could just use letters to go to the first program starting with that letter.  Since I haven't updated the poll for a while, I decided to change it.

819
The Axe Parser Project / Re: Backups
« on: September 21, 2010, 11:19:47 pm »
Its identical.  The thing is though, it has to have the normal Axe header to backup it up in the first place or even show up on the list (that is, the period followed by a letter).  So in a sense, they do still have headers.

I don't get the Edit btw...  :-\

820
The Axe Parser Project / Re: Axe Parser
« on: September 21, 2010, 12:16:46 am »
Builderboy, no need to panic, nothing is changing with the existing sub() command I am only adding a new command sub()r :)

It only backs up the variables its using so if you call sub(SUB,A,B)r it will only save r1 and r2.  In recursive subroutines, they are saved to the stack.  The actual addresses of r1-r6 are in a really small free-ram area not part of L1-L6.  You can get the actual location now with or1 if you want to pass them by reference or something.

821
The Axe Parser Project / Re: Axe Parser
« on: September 20, 2010, 10:17:23 pm »
I'm releasing 0.4.5 very soon because I don't want everyone waiting so long for 1.0.0 since its going to take a long time.  In this intermediate version, I will disable Axioms since those are totally under construction right now, but most of the new features and bug fixes will be available.

The command nib{} is the only one where you actually have to do math to the pointer itself.  Like if you have a string of bytes in Str1 then you have to refer to it with nib{Str1*2} since there are twice as many nibbles addresses as there are byte addresses.

The other new thing you'll be able to do is pass by reference commands.  If you are familiar with other languages that use pointers then you might have an idea about what this is, but for those who don't, its a very powerful tool.  Pass by reference is used when you want the function you are using to modify the variables instead of (or in addition to) just returning the result of the calculation.  For instance, say you want to write a function that swaps 2 variables.  You can't just call sub(SWP,A,B) because the subroutine itself only knows the values of A and B and not where to put the result.  So instead you could write the subroutine like this:


:.This is the subroutine.
:.r3 is used as a temporary.
:Lbl SWP
:{r1}r->r3
:{r2}r->{r1}r
:r3->{r2}r
:Return

:.You can call it like this
:sub(SWP,oA,oB)
:.A and B have now swapped their values

So what is going on here?  Well, instead of passing the value of A and B, you pass a pointer to A and B because not only can you read the value by using {pointer}, but you can also write to them as well since you have the pointer at your disposal.  Another way you can take advantage of this systems is by inventing your own data types!  For example, lets say you want a 32-bit double precision integer.  It conveniently fits in 2 Axe variables so you can store them in consecutive addresses like A could be the low word and B could be the high word.  Then, you can pass to the subroutine the pointer to A and the subroutine now has access to A and B because it can read and write to their values with {r1}r and {r1+2}r.  That means, you only need one argument to call the subroutine and you don't need to give it 2 "halves" of the number.  There's probably a billion other uses for this too, but it will definitely make the language more convenient.

I also will take calc84maniac's request from a while back to allow recursive subroutines because all of the Scheme programming I've been doing recently has really opened my eyes to the beauty and the simplicity of using them (even if they are bulkier and less efficient at the assembly side).  If you have no idea what I'm talking about, I'll explain the command with some examples later.  Basically, it automatically saves and restores the r1-r6 variables before and after the call.

822
Axe / Re: Wait For Keys
« on: September 19, 2010, 10:54:31 pm »
If you're in Full mode then the delay in the key routine is too quick to register the key-group switch.  Make sure you're in Normal mode when using direct key detection.

823
The Axe Parser Project / Re: Axe Parser
« on: September 19, 2010, 05:59:39 pm »
I'm afraid I don't know either since its TI's crazy formats and I haven't played around with OS variables yet.  If I had to guess though, I'd say its the rows and columns of the matrix and not the number of bytes for each.  I know when you read the size bytes of a list its the number of elements and not the number of bytes so its probably the same for matrices.

824
The Axe Parser Project / Re: Bug Reports
« on: September 19, 2010, 05:54:16 pm »
Well apparently the buffer where the input string is stored is not a temporary variable so a bcall to _CleanAll doesn't clear it.  I will have to find the name of that string.  The buffer for the input is named "-" and I've seen a "#" and "$" so I'm guessing it's something similar to that.

There isn't a way to fix the memory leaks since this is an OS call.

825
The Axe Parser Project / Re: Axe Parser
« on: September 19, 2010, 05:32:22 pm »
You have to create a new matrix the size you want (or use a buffer), copy the old one into the new one, then delete the old one.

Pages: 1 ... 53 54 [55] 56 57 ... 135