用汇编语言可以开发哪些类型的软件

发布于 2024-12-12 04:32:24 字数 83 浏览 0 评论 0原文

我是计算机科学专业的学生,​​正在学习汇编语言。现在我想用汇编语言制作一个项目,请告诉我用汇编语言制作什么样的应用程序。所以我为我的主题选择合适的项目。

I am Student of Computer Sciences and learning assembly language. Now i want to make a project in assembly language kindly tell me that what kind of application are making with assembly language. So i select the appropiate project for my subject.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

毁梦 2024-12-19 04:32:24

汇编作为低级编程语言,可以用来开发任何东西,从一个小的“你好,世界!”编程到操作系统。曾几何时(早在 40 年代),所有开发人员都必须使用这种语言,但后来高级语言开始出现,人们迅速向前发展。

如今,汇编语言的使用主要仅限于没有足够编译器的设备以及手工编写的优化良好的代码。也就是说,在当今的体系结构中,很难生成比现代编译器提供的更优化的汇编代码。

对于您的目的,这取决于项目范围和要求。请记住,即使是一个非常简单的项目,例如基于交互式控制台的井字棋,其组装量也可能非常大。以下是一个小项目的一些示例:

  1. 猜测数字:PC 将选择一个随机数字 [1..100],用户需要猜测它。
  2. 求除数:给定用户一个数字,找到该数字的所有除数。
  3. 排列字符串:给定用户的字符串,找到该字符串的所有排列。

Assembly, being the low-level programming language that it is, can be used to develop anything, from a small "hello, world!" program up to an operating system. Once upon a time (back in the 40s) that was all developers had to work with, but then high-level languages started coming out and people quickly moved forward.

Today, the use of Assembly language is mainly contained to devices without adequate compilers and for hand-crafted well-optimized code. That said, with today's architecture it is quite hard to produce a piece of assembly code that's more optimized than what a modern compiler would give you.

For your purposes, it depends on the project scope and requirements. Bear in mind that even a very simple project, like an interactive console-based tic-tac-toe can be quite large in assembly. Here are some examples for a small project:

  1. Guess the number: the PC will pick a random number [1..100] and the user will need to guess it.
  2. Find the divisors: given a number from the user, find all the divisors of this number.
  3. Permutate a string: given a string from the user, find all the permutations of this string.
捎一片雪花 2024-12-19 04:32:24

理论上,您可以使用汇编语言构建任何软件;然而,只有在以下情况才适合使用汇编语言:

(1) 直接与硬件通信。例如,编写硬件驱动程序。

(2) 使用低级操作系统服务(或破解操作系统)。例如,编写病毒或防病毒软件。

(3)编写高效的程序。汇编代码生成非常小的可执行文件。如果要运行程序的设备的内存非常有限,那么它是完美的选择。而且,从理论上讲,大多数时候,汇编程序的运行速度比使用高级语言创建的程序要快。

我经历的一个真实的例子是,我很早以前就使用汇编语言拦截Windows API,将一些阿拉伯语服务引入到英文版Windows 98中。另外,我必须使用汇编语言来创建一个阿拉伯字符串实用程序,该实用程序经常被核心使用,并且事实证明,使用汇编语言是一个正确的选择。

Theoretically, you can build any software using Assemble language; however, it is appropriate to use Assemble language only in following situations:

(1) To communicate with hardware directly. For example, writing hardware Drivers.

(2) To use low-level OS service (or hack the OS). For example, writing virus or anti-virus software.

(3) Write highly efficient program. Assemble code generates very small executable.It is perfect choice if the memory of the device which is intended to run the program is very limited. Also, in theory, and most of the times, Assemble program runs faster than the programs created using high-level languages.

A real example from my experience is that I used assemble language to intercept Windows APIs to introduce some Arabic language services to English Windows 98 long time ago. Also, I had to use Assemble language to create a Arabic String utility which was very frequently utilized by the core and it was proved that using Assemble language was a right choice for that matter.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文