LoginSignup
0
0

More than 1 year has passed since last update.

MASM32からmsvcrtを使ってみた

Posted at

MASM32からmsvcrtを使ってみた

printf.asm
comment *
ml /c /coff /Fl /Sa printf.asm
link /subsystem:console printf
*
includelib kernel32.lib
includelib msvcrt.lib

.386
.model flat

ExitProcess proto stdcall :DWORD
printf proto c :VARARG

.const
fmt db  'hello, world %.20f', 0dh, 0ah, 0
num dq  3.1415926535897932384626433832795

.code
_start:
    invoke  printf, addr fmt, num
    invoke  ExitProcess, 0

end _start
dev.bat
@echo off
path %path%;C:\masm32\bin
set LIB=C:\masm32\lib
cmd

実行例

m.png

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