Search found 1646 matches

by jj2007
Oct 20, 2020 19:08
Forum: General
Topic: ASM query
Replies: 14
Views: 204

Re: ASM query

MASM accepts inc n (and a decent assembler knows the size of n, so why ask for more information?)
by jj2007
Oct 20, 2020 13:59
Forum: General
Topic: ASM query
Replies: 14
Views: 204

Re: ASM query

But you didn't say with GAS So far I lived under the impression that this is FreeBasic's default assembler http://deltarho.org.uk/Downloads/wink.png . As to gcc, just add the size, i.e. asm mov dword ptr [num], eax . Gcc is a bit dumb, it doesn't know that a register like eax is always dword sized ...
by jj2007
Oct 20, 2020 12:31
Forum: General
Topic: ASM query
Replies: 14
Views: 204

Re: ASM query

Folks, I never post code that I haven't tested. It does compile with GAS.
by jj2007
Oct 20, 2020 11:13
Forum: General
Topic: ASM query
Replies: 14
Views: 204

Re: ASM query

Test it... Dim num as Ulongint asm mov eax, 1 asm mov [num+4], eax Print num, num/2^32 asm mov eax, 123 asm mov [num+4], eax Print num, num/2^32 sleep If you have OllyDbg as just-in-time debugger, inserting an asm int 3 somewhere is the best way to find out what's going on under the hood.
by jj2007
Oct 18, 2020 20:45
Forum: Windows
Topic: Simple tutorial to create first Windows applications
Replies: 7
Views: 569

Re: Simple tutorial to create first Windows applications

5.82 gives you ugly pre-XP look. Try to specify a manifest file in a resource file as follows: 32512 ICON "SomeFile.ico" 1 24 "XpManifest.xml" This is XpManifest.xml: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:s...
by jj2007
Oct 16, 2020 17:50
Forum: Libraries
Topic: ASpell dictionaries to work with FB Example
Replies: 4
Views: 196

Re: ASpell dictionaries to work with FB Example

Please go ahead! Where did you find the dll?
by jj2007
Oct 16, 2020 16:41
Forum: Libraries
Topic: ASpell dictionaries to work with FB Example
Replies: 4
Views: 196

Re: ASpell dictionaries to work with FB Example

Code: Select all

ld.exe: cannot find -laspell
Where is the dll? I've searched a lot on the web, out of curiosity, but it seems there are no binaries around.
by jj2007
Oct 14, 2020 22:57
Forum: General
Topic: I hate shell
Replies: 17
Views: 4924

Re: I hate shell

Same question. How do you know if the executed program/command returns an errorlevel? Something like this? It returns La$? in case of errors - easy to check. MsgBox 0, Launch$ ("cmd.exe /c time /t"), "The time:", MB_OK And what about shell commands that don't produce any...
by jj2007
Oct 14, 2020 6:34
Forum: General
Topic: Function String don't work if unicode BOM
Replies: 26
Views: 533

Re: Function String don't work if unicode BOM

Josep Roca wrote:

Code: Select all

#INCLUDE ONCE "Afx/AfxStr.inc"
print AfxStrRepeat(3, "текст ")
Yep, that works, great! Mysteries of FreeBasic ;-)
by jj2007
Oct 13, 2020 23:50
Forum: General
Topic: Function String don't work if unicode BOM
Replies: 26
Views: 533

Re: Function String don't work if unicode BOM

And WinFBX Print AfxStrRepeat(3, "текст ") will output текст текст текст Is something missing in the code? I get a bunch of error 14: Expected identifier, found 'CWSTR' If I add on top, as described at https://www.freebasic.net/forum/viewtopic.php?f=6&t=28296 ... #INCLUDE ONCE "A...
by jj2007
Oct 13, 2020 12:48
Forum: General
Topic: Function String don't work if unicode BOM
Replies: 26
Views: 533

Re: Function String don't work if unicode BOM

Sure? I would consider this more useful: Print "**", String$(9, " urgent *"), "*"

Code: Select all

** urgent * urgent * urgent * urgent * urgent * urgent * urgent * urgent * urgent **
by jj2007
Oct 13, 2020 11:25
Forum: General
Topic: Function String don't work if unicode BOM
Replies: 26
Views: 533

Re: Function String don't work if unicode BOM

Although I thought the ch_code should be ushort for wstring and ubyte for string, but they are both set at long. C++ type checking hell, but it works. Strange that Print WString( 5, WStr("Indeed")) doesn't produce a warning of the type "only the first char will be used". In cont...
by jj2007
Oct 12, 2020 23:42
Forum: General
Topic: Function String don't work if unicode BOM
Replies: 26
Views: 533

Re: Function String don't work if unicode BOM

You are not passing a utf-8 string to STRING(...). You pass an ANSI string that, ok, can be upgraded to a UTF-16 string, i.e. "x" (Ansi) becomes "x" (UTF-16). There is no chance that MultiByteToWideChar() chokes on something as simple as "x". And as demonstrated, other ...
by jj2007
Oct 12, 2020 19:38
Forum: General
Topic: multithread detection
Replies: 11
Views: 369

Re: multithread detection

Just in case the compiler has, at a certain moment, the complete source code somewhere in a buffer: on my trusty old Core i5, checking for the presence of the keyword 'ThreadCreate' in a two megabyte source takes typically less than 0.5 milliseconds (see Check a 2MB source for a keyword)

Go to advanced search