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 ... 125 126 [127] 128 129 ... 135
1891
Axe / Re: Axe for Dummies (like me)
« on: March 01, 2010, 02:29:59 pm »
The thing is, some of the stuff we're talking about here is pretty advanced.  Most programmers won't need to use hexadecimal or multiprecision byte storing, but its pretty cool that you CAN do it.  Hence, Axe Parser has a very wide learning curve.  Its very easy to learn the basics but as you start to get more advanced, you can start doing some pretty crazy stuff.  Even when staying within the syntax and not using assembly, you can literally do almost everything.  Well... maybe not everything right now, but when Axe is finished, this is what I'm hoping.

1892
Axe / Re: Axe for Dummies (like me)
« on: March 01, 2010, 02:08:21 pm »
I am thinking of adding hex soon.  Maybe even add ">Rect" do display hex numbers.  Right now, if you need $ABCD, you can do this: Asm(21CDAB)

Edit: Fixed little endian.

Oh and that routine I made to store a 16 bit number works like this:

When you divide a number by 256, a number in hexadecimal like $9D93 becomes $009D so it transfers the upper byte to the lower byte.  This is just like dividing in decimal. 2310 divided by 100 is 0023 if we ignore fractions.  When you do multiplication by 256, the opposite happens.  The low order byte moves to the high order byte.  $9D93 times 256 is $9300.  When you do modulus 256, it means that you only take the remainder of the division, so $9D93 becomes $0093 cutting off the high order byte.  However, I just realized that you don't need this since its automatically cut off anyway.  It can actually be this:

Write:
:A/256->{L1}:A->{L1+1}
Read:
:{L1}*256+{L1+1}->A

1893
The Axe Parser Project / Re: Axe Parser
« on: March 01, 2010, 02:02:55 pm »
That wouldn't fix the speed issue though.

Hmm... is it possible to sort the symbol table alphabetically before stepping through it?  That way everything would already be in order and it wouldn't have to be sorted as its going through the list.  Is there a bcall for that?  If not, is it as simple as swapping the entries, or are there other dependent pointers I have to change?

1894
The Axe Parser Project / Re: Bug Reports
« on: March 01, 2010, 01:56:05 pm »
Oops!  I forgot about that.  Its really weird it worked for all the examples I tried it on... fixed it now.

Also, I noticed an error when you try to use a subroutine in an if statement it causes the program to freeze sometimes.  Let me know if anyone else gets this error, I'm trying to fix it.

1895
Axe / Re: Axe for Dummies (like me)
« on: February 28, 2010, 07:52:34 pm »
Yeah, just one byte 0 to 255 (or -128 to +127 if you subtract 128 after reading the byte)

Lets say this were in base 10.  If I had a 4 digit number like 5827 but I can only fit 2 digits in a byte, then only the low order part, the "27", would be stored and the "58" would be ignored.  The 16-bit numbers that Axe uses can be broken into a 4 digit number in base 16, hexadecimal.  So in a number like 2A7C, only the "7C" would get stored into the byte.

It is possible to store a 16 bit number (0 to 65535) into 2 bytes using a routine like this:
:A/256->{L1}
:A^256->{L1+1}

And reading the 2 byte number could be like this:
:{L1}*256+{L1+1}->A

1896
Axe / Re: Axe for Dummies (like me)
« on: February 28, 2010, 07:30:04 pm »
That's correct, but you started mixing up the words "SaveScreen" and "PlotsScreen".  L1 is "SaveScreen".

But like Builderboy said, you don't need to concern yourself with the names, just know that there's are about 700 bytes there you can use for reading and writing.

