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 ... 108 109 [110] 111 112 ... 135
1636
The Axe Parser Project / Re: Axe Parser
« on: April 25, 2010, 01:11:07 am »
All static pointers are distinct.  Even Str1 and Str01 are not the same.  GetCalc currently only works for appvars and programs so graph database files can not be read.

You can kind of get the Nth data pointer if all the data is the same size and declared consecutively.  If you have:
:[C0FFEE]->Str0
:[DECAFF]->Str1
:[CAFE00]->Str2

You can get the Nth pointer here by doing "N*3+Str0"

There is another way to get the Nth arbitrary pointer (not consecutive not the same size) but its a little more complicated and involves pointers to pointers.

1637
I think the hardest part of learning asm is the shift in paradigm.  In my opinion, someone with very little programming background will be able to learn the language and understand it better initially than someone who has exclusively programmed in higher level languages their whole lives.  I remember the concept of flags, registers, unsigned arithmetic, bit shifting, etc.  seemed so foreign to me when I was first learning.  You never cover that stuff in high level.  In my head I kept trying to make my code look and feel like the languages I was used to so then it would all be simple and I could just naturally pick it up.  But you can't do that, its impossible.  You miss all the concepts that are absolutely essential to do all the low level tasks which is the whole point.

You have to start with a very open mind.  Your knowledge of how to ride a bike isn't going to help you much when you're trying to fly a helicopter.  It took me about a whole summer to get the hang of it and it was almost a year before I could write a game with it.

1638
Introduce Yourself! / Re: Hello! I am Stephan!
« on: April 24, 2010, 11:55:05 pm »
Enjoy your stay :)  Hope you enjoy industrial portions of peanuts...

1639
The Axe Parser Project / Re: Features Wishlist
« on: April 24, 2010, 11:46:05 pm »
Exactly.  But if someone writes a library, odds are you aren't going to use every single command in that library.  And its a huge hassle to keep track of which ones you use and which ones you don't need.  And what if you delete one but it turns out you need it later on?  In addition, its more organized to have the programs and subroutines in separate files.  Also, it would be a real annoyance to have to do a [Rcl] with someone's code into your main program.  And yet another thing!  You might have several source files that use the same libraries so it could potentially save space and make source files even smaller.

1640
The Axe Parser Project / Re: Features Wishlist
« on: April 24, 2010, 09:58:09 pm »
I am also a bit confused about what you're asking about.  A library is just a list of subroutines.  Like if somebody makes a tile mapper or physics engine or something, then you can call those routines from your main program.  Like if your program was prgmA and you said sub(prgmTM,D) this would call subroutine D (lets say that's a drawing command for the tile mapper) from the tile mapper library.

1641
The Axe Parser Project / Re: Axe Parser
« on: April 24, 2010, 09:41:03 pm »
Yes.  Actually, I think that would be pretty easy to add.  There would have to be one for setting a bit, resting a bit, reading a bit, and possibly flipping a bit.  The problem is that I can't seem to find any intuitive tokens for it.  Maybe binomcdf()?  But there's only 2 of those and its kind of a long one...

EDIT: Also, I should say that these will only work with a CONSTANT as the bit#.  So you can't have the Xth bit with X being a variable.  Otherwise, the routine you wrote is pretty efficient for it.

1642
The Axe Parser Project / Re: Features Wishlist
« on: April 24, 2010, 09:30:05 pm »
I'd like to ask about library files now.

First of all, I think they will be handled slightly differently than regular source files.  Their header will be in lowercase to distinguish them, and they won't show up on the compiling list to reduce clutter since they're never compiled standalone anyway.  The libraries will basically just be a big list of subroutines that can be called from the main program.

Next thing is how to reduce naming conflicts since the labels are only 2 letters.  Although I plan to eventually allow labels up to 8 letters, right now there is a high chance for duplicate labels, especially if there are multiple library files included in the main program.  To avoid this, I am thinking of having a prefix for the subroutines like this: sub(prgmMYLIB,DW) will call the subroutine "DW" from the "prgmMYLIB" library.

The nice thing about the libraries is that only subroutines you actually USE will get compiled into the code.  That means if a library has 25 different routines, but you're only using 5 of them, only the 5 that you use get put into the program.  There is going to have to be some slight restrictions to the subroutines however, mostly, they cannot allocate data or use regular goto's and sub's, only library subs (including itself).

I haven't written any of this yet, I want to get an opinion first.  Does anyone have any other ideas?

1643
Miscellaneous / Re: Post your desktop
« on: April 24, 2010, 07:13:33 pm »
I'm surprised how many other people here use Linux.  But I guess this is a pretty geeky place  :P

My linux background is really cool.  Its called "Day and Night" or something.  I can't seem to find it online anymore, but its really cool.  Its a sunrise from above the clouds and the image changes depending on the time of day.  In the morning, its a light blue with a sunrise, in the day its bright with yellow, the evening there's a red sunset, and at night, the sky is dark.  I love it.

1644
The Axe Parser Project / Re: Axe Parser
« on: April 24, 2010, 06:55:51 pm »
Actually, there is a little trick you can use extract them.  Try this:

Input: X is the 16-bit variable

:X->B
:For(A,1,16)
:If B^2
:<What to do if the Nth bit from the right is 1>
:End
:B/2->B
:End

It will iterate and read all the bits.

If you just want a specific bit, the Nth bit on the right, then do this:

Input: X is the 16-bit variable
Input: N is which bit (in range 0-15):
Output: Returns the value of the bit.

:X->B
:For(A,1,N)
:B/2->B
:End
:B^2

1645
TI Z80 / Re: Zedd Physics Library
« on: April 24, 2010, 06:43:00 pm »
Holy crap that's awesome!  :o  I couldn't even get that stuff working well in my C++ physics engine!

Its strange, I've hardly seen any calculator games with real physics engines before, but after Axe Parser, it seems like a lot more people are interested in using them for some reason (Like Portal X, Half-Life, and a few others).  Maybe they're just generally too messy when written in actual assembly and this simplifies the process...

1646
The Axe Parser Project / Re: Axe Parser
« on: April 24, 2010, 06:32:30 pm »
Same as the difference between Hex and decimal, its just the way you write the number

For instance, the number "99" can be written

Hex: 63
Decimal: 99
Binary: 01100011

Binary mostly helps when you have a lot of Boolean variables (true/false) that you want to store into a single byte to save space since you can hold 8 of them per byte.

1647
The Axe Parser Project / Re: Axe Parser
« on: April 24, 2010, 05:59:59 pm »
Not yet, but i plan to add support to it soon.

1648
Axe / Re: A solution to the archive/unarchive battery bill issue
« on: April 24, 2010, 02:30:54 pm »
I think this is something I'll worry about when the time comes.  I don't think anyone is currently making any massive RPGs of this nature (but correct me if I'm wrong).

1649
The Axe Parser Project / Re: Your Projects - Post and Critique
« on: April 24, 2010, 03:21:50 am »
I've written a really fast line routine that only uses one external call to the get pixel routine and it doesn't use shadow registers or absolute jumps!  And its relatively small, under 100 bytes (50 bytes smaller than that routine you linked to).  Haven't tested the speed yet becasue I have to resolve a few parsing issues first, but I presume its really fast, probably faster than that other one.

1650
The Axe Parser Project / Re: Features Wishlist
« on: April 23, 2010, 10:42:56 pm »
I don't think there's such a thing as garbage collecting messages in asm.  I could be wrong, but I've never seen it or heard about it before.  Its possible it might ask when the program quits and hands control back to the OS though.

Pages: 1 ... 108 109 [110] 111 112 ... 135