ASM forum for the English forums

Everything else that doesn't fall into one of the other PB categories.
gebe
User
User
Posts: 56
Joined: Thu Mar 22, 2007 9:39 pm
Location: South Africa

ASM forum for the English forums

Post 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
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post 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.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

In your current directory.
gebe
User
User
Posts: 56
Joined: Thu Mar 22, 2007 9:39 pm
Location: South Africa

Post 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
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post 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.)
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post 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).
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post 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.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Thanks, there was still a remaining deletefile() which shouldn't be here anymore.
Post Reply