Page 1 of 1

ASM forum for the English forums

Posted: Fri Jun 01, 2007 7:35 pm
by gebe
Just joined the French forum...Just for the ASM forum

Searched and I already got after 15 minutes what I've been looking for here (During one week)

Just a suggsestion to add weight to some post I 've lost sight of.

Derrick I am still working on my speeds .

I have added RosASM to my "strings"


Cherrio

gebe
:D

Posted: Fri Jun 01, 2007 8:07 pm
by Trond
ASM forum for the English forums
I think the first step would be to somewhere document where on earth the /COMMENED switch puts the asm file in 4.10 beta 1.

Posted: Fri Jun 01, 2007 11:24 pm
by Fred
In your current directory.

Posted: Sat Jun 02, 2007 12:43 am
by gebe
My contribution,after (finally) :oops: "understanding"the 2 different ways of using
machine code.C type conversion ,using a buffer.


gebe :)

Code: Select all

]
;was not tested for speed
;only an exercise
Procedure StrL(l.l,*p)
!MOV eax,dword[p.v_l]
  ! PUSH edi;+4 for the push
  !  MOV edi,dword[p.p_p+4];the pointer value   
    ! MOV dl ,255     ;make end marker
     ! PUSH edx      ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
      !MOV ecx ,10   ;
! x0:
      !MOV edx ,0
       !DIV ecx       ; divide eax by 10
        !PUSH edx    ; save the rest <<<<<<<<<<<<<<<<<<<<<<< 
         !CMP eax ,0; result of division
          !JA x0     ; is eax 0 ? finished ?
!x2:
          !POP eax   ; start getting back the results of divisions>>>>>>>>>>>>
          !CMP al ,255   ; untill start/end marker found
          !JE x9
          !ADD al ,'0'
          !STOSB
          !JMP x2
! x9:
          !MOV al,0
          !STOSB    ; finished ZERO TERMINATING
   ! POP edi  ;   restore edi>>>>>>>>>>>>>>>>>>>>>>>>>  
EndProcedure

;ALLOCATION OF SPACE
st.s="00000000000000"
Debug st
b.l=19191919;number to convert
     
Strl(b,@st);or stp

Debug st
End

Posted: Sat Jun 02, 2007 9:16 am
by Trond
Fred wrote:In your current directory.
Ah, but every time I compile something pbcompiler.exe deletes PureBasic.asm from the compilers folder, which made me think it wasn't there. (Freak said everything should be written to the temp folder.)

Posted: Sat Jun 02, 2007 10:11 am
by Fred
If you don't use the /COMMENTED, it should be put in the temp folder, if not we have a problem (i will check).

Posted: Sat Jun 02, 2007 1:24 pm
by Trond
Fred wrote:If you don't use the /COMMENTED, it should be put in the temp folder, if not we have a problem (i will check).
If I cd to compilers and type pbcompiler myinput.pb /COMMENTED then the file PureBasic.asm is created in the compilers directory.
But if I then compile a file from the IDE then PureBasic.asm is no longer in the compilers directory afterwards. But the asm file from the IDE compilation is created in (and deleted from) the temp folder according to FileMon.

Edit: FileMon shows that pbcompiler simply deletes c:\program files\purebasic 4\compilers\PureBasic.asm on every compilation from the IDE.

Posted: Sat Jun 02, 2007 2:29 pm
by Fred
Thanks, there was still a remaining deletefile() which shouldn't be here anymore.