Search found 901 matches

by SARG
Jul 22, 2019 23:00
Forum: Beginners
Topic: Why wrong length of array
Replies: 8
Views: 119

Re: Why wrong length of array

If "length of s is:" should show the number of words you need to add one to the ubound as it's zero based..

Code: Select all

print "length of s is: "; ubound(S)+1
by SARG
Jul 22, 2019 9:15
Forum: Documentation
Topic: Hello fxm :-) => for updating the ASM documentation page on wiki
Replies: 15
Views: 835

Re: Hello fxm :-) => for updating the ASM documentation page on wiki

@D.J.Peters ...I would post later for Linux later. :-( Sorry to be so late. I forgot my reply .... Windows ABI ----------- params : rcx,rdx,r8,r9 + xmm0 to xmm3 Space for these registers also reserved on the stack to store them at the beginning of proc. Important note : if the first arg is an integ...
by SARG
Jun 27, 2019 8:03
Forum: General
Topic: mingw_stdio example
Replies: 13
Views: 513

Re: mingw_stdio example

@SARG thanks a million for your fine detective work :-) One thanks was enough :-) a take it that if the return type were one of FB's built-in types it would work. Sure I tested this and it works fine. declare function sin2 cdecl alias "sin" (byval c as double) as double dim as double sdou...
by SARG
Jun 26, 2019 20:29
Forum: General
Topic: mingw_stdio example
Replies: 13
Views: 513

Re: mingw_stdio example

your declarations are very similar to my next to last post, tested ok both 32 and 64 bit Sorry I missed your post and caseih's one. sadly, the same approach won't work for functions like sinl, it works ok in 64-bit but not in 32-bit, apparently, there are some differences between linux cdecl and wi...
by SARG
Jun 25, 2019 21:03
Forum: General
Topic: mingw_stdio example
Replies: 13
Views: 513

Re: mingw_stdio example

Hi srvaldez, No need naked subs : just use declare with alias, simplier.... 32bit tested but maybe declares should be added for 64 bit. #include "crt/longdouble.bi" declare sub sprint_ cdecl Alias "__mingw_sprintf" (byval s As zstring ptr,byval frmt as zstring ptr,byval c as clon...
by SARG
Jun 25, 2019 10:37
Forum: Projects
Topic: FB debugger : 2.93 32/64 BIT ..... (Sept 5th, 2018)
Replies: 617
Views: 114690

Re: FB debugger : 2.93 32/64 BIT ..... (Sept 5th, 2018)

Hi Charles, Please the probably stupid questions but ... FIRST thank all of you for the the Free Basic language and the Free Basic Debugger !!! There is no stupid question ... You are welcome. Now, my problem - I wrote a small program with many loops that runs (up to some point I don't see and then ...
by SARG
Jun 08, 2019 8:52
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) :-)
Replies: 56
Views: 4711

Re: Gas64 (no more use of gcc, only gas) :-)

Hi all, New version : http://users.freebasic-portal.de/sarg/fbcgas64.zip Bugs fixed: - adding of 2 array elements (frisian) - crash when using naked procedures (cadd csub). In this case parameter names are not filled so issue to use them... (srvaldez) - and some other ones Changed: - optimizations f...
by SARG
Jun 02, 2019 16:12
Forum: General
Topic: x64 Win asm naked function return value?
Replies: 13
Views: 505

Re: x64 Win asm naked function return value?

Hi srvaldez,

If the returned value is a simple datatype :
- integer number --> rax
- float( single/double) --> xmm0

As far I understand in case of structure (udt) rax is not used. Maybe byref/byval involves a different behaviour.

Do you get a problem when not filling rax in your example ?
by SARG
May 28, 2019 14:06
Forum: General
Topic: x64 Win asm naked function return value?
Replies: 13
Views: 505

Re: x64 Win asm naked function return value?

Hi srvaldez, Checked, all is ok. However for this example it's better to use a sub with the result variable as parameter. It's nearly the same but this avoids the creation of a temporary variable and the copy. print __FB_BACKEND__ type bar as double d as long l as longint ld as zstring*19 sz end typ...
by SARG
May 28, 2019 0:16
Forum: General
Topic: x64 Win asm naked function return value?
Replies: 13
Views: 505

Re: x64 Win asm naked function return value?

Ok understood.

Have you seen my edit ?
by SARG
May 28, 2019 0:02
Forum: General
Topic: x64 Win asm naked function return value?
Replies: 13
Views: 505

Re: x64 Win asm naked function return value?

It should be safe. However I will check tomorrow (near 2h00 now in France...).
But there are only 4 fields in the type so writing in [rcx+32] seems not good.

By the way CDECL is not usefull.

edit

function foo naked () as bar
...

y=foo

are enough no need a parameter.
by SARG
May 27, 2019 23:09
Forum: General
Topic: x64 Win asm naked function return value?
Replies: 13
Views: 505

Re: x64 Win asm naked function return value?

Hi srvaldez, That's not completely exact. Rcx (hidden parameter) contains the address of a temporary variable (type as double_complex) which receives the values (your movsd) then they are moved to the final variable (result). Rax not really used. The extract below, from gas64, below shows in detail ...
by SARG
May 24, 2019 17:31
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) :-)
Replies: 56
Views: 4711

Re: Gas64 (no more use of gcc, only gas) :-)

Hi, New version : http://users.freebasic-portal.de/sarg/fbcgas64.zip The link in my previous post pointed to an older version, sorry. @srvaldez - "complex.bas" issue : fixed (just some forgotten lines...) @Xusinboy Bekchanov Compilation times without writing comments (but always generated)...
by SARG
May 19, 2019 16:49
Forum: Documentation
Topic: How using RTTI from FB built-in OBJECT to extract Typename and those of all Bases of an instance
Replies: 4
Views: 318

Re: How using RTTI from FB built-in OBJECT to extract Typename and those of all Bases of an instance

Hi fxm, Is the prefix "N" and the suffix "E" from namespace ? N for nested-name and E for ending the sequence. Extract from a precious doc I use for demangling variable or procedure names in FBdebugger : "Names of objects nested in namespaces or classes are identified as a d...
by SARG
May 14, 2019 23:44
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) :-)
Replies: 56
Views: 4711

Re: Gas64 (no more use of gcc, only gas) :-)

Hi, new version : http://users.freebasic-portal.de/sarg/fbcgas64.zip @frisian Sorry for my late reply, I wanted to fix most of issues. 1/ redim shared as byte issue : fixed (every pointer was byte sized instead integer sized...) 2/ close windows issue : fixed (some escape sequences not well handled)...

Go to advanced search