Author Topic: Routines  (Read 317357 times)

0 Members and 9 Guests 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: Routines
« Reply #165 on: March 23, 2010, 03:31:31 pm »
yes, I downloaded it yesterday.
I typed the second code right after the first code.
when I delete that code and 'sub(A)', there are no errors, but then just only the enter key works to stop the prog...
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

_player1537

  • Guest
Re: Routines
« Reply #166 on: March 23, 2010, 10:55:06 pm »
I believe I had troubles with the "sub(A)" part as well, let me upload the actual program, see if it works
« Last Edit: March 23, 2010, 10:57:04 pm by _player1537 »

Offline LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
Re: Routines
« Reply #167 on: March 24, 2010, 11:26:45 am »
thanks! this works! (not with 0.1.2, but with 0.1.3 its doing fine)
But there the maximum number is 65535 (serveral times pressed 9, or the [Y=] key :P)
I am writing something for a string input, but my calc crashed :(
I'll figure it out somehow ;D
« Last Edit: March 24, 2010, 11:28:04 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

SirCmpwn

  • Guest
Re: Routines
« Reply #168 on: March 24, 2010, 12:02:27 pm »
But there the maximum number is 65535 (serveral times pressed 9, or the [Y=] key :P)
Axe has a maximum number, there is little we can do about it.

Offline LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
Re: Routines
« Reply #169 on: March 24, 2010, 12:15:59 pm »
yes, of course we can use other bytes to extend it ourselves, if really needed...

I got an idea to use Then for: a kinda switch-case statement
like this:

Code: [Select]
:If VAR
:Then 1:
:CODE1
:End
:Then 2:
:CODE2
:End
:EndIf

something like that would be nice, I think.
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 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: Routines
« Reply #170 on: March 24, 2010, 01:57:46 pm »
The ideal input routine should store the input into a buffer in ram.  Then, the programmer has control of how to interpret the buffer; either as numerical, string, or something else.  And yes, you can store numbers larger than 16 bits using part of RAM to store the larger number (kind of like how the 16 bit number is really just two 8 bit numbers).  In fact, you can store as much precision as you want.  You can have a 100 trillion digit number if you need it.  It just complicates the math you have to do, but little subroutine can take care of that for you so you don't have to deal with it manually.
___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: Routines
« Reply #171 on: March 24, 2010, 02:52:12 pm »
Can we actually display these larger numbers at all, though? If so, then how? (Not that I really need to in short term, but it might be useful to know)
« Last Edit: March 24, 2010, 02:52:37 pm by DJ Omnimaga »

SirCmpwn

  • Guest
Re: Routines
« Reply #172 on: March 24, 2010, 02:53:15 pm »
With some thought, it is possible.  Unfortunately, I am low on thought right now.

Offline LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
Re: Routines
« Reply #173 on: March 24, 2010, 06:22:47 pm »
I would just recommend to write one or two subroutines which convert real number to string and vice versa
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

_player1537

  • Guest
Re: Routines
« Reply #174 on: March 24, 2010, 06:24:33 pm »
I can get to work on this, along with the other input routine. These will most likely be needed eventually anyways

SirCmpwn

  • Guest
Re: Routines
« Reply #175 on: March 24, 2010, 06:29:24 pm »
I can get to work on this, along with the other input routine. These will most likely be needed eventually anyways
Phew, now I don't have to do it ;)
I was planning on it later today.

_player1537

  • Guest
Re: Routines
« Reply #176 on: March 26, 2010, 10:02:46 pm »
I made a 16x16 sprite drawing routine, and a program to help make the sprites.  Here they are:
for the sprite making program, just use the arrow keys to move, and 2nd to toggle a pixel, then Clear to convert the sprite

Edit:The first sprite editor was not very optimized, this one is
Edit2:there were a few bugs that made it either quit or not draw the sprite correctly (order of operations messed it up), anyways heres the new "Dspaxe16" program
« Last Edit: March 27, 2010, 10:35:14 am by _player1537 »

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: Routines
« Reply #177 on: March 26, 2010, 10:22:36 pm »
nice :D should be useful for some people :D

SirCmpwn

  • Guest
Re: Routines
« Reply #178 on: March 26, 2010, 10:53:05 pm »
What's the size difference between unoptimized and optimized?

_player1537

  • Guest
Re: Routines
« Reply #179 on: March 26, 2010, 10:57:51 pm »
          Size
unoptimized:437
Optimized:427

the main optimization was speed, the first one had a bunch of "for(A,1+8*3)" etc in it, can't really test speed because two different calcs (83+ and 84+SE) but it should run faster.