[英]Printing out registers/ints to console | FASM | WINAPI
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.
它可以是基数10,也可以是十六进制我不介意。
I would like to see the format in which some functions return. 我想看看一些函数返回的格式。
I would prefer not to do it the long way using WriteConsole and a lot of asm 我不想在使用WriteConsole和很多asm的情况下做很多事情
PS also this is my first question , how do i accept an answer PS这也是我的第一个问题,我该如何接受答案
use printf from msvcrt.dll: 使用msvcrt.dll中的printf :
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'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.