Search found 3447 matches

by MichaelW
Feb 28, 2016 14:13
Forum: General
Topic: Timeslice for cpu
Replies: 23
Views: 2902

Re: Timeslice for cpu

Michael, I agree that the cpu would not be the problem ,unless it has a need to have cpu cycles yielded to it. I don't seem to be able to get an answer on that. Under Windows, and running on a multicore processor, if you max out your process priority, so no other (user) process will be able to pree...
by MichaelW
Feb 26, 2016 1:49
Forum: General
Topic: Timeslice for cpu
Replies: 23
Views: 2902

Re: Timeslice for cpu

I have doubts that the CPU is the problem, because it's much, much faster than your I/O board.
by MichaelW
Feb 16, 2016 23:50
Forum: General
Topic: Entering special characters via keyboard?
Replies: 14
Views: 2093

Re: Entering special characters via keyboard?

For example, the FB graphics window (Screen[Res]) on Windows takes characters in the system codepage and then explicitly converts them to CP437 (the DOS/OEM codepage...) Unless this detail has changed, the character pixel patterns used in the graphics modes were captured from a VGA BIOS, that I thi...
by MichaelW
Feb 14, 2016 21:30
Forum: Windows
Topic: UNICODE tooltips won't work
Replies: 19
Views: 5729

Re: UNICODE tooltips won't work

_WIN32_WINNT >= Ox0501 specifies Windows XP or later, so considering how few people are running pre-XP systems the last member should probably be included in the size by default.
by MichaelW
Jan 04, 2016 23:20
Forum: General
Topic: 32 bit vs 64 bit vs variable size
Replies: 5
Views: 778

Re: 32 bit vs 64 bit vs variable size

If a variable is stored on the stack, whether because it's a local variable allocated from the stack, or it's passed on the stack as a procedure parameter, it's going to occupy 4 or 8 bytes regardless.
by MichaelW
Dec 07, 2015 20:38
Forum: General
Topic: CONDSIGNAL example
Replies: 14
Views: 1459

Re: CONDSIGNAL example

I think under Windows CondWait and related functions are based on the Windows Wait Functions, so perhaps the Microsoft descriptions may make more sense.
by MichaelW
Nov 24, 2015 23:13
Forum: Windows
Topic: ASCII 0 to 256 EditControl
Replies: 22
Views: 4441

Re: ASCII 0 to 256 EditControl

The FreeBASIC fonts include the entire character set, and are the VGA pattern. I'm not sure what your display requirements are, but you could render your characters to an appropriate image buffer (ImageCreate), BSAVE the buffer to a bitmap, then display the bitmap in a static control. Forcing the us...
by MichaelW
Nov 18, 2015 16:06
Forum: General
Topic: How to retrieve background color in 32 bits?
Replies: 9
Views: 1822

Re: How to retrieve background color in 32 bits?

Looking at the 1.04.0 source, in fb_gfx_private.h, the FB_GFXCTX (fb_gfx context) structure stores the foreground and background colors as separate 32-bit unsigned integers: typedef struct FB_GFXCTX { int id; int work_page; unsigned char **line; int max_h; int target_bpp; int target_pitch; void *las...
by MichaelW
Nov 18, 2015 2:24
Forum: Windows
Topic: ASCII 0 to 256 EditControl
Replies: 22
Views: 4441

Re: ASCII 0 to 256 EditControl

After several hours of trying, under Windows 8.1, I can't find any reasonable way to control the active code page, where reasonable means without modifying the registry, and the default (1252) does not include the original characters > 127. And setting the typeface to "fixedsys", "luc...
by MichaelW
Nov 18, 2015 0:00
Forum: Windows
Topic: Set NumLock
Replies: 1
Views: 1738

Set NumLock

#include "windows.bi" dim ki(0 to 1) as INPUT_ if GetKeyState(VK_NUMLOCK) = 0 then ki(0).type = INPUT_KEYBOARD ki(0).ki.wVk = VK_NUMLOCK ki(0).ki.dwFlags = 0 ki(1).type = INPUT_KEYBOARD ki(1).ki.wVk = VK_NUMLOCK ki(1).ki.dwFlags = KEYEVENTF_KEYUP SendInput( 2, @ki(0), sizeof(ki) ) end if ...
by MichaelW
Nov 17, 2015 22:55
Forum: DOS
Topic: version 1.04 DOS compile error
Replies: 6
Views: 4174

Re: version 1.04 DOS compile error

You should expect problems compiling a source file anywhere in Program Files or Program Files (x86) because the directories are write protected. Your source files should be in a directory where you have write permission, normally an appropriate subdirectory of Users.
by MichaelW
Nov 14, 2015 10:51
Forum: General
Topic: Round a number function problem
Replies: 15
Views: 2401

Re: Round a number function problem

fxm wrote:Same result with the FB keyword CINT
...
In fact the rounding depends on program context!
Yes, that is the result I get, but why would the result vary with the context?
by MichaelW
Nov 14, 2015 10:37
Forum: General
Topic: Round a number function problem
Replies: 15
Views: 2401

Re: Round a number function problem

I would have guessed that CINT uses the CRT, but apparently not. #include "crt.bi" dim as single a1(0 to 20) = {-3.0,-2.7,-2.4,-2.1,-1.8,-1.5,-1.2,-0.9,-0.6, _ -0.3, 0.0,+0.3,+0.6,+0.9,+1.2,+1.5,+1.8,+2.1, _ +2.4,+2.7,+3.0 } dim as double a2(0 to 20) = {-3.0,-2.7,-2.4,-2.1,-1.8,-1.5,-1.2,-...
by MichaelW
Nov 12, 2015 5:30
Forum: Documentation
Topic: Calling conventions, x86-64
Replies: 1
Views: 1211

Re: Calling conventions, x86-64

Although I cannot find the article ATM, from what I recall of it, for x86-64 code on Windows the X64 calling convention specified in the ABI is the only one used, and cdecl, etc are ignored. To test this I used the test code here , and specified the cdecl calling convention for the test function: .....
by MichaelW
Nov 02, 2015 21:54
Forum: General
Topic: Random Numbers
Replies: 40
Views: 5761

Re: Random Numbers

albert wrote: The outputs of both methods are just about the same numbers of digits.
Which indicates that both methods return sequences that are more or less uniformly distributed, but consider that it's possible to create non-random sequences that have a perfect uniform distribution.