Search found 2269 matches
- Feb 17, 2022 21:28
- Forum: General
- Topic: Using a static library: linker problems
- Replies: 48
- Views: 3865
Re: Using a static library: linker problems
The calling convention you've implemented seems to be non-standard (STDCALL for variadic methods). Non-standard is an understatement - it's pretty exotic even for Assembly standards. In fact, in 180+ procedures of that library I've only used it once. More just for fun than out of a real need :D mov...
- Feb 17, 2022 21:23
- Forum: Community Discussion
- Topic: Bye Bye
- Replies: 41
- Views: 3572
- Feb 17, 2022 21:18
- Forum: General
- Topic: Fast Str() alternative
- Replies: 3
- Views: 411
Re: Fast Str() alternative
Thanks. Without the https://, apparently it gets interpreted as a relative path. Good to know.Munair wrote: ↑Feb 17, 2022 20:58 Removed the forum address from the link: https://jj2007.eu/Float2AscLib.zip
- Feb 17, 2022 21:16
- Forum: General
- Topic: when does FileFlush() return?
- Replies: 6
- Views: 604
Re: when does FileFlush() return?
you can generally expect the data to be physically written to disk Good question. I would expect the following to happen: - program writes to disk - data are now in disk-internal cache - oops, power failure! - disk has some condensators that allow to flush the cache automagically See https://www.qu...
- Feb 17, 2022 20:30
- Forum: General
- Topic: Fast Str() alternative
- Replies: 3
- Views: 411
Fast Str() alternative
Following discussions in two other threads, Using a static library: linker problems and Calling function does nothing but takes huge amount of time vs called function , I have posted an archive with two libs here . They can be used as follows: #inclib "MasmBasic" #inclib "Shell32"...
- Feb 17, 2022 19:44
- Forum: General
- Topic: Using a static library: linker problems
- Replies: 48
- Views: 3865
Re: Using a static library: linker problems
I'm not sure whether the Microsoft Linker really doesn't care or, instead implicitly loads the libraries. It can do so, because the MasmBasic library contains according linker directives for the Microsoft Linker, which the GNU Linker probably doesn't understand: Linker Directives ----------------- ...
- Feb 17, 2022 15:39
- Forum: Community Discussion
- Topic: Bye Bye
- Replies: 41
- Views: 3572
Re: Bye Bye
What FreeBasic definitely doesn't need is arrogant people wanting everything but the kitchen sink readily available without being willing to invest barely any time and resources themselves. With my almost 40 years of experience in BASIC programming ( including the latest one on using a library ), I...
- Feb 17, 2022 15:21
- Forum: General
- Topic: Using a static library: linker problems
- Replies: 48
- Views: 3865
Re: Using a static library: linker problems
Indeed you were just using the wrong calling convention. Try the code above and it will find the method in your library. There is just a missing reference to "StdOut@4", which is used by your library, but I don't know from which library this should be imported. If you add the missing libr...
- Feb 17, 2022 14:16
- Forum: General
- Topic: Using a static library: linker problems
- Replies: 48
- Views: 3865
Re: Using a static library: linker problems
You say "unused references" but the linker complains about "undefined". Apparently it cannot find the definitions that match the declared symbols? The linker should ignore symbols that aren't used in the function Float2Asc. Microsoft's link.exe can do that, and the FB doc says -...
- Feb 17, 2022 5:01
- Forum: General
- Topic: Using a static library: linker problems
- Replies: 48
- Views: 3865
Using a static library: linker problems
' OPT_Obj -Wl --allow-shlib-undefined 'Allow unresolved references in shared libaries #inclib "MasmBasic" Declare Sub Float2Asc lib "MasmBasic" alias "Float2Asc"(byval arg1 as any ptr, byval arg2 as long, byval arg3 as long) Float2Asc(@"%i", 16, 5) Print &quo...
- Feb 17, 2022 3:58
- Forum: General
- Topic: Calling function does nothing but takes huge amount of time vs called function
- Replies: 47
- Views: 3226
- Feb 16, 2022 21:42
- Forum: General
- Topic: Calling function does nothing but takes huge amount of time vs called function
- Replies: 47
- Views: 3226
Re: Calling function does nothing but takes huge amount of time vs called function
But why it spits out that 4.0069999999999997E+000 string for 4.007 I cannot tell, but it renders it useless. Nobody is perfect :D include \masm32\include\masm32rt.inc .data? buffer db 40 dup(?) .code start: cls invoke FloatToStr, FP8(4.007), offset buffer print offset buffer, 13, 10 invoke FloatToS...
- Feb 16, 2022 1:04
- Forum: General
- Topic: when does FileFlush() return?
- Replies: 6
- Views: 604
Re: when does FileFlush() return?
Good question. I would expect the following to happen:
- program writes to disk
- data are now in disk-internal cache
- oops, power failure!
- disk has some condensators that allow to flush the cache automagically
- Feb 14, 2022 11:05
- Forum: General
- Topic: Calling function does nothing but takes huge amount of time vs called function
- Replies: 47
- Views: 3226
Re: Calling function does nothing but takes huge amount of time vs called function
mixed language programming across different tool sets, maybe not so standard as you need to know both sides Thanks for looking into this. I made a MASM snippet using the absolute minimum - no other libraries involved, no Windows, no console printing, nothing. It works fine, as seen in the debugger....
- Feb 14, 2022 10:23
- Forum: General
- Topic: Calling function does nothing but takes huge amount of time vs called function
- Replies: 47
- Views: 3226
Re: Calling function does nothing but takes huge amount of time vs called function
UNDEF means it's not defined there, no? Right. However, it does appear in the second part of the dumpbin output (why 2 parts?) as "notype": Dump of file FloatToStr.lib File Type: LIBRARY COFF SYMBOL TABLE 000 00000000 DEBUG notype Filename | .file fptoa.asm 002 001220FC ABS notype Static ...