Created
August 1, 2025 04:30
-
-
Save doccaico/ff1d1f0e5bc432f72d423cad784f1fa4 to your computer and use it in GitHub Desktop.
Fasmで日本語表示 (printf, MessageBox...)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| format PE CONSOLE | |
| entry start | |
| include 'encoding\utf8.inc' | |
| include 'win32w.inc' | |
| section '.data' data readable writeable | |
| name db '山田(yamada)', 0 | |
| title TCHAR 'タイトル(title)', 0 | |
| content TCHAR 'コンテンツ(content)', 0 | |
| section '.code' code readable executable | |
| start: | |
| cinvoke printf, name | |
| invoke MessageBox, NULL, content, title, MB_OK | |
| invoke ExitProcess, 0 | |
| section '.idata' import data readable writeable | |
| library kernel32, 'kernel32.dll',\ | |
| user32, 'user32.dll',\ | |
| msvcrt, 'msvcrt.dll' | |
| import user32,\ | |
| MessageBox, 'MessageBoxW' | |
| import kernel32,\ | |
| ExitProcess, 'ExitProcess' | |
| import msvcrt,\ | |
| printf, 'printf' | |
| ; printfで日本語を表示する | |
| ; コードページをUTF-8にする方法 | |
| ; $ chcp 65001 | |
| ; コードページをCP932に戻す方法 | |
| ; $ chcp 932 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment