Calculator Community > Axe

MirageOs/Ion issue

(1/5) > >>

DJ Omnimaga:
Hey, I noticed something weird happening when compiling for MirageOs/Ion:

Sometimes, when exiting my tunnel game, the file size in Mirage will show up as 65535 bytes, as you'll notice in the screenshot below my source code


--- Code: ---:.DJTUNNEL Axe Parser Tunnel clone
:"vDJTUNNHS"→GDB1
:UnarchiveGDB1
:[80C0E0F0E0C08000→Pic1
:"AXE TUNNEL"→Str2
:"2010, by DJ Omnimaga"→Str3
:"SPEED:"→Str4
:0→D→P+1→S+1→Q→K
:5→J
:8→C+1→R
:29→I+1→A
:40→W→T
:Full
:DiagnosticOff
:ClrHome
:ClrDraw
:For(Z,9,21
:Line(0,Z,95,Z
:End
:Line(0,56,95,56
:StorePic
:ClrDraw
:For(Z,8,22
:Line(0,Z,95,Z
:End
:For(Z,56,63
:Line(0,Z,95,Z
:End
:DrawInv
:Fix 5
:Fix 1
:Text(20,12,Str2
:Fix 0
:Text(14,57,Str3
:Fix 3
:Text(5,35,Str4
:Repeat Z=54
:DS<(K,12)
:DispGraphr
:End
:DS<(J,11-(S*2))
:Pt-Change(I,35,Pic1)
:I+1→I
:If I=86
:29→I
:End
:End
:getKey→Z
:If Z=15
:1→S
:Goto GO
:End
:Z=3-(Z=2)+S→S
:If S=6
:5→S
:End
:!If S
:1→S
:End
:End
:ClrHome
:ClrDraw
:For(Z,10,50
:Line(0,Z,95,Z)
:End
:Repeat W=6 or getKey(15)
:P+S→P
:DS<(C,8)
:rand^2*2-1→D
:End
:R+D→R
:!If R
:1→R
:End
:If 62-W<R
:62-W→R
:End
:A-getKey(4)+getKey(1)→A
:Pt-Change(0,A,Pic1)
:Line(95,R,95,R+W)
:DS<(Q,S)
:DispGraph
:If pxl-Test(0,A) or pxl-Test(0,A+6)
:Goto GO
:End
:End
:Pt-Change(0,A,Pic1
:Horizontal(-
:DS<(T,99)
:W-1→W
:End
:End
:Lbl GO
:getKey
:Fix 4
:Fix 2
:ClrHome
:If P
:Output(0,0,"Score:",P►Dec
:End
:GetCalc(GDB1)→M
:If M
:If P>{S*2+M-2}r
:P→{S*2+M-2}r
:End
:Else
:GetCalc(GDB1,10
:GetCalc(GDB1)→M
:P→{S*2+M-2}r
:End
:Output(0,1,"SPEED HIGHSCORE
:For(S,1,5
:Output(0,S+1,S►Dec,"     ",{S*2+M-2}r►Dec
:End
:Output(0,0
--- End code ---

This happens in version 0.2.0 through 0.2.3 of Axe Parser (basically every version that has built in shell support)

Quigibo:
Is anyone else getting this error?

Could it be possible your high score code is leaking and overwriting the program size bytes?  Like I'm confused where that "S" is coming from when you first check if the high score file exists.  I never saw S initialized.  Also, could it be possible you're using a ram location used by MOS like L2?

DJ Omnimaga:
Mhmm not sure. As for S, do you mean I have to do 0->S at the beginning of my program? Cuz I actually did

0→D→P+1→S+1→Q→K

DJ Omnimaga:
Any clue? I seriously don't know what I am doing wrong.

I still don't know how MirageOs+Axe works with memory together, so it's impossible for me to figure out how to not overwrite anything MirageOs uses (besides L2) if any

ztrumpet:
I think it's a little know fact that Mirage uses AsmFlag1 for stuff with the size.  I think Axe is using this flag somewhere, and it's causing problems.  Quigibo, could this be the problem?

To clarify: It won't cause a crash, but it's irksome that somewhere Mirage and Axe don't get along. ;D

Navigation

[0] Message Index

[#] Next page

Go to full version