打印输出寄存器/整数安慰| FASM | WINAPI [英] Printing out registers/ints to console | FASM | WINAPI

查看:147
本文介绍了打印输出寄存器/整数安慰| FASM | WINAPI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是想知道如果有一种方法,我可以打印出一个数字控制台
通过调用。它可以是基数10或十六进制我不介意。

Just wondering if there was a way i could print out a number to the console by invoking. it can be either base 10, or hex I don't mind.

我想看到一些函数返回的格式。

I would like to see the format in which some functions return.

我想preFER不使用WriteConsole和大量的ASM做了很长的路。

I would prefer not to do it the long way using WriteConsole and a lot of asm

P.S也这是我的第一个问题,我怎么接受一个答案

P.S also this is my first question , how do i accept an answer

推荐答案

使用的printf 从MSVCRT.DLL:

use printf from msvcrt.dll:

                format PE console
                include "win32ax.inc"
start:
                cinvoke printf,formatstring,eax
                invoke  Sleep,-1

formatstring    db "%d",13,10,0

section '.idata' import data readable

library msvcrt,'msvcrt.dll',\
        kernel32,'kernel32.dll'

import  msvcrt,printf,'printf'
import  kernel32,Sleep,'Sleep'

这篇关于打印输出寄存器/整数安慰| FASM | WINAPI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