0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

中古ノート、買ってみた。 その140

0
Last updated at Posted at 2025-12-15

概要

中古ノート買ってみた。
windows10でfasmをやってみた。
win32apiのMessageBox呼び出してみた。

写真

image.png

コンパイル、実行

>fasm msg1.asm
flat assembler  version 1.73.34  (1048576 kilobytes memory)
2 passes, 2048 bytes.

>msg1

サンプルコード



format PE64 GUI
entry start

section '.idata' import data readable writeable
	dd 0,0,0,RVA kernel_name,RVA kernel_table
	dd 0,0,0,RVA user_name,RVA user_table
	dd 0,0,0,0,0
kernel_table:
	ExitProcess 	dq RVA _ExitProcess
	dq 0
user_table:
	MessageBoxA 	dq RVA _MessageBoxA
	dq 0
	kernel_name 	db 'KERNEL32.DLL',0
	user_name 		db 'USER32.DLL',0
	_ExitProcess 	dw 0
					db 'ExitProcess',0
	_MessageBoxA 	dw 0
					db 'MessageBoxA',0

section '.text' code readable executable

start:
	sub	 	rsp, 8 * 5
	mov	 	r9d, 0
	lea	 	r8, [_caption]
	lea	 	rdx, [_message]
	mov	 	rcx, 0
	call	[MessageBoxA]
	mov	 	ecx, eax
	call	[ExitProcess]

section '.data' data readable writeable
	_caption 		db 'Win64 assembly program',0
	_message 		db 'Hello World!',0





以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?