• Features Wishlist 5 1
Currently:  

Author Topic: Features Wishlist  (Read 693222 times)

0 Members and 2 Guests are viewing this topic.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Features Wishlist
« Reply #465 on: April 11, 2010, 06:27:56 pm »
Nope, Axe does not have decimal support, so you can only have whole numbers.  You can kind of multiply by 1.5 by doing

L*3/2->B

But you wont get the precision of using floating point numbers, it will drop the decimal places.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Features Wishlist
« Reply #466 on: April 11, 2010, 06:31:32 pm »
Bah humbug.

It's ok, though. I'll figure it out. Axe still rocks.

Offline 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...
    • View Profile
Re: Features Wishlist
« Reply #467 on: April 11, 2010, 08:03:16 pm »
Actually, you can do decimals (for the most part).  Since variables are 2 bytes, the low byte can be the decimal part and the high byte can be the integer part.  It requires some knowledge of hexadecimal though and the math might be a little confusing at first, but its almost the same as regular math.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Will_W

  • LV3 Member (Next: 100)
  • ***
  • Posts: 54
  • Rating: +1/-1
    • View Profile
Re: Features Wishlist
« Reply #468 on: April 11, 2010, 08:09:30 pm »
That's called 8.8 fixed point by the way if anyone wants to know more about it, and I have a (poorly coded) include file that does some stuff with it in z80 over at revsoft.
Adding two 8.8s is the same as adding two 16 bit numbers.  Multiplying two 8.8s results in a 16.16 which needs to be truncated differently (Keep the middle bytes) than if you had multiplied two 16 bit numbers(Keep the low bytes).
« Last Edit: April 11, 2010, 08:09:51 pm by Will_W »
ex de,hl
ld (hl),e
inc hl
ld (hl),d
ld a,(hl)

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Features Wishlist
« Reply #469 on: April 11, 2010, 11:42:14 pm »
Quigibo, I think you should have an operator to multiply by an 8.8 fixed point value (because this type of value is what sin and cos return, right?)
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Will_W

  • LV3 Member (Next: 100)
  • ***
  • Posts: 54
  • Rating: +1/-1
    • View Profile
Re: Features Wishlist
« Reply #470 on: April 11, 2010, 11:53:51 pm »
8.8 multiplication would be niffty.  I can't think of it right now, but I'm pretty sure division is different too.
ex de,hl
ld (hl),e
inc hl
ld (hl),d
ld a,(hl)

Offline 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...
    • View Profile
Re: Features Wishlist
« Reply #471 on: April 12, 2010, 01:27:25 am »
Quigibo, I think you should have an operator to multiply by an 8.8 fixed point value (because this type of value is what sin and cos return, right?)
Kind of.  Since the range is 127 to -127 its really half of the actual sine value.  By the way, thanks for the sin routine!  I modified it a little to get it in the right range, but it's a pretty cool optimization.  I don't know if you were aware I used it.  Someone gave it to me in IRC and said you made it.

I don't know if 8.8 multiplication is really that essential.  There's already a way to multiply by fractions (a multiplication then a division like Builderboy's example) and I've never actually needed to use 8.8 it in any of my asm programs before.

A little off topic:  I'm trying to think of a way to make shell support and I'm not sure how to do the menu because I think it'll be too complicated to have that information built into the source.  There's a lot of information in descriptions and thumbnails, both of which are hard to input.  So unless I make it real simple: Description is the first comment in the program and the thumbnail is an Axe logo, I'm not sure how to go about this and still be easy to use.  I think I'll just go with the simple way for now and do the more complicated way later.
« Last Edit: April 12, 2010, 01:27:57 am by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #472 on: April 12, 2010, 01:35:08 am »
Remember that Ion doesn't support thumbnails, tho, even when its programs are ran in Mirage. Maybe for now have the compiled program name as first line, description, and for now Axe logo for thumbnail if compiled for MirageOs. Later, maybe add support for custom logos?

Offline 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...
    • View Profile
Re: Features Wishlist
« Reply #473 on: April 12, 2010, 02:02:45 am »
Remember that Ion doesn't support thumbnails, tho, even when its programs are ran in Mirage. Maybe for now have the compiled program name as first line, description, and for now Axe logo for thumbnail if compiled for MirageOs. Later, maybe add support for custom logos?
That's essentially exactly what I just said ;)
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #474 on: April 12, 2010, 02:07:01 am »
I know, I was just stating it as what I think that should be the best idea...

Well this was my final Axe Parser suggestion/opinion statment. I'm going to let other people provide theirs and wait for the final version.

Offline 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...
    • View Profile
Re: Features Wishlist
« Reply #475 on: April 12, 2010, 02:12:55 am »
You ended it with a question mark so I thought you were asking me if that was what I was going to do.  Sorry if I misunderstood...
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Will_W

  • LV3 Member (Next: 100)
  • ***
  • Posts: 54
  • Rating: +1/-1
    • View Profile
Re: Features Wishlist
« Reply #476 on: April 12, 2010, 02:15:34 am »
Take a look at the DCS BASIC header:
::DCS6
:"64-char_hex_icon
:Program code
I can't think of a way to use sine values without 8.8 multiplication, since they are always between [0,1]
ex de,hl
ld (hl),e
inc hl
ld (hl),d
ld a,(hl)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #477 on: April 12, 2010, 02:19:13 am »
You ended it with a question mark so I thought you were asking me if that was what I was going to do.  Sorry if I misunderstood...
Oh sorry for the confusion x.x

I sometimes tend to end my suggestions (especially short ones) with a question mark, especially when the person asks for some. x.x

Offline 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...
    • View Profile
Re: Features Wishlist
« Reply #478 on: April 12, 2010, 02:29:56 am »
Its simple:


;A holds the value to be multiplied in the range 0 to 255
;B holds angle

sin(B)*A/256    ;You can do this right now, but its unsigned
sin(B)*A//256    ;You can do this in the future as signed


___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Will_W

  • LV3 Member (Next: 100)
  • ***
  • Posts: 54
  • Rating: +1/-1
    • View Profile
Re: Features Wishlist
« Reply #479 on: April 12, 2010, 02:36:03 am »
is dividing by powers of two optimized so it uses shifting instead of division?
Or better yet, Shifting and rotation commands?
« Last Edit: April 12, 2010, 02:41:00 am by Will_W »
ex de,hl
ld (hl),e
inc hl
ld (hl),d
ld a,(hl)