Search found 19 matches

by k6sti
Apr 03, 2023 20:06
Forum: General
Topic: Line style not working properly?
Replies: 4
Views: 874

Re: Line style not working properly?

The other problem with line style is that it is not phase-continuous over multiple calls. That is, it resets each call. So if you try to draw a curve using styled line segments, the curve looks funny.

Brian
by k6sti
Mar 15, 2022 11:03
Forum: General
Topic: Generating 686 Code
Replies: 5
Views: 584

Re: Generating 686 Code

Thanks for your help. I switched to gcc after rewriting my routines to better accommodate it. It has many options and flags you can invoke from the FB command line with -Wc. I'm using a number of them to optimize various floating point operations. I found this documentation helpful: https://gcc.gnu....
by k6sti
Mar 12, 2022 16:26
Forum: General
Topic: Generating 686 Code
Replies: 5
Views: 584

Re: Generating 686 Code

From Agner Fog's "Optimizing subroutines in assembly language": 16.12 FCOM + FSTSW AX (all processors) The FNSTSW instruction is very slow on all processors. Most processors have FCOMI instructions to avoid the slow FNSTSW. Using FCOMI instead of the common sequence FCOM / FNSTSW AX / SAHF...
by k6sti
Mar 12, 2022 14:42
Forum: General
Topic: Generating 686 Code
Replies: 5
Views: 584

Generating 686 Code

I want to generate 686 code, mainly to replace slow fnstsw instructions with the faster fcomi. I can do this with the -arch 686 option when compiling with gcc, but not with gas. I want to use gas because of some other aspects of the code it generates. I've tried the _Wa -march=i686 option, but I sti...
by k6sti
Jun 29, 2020 0:35
Forum: Sources, Examples, Tips and Tricks
Topic: Faster ^ and EXP
Replies: 0
Views: 1466

Faster ^ and EXP

These substitutes for the FreeBASIC ^ power function and EXP exponential function reduce execution time. They replace the FRNDINT and FSCALE instructions with faster equivalents. On a fourth-generation Intel processor, ^ took 60% as long and EXP 70% as long as the FreeBASIC functions. The code shoul...
by k6sti
Jun 24, 2020 21:55
Forum: General
Topic: Constant Precision
Replies: 2
Views: 709

Re: Constant Precision

That section is for variables, but I found the answer in the Literals section: "By default, floating point numbers that do not have either an exponent or a suffix are considered as a double precision floating point value, except in the -lang qb dialect, where numbers of 7 digits or fewer are co...
by k6sti
Jun 24, 2020 21:27
Forum: General
Topic: Constant Precision
Replies: 2
Views: 709

Constant Precision

If I set a# = 1.23 and print a#, I get 1.230000019073486. If I set a# = 1.23#, I get 1.23. Is this behavior intended? I expect the compiler to assign a double-precision variable the closest approximation to the value specified. Are values without a trailing # assumed to be single precision? I couldn...
by k6sti
Mar 23, 2019 18:55
Forum: Windows
Topic: Windows 10 Window Close
Replies: 12
Views: 7709

Re: Windows 10 Window Close

The reason the program detects window close is so it can write its state to a small binary file. When restarted, the program reads the file to restore the previous state. For now I've decided to just write the file any time the state changes. That's a kludge, but the overhead is negligible and it so...
by k6sti
Mar 23, 2019 17:36
Forum: Windows
Topic: Windows 10 Window Close
Replies: 12
Views: 7709

Re: Windows 10 Window Close

This is the routine that waits for a keystroke or mouse event. (The indenting doesn't display as written.) If I add code to print key$ with a 1-second delay so that I can see it, any key I press gets displayed. However, clicking on window close prints nothing and closes the window. I commented out e...
by k6sti
Mar 23, 2019 15:59
Forum: Windows
Topic: Windows 10 Window Close
Replies: 12
Views: 7709

Re: Windows 10 Window Close

INKEY$ returns nothing when I click on window close in Windows 10. I do not have a SCREEN statement because I do not need graphics mode. I tried adding SCREEN 0. It did not help.

Brian
by k6sti
Mar 22, 2019 23:43
Forum: Windows
Topic: Windows 10 Window Close
Replies: 12
Views: 7709

Windows 10 Window Close

My 32-bit console program detects the two-character window-close signal INKEY$ returns. It works in Windows XP but not Windows 10. In Windows 10, clicking on X closes the window without sending anything to INKEY$. The program uses QB mode. Is something special needed to make this work in Windows 10?...
by k6sti
Feb 20, 2019 14:36
Forum: Community Discussion
Topic: Building FreeBASIC 1.06 Release
Replies: 46
Views: 12056

Re: Building FreeBASIC 1.06 Release

Interesting that the online scan lists two more hits than mine did yesterday. No environment references to A:. Directory listing yielded this (mingworg version): Directory of c:\progra~1\freeba~1\bin\win32 02/20/2019 03:33 AM <DIR> . 02/20/2019 03:33 AM <DIR> .. 02/20/2019 03:33 AM 112,142 libgcc_s_...
by k6sti
Feb 20, 2019 12:41
Forum: Community Discussion
Topic: Building FreeBASIC 1.06 Release
Replies: 46
Views: 12056

Re: Building FreeBASIC 1.06 Release

I am using cmd.exe. The mingworg also complains if there is no floppy drive in A:. If I put one in the drive and enter fbc with no parameters, the floppy light comes on, the screen reverts to the desktop with no error message, and the options are listed at the command line as expected. I can continu...
by k6sti
Feb 20, 2019 11:48
Forum: Community Discussion
Topic: Building FreeBASIC 1.06 Release
Replies: 46
Views: 12056

Re: Building FreeBASIC 1.06 Release

I tried the .zip archive. The compiler will not run without a floppy disk in A:. Then I tried FreeBASIC-1.06.0-win32-mingworg.zip. Executing the compiler yielded an error message that libiconv-2.dll was not found. I am using WinXP Pro version 2002 Service Pack 3. Brian Edit - At the full-screen comm...
by k6sti
Feb 20, 2019 10:46
Forum: Community Discussion
Topic: Building FreeBASIC 1.06 Release
Replies: 46
Views: 12056

Re: Building FreeBASIC 1.06 Release

I installed FreeBASIC-1.06.0-win32.exe on my WinXP system. Avast reported that uninstall.exe had FileRepMalware. When I sent uninstall.exe to virustotal.com, AVG reported "FileRepMalware," McAfee-GW-Edition reported "BehavesLike.Win32.Ransom.lc," and SentinelOne reported "st...