It is currently Mon Aug 26, 2019 8:17 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Float problem with PB 522, Tailbite 1.4.11 and Win7(x64)
PostPosted: Sat May 03, 2014 1:42 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Oct 11, 2008 9:07 pm
Posts: 416
Location: Germany, Berlin > member German forum
Hello,

i have a problem and whant to know is it a bug or make i something wrong ?!?

if i use the following code with pb511(x86 and x64) it works.
If i use the following code with pb522(x86) it works too, but if i use the code in pb522(x64) i got only "NaN" back

Greetings Michael

lib code
Code:
ProcedureDLL.f test_LimitTo360(angle.f) ; Limitiert einen Winkel auf -359,999 zu 359,999 Grad
 
  While angle > 360
      angle - 360
  Wend
 
   While angle < - 360
      angle + 360;
  Wend
 
  var.d = angle
 
  ProcedureReturn angle

EndProcedure


testfile
Code:
For n = 200 To 1000
     Debug test_LimitTo360(n)
Next

_________________
Working on - MP3D Library -


Top
 Profile  
Reply with quote  
 Post subject: Re: Float problem with PB 522, Tailbite 1.4.11 and Win7(x64)
PostPosted: Sat May 03, 2014 2:17 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Oct 11, 2008 9:07 pm
Posts: 416
Location: Germany, Berlin > member German forum
Hi,

i have checked the differenz between

PB511x64 and beetween PB522x64

at the end of the Procedure are two commands and make the problem. If you delete the lines the command works

Greetings Michael

Code:
; EndProcedure
FLDZ
_EndProcedure1:
ADD    rsp,48
;FSTP   dword [rsp-8] <- make the Problem
;MOVSS  xmm0,[rsp-8] <- make the Problem
POP    r15
RET


For now i had mada a dirty trick. I use tailbit, then i use this program for delete the lines
in the asm file in the folder
"C:\Users\Myname\Documents\TailBite Library Sources\My_Library\Functions\"
"C:\Users\Myname\Documents\TailBite Library Sources\My_Library\Functions\Shared\"

The i start the "My_Librarybuild.bat" batch and the compiled lib works

Code:
;
; ------------------------------------------------------------
;
;   PureBasic - FileSystem example file
;
;    (c) 2001 - Fantaisie Software
;
; ------------------------------------------------------------
;

If OpenWindow(0, 100, 200, 590, 200, "PureBasic - FileSystem Example")

  StringGadget  (0,  10, 10, 202, 24, GetHomeDirectory())
  ButtonGadget  (1, 220, 10, 60 , 24, "List")
  ListViewGadget(2,  10, 40, 570, 150)

  Repeat
    Event = WaitWindowEvent()

    If Event = #PB_Event_Gadget
      If EventGadget() = 1 ; Read

        ClearGadgetItems(2)  ; Clear all the items found in the ListView

        If ExamineDirectory(0, GetGadgetText(0), "*.asm")

          While NextDirectoryEntry(0)

            FileName$ = GetGadgetText(0)+DirectoryEntryName(0)
            If DirectoryEntryType(0) = #PB_DirectoryEntry_Directory
              FileName$ = "[DIR] "+FileName$
            Else 
             
              AddGadgetItem(2, -1, FileName$)
             
             
              If OpenFile(0,FileName$)    ; öffnet eine existierende Datei oder erstellt eine, wenn sie noch nicht existiert
                 While Eof(0) = 0           ; sich wiederholende Schleife bis das Ende der Datei ("end of file") erreicht ist
                    search$ = ReadString(0)      ; Zeile für Zeile im Debugger-Fenster anzeigen
                    If  FindString(search$,"FSTP   dword [rsp-8]")
                      FileSeek(0, Loc(0)-Len(search$)-2)
                      WriteString(0,";")
                    EndIf
                    If  FindString(search$,"MOVSS  xmm0,[rsp-8]")
                      FileSeek(0, Loc(0)-Len(search$)-2)
                      WriteString(0,";")
                    EndIf
                  Wend

              EndIf
             
            EndIf
           
          Wend
         
        Else
          MessageRequester("Error","Can't examine this directory: "+GetGadgetText(0),0)
        EndIf

      EndIf
    EndIf

  Until Event = #PB_Event_CloseWindow

EndIf

End

_________________
Working on - MP3D Library -


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye