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

0 Members and 3 Guests are viewing this topic.

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 #60 on: February 26, 2011, 03:18:21 pm »
I do not know how to do that in Axe... but for the number converter, how large are the numbers? I am working on a converter right now...

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 #61 on: February 26, 2011, 03:26:09 pm »
V[1,8] X[0,94] Y[0,62] (interval notation)
I still need the ability not to scribble over anything.
« Last Edit: February 26, 2011, 03:29:44 pm 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 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 #62 on: February 26, 2011, 03:31:57 pm »
Okay, so the best idea I have is to store the number as V/100+X/10000+Y/1000000 and I can come up with a code for ya :D

And how do you want the output?

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 #63 on: February 26, 2011, 03:37:16 pm »
I'll get started on it. Does anyone know how to display the back buffer instead of the...front? buffer?
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 #64 on: February 26, 2011, 03:40:07 pm »
L3→DispGraph




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 #65 on: February 26, 2011, 04:49:59 pm »
Remind me what L3 is in Axe? That is a right arrow, correct? It just shows up as a box on my screen. And will that overwrite the front? buffer?
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 #66 on: February 26, 2011, 05:10:11 pm »
Okay, I had to go do some real life stuff, but I am back... Does anybody know how to return the pointer of a floating point number in HL or some other register (in Axe)? I have a code that right now takes Ans and can convert the number (stored to HL for Axe).

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 #67 on: February 26, 2011, 05:32:47 pm »
Remind me what L3 is in Axe? That is a right arrow, correct? It just shows up as a box on my screen. And will that overwrite the front? buffer?

L3 is the back-buffer, and yes, that's a store arrow. L3→DispGraph is basically the same as just DispGraph except that it uses the graph buffer, so it won't affect any data at all. (In fact, L6→DispGraph is exactly the same as DispGraph.)
« Last Edit: February 26, 2011, 05:33:22 pm by Deep Thought »




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 #68 on: February 26, 2011, 05:41:32 pm »
Okay, so apparently this should work (where A is the list element):
Code: [Select]
A*9+GetCalc(<<ListName>>)
Asm(2323E5
0      ;This tells which 2 digit pair to read. V=0, X=1, Y=2
Asm(D1194EAF060407CB013002C60A10F74F7EE60F8126006F

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 #69 on: February 26, 2011, 07:15:00 pm »
What's the Asm for?
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 #70 on: February 26, 2011, 08:05:13 pm »
The Asm( inserts pure hex assembly into the code. The hex happens to be what converts the data :D

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 #71 on: February 26, 2011, 08:17:14 pm »
That's not what I was asking....What is the machine code doing?
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 #72 on: February 26, 2011, 08:21:59 pm »
Oh, the code grabs a pair of numbers out of a floating point number and converts them from decimal to hex and stores it to HL (Ans in Axe). That was why I suggested you store the numbers that way :D

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: What am I doing wrong here?
« Reply #73 on: February 26, 2011, 08:44:28 pm »
Freyaday, here is a solution which doesn't use inline assembly. I also added comments which should hopefully make it a little bit easier to understand.

Code: [Select]
.., INITIALIZATION ,..
[015D]"M"→Str0L
GetCalc(Str0L)→L


.Example call to get the V value from the Nth list element:
Nsub(V)



.., SUBROUTINES ,..

.Get the V value from the specified list element
Lbl LV
  .Calculate offset in list
  *9
  .Goto byte retrieval function
  Goto LB
.Return

.Get the X value from the specified list element
Lbl LX
  .Calculate offset in list
  *9+1
  .Goto byte retrieval function
  Goto LB
.Return

.Get the Y value from the specified list element
Lbl LV
  .Calculate offset in list
  *9+2
.Return

.Get a byte from the list element and convert from BCD to hex
Lbl LB
  .Get byte from list
  {+L+2}→r₆
  .Convert high nibble from base 10 to base 16
  *16/256*10
  .Add low nibble
  +(r₆ and b00001111)
Return


Each list element should contain data such that the V element is multiplied by 10N, the X element is multiplied by 10N-2, and the Y element is multiplied by 10N-4. For instance, you could format data like V*10000+X*100+Y.

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 #74 on: February 27, 2011, 01:56:05 am »
My current method looks something like this (P is the start of the list)
for(Q,1,{P-2}
nib{Q*9+4->V
10*nib{Q*9+5}+nib{Q*9+6->X
10*nib{Q*9+7}+nib{Q*9+8->Y
...snip...
DispGraph
End
UnDirty GraphScreen machine code

Edit:
I just realized something: I don't need a dynamic AppVar. I just use Axe's GDB0 and keep track of how long it's getting, then create the AppVar at the very end.
*Sigh.*
Gloves.
« Last Edit: February 27, 2011, 02:32:56 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!