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?

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

0
Posted at

概要

中古ノート買ってみた。
fasmがx64のexeを吐く、らしいので、やってみた。

参考にしたページ

手順

環境

windows10

fasmw17334.zipをダウンロード

コンパイル、実行

>fasm hello64.asm
flat assembler  version 1.73.34  (1048576 kilobytes memory)
4 passes, 1536 bytes.

>hello64
Hello world!


サンプルコード


format PE64 console
entry main
include 'C:\Program Files (x86)\fasmw17334\INCLUDE\win64a.inc'

section '.idata' data readable import
	library kernel32, 'kernel32.dll', msvcrt, 'msvcrt.dll'
	import kernel32, ExitProcess, 'ExitProcess'
	import msvcrt, printf, 'printf', getchar, 'getchar'

section '.text' code executable

main:
	cinvoke printf, <'Hello world!', 10, 0>
	cinvoke getchar
	invoke ExitProcess, 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?