FAQ  •  Register  •  Login

Optimiser level 3 bug found (*solved*)

<<

LCD

Posts: 596

Joined: Fri Feb 13, 2009 3:11 pm

Location: Vienna, Austria

Post Wed Nov 28, 2012 9:25 am

Optimiser level 3 bug found (*solved*)

Hi Boriel!
I just ran into a bug with this code:
  Code:
paper 7:ink 0:border 7:cls

Function code2level() as ubyte
   dim adr as uinteger
   dim count as ubyte
   adr=@buffer
   count=0
   do
      if not (peek(Uinteger,adr)-peek(Uinteger,@inpstring+3)+peek(Uinteger,adr+2)-peek(Uinteger,@inpstring+5)+peek(Uinteger,adr+4)-peek(Uinteger,@inpstring+7))
         goto passok
      Else
         count=count+1:adr=adr+6
      end if
   loop until count=32
   count=255
   passok:
   return count
end function

print code2level()

End
inpstring:
asm
   defb 1,1,56
   defm "Leveld"
end asm

buffer:
asm
   defm "Level1"
   defm "Level2"
   defm "Level3"
   defm "Level4"
   defm "Level5"
   defm "Level6"
   defm "Level7"
   defm "Level8"
   defm "Level9"
   defm "Level0"
   defm "Levela"
   defm "Levelb"
   defm "Levelc"
   defm "Leveld"
   defm "Levele"
   defm "Levelf"
   defm "Levelg"
   defm "Levelh"
   defm "Leveli"
   defm "Levelj"
   defm "Levelk"
   defm "Levell"
   defm "Levelm"
   defm "Leveln"
   defm "Levelo"
   defm "Levelp"
   defm "Levelq"
   defm "Levelr"
   defm "Levels"
   defm "Levelt"
   defm "Levelu"
   defm "Levelv"
end asm

Without Optimiser or at level 1 or 2 it displays the correct value (13), but with Optimiser level 3 it runs through all the strings aot finding the correct one, so the output is 255 which here means "code not found".
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Fri Dec 14, 2012 8:13 pm

Re: Optimiser level 3 bug found

I've been rather busy. :oops: Sorry.
I've fixed that bug in the latest version 1.3.0 s947, but now other code is suboptimal. :x So still needs some work, I guess.
<<

LCD

Posts: 596

Joined: Fri Feb 13, 2009 3:11 pm

Location: Vienna, Austria

Post Sat Dec 15, 2012 8:27 pm

Re: Optimiser level 3 bug found

boriel wrote:I've been rather busy. :oops: Sorry.
I've fixed that bug in the latest version 1.3.0 s947, but now other code is suboptimal. :x So still needs some work, I guess.

Thanks! Don't worry, I reduced my retro activity after my father died. Hope to get up soon. Will check the new version tomorrow.
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Mon Dec 17, 2012 2:30 pm

Re: Optimiser level 3 bug found

Oh, I'm very sorry to hear that :!: :(
My condolences in these sad moments.

Hope you get up and back here soon.
<<

LCD

Posts: 596

Joined: Fri Feb 13, 2009 3:11 pm

Location: Vienna, Austria

Post Mon Dec 17, 2012 9:24 pm

Re: Optimiser level 3 bug found

boriel wrote:Oh, I'm very sorry to hear that :!: :(
My condolences in these sad moments.

Hope you get up and back here soon.

Thanks. I hope this too...
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
<<

JBGV

Posts: 65

Joined: Wed Feb 16, 2011 6:12 am

Post Wed Dec 26, 2012 9:19 pm

Re: Optimiser level 3 bug found

I had not seen these posts, I'm sorry to read this .

My condolences LCD.
<<

LCD

Posts: 596

Joined: Fri Feb 13, 2009 3:11 pm

Location: Vienna, Austria

Post Thu Dec 27, 2012 7:53 am

Re: Optimiser level 3 bug found

JBGV wrote:I had not seen these posts, I'm sorry to read this .

My condolences LCD.

Thank you.
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Tue Feb 12, 2013 1:43 pm

Re: Optimiser level 3 bug found

BTW, is this bug fixed?
<<

LCD

Posts: 596

Joined: Fri Feb 13, 2009 3:11 pm

Location: Vienna, Austria

Post Tue Feb 12, 2013 5:10 pm

Re: Optimiser level 3 bug found

boriel wrote:BTW, is this bug fixed?

Oops, I forgot to answer: yes, thamks, it was fixed.
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!

Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO