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 - ACagliano

Pages: 1 ... 5 6 [7] 8 9 ... 62
91
TI Z80 / Re: PolyAOI v6?
« on: April 08, 2014, 05:11:45 pm »
Are they asm or Axe? Bc I'm working in Axe. I've been looking into the Axiom :p

92
TI Z80 / Re: PolyAOI v6?
« on: April 08, 2014, 04:46:34 pm »
Update: screenshot of the opening graphics (launched via DoorsCS7). Captured by WabbitEmu.


And apparently very glitchy. The weirdness you see in the screen didn't even show up on the emulator itself, or on my calc.

93
TI Z80 / Re: Order of Operations
« on: April 07, 2014, 08:36:26 am »
Ok, so my final question, for now, is this: this program is designed to simplify polynomial expressions. so for example, simplifying this: (x-1)(x+1) should result in x^2-1. How much more complicated is make it involve the x as an entity?


Also, when Axe command lists say a command takes EXPR as an argument, what does that mean exactly? What's the difference between EXPR and an Axe list, or an array of bytes?

94
TI Z80 / Re: Order of Operations
« on: April 06, 2014, 08:09:46 pm »
For the other variables, I'm talking about something to this effect:
3x+7y=-2x-14y
the calculator sees the =, and then the presence of x AND y, and automatically determines its a system of equations problem and solves for x and y.

As for the second part, if you're evaluating step 2 in my algorithm, you should still have () in there, or you should be on to step 3?


response to edit: yeah, those are also invalid. let's get the algorithm working, then we can work with error finding :p

95
TI Z80 / Re: Order of Operations
« on: April 06, 2014, 09:02:04 am »
Ok, ill talk to Xeda then. But, for now, let's talk algorithm.


step 1: error codes. Count up # of ( and # of ). If ( > ), then too many (, or if ( < ), then too many )
step 2: find first ). move backwards to first ( we find. That's the first thing to evaluate. Move expression contained to some other area, rinse and repeat until there are no more () sets.
step 3: dump whatever is left into some other area
step 4: parse some other area, with * and / first.


how difficult would it be to add support for other variables. like a,b,c,y,z and so on.

96
TI Z80 / Re: Order of Operations
« on: April 05, 2014, 02:32:26 pm »
Thats pretty awesome. So it seems to me like Axe is being designed to at least *feel* like using a C-style language for the computer. Am I right?

As for functions, how about direct ROM call injection? Like using b_call(_MD5Init) or something, that require certain registers as input? Or if its not implemented, maybe a variation on sub(, where argument one is the ROM call name, and the other arguments are like loads into registers, in {PTR}->[register] format?


Edit: So here would be an all-text algorithm..


Lbl Evaluate


1. if number of ( > number of ); then error one or more paren not closed
2. if number of ( < number of ); then error, too many )
3. find innermost (...), dump expression into scrap RAM
4. repeat 3 for each wrapping (...), until there are no parentheses left to evaluate. Each iteration of this becomes an "entry" in scrap RAM. When we have no more parentheses, we dump the rest of the expression into scrap RAM.
5. For each entry in scrap RAM, break apart entry into expressions, by the operator, and perform * and / before + and -.


Would that work?

97
TI Z80 / Re: Order of Operations
« on: April 05, 2014, 12:19:21 pm »
Nice! Didn't know that. Haven't been up to date on Axe's features before now. :p Is that the same for variable names now? Anything else it can do? lol

98
TI Z80 / Re: Order of Operations
« on: April 05, 2014, 10:23:25 am »
Ok, that helps a bit. So as a follow up to that... is Axe advanced enough now to take arbitrary Label names? Like you said sub(evaluate, [arg]). Can I do LBL EVALUATE? Or must I use the 2-character label names?

99
TI Z80 / Re: Order of Operations
« on: April 04, 2014, 09:54:17 pm »
Ok I came up with a partial algorithm, but I may need some assistance coding it. Order of operations goes PEMDAS, so parentheses are first. So, my idea is to loop:



Code: [Select]
input->A
A->W
While inData(')',A)
   ;; in the example 3x + (7x + 4x + (3x) - (2x-1))
   ;; while we have a ), this will keep looping
   While inData('(',W)<inData(')',A)
       If inData('(',W) < inData(')',A)
           inData('(',W) -> Z
           End
       inData('(',W) + 1 -> W
   ;; while the next ( we find is in front of the ), we loop.
   ;; When it moves behind it, we are in a new nested parentheses, so we stop looping.
   ;;  Z is saved, so we can recall correct location.
   End
 ;; Once we are out of the second while loop, we can copy the innermost parentheses...
 ;; contents to another location in RAM, and zero terminate it, or length pre-pend it.
 ;; then we delete the contents of that paren from the source string. doing so eliminates that...
 ;; ), so that the first while loop returns the position of the next ) in its test, so we loop until parens...
 ;; are all gone.
