when I create a DIB with CreateDIBSection, I only seem to be able to write to the bits once. I inserted calls to GdiFlush throughout the code but that doesn't seem to solve the problem. here is the test code:
#include <windows.h>
LRESULT
WndProc(HWND, UINT, WPARAM, LPARAM);
struct dib
{...
I can't figure this out. All I need to do is mov the contents of sp into a register, but nasm complains 'invalid effective address'. I've tried it with every single register combination, but it won't let me do it. Please help!
Hello, I have a question with accessing stack variables - I am using NASM. Here is what I did on the calling side:
push msg ; msg is a null-terminated string
call print
add esp, 4
And for the callee:
print:
mov si, [esp-4]
; more code...
For some reason, esp-4 doesn't seem to hold the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.