Author Topic: What am I doing wrong here?  (Read 25553 times)

0 Members and 1 Guest are viewing this topic.

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: What am I doing wrong here?
« Reply #30 on: February 25, 2011, 10:14:56 pm »
But I need to read the nibbles and I can't figure out which ones to read. That, and I somehow created an infinite for loop.

What nibbles do you need to read?




Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: What am I doing wrong here?
« Reply #31 on: February 25, 2011, 11:58:07 pm »
The way I understand it, each list element is like so: 00 82 VX XY Y0 00 00 00 00 where V is the instruction number and XX YY are 2 digit coordinates. But Axe's been telling me otherwise.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

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: What am I doing wrong here?
« Reply #32 on: February 26, 2011, 12:07:39 am »
If I understand what you're saying correctly, then you appear to have a slight misconception. First of all, let's go over number systems. Hex is basically a compact way of representing binary. Each hex digit is equivalent to 4 bits and so on. That means that each 8 bit long byte is composed of two hex digits, which you clearly understand. Now, a nibble is a four bits or half of a byte. When things are stored on the calculator, they're stored in bytes. This means that you have a series of hex digits like 01 23 45 67 89 AB CD EF in continuous addresses. When you extract a nibble from RAM, you're actually extracting an entire byte and simply masking it off. Because of how Axe addresses nibbles, to extract the second nibble of byte 3, you'd have to double the pointer to address 3 and add 1 (the first nibble would simply omit the addition). This addressing is probably where your problem is.

Also, just so you know, nibbles are slower and more difficult to work with. Their only advantage is that they take up less space.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂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: What am I doing wrong here?
« Reply #33 on: February 26, 2011, 12:09:10 am »
List elements are floats not nibble.  You read them with float{<pointer>} to get their numeric value if they are integers between 0 and 65536.  Otherwise, you would have to parse them some other way.
___Axe_Parser___
Today the calculator, tomorrow the world!

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: What am I doing wrong here?
« Reply #34 on: February 26, 2011, 12:10:02 am »
Wait, I thought he was talking about Axe "lists", not the OS list arrays.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: What am I doing wrong here?
« Reply #35 on: February 26, 2011, 12:29:26 am »
 Nooo.... I've been talkin' about the list created by my BASIC program Macro, LM...what have you been talking about?
« Last Edit: February 26, 2011, 12:33:18 am by Freyaday »
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

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: What am I doing wrong here?
« Reply #36 on: February 26, 2011, 12:31:01 am »
Er, butterflies. You *are* using butterflies to program, right?
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: What am I doing wrong here?
« Reply #37 on: February 26, 2011, 12:38:26 am »
I've been using farfalle, Italian butterflies. You probably know them as bowtie pasta. Should I have been using fiori instead?
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

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: What am I doing wrong here?
« Reply #38 on: February 26, 2011, 04:12:52 am »
I'm lost about what is the discussion about now. O.O

To come back on-topic, did you have any luck Freyday with your program?
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

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: What am I doing wrong here?
« Reply #39 on: February 26, 2011, 09:30:09 am »
The way I understand it, each list element is like so: 00 82 VX XY Y0 00 00 00 00 where V is the instruction number and XX YY are 2 digit coordinates. But Axe's been telling me otherwise.

Nope, each list element is a floating point number, as I said. The first byte tells you if it's positive or negative and whether it's real or complex; the second byte is the exponentiation; and the rest of the bytes are the number itself, truncated to 14 digits where each digit takes up a nibble in BCD (binary-coded decimal).

From what you're asking it seems like you're trying to make your own routine to read the numbers, but Axe takes care of that with the float{ command.




Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: What am I doing wrong here?
« Reply #40 on: February 26, 2011, 12:23:19 pm »
Well, I got it to recognize that the list M exists, but because the Axe only allows integers and the list contains nonintegers, I can't use the float{ command. That, and the last time I tried running the program, it produced absolute garbage (not the album, unfortunately; that would have been sweet) and was still going half an hour later.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: What am I doing wrong here?
« Reply #41 on: February 26, 2011, 12:30:02 pm »
Wait, so what exactly are you trying to do? I have worked with FP numbers in assembly for various things.

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: What am I doing wrong here?
« Reply #42 on: February 26, 2011, 01:10:57 pm »
Well, I got it to recognize that the list M exists, but because the Axe only allows integers and the list contains nonintegers, I can't use the float{ command. That, and the last time I tried running the program, it produced absolute garbage (not the album, unfortunately; that would have been sweet) and was still going half an hour later.

Why can't you use float{?




Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: What am I doing wrong here?
« Reply #43 on: February 26, 2011, 01:37:07 pm »
I can't use float{ because the numbers have fractional parts and multiplying the list to remove the fparts would put the list elements over 2^16 (to the power, not modulo)
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

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: What am I doing wrong here?
« Reply #44 on: February 26, 2011, 01:46:12 pm »
I can't use float{ because the numbers have fractional parts and multiplying the list to remove the fparts would put the list elements over 2^16 (to the power, not modulo)

float{ gets only the significand (non-fractional part), no matter what power it's taken to (as long as it fits).

If you need the mantissa, you'll have to write your own routine :-\ Remember how FP numbers are stored.
« Last Edit: February 26, 2011, 01:47:01 pm by Deep Thought »