Author Topic: Features Wishlist  (Read 630930 times)

0 Members and 1 Guest are viewing this topic.

Offline LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
Re: Features Wishlist
« Reply #1305 on: October 06, 2010, 08:15:30 am »
what is this command to do exactly? go to the label which has the name of the value stored in X? I think you should just write a handy subroutine for this, which could do the actions you would have placed in the label called [value of X]. like this:
Code: [Select]
244->X
Sub(LX,X

Lbl LX
If r1=224
.actions for label 224, or even:
Goto 224
ElseIf r1=225
.similar actions
ElseIf etc.
.and even more code, if you need it.
End

The switch-statement would be very handy for this in the future, but isn't implemented jet...

EDIT: kinda ninja'd, but not really IMO ;)
« Last Edit: October 06, 2010, 08:17:12 am by LordConiupiter »
everytime that I was down, you would always come around, and get my feedback on the ground. (modified part from 'Seasons in the sun')

No matter how many errors are bothering you, always try to stay rel-Axe!

The HoMM project will be resumed as soon Axe 1.0.0 will be released!
Projects:
Code: [Select]
HoMM:   [==--------]    Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :P
tiDE:   [----------]    Explored and understood the main part of the code: just started writing a Tokenizer.



password of the week: uvanapererubupa (Any pronunciation is the right one ;) )   :D click me, and you'll be raided :D

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #1306 on: October 06, 2010, 01:55:57 pm »
Switch statements would be handy, but I don't know if Quigibo was still planning to add them in the future.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Features Wishlist
« Reply #1307 on: October 06, 2010, 02:53:15 pm »
what is this command to do exactly? go to the label which has the name of the value stored in X? I think you should just write a handy subroutine for this, which could do the actions you would have placed in the label called [value of X].

The switch-statement would be very handy for this in the future, but isn't implemented yet...

yes, go to the value stored in X
uh, that code would be very long in my program, because there will be 111 if...goto routines.
I'm not a nerd but I pretend:

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 #1308 on: October 06, 2010, 04:51:57 pm »
The labels are just names, they don't actually exist in the executable so there would be no way to tell where you actually need to jump.  ASM jumps function differently than BASIC gotos becasue the ASM uses the actual address in memory which varies wildly as your code grows and changes.  I'm still trying to see if switch statements will be possible and save memory by the way, but I would need to add a break command or something which would be a lot of work.

The reason I don't have 8xY sprite drawing is because it will either make the existing routine larger and slightly slower or i would have to add a whole other sprite routine.  It gets complicated due to the clipping.

« Last Edit: October 06, 2010, 04:53:04 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Features Wishlist
« Reply #1309 on: October 06, 2010, 04:57:42 pm »
or i would have to add a whole other sprite routine.  It gets complicated due to the clipping.
I vote for this option.  Personally, I don't think it would be a bad thing and it would make programs faster and smaller as an end result. :)

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 #1310 on: October 06, 2010, 05:18:59 pm »
I'm still trying to see if switch statements will be possible and save memory by the way, but I would need to add a break command or something which would be a lot of work.
You could possibly make Return break out of the switch statement (which could possibly be the smallest solution -- just 4 bytes to push the return location onto the stack and 1 byte per return, as opposed to no overhead and 3 bytes per break)
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Features Wishlist
« Reply #1311 on: October 06, 2010, 05:19:50 pm »
I'm still trying to see if switch statements will be possible and save memory by the way, but I would need to add a break command or something which would be a lot of work.
You could possibly make Return break out of the switch statement (which could possibly be the smallest solution -- just 4 bytes to push the return location onto the stack and 1 byte per return, as opposed to no overhead and 3 bytes per break)
That's a really good idea!  I vote for this. :)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #1312 on: October 06, 2010, 11:26:27 pm »
Such sprite routine might be good, unless it really signifiantly make your program grow much larger (like 70-100 bytes larger).

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 #1313 on: October 06, 2010, 11:43:54 pm »
But note that it will only make your program larger if you want to use it, and if you dont want the size increase, you can stick with the normal routine and just use two or more 8x8 :)

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 #1314 on: October 07, 2010, 01:02:19 am »
calc84maniac, I was thinking about that, and it's a great idea!

I also thought of an interesting new block type which is basically an anti-subroutine.  Instead of calling a routine and then returning from where you called it, you tell it the place you want to return to and then do the routine.  I'm wondering if that would be useful because I do that a lot in the actual parser code.  In Axe and assembly, it's basically this:

Code: (Axe) [Select]
SetRet(LBL)
...
Return
...
Lbl LBL

Code: (Assembly) [Select]
  ld de,LBL
  push de
...
  ret
...
LBL:

The switch statement itself would use something similar.  And since the return point is set to the end of the switch statement, I wouldn't need to add a new break command, you could just use "Return".  The main problem though is that this would actually create memory leaks if you tried to do a goto out of the switch statement from within the switch statement.  I think a common use of switch statements is branching to a bunch of labels though so I'd have to figure out another way to do that...
« Last Edit: October 07, 2010, 01:04:01 am by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Re: Features Wishlist
« Reply #1315 on: October 07, 2010, 01:10:42 am »
Hm... Quigibo, could you look into my suggestion on page 86 as well?
It seems to be totally forgotten, and its a feature I (and most likely alot of others) need.
http://ourl.ca/4057/124762
« Last Edit: October 07, 2010, 01:11:17 am by Ikkerens »

Splut for Android [----------]
Paused/halted indefinitely, might be abandoned, our graphic designer quit and the rest of us simply doesn't have the time to work on it...

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 #1316 on: October 07, 2010, 01:12:00 am »
Yeah, I've already added that :)
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Re: Features Wishlist
« Reply #1317 on: October 07, 2010, 01:13:06 am »
Oh cool!
Thx :P

Splut for Android [----------]
Paused/halted indefinitely, might be abandoned, our graphic designer quit and the rest of us simply doesn't have the time to work on it...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #1318 on: October 07, 2010, 02:46:02 am »
But note that it will only make your program larger if you want to use it, and if you dont want the size increase, you can stick with the normal routine and just use two or more 8x8 :)
One concern I got, though, is if you use both 8x8 and the others, wouldn't both routines be added? That might waste a bit of space x.x

Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Re: Features Wishlist
« Reply #1319 on: October 07, 2010, 11:38:50 am »
I have many ideas for projects atm, but I lose the most possibilities by the memory which is avaible for a game.
How possible would it be to let Axe compile a code into an 32/65KB app?
« Last Edit: October 07, 2010, 11:44:32 am by Aichi »