Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
Calculator Community
»
Major Community Projects
»
The Axe Parser Project
(Moderator:
Runer112
) »
Using OP variable
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Using OP variable (Read 6813 times)
0 Members and 1 Guest are viewing this topic.
ACagliano
LV8
Addict (Next: 1000)
Posts: 919
Rating: +32/-2
Using OP variable
«
on:
May 05, 2011, 10:10:37 am »
In my study of z80, I saw that there are floating point variables (Op1,Op2,Op3...). Where are these located in Axe? Is that the float command? And can someone post an example of how to use it?
Logged
Quigibo
The Executioner
CoT Emeritus
LV11
Super Veteran (Next: 3000)
Posts: 2031
Rating: +1075/-24
I wish real life had a "Save" and "Load" button...
Re: Using OP variable
«
Reply #1 on:
May 05, 2011, 03:04:37 pm »
Those aren't used in Axe as variables because they are too volatile and get overridden constantly (especially OP1 and OP2) by OS routines. Axe also uses some of that memory internally to manage grayscale during interrupts.
«
Last Edit: May 05, 2011, 03:05:15 pm by Quigibo
»
Logged
___Axe_Parser___
Today the calculator, tomorrow the world!
Builderboy
Physics Guru
CoT Emeritus
LV13
Extreme Addict (Next: 9001)
Posts: 5673
Rating: +613/-9
Would you kindly?
Re: Using OP variable
«
Reply #2 on:
May 05, 2011, 03:34:43 pm »
It also might be worthy to note that they are in fact *not* variables, but just locations in memory the OS uses to do specific operations. They can be used for much more than just floating point arithmetic.
Logged
ACagliano
LV8
Addict (Next: 1000)
Posts: 919
Rating: +32/-2
Re: Using OP variable
«
Reply #3 on:
May 05, 2011, 03:59:58 pm »
Ok. Understood. I am making a chem program in Axe, so I just wanted to use a float as the final resting spot for an answer to a problem (since chem requires decimals). I won't be holding data long term or anything like that.
Logged
Builderboy
Physics Guru
CoT Emeritus
LV13
Extreme Addict (Next: 9001)
Posts: 5673
Rating: +613/-9
Would you kindly?
Re: Using OP variable
«
Reply #4 on:
May 05, 2011, 04:09:09 pm »
Any particular reason you are going with Axe? Basic actually far outweighs Axe in the area of advanced floating point math, as in Axe you would have to use pretty much all custom hex codes to work with floating point numbers, as well as any operations on them. What kind of program is it?
Logged
ACagliano
LV8
Addict (Next: 1000)
Posts: 919
Rating: +32/-2
Re: Using OP variable
«
Reply #5 on:
May 05, 2011, 04:11:19 pm »
What do you mean by 'kind of program'. It's a chem suite. it does molar masses, balancing equations, lewis structures, and electron configurations.
Logged
Builderboy
Physics Guru
CoT Emeritus
LV13
Extreme Addict (Next: 9001)
Posts: 5673
Rating: +613/-9
Would you kindly?
Re: Using OP variable
«
Reply #6 on:
May 05, 2011, 04:19:54 pm »
Ah gotcha, in that case I myself would recommend Basic over Axe, on account of its easy to use floating point arithmetic, and its simple input features. In axe, you would end up having to rewrite almost every routine, or write hex to access the built in OS ones, while in basic everything is already set up.
Logged
ACagliano
LV8
Addict (Next: 1000)
Posts: 919
Rating: +32/-2
Re: Using OP variable
«
Reply #7 on:
May 05, 2011, 04:42:14 pm »
I'll see what I can do. Is there a way to create and read/write appvars in basic, with no external routines/apps needed (I would use inline assembly if possible, but I want to avoid that route if it requires an external var). That's why I wanted to use Axe (or even assembly). I want the program to be completely functional on its own.
Logged
Builderboy
Physics Guru
CoT Emeritus
LV13
Extreme Addict (Next: 9001)
Posts: 5673
Rating: +613/-9
Would you kindly?
Re: Using OP variable
«
Reply #8 on:
May 05, 2011, 05:29:05 pm »
There is no way to write to appvars, but you can create and name your own lists, where you can store large amounts of data. Why do you need Appvars for a chemistry program?
Logged
ACagliano
LV8
Addict (Next: 1000)
Posts: 919
Rating: +32/-2
Re: Using OP variable
«
Reply #9 on:
May 05, 2011, 05:46:53 pm »
To hold both text (different inputs to accept for elements, that equate to the same actual element) and numbers (lists hold only numbers).
Logged
AngelFish
Is this my custom title?
Administrator
LV12
Extreme Poster (Next: 5000)
Posts: 3242
Rating: +270/-27
I'm a Fishbot
Re: Using OP variable
«
Reply #10 on:
May 05, 2011, 05:51:17 pm »
Couldn't you use a String then? Just push the previous contents of the string into one of the almost never used polar equation variables and restore it when you're done.
Logged
∂²Ψ -(2m(V(x)-E)Ψ
--- = -------------
∂x² ℏ²Ψ
ACagliano
LV8
Addict (Next: 1000)
Posts: 919
Rating: +32/-2
Re: Using OP variable
«
Reply #11 on:
May 05, 2011, 06:26:54 pm »
Hmmm. I guess. I'm thinking of just doing this whole project in straight z80.
Logged
Builderboy
Physics Guru
CoT Emeritus
LV13
Extreme Addict (Next: 9001)
Posts: 5673
Rating: +613/-9
Would you kindly?
Re: Using OP variable
«
Reply #12 on:
May 05, 2011, 07:29:20 pm »
Wait do you want to make this in Axe or z80 asm?
Logged
ACagliano
LV8
Addict (Next: 1000)
Posts: 919
Rating: +32/-2
Re: Using OP variable
«
Reply #13 on:
May 05, 2011, 09:21:19 pm »
I wanted to do it in Axe, but z80 might be easier. I have to see.
Logged
ralphdspam
LV8
Addict (Next: 1000)
Posts: 841
Rating: +38/-1
My name is actually Matt.
Re: Using OP variable
«
Reply #14 on:
May 05, 2011, 10:04:38 pm »
OP1 = {8478
E
}
OP2 = {8483
E
}
OP3 = {848E
E
}
OP4 = {8499
E
}
OP5 = {84A4
E
}
OP6 = {84AF
E
}
So you load/store the FP number to these locations in ram. Since they're just addresses, you can just make your own arbitrary FP variables in the L
x
locations in Axe.
Yeah, I think Z80 is easier for your math program.
«
Last Edit: May 05, 2011, 10:08:10 pm by ralphdspam
»
Logged
ld a, 0
ld a, a
Print
Pages: [
1
]
Go Up
« previous
next »
Omnimaga
»
Forum
»
Calculator Community
»
Major Community Projects
»
The Axe Parser Project
(Moderator:
Runer112
) »
Using OP variable