Category : Assembly Language Source Code
Archive   : WDASM18.ZIP
Filename : HELLO.C

 
Output of file : HELLO.C contained in archive : WDASM18.ZIP
/* WDASM Example Disassembly Program */

#include

long FAR PASCAL WndProc( HWND, WORD, WORD, LONG);

int PASCAL WinMain( HANDLE hInstance, HANDLE hPrevInstance,
LPSTR lpszCmdParam, int nCmdShow)

{ static char szAppName[] = "Windows Disassembler Example";
HWND hwnd;
MSG msg;
WNDCLASS wndclass;

if( !hPrevInstance)
{ wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.lpfnWndProc = WndProc;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = hInstance;
wndclass.hIcon = LoadIcon( NULL, IDI_APPLICATION);
wndclass.hCursor = LoadCursor( NULL, IDC_ARROW);
wndclass.hbrBackground = GetStockObject( WHITE_BRUSH);
wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = szAppName;
RegisterClass( &wndclass);
}
hwnd = CreateWindow( szAppName, // lpClassName
"Windows Disassembler Example", // lpWindowName
WS_OVERLAPPEDWINDOW, // dwStyle
CW_USEDEFAULT, // X
CW_USEDEFAULT, // Y
CW_USEDEFAULT, // nWidth
CW_USEDEFAULT, // nHeight
NULL, // hWndParent
NULL, // hMenu
hInstance, // hInstance
NULL); // lpParam
ShowWindow( hwnd, nCmdShow);
UpdateWindow( hwnd);
while( GetMessage( &msg, NULL, 0, 0))
{ TranslateMessage( &msg);
DispatchMessage( &msg);
}
return msg.wParam;
}

long FAR PASCAL WndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam)
{ HDC hdc;
PAINTSTRUCT ps;
RECT rect;

switch( message)
{ case WM_PAINT:
hdc = BeginPaint( hwnd, &ps);
GetClientRect( hwnd, &rect);
DrawText( hdc, "Congratulations, it works!", -1, &rect,
DT_CENTER | DT_VCENTER | DT_SINGLELINE);
EndPaint( hwnd, &ps);
return 0;
case WM_DESTROY:
PostQuitMessage( 0);
return 0;
}
return DefWindowProc( hwnd, message, wParam, lParam);
}


  3 Responses to “Category : Assembly Language Source Code
Archive   : WDASM18.ZIP
Filename : HELLO.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/