Search found 2095 matches

by srvaldez
Nov 17, 2019 0:48
Forum: Beginners
Topic: Need speedup
Replies: 20
Views: 671

Re: Need speedup

if your program is doing a lot of floating-point divisions and square roots then reducing the fpu precision might give some speed increase, example of reducing the fpu precision to single precision 'place at top of your code dim as ushort oldcw, cwdouble=&h27F, cwsingle=&h7F asm fstcw word p...
by srvaldez
Nov 13, 2019 23:49
Forum: General
Topic: FB-1.07.1-gcc-6.4
Replies: 21
Views: 429

Re: FB-1.07.1-gcc-6.4

@deltarho[1859] if you change the two instances of Asm nop to Asm "nop" and change the compile command to includ e -asm att then you will be able to successfully compile your program, though you will still get the "warning: array subscript is below array bounds [-Warray-bounds]" ...
by srvaldez
Nov 12, 2019 21:53
Forum: General
Topic: FB-1.07.1-gcc-6.4
Replies: 21
Views: 429

Re: FB-1.07.1-gcc-6.4

gcc-5.2 and gcc-6.4 don't have issues compiling with optimization, as far as I know.
by srvaldez
Nov 12, 2019 17:42
Forum: General
Topic: FB-1.07.1-gcc-6.4
Replies: 21
Views: 429

Re: FB-1.07.1-gcc-6.4

yes, that works, however, optimization options seem to cause problems
try paul doe's compile options fbc -s console -dll -export -gen gcc -Wc -Ofast "blah-dll.bas"
granted that -s console is not needed to build a dll
by srvaldez
Nov 12, 2019 17:32
Forum: General
Topic: FB-1.07.1-gcc-6.4
Replies: 21
Views: 429

Re: FB-1.07.1-gcc-6.4

what's your compile command? (options)
by srvaldez
Nov 12, 2019 17:17
Forum: General
Topic: FB-1.07.1-gcc-6.4
Replies: 21
Views: 429

Re: FB-1.07.1-gcc-6.4

thank you MrSwiss
so basically all that was needed was Extern "windows"/End Extern?
by srvaldez
Nov 12, 2019 16:48
Forum: General
Topic: FB-1.07.1-gcc-6.4
Replies: 21
Views: 429

Re: FB-1.07.1-gcc-6.4

Hi MrSwiss
sometimes the simplest of examples fail to build a working 64-bit dll, have you tried paul doe's example? viewtopic.php?f=3&t=27966
by srvaldez
Nov 12, 2019 15:00
Forum: General
Topic: FB-1.07.1-gcc-6.4
Replies: 21
Views: 429

FB-1.07.1-gcc-6.4

from my tests, FB-gcc-6.4 is the latest gcc-toolchain that correctly builds DLL's, so here are the builds if you are interested
FreeBASIC-1.07.1-gcc640-win32.7z
FreeBASIC-1.07.1-gcc640-win64.7z
by srvaldez
Nov 11, 2019 22:35
Forum: General
Topic: Problem building shared library with Gcc 8
Replies: 3
Views: 160

Re: Problem building shared library with Gcc 8

hello paul doe
I just downloaded FreeBASIC-1.07.1-win64-gcc-8.1.0 and compiling your example gives the error you describe.

I had similar experiences before viewtopic.php?f=3&t=26973&p=251109&hilit=Warning%3A+.drectve#p251109
by srvaldez
Nov 07, 2019 0:48
Forum: General
Topic: PI : many digits try
Replies: 4
Views: 145

Re: PI : many digits try

hello bluatigro just for fun, I modified the code to calculate pi in base 2 to 16 pi in base 10 = 3.1415926535897932385 pi in base 16 = 3.243F6A8885A308D3132 pi in base 2 = 11.0010010000111111100 Declare Function find_pi(Byval n As Integer, Byval nbase As Integer) As String Print find_pi(20, 10) Pri...
by srvaldez
Nov 06, 2019 12:11
Forum: General
Topic: PI : many digits try
Replies: 4
Views: 145

Re: PI : many digits try

after fixing numerous mistakes here's your working code const as integer n = 100 sub array_mul( a() as integer , f as integer ) dim as integer c = 0 , p , h for p = n to 0 step -1 h = a( p ) * f + c c = h \ 10 a( p ) = h mod 10 next p end sub sub array_div( a() as integer , f as integer ) dim as int...
by srvaldez
Nov 06, 2019 11:04
Forum: General
Topic: PI : many digits try
Replies: 4
Views: 145

Re: PI : many digits try

@bluatigro
remove all byref from array arguments, also you can't have scalar and array variable of the same name, there are too many mistakes in your code to make it work
by srvaldez
Nov 03, 2019 15:49
Forum: General
Topic: Home-brewed encryption
Replies: 42
Views: 998

Re: Home-brewed encryption

actually, in 64-bit it's 2 times faster than the asm version but 32% slower in 32-bit
by srvaldez
Nov 03, 2019 15:17
Forum: General
Topic: Home-brewed encryption
Replies: 42
Views: 998

Re: Home-brewed encryption

thank you fxm :-)
by srvaldez
Nov 03, 2019 15:02
Forum: General
Topic: Home-brewed encryption
Replies: 42
Views: 998

Re: Home-brewed encryption

here's a FBfied version of your asm range function, sadly, much slower the reason I am so late in posting this is that the following union doesn't work union mt as ulongint uli as long l1, l2 end union apparently as long l1, l2 is the same as as long l1 as long l2 union eax_edx as ulongint eaxedx ty...

Go to advanced search