1897
Axe / Re: Axe for Dummies (like me)
« on: February 28, 2010, 07:16:38 pm »
FastCopy is just a name of an assembly routine.  It has nothing to do with Axe Parser itself other than that Axe uses this routine (err.. it doesn't anymore, it used to).

The instruction set lists it in the documentation as:

DispGraph - Draws the buffer on the screen.

I think its a pretty straightforward command.  Do you have any questions in particular?  I haven't made an Axe tutorial yet and I don't think I will even get started until its more stable.  The best thing to do is look at the source code for the example programs and play around with it.

EDIT:
L1-L6 are just locations in RAM.  When you write {L1+4} you are saying "The byte that is 4 bytes after the location of L1" just like you would do L1(5) in basic.  It would be 5 instead of 4 in basic because you start counting at 1 instead of 0.

1898
ASM / Re: ASM Optimized routines
« on: February 28, 2010, 05:21:57 pm »
Here is a little optimization I use but haven't really seen around.  When you need a direct key press, you have to wait about 7 clock cycles between setting the port and reading it.  Most people just fill in the extra space with a waste instruction like this:

Code: [Select]
ld a,xx
out (1),a
ld a,(de)
in a,(1)
and yy
9 Bytes, 43 T-States.

You can actually use the waste instruction to do something useful.  It gives a slight speed increase.

Code: [Select]
ld a,xx
out (1),a
ld b,yy
in a,(1)
and b
9 Bytes, 40 T-States.

1899
The Axe Parser Project / Re: Features Wishlist
« on: February 28, 2010, 04:15:16 pm »
Copy means copy during compile time of course :)

The way grayscale will work will be that all drawing routines actually draw to both buffers at the same time.  When you use DispGraph in grayscale mode, or maybe it will just be a different command, It displays the first buffer mixed with half of the second buffer.  Then the next time its called, it automatically switches to using the other half of the second buffer.  It will not automatically be gray.  You have to constantly redraw the screen in the main loop.

You can automate that when I add interrupt support, but I'm nowhere near ready for that now.

1900
The Axe Parser Project / Re: Axe Parser
« on: February 28, 2010, 04:04:21 pm »
Right, a horizontal line can be written like this:

:Lbl HL
:*12->B
:For(A,0,11)
:255->{B+A+L6}
:End
:Return

Called like this:
:Xsub(HL)

1901
The Axe Parser Project / Re: Axe Parser
« on: February 28, 2010, 12:42:54 pm »
Not instead, it IS the pixels.  You can write directly on the screen that way if that's your intention.  You're not always using the buffer though, like in a text only game you could write to there as actual storage.

Don't forget to clear some of these buffers.  Like if you don't end the program with a ClrHome but you used the text shadow, you will get garbage on the screen when the program quits.

1902
The Axe Parser Project / Re: Features Wishlist
« on: February 28, 2010, 12:37:55 pm »
Yeah, you won't even need a title screen to hex program because when do I add splash screen support, it will just use the calc's pictures and copy the ones you choose into the program.  If you need more than 10 pictures you can always write them in Hex if you're really desperate, but I think there are some Pic-to-AppVar programs out there and I might support AppVars where you normally enter a picture.  Grayscale will take a while but I can't think of a good syntax for it yet...

1903
The Axe Parser Project / Re: Axe Parser
« on: February 28, 2010, 04:44:13 am »
Alright, the moment you've all been waiting for, Axe Parser 0.0.6 is finally out, widening the range of what is possible by a HUGE amount.  This is the last of the 0.0 series.  In 0.1 I will be working on improving the GUI, error handling, and safety features until it is somewhat acceptable.  I might also throw in a new command or two every so often.

Looking forward to seeing some new projects. :)

1904
The Axe Parser Project / Latest Updates (***DO NOT POST HERE!***)
« on: February 28, 2010, 04:38:01 am »
Axe Parser
Alpha 0.0.6



New Features:
  • Pointers!
  • Double Buffering
  • Alphabetical Listings
  • Character Display
  • Else Statement
  • If-False Statement
  • New Automatic Optimizations
  • Sprite Editor Updated

Changed:
  • Sprites are now clipped!
  • DispGraph is now SafeCopy instead of FastCopy

New example program.

1905
The Axe Parser Project / Re: Axe language for the TI-Nspire and 68K calcs?
« on: February 28, 2010, 02:00:25 am »
It is possible to have a language with C syntax, but still Basic style.  The biggest reason I found C difficult when I first learned it was due to all the external calls you have to make.  Like printf() had a bizarre way of displaying stuff and if you want to draw a picture to the screen, you have to import tons of libraries and use all these weird functions to communicate with different drivers, do all this initialization stuff, and it was just so frustrating!

All you have to do to make C easier is just have a built in library that supports all the essential functions like DrawXor(X,Y,Sprite) for instance.  If a sufficient built in library is created, then it becomes extremely easy to program regardless of the actual syntax.

Pages: 1 ... 125 126 [127] 128 129 ... 135