开发者

What are the limitations of assembler? (NASM)

开发者 https://www.devze.com 2023-01-01 04:38 出处:网络
Is there a technical limitation of what kind of programs I can write with assembler (NASM)? For now I\'ve only seem some program that do arithmetic operations, like adding two numbers.

Is there a technical limitation of what kind of programs I can write with assembler (NASM)?

For now I've only seem some program that do arithmetic operations, like adding two numbers.

Is it possible to write complex assemble开发者_Go百科r programs, that provide a GUI, access the file system, plays sounds et cetera?

I know I wouldn't write such programs, but I'm curious, if there are technical limitations on what kind of programs I can write with assembler.


Given sufficient knowledge of the target system, it's possible to do whatever you would like through ASM. However, there are other things at play that make it difficult to manage. But I've seen many GUIs that were done in ASM. They weren't particularly nice to look at, but they did. I've seen a guy write a video game (that game with the asteroids and you have a little ship in the middle of the screen that shoots a machine gun or laser) in pure ASM. He wanted to test himself, and had already done some ASM before. So yes, it can be done, whatever you would like.

Need I remind you that ASM is merely pseudo-machine instruction, to which all other code must eventually be reduced?


There are no limitations as such. Programs written in C or C++ pass through a stage as assembler source code during compilation, so by definition you could write anything from a complete operating system such as Windows to an application like AutoCAD in assembler. It wouldn't be particularly fun or productive though, and the number of bugs would likely be substantial.


No, no limitations on what CAN be done with assembler. Whether it's practical to write a GUI, access the file system, play sounds, etc, in assembler is another matter.


Back in the day I think a number of computer games were programmed in assembler. I'm thinking in particular of the "Air Traffic Controller" game that came out for the TRS-80 in 1978. It had a character-based UI, beep sounds, and quite a bit of game logic all in a "realtime" game simulation that ran in 4k of RAM. Here's link to site with some info on that game, as well as a screenshot: http://atc.fastie.com/index.htm

0

精彩评论

暂无评论...
验证码 换一张
取 消