flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
AsmGuru62 14 Sep 2022, 16:56
Also, the FASM program with just a dialog box takes about 2Kb, but the C/C++ code of same nature may be larger.
|
|||
![]() |
|
macomics 14 Sep 2022, 17:12
AsmGuru62 wrote: Also, the FASM program with just a dialog box takes about 2Kb, but the C/C++ code of same nature may be larger. Code: #include <windows.h> #include <winuser.h> void Show(wchar_t *cap, wchar_t *mes, int ico) { HWND hWnd = GetForegroundWindow(); MessageBoxW(hWnd, mes, cap, ico); } void Usage() { Show(L"Внимание!", L"Использование:\n\nMessageShow.exe <заголовок> <сообщение> [цифра-иконки]\n\n" "Цифра иконки (если не указана, то: Information)\n\n" " 1 Exclamation\n" " 2 Warning\n" " 3 Information\n" " 4 Asterisk\n" " 5 Question\n" " 6 Stop\n" " 7 Error\n" " 8 Hand\n\n", MB_ICONINFORMATION | MB_OK); } INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, INT nCmdShow) { wchar_t** szArglist; int nArgs; szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs); if (NULL == szArglist) { Usage(); return 0; } else { if (nArgs < 3) { Usage(); } else { int ico = 0; if (nArgs > 3) { if (lstrcmpW(szArglist[3], L"1") == 0) { ico = MB_ICONEXCLAMATION; } if (lstrcmpW(szArglist[3], L"2") == 0) { ico = MB_ICONWARNING; } if (lstrcmpW(szArglist[3], L"3") == 0) { ico = MB_ICONINFORMATION; } if (lstrcmpW(szArglist[3], L"4") == 0) { ico = MB_ICONASTERISK; } if (lstrcmpW(szArglist[3], L"5") == 0) { ico = MB_ICONQUESTION; } if (lstrcmpW(szArglist[3], L"6") == 0) { ico = MB_ICONSTOP; } if (lstrcmpW(szArglist[3], L"7") == 0) { ico = MB_ICONERROR; } if (lstrcmpW(szArglist[3], L"8") == 0) { ico = MB_ICONHAND; } } HWND hWnd = GetForegroundWindow(); MessageBoxW(hWnd, szArglist[2], szArglist[1], ico|MB_OK|MB_TOPMOST); } LocalFree(szArglist); } return 0; } Code: E:\Tools\MSys64\mingw32\bin\gcc.exe ^ -D UNICODE -D _UNICODE ^ -s -Os -fno-ident -fno-stack-protector -fomit-frame-pointer ^ -fno-unwind-tables -fno-asynchronous-unwind-tables -falign-functions=1 ^ -e _WinMain ^ -Wl,--enable-stdcall-fixup ^ -nostdlib -nodefaultlibs -nostartfiles -o MessageShow.exe main.c -lkernel32 -luser32 -lshell32 3072 bytes
|
|||||||||||
![]() |
|
macomics 15 Sep 2022, 20:56
Here are a few programs that may be useful for you.
ResEd - This is the later version of Ketil Olsen's ResEd dialog editor. It has been downloaded from the link that Ketil provided in the RadAsm IDE subforum. Resource Compiler - A free resource compiler (GoRC.exe), which produces RES files from RC And Resource Builder |
|||
![]() |
|
DimonSoft 16 Sep 2022, 10:11
Overclick wrote:
No XP– support at the same time, which puts an assembly program at the same level of cross-platformness as C#/Java/any other element of Bristol scale or even worse ![]() |
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.