开发者

game programming in assembly IA32

开发者 https://www.devze.com 2023-04-12 23:02 出处:网络
I want to write snake game in assembly IA 32 in unix environment . I found these codes from here is it what i wanted ? w开发者_如何学编程hat is the different between assembler 8086 and IA32 and Emu80

I want to write snake game in assembly IA 32 in unix environment . I found these codes from here

is it what i wanted ? w开发者_如何学编程hat is the different between assembler 8086 and IA32 and Emu8086? what is AT&T stype assembly ? I'm totally confused


1- Difference between assembly languages:

There are as many languages as there are different architectures. They mostly differ in syntax and registers.

You can find a list of machine languages (assembly languages) here.

For information on what is machine code, read this.

2- The snake game

Is indeed in IA32 or x86 (different term for same language) but it is for windows (DOS actually).

It uses interrupts (int xxh) that can only be read by DOS systems.

Additionally, IA32 on windows and linux differ also in syntax. The most notable difference is that registers:

mov %eax,%ebx (AT&T) mostly used on unix systems

mov ebx,eax (Intel) mostly used in DOS/Windows

(note that register are swapped: source<->destination)

This also depends on the assembler you use. tasm and nasm are apparently supporting windows masm syntax. (it will not convert OS-dependent interrupts though)

This source might help you: http://mcs.uwsuper.edu/sb/324/ASM/snake.asm


8086 is a very old Intel processor. It was followed by the 80386, 80486, and 80586(renamed Pentium). Because these all end in 86, we tend to call them x86. IA-32 or Intel Architecture-32 refers specifically to 32-bit x86 processors.

x86 is ugly; a terrible language to learn assembler in. If you pick up something like MIPS and get the hang of it, x86 is less of a monster to learn.

ARM might not be too bad to start with, because it's still used with some frequency in embedded systems.

Don't try to write a game, until you understand what's going on in "Hello World"

0

精彩评论

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

关注公众号