Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DrV

Pages: [1]
1
Sorry for dragging this even farther off topic, but here's a relatively simple memory copy routine that's (possibly) faster than the CRT one (I can never resist the urge to write a bit of inline assembly :)):

Code: [Select]
sub fastmemcpy(byval dst as any ptr, byval src as any ptr, byval bytes as uinteger)
asm
mov ecx, [bytes]
mov esi, [src]
mov edx, ecx
shr ecx, 2 ' ecx = bytes / 4 = number of dwords to copy
and edx, 3 ' edx = 3, 2, 1, 0 bytes left over after dword copy
test ecx, ecx
mov edi, [dst]
jz bytecpy
rep movsd
bytecpy:
test edx, edx
jz endcpy
mov ecx, edx
rep movsb
endcpy:

end asm
end sub
 

2
Freebasic / Re: New tinyptc library
« on: February 24, 2007 »
Just dropping by because I noticed a possible bug which occurred in Lithium's AntiMan and shockwave's invite for the 20 sec compo - I normally have FRAPS running in the background to monitor framerates of stuff and take vids, and when I run a program using this TinyPTC replacement (at least that's what I assume the culprit is), my primary monitor is totally black after the program exits and won't repaint until I drag some specific programs across it (I have a dual-monitor setup).  Not sure if this is a FRAPS bug or a problem with this lib or both, but just wanted to let you know.  If I close FRAPS first and then run the programs, they work fine, so I'd lean toward it being a problem with FRAPS, but then again, FRAPS seems to work fine with other programs.  No big worries, just a heads up.  (btw, FRAPS reports a nice steady 60 FPS :))

Pages: [1]