Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 June, 2013, 08:55:16 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1]   Go Down
  Print  
Author Topic: Using OP variable -  (Read 1042 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
ACagliano
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« on: 05 May, 2011, 16:10:37 »
0

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

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

Quigibo
The Executioner
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: 31 May, 2013, 10:48:29
Date Registered: 22 January, 2010, 05:02:37
Location: Los Angeles
Posts: 2022


Total Post Ratings: +1019

View Profile
« Reply #1 on: 05 May, 2011, 21:04:37 »
0

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: 05 May, 2011, 21:05:15 by Quigibo » Logged

___Axe_Parser___
Today the calculator, tomorrow the world!
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Online Online

Gender: Male
Last Login: Today at 08:32:53
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5645


Total Post Ratings: +589

View Profile
« Reply #2 on: 05 May, 2011, 21:34:43 »
0

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)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« Reply #3 on: 05 May, 2011, 21:59:58 »
0

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

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Online Online

Gender: Male
Last Login: Today at 08:32:53
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5645


Total Post Ratings: +589

View Profile
« Reply #4 on: 05 May, 2011, 22:09:09 »
0

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)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« Reply #5 on: 05 May, 2011, 22:11:19 »
0

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

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Online Online

Gender: Male
Last Login: Today at 08:32:53
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5645


Total Post Ratings: +589

View Profile
« Reply #6 on: 05 May, 2011, 22:19:54 »
0

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)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« Reply #7 on: 05 May, 2011, 22:42:14 »
0

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

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Online Online

Gender: Male
Last Login: Today at 08:32:53
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5645


Total Post Ratings: +589

View Profile
« Reply #8 on: 05 May, 2011, 23:29:05 »
0

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)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« Reply #9 on: 05 May, 2011, 23:46:53 »
0

To hold both text (different inputs to accept for elements, that equate to the same actual element) and numbers (lists hold only numbers).
Logged

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

AngelFish
This is my custom title
Administrator
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Gender: Male
Last Login: Today at 01:08:43
Date Registered: 15 August, 2010, 09:18:54
Posts: 3192


Total Post Ratings: +222

View Profile
« Reply #10 on: 05 May, 2011, 23:51:17 »
0

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)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« Reply #11 on: 06 May, 2011, 00:26:54 »
0

Hmmm. I guess. I'm thinking of just doing this whole project in straight z80.
Logged

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Online Online

Gender: Male
Last Login: Today at 08:32:53
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5645


Total Post Ratings: +589

View Profile
« Reply #12 on: 06 May, 2011, 01:29:20 »
0

Wait do you want to make this in Axe or z80 asm? 
Logged

ACagliano
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 14 May, 2013, 13:02:38
Date Registered: 03 July, 2009, 01:06:06
Posts: 764


Topic starter
Total Post Ratings: +29

View Profile WWW
« Reply #13 on: 06 May, 2011, 03:21:19 »
0

I wanted to do it in Axe, but z80 might be easier. I have to see.
Logged

-ACagliano
TI-Basic software developer

My Website


Current Projects
----------------------------
1. Legend of Zelda "Revenge of Ganon"
        -maps: 100%
        -graphics engine: 20% (sprites)
        -AI engine: 0%
        -event scripts: 60% (text left)
        -walking engine: 100%
        -miscellaneous: 40%
  -total progress:  54%

ralphdspam
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 14 May, 2013, 09:10:11
Date Registered: 01 February, 2011, 07:58:40
Location: California, USA
Posts: 841


Total Post Ratings: +36

View Profile
« Reply #14 on: 06 May, 2011, 04:04:38 »
0

OP1 = {8478E}
OP2 = {8483E}
OP3 = {848EE}
OP4 = {8499E}
OP5 = {84A4E}
OP6 = {84AFE}

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 Lx locations in Axe.  Wink

Yeah, I think Z80 is easier for your math program.
« Last Edit: 06 May, 2011, 04:08:10 by ralphdspam » Logged

ld a, 0
ld a, a
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.267 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.