什么是Irvine32库,为什么要使用它? [英] What is the Irvine32 library and why do we use it?

查看:300
本文介绍了什么是Irvine32库,为什么要使用它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道Irvine32汇编语言库是.

我想要一个定义以及我们为什么要使用此库.

解决方案

我想知道什么是汇编语言中的Irvine32库.

Irvine32库是有用功能的集合,您可以查看在线文档以获得它们的列表和更多详细信息.

我要辩护,还有我们为什么要使用这个库?

我不知道为什么使用它.

通常,人们希望使用它来避免自己编写提供该功能的代码.由于复制某些功能的汇编代码可能是数十行或数百行代码(对于非常复杂的功能,甚至可能是数千行),并且每次都要编写它可能很麻烦.

Irvine32函数提供的API通常比OS服务提供的类似API更易于使用,因此使用Irvine32而不是直接调用OS服务通常更简单.

它还提供了读取和打印整数的库函数(例如 WriteDec ),没有系统调用.因此,这就像一个简化的C库printf.并且 ReadDec 返回一个EAX中的值,而FLAGS(CF)中的成功/失败,而C库 解决方案

I want to know that what is Irvine32 library in assembly language.

Irvine32 library is collection of helpful functions, you may check online documentation for list of them and further details.

I want a defenation and also why we use this library?

I don't know why you use it.

Usually one wants to use it to avoid writing the code providing that functionality himself. As the assembly code replicating some of the functionality may be tens or hundreds of lines of code (or even thousands for very complex functions), and having it to write every time may be cumbersome.

Also the API provided by Irvine32 functions is often simpler to use than similar API provided by OS services, so it may be often somewhat simpler to use Irvine32 instead of calling the OS services directly.

It also provides library functions that read and print integers (like WriteDec), which there's no system call for. So it's like a simplified C library printf. And ReadDec returns a value in EAX, and success/fail in FLAGS (CF), while C library scanf requires you to pass a pointer where the result will be stored1.

It's designed for beginners and simple programs, not for efficiency. For example, Irvine32 uses its own calling convention with no call-clobbered registers, so you can print stuff inside a loop without having to think of keeping your loop counter in a register that it's not going to step on.


Footnote 1: Because scanf can do multiple conversions in one call, and because C can't return both an integer and a flag as two separate return values. Returning a value in a register with success/fail in CF is something only asm calling conventions can normally use. It's not unique to Irvine32, though. Mac OS system calls do that, for example.

这篇关于什么是Irvine32库,为什么要使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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