Search found 78 matches

by Vitor_Boss®
Tue Aug 28, 2012 4:50 am
Forum: General Discussion
Topic: Optimize code size
Replies: 41
Views: 10167

Re: Optimize code size

Thorium wrote:Check out the Rep and Scan instructions, they should speed it up more.
Or use 128bit SSE registers for the compare.
Updated with 64bit MMX instructions for a fastest results, all memory use a bus 64bits wide right?
by Vitor_Boss®
Sun Aug 19, 2012 5:17 am
Forum: General Discussion
Topic: Optimize code size
Replies: 41
Views: 10167

Re: Optimize code size

Thank you for all codes and explanation about ASM coding. I tried optimize memory comparison procedure and got this
Procedure CmpMem(*Source, *Test, Size)
push edi
push esi
mov eax, [esp+14h] ; Size
mov esi, [esp+10h] ; *Test2
mov edi, [esp+0Ch] ; *Source
dec eax
cmp eax, 3
jl loc_Byte_cmp_init ...
by Vitor_Boss®
Sat Jun 30, 2012 5:51 am
Forum: General Discussion
Topic: Optimize code size
Replies: 41
Views: 10167

Optimize code size

First of all I wish to tanks for this greatest compiler.
I got started on assembly language, I'm studying some codes, for a test I've copy a code to compare memory bytes and I saw size difference of compiled code, so I'll show the source and compiled one:
http://img23.imageshack.us/img23/4076 ...
by Vitor_Boss®
Sun Jan 29, 2012 1:08 am
Forum: Coding Questions
Topic: Website Login
Replies: 4
Views: 1352

Re: Website Login

Sorry about that, I don't know expressions in English. What I mean is "I had modify your code to improve the login page".

Thank you very much. And I'm not a JS programmer too.
by Vitor_Boss®
Sun Jan 29, 2012 12:44 am
Forum: Coding Questions
Topic: Website Login
Replies: 4
Views: 1352

Re: Website Login

Thank you, that is a perfect start. I had modify your function to improve your code.

Procedure WebGadget_SetFieldText (nGadget, sFieldName.s, sValue.s)
Protected sScript.s
;sScript = "document." +sForm + "." + sFieldName + ".value = " + sValue + ";"

sScript = "var elements = document ...
by Vitor_Boss®
Sat Jan 14, 2012 3:32 pm
Forum: Coding Questions
Topic: Website Login
Replies: 4
Views: 1352

Website Login

I'm building a kind of a auto-cliker program and didn't found any working code. Can someone help or show me where find this?

Thank you in advance.
by Vitor_Boss®
Sat Jan 14, 2012 3:08 pm
Forum: Coding Questions
Topic: Read text file is very slow
Replies: 12
Views: 3444

Re: Read text file is very slow

In my application the ReadData() is 3-5 times faster than ReadText().

For this kind of application I use 2 procedures, one to get the text file and another to split a delimiter with unlimited size.

Seems the author of the thread speak portuguese, I have some code here if you want.
by Vitor_Boss®
Fri May 20, 2011 8:20 pm
Forum: Tricks 'n' Tips
Topic: Edit & RichEdit Controls for experiments[Windows]
Replies: 9
Views: 4169

Re: Edit & RichEdit Controls for experiments[Windows]

Working example:

Enumeration
#Window_0
EndEnumeration
Enumeration
#Button_0
#Button_1
#Button_2
#String_0
#Editor_0
EndEnumeration
Procedure Open_Window_0()
If OpenWindow(#Window_0, 371, 30, 474, 263, "New window ( 0 )", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar ...
by Vitor_Boss®
Fri May 20, 2011 8:02 pm
Forum: Feature Requests and Wishlists
Topic: PluckString command to extract string from another
Replies: 21
Views: 5313

Re: PluckString command to extract string from another

Hi, if I understood you need split an string, I wrote a code to do that returning result as ARRAY. Enjoy

Procedure Split(Array Result.s(1), Expression.s, Delimiter.s, Limit.l=-1)
Protected.i i, ii, C
Protected.l Length, Size, Position
ii = CountString(Expression, Delimiter)
If ii=0
ReDim ...
by Vitor_Boss®
Tue May 10, 2011 10:03 pm
Forum: Tricks 'n' Tips
Topic: Edit & RichEdit Controls for experiments[Windows]
Replies: 9
Views: 4169

Re: Edit & RichEdit Controls for experiments[Windows]

Hi guys, after many tries I've make it work.

This code add a text to editor gadget with color, size and format.
Procedure.s IIFs(Expression,TruePart$,FalsePart$)
If is(Expression) >= #True
ProcedureReturn TruePart$
EndIf
ProcedureReturn FalsePart$
EndProcedure
Procedure Split(Array Result.s(1 ...
by Vitor_Boss®
Tue Feb 15, 2011 5:32 pm
Forum: Linux
Topic: Running PureBasic Apps on Embedded Single Board Computers
Replies: 22
Views: 11094

Re: Running PureBasic Apps on Embedded Single Board Computer

There is an ARM C/C++ compiler called IAR.

http://www.iar.com/website1/1.0.1.0/68/1/

I've started C coding on it to write SonyEricsson Patches and ELFs, I don't know how write a Windows application using it, but I believe it is possible.
by Vitor_Boss®
Wed Feb 09, 2011 6:36 pm
Forum: Coding Questions
Topic: RightString code working for Unicode and ASCII?
Replies: 20
Views: 3439

Re: RightString code working for Unicode and ASCII?

Worked for me on both mode this way:
Procedure.s GetRightMost(s.s)
Protected n
n=Len(s)-1
If n>=0
If PeekC(@s+n<<#PB_Compiler_Unicode)='\'
s=Left(s,n)
EndIf

While n > 0
n-1
If PeekC(@s+n) = '\'
ProcedureReturn Mid(s, n+2)
EndIf
Wend
EndIf
ProcedureReturn s
EndProcedure

Debug ...
by Vitor_Boss®
Wed Feb 09, 2011 6:24 pm
Forum: Coding Questions
Topic: ascii art
Replies: 7
Views: 1955

Re: ascii art

You can change the codepage to use others ASCII characters.

Look: http://www.science.co.il/language/local ... s=codepage Click on CodePage number to see.
by Vitor_Boss®
Tue Feb 08, 2011 6:42 pm
Forum: Coding Questions
Topic: Download with progressbar
Replies: 13
Views: 2680

Re: Download with progressbar

effis wrote:its not working
connection timeout
Verify your Firewall.

Here it Work. Look:
Image
by Vitor_Boss®
Tue Feb 08, 2011 3:37 pm
Forum: Coding Questions
Topic: Download with progressbar
Replies: 13
Views: 2680

Re: Download with progressbar

Here it is working fine.
complete code:
Enumeration 1
#Window_Main
EndEnumeration

Enumeration 1
#Gadget_Main_Text
#Gadget_Main_Progress
EndEnumeration

InitNetwork()

Procedure.s ReceiveHTTPMemory(URL.s, BufferSize = 4096, Timeout = 5000)
;====================== ReceiveHTTPMemory ...