Search found 351 matches

by Cherry
Mar 11, 2013 19:18
Forum: General
Topic: Are any of the FreeBasic Commands done in assembly?
Replies: 23
Views: 2549

Re: Are any of the FreeBasic Commands done in assembly?

Yes, I meant SSE2, sorry.

The code does satisfy the requirements since FBGFX image buffers (including the screen buffer) are also 16 byte aligned.
by Cherry
Mar 10, 2013 23:51
Forum: General
Topic: Are any of the FreeBasic Commands done in assembly?
Replies: 23
Views: 2549

Re: Are any of the FreeBasic Commands done in assembly?

I wouldn't hardcode STOSD in assembly because then you actually opt out of faster technologies like SSE. If you use memset from crt.bi, for example, it will automatically use SSE if available (which should be faster than your code).
by Cherry
Mar 10, 2013 19:25
Forum: General
Topic: Are any of the FreeBasic Commands done in assembly?
Replies: 23
Views: 2549

Re: Are any of the FreeBasic Commands done in assembly?

This is mine, by the way. Should be pretty fast (needs a CPU supporting SSE). Sub ClsSSE Naked() Asm call _fb_GfxScreenPtr@0 push eax mov eax, [___fb_gfx] mov edx, [eax+&h1C] ' height of screen mov eax, [eax+&h28] ' pitch of screen (bytes per row) mul edx mov ecx, eax pop eax mov edx, ecx xo...
by Cherry
Mar 10, 2013 17:23
Forum: Windows
Topic: Working with "Tool" windows
Replies: 4
Views: 913

Re: Working with "Tool" windows

This code does what you want, but it's in Visual Basic - although I think it can easily be translated after understanding what it does. (Sorry, I don't have time at the moment to do it for you.) http://www.vbaccelerator.com/home/VB/Code/Libraries/Subclassing/Keep_Form_Titlebars_in_Focus_when_ToolWin...
by Cherry
Mar 07, 2013 10:56
Forum: Tips and Tricks
Topic: Create a file assosiation (Windows only!)
Replies: 9
Views: 2312

Re: Create a file assosiation (Windows only!)

">null" is wrong (as you can see, you have to delete the file "null" afterwards). You have to use ">nul" instead because NUL is a device name (equivalent to /dev/null in Unix).
by Cherry
Jan 19, 2013 23:03
Forum: General
Topic: [SOLVED] freefile returns 0 ???
Replies: 5
Views: 486

Re: freefile returns 0 ???

For something like this, a "file" class or even just a "filenumber" class would be a good idea - which self-closes if it goes out of scope. Type FileNumber Declare Constructor() Declare Destructor() Declare Operator Cast As Integer Declare Sub Close() n As Integer End Type Constr...
by Cherry
Jan 12, 2013 20:35
Forum: General
Topic: Simulating ALT+ENTER through code.
Replies: 5
Views: 598

Re: Simulating ALT+ENTER through code.

Well, then I would just save the screen contents into an image buffer (and the cursor position and current color, if needed), call screenres and load the data back from the buffer to the screen. The idea is not to use screenres. I have done this by using screenres but it seems hackish and i needed ...
by Cherry
Jan 10, 2013 17:01
Forum: General
Topic: Simulating ALT+ENTER through code.
Replies: 5
Views: 598

Re: Simulating ALT+ENTER through code.

Well, then I would just save the screen contents into an image buffer (and the cursor position and current color, if needed), call screenres and load the data back from the buffer to the screen.
by Cherry
Dec 15, 2012 22:10
Forum: General
Topic: Squares
Replies: 6886
Views: 403247

Re: Squares

...myvoid actually gets space on the stack, ... Virtual space in stack because Sizeof(myvoid) = 0! Oh, you are right: Sub dummy(): End Sub Var x = 123 Var myvoid = Type<TypeOf(@dummy)>(0) Var y = 456 Print Cast(Integer, myvoid) Sleep ...compiles to... .intel_syntax noprefix #dummytest.bas' compilat...
by Cherry
Dec 14, 2012 0:31
Forum: General
Topic: Squares
Replies: 6886
Views: 403247

Re: Squares

Weird: Seems like you can create a variable of type VOID ("Any"), which should not be possible: Sub dummy(): End Sub Var myvoid = Type<TypeOf(@dummy)>(0) #Print TypeOf(myvoid) 'Print myvoid 'Print myvoid + 1 'Print 1 + myvoid 'Print Cast(Integer, myvoid) 'Print @myvoid 'Print *@myvoid 'Pri...
by Cherry
Dec 14, 2012 0:11
Forum: General
Topic: #include bi files , correct usage ?
Replies: 36
Views: 1750

Re: #include bi files , correct usage ?

Well, of course it is also possible to just #include a .bas file, like this: a.bas Sub A() Print "Hello A" End Sub b.bas Sub B() Print "Hello B" End Sub main.bas #include "a.bas" #include "b.bas" Print "Hello World" A() B() Though this works and is u...
by Cherry
Dec 13, 2012 20:16
Forum: Community Discussion
Topic: Infinity FOR-cycle bug
Replies: 8
Views: 1049

Re: Infinity FOR-cycle bug

...which would be faster if done like that:

Code: Select all

Dim i As UByte = 0
Do
    ' Code here
    i += 1
Loop


...because there would be no unnecessary always-wrong check "i > 255" then.
by Cherry
Dec 13, 2012 14:02
Forum: Windows
Topic: breaking the RAM ceiling on windows XP
Replies: 14
Views: 1949

Re: breaking the RAM ceiling on windows XP

Which service pack are you talking about? Please note that for Windows XP SP0 and SP1 it was possible for device drivers (possibly ramdisk drivers) to use memory above the 4GB limit (though this memory was still unavailable to user-mode programs because Windows was simply not designed for utilizing ...
by Cherry
Nov 12, 2012 16:56
Forum: Beginners
Topic: Creating dll to send data to Excel
Replies: 4
Views: 740

Re: Creating dll to send data to Excel

There is a very easy Excel helper library: viewtopic.php?f=8&t=13298
by Cherry
Nov 12, 2012 16:47
Forum: Windows
Topic: Windows Taskbar access
Replies: 4
Views: 781

Re: Windows Taskbar access

What do you need that for? If you want to temporarily activate auto-hide (in order to show something fullscreen), that's not a good idea!

See: http://blogs.msdn.com/b/oldnewthing/arc ... 26972.aspx
The "right" solution is linked at the bottom of the article too.

Go to advanced search