End
   

bump on that.

When i talk to people about order of operations...they say "make a tree". but my question is...how the heck do you make a "tree" in assembly? you just have arrays of bytes...

100
TI Z80 / Re: Order of Operations
« on: April 03, 2014, 08:16:33 am »
bumpity bump

101
TI Z80 / Re: Order of Operations
« on: April 01, 2014, 09:50:37 pm »
Ok I came up with a partial algorithm, but I may need some assistance coding it. Order of operations goes PEMDAS, so parentheses are first. So, my idea is to loop:



Code: [Select]
input->A
A->W
While inData(')',A)
   ;; in the example 3x + (7x + 4x + (3x) - (2x-1))
   ;; while we have a ), this will keep looping
   While inData('(',W)<inData(')',A)
       If inData('(',W) < inData(')',A)
           inData('(',W) -> Z
           End
       inData('(',W) + 1 -> W
   ;; while the next ( we find is in front of the ), we loop.
   ;; When it moves behind it, we are in a new nested parentheses, so we stop looping.
   ;;  Z is saved, so we can recall correct location.
   End
 ;; Once we are out of the second while loop, we can copy the innermost parentheses...
 ;; contents to another location in RAM, and zero terminate it, or length pre-pend it.
 ;; then we delete the contents of that paren from the source string. doing so eliminates that...
 ;; ), so that the first while loop returns the position of the next ) in its test, so we loop until parens...
 ;; are all gone.
End
   

102
TI Z80 / Re: Order of Operations
« on: April 01, 2014, 05:25:42 pm »
Ok. The problem is, I don't even know where to start... my initial thought was, starting at position 1 of the input string,

search for a (.
if found, search for next )
copy contents to scrap buffer.
rinse and repeat.

but beyond that, I'm lost...

103
TI Z80 / Order of Operations
« on: April 01, 2014, 03:32:42 pm »
I have been trying to do this myself, but I'm failing. I need to ask for at the least conceptual, if not coding assistance...


I need to make an order of operations parser. For instance, the string: ((3x+7)(x-3))/4x should be evaluated into memory:


3x+7
*
x-3
/
4x


My language is Axe. If there's an app (like Symbolic) that does this, then this post is also an official permission request to view, and perhaps borrow elements from them, if they would help.

104
TI Z80 / Re: Weird Bottom-of-Screen Glitchyness
« on: March 31, 2014, 05:12:06 pm »
The display occurs after, not before. :p. In any event, I just figured it out. The bottom text was grey, and some of it defaulted to white and some to black when SourceCoder converted it. :p Hence, the appearance.

105
TI Z80 / Weird Bottom-of-Screen Glitchyness
« on: March 31, 2014, 11:22:42 am »

This code, when run, is giving me glitchyness at the bottom of the screen, right where the TI-OS puts the x and y coords of the cursor.



Code: [Select]

.POLYAOI
identity(FFFFCFBFB7BFB7BF89ADB6ADB6B3B9BBFFFBCC67B6DBB6DB86DBB6DBB467FFFF)
Full
Full
ClrDraw
ClrDraw
DispGraph
ClrHome
DispGraph(Pic0)
getKey
ClrHome
Disp "Input Polynomial"
Disp "Expression:"
Disp 
Input →A
length(A)→B
Disp A
Pause 5000







[FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9FFFFFFFFFFCFFFFFFFFE1FF9FFFFFFFE7FCFFFFFFFFE4FF9FFFFFFFFFFCFFFFFFFFCCC73261C709CC39C7FFFFFFCC9332649324CF999FFFFFFFC39330E49324CC198FFFFFFF9F9271C992499933CFFFFFFF9FC673C9C6499C331FFFFFFFFFFFF3FFFFFFFFFFFFFFFFFFFFFFE7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE64F8FFF0FFFFFFFFFFFFFFFC64FCFFE6FFFFFFFFFFFFFFFD6DFD87EE430FFFFFFFFFFFF96D9DB66EDA0FFFFFFFFFFFF86DF9B7ECDA7FFFFFFFFFFFF709F127E1931FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF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