Author Topic: Need moar variables...  (Read 13417 times)

0 Members and 1 Guest are viewing this topic.

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: Need moar variables...
« Reply #15 on: October 18, 2010, 06:03:43 pm »
It means that if you unarchive/archive in Axe during the running of your program, the data in L4 will no longer be there. :)

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Need moar variables...
« Reply #16 on: October 18, 2010, 07:08:37 pm »
Oh, and yunhua98, use 2-byte storage for most uses. It's one byte less than one-byte vars (weird, I know, but that's just how it works).




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: Need moar variables...
« Reply #17 on: October 18, 2010, 08:44:04 pm »
It means that if you unarchive/archive in Axe during the running of your program, the data in L4 will no longer be there. :)
Ah ok, good to know. I was worried that weird crap could happen during archving/unarchving

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Need moar variables...
« Reply #18 on: October 21, 2010, 03:53:43 pm »
Oh, and yunhua98, use 2-byte storage for most uses. It's one byte less than one-byte vars (weird, I know, but that's just how it works).
...wait really? I never knew that :x

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Need moar variables...
« Reply #19 on: October 21, 2010, 04:30:06 pm »
Oh, and yunhua98, use 2-byte storage for most uses. It's one byte less than one-byte vars (weird, I know, but that's just how it works).

Waitwhat?  Two byte storage is one byte *less* than one byte? ???

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Need moar variables...
« Reply #20 on: October 21, 2010, 04:52:40 pm »
Yeah, it's weird, but I think I know why.
Code: (Axe) [Select]
1→{GDB0}r


is one byte less than

Code: (Axe) [Select]
1→{GDB0}


because in Axe, numbers are treated as two-byte numbers for all operations (because it's all stored in HL, which is a two-byte register). So when Axe sees that 1, it loads 0001h to HL. Then when you store it to a one-byte space, it has to first load L (the single-byte portion of HL) to A (which is like HL for one-byte numbers), then stores it from A. On the other hand, if you're storing to a two-byte space, it just stores HL straight there.

EDIT: Of course, if Axe 2.0 (or whatever that was called) uses one-byte operations, it won't be this way :)
« Last Edit: October 21, 2010, 04:54:13 pm by Deep Thought »




Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Need moar variables...
« Reply #21 on: October 21, 2010, 06:45:29 pm »
Ooooooh gotcha i didn't know you meant memory in code, i thought you meant 2 bytes numbers used 1 less byte for storage than 1 byte numbers ;D

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Need moar variables...
« Reply #22 on: October 21, 2010, 07:39:59 pm »
No, TI's code isn't that bad XD




Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Need moar variables...
« Reply #23 on: October 21, 2010, 07:45:59 pm »
At least not the RAM addressing part of their code...
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