Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is MASM ? which we generally use it for learning assembly language code?

Tags:

assembly

In 8086 processor,what ic's we use are different...i think they are of 16 bit...but we practice the code in 64 bit computers..how is it possible?please expalin>>>>What is MaSm actually?? and can you explain me where I can get the software....

like image 920
user581105 Avatar asked Jan 19 '11 08:01

user581105


People also ask

What is MASM used for?

The Microsoft Macro Assembler (MASM) provides several advantages over inline assembly. MASM contains a macro language that has features such as looping, arithmetic, and text string processing. MASM gives you greater control over the hardware. By using MASM, you also can reduce time and memory overhead in your code.

What syntax does MASM use?

MASM uses the standard Intel syntax for writing x86 assembly code.

Which software is used for assembly language programming?

These include MASM (Macro Assembler from Microsoft), TASM (Turbo Assembler from Borland), NASM (Netwide Assembler for both Windows and Linux), and GNU assembler distributed by the free software foundation.

How do you write MASM codes?

We can write assembly program code inside c language program. In such case, all the assembly code must be placed inside asm{} block. Let's see a simple assembly program code to add two numbers in c program.


2 Answers

MASM is microsoft's macro assembler. The Microsoft Assembler has been in production since 1981 and is upgraded by Microsoft to keep abreast with operating system needs and processor developments. for compatibilities issues check this

can be downloaded from here

like image 67
ayush Avatar answered Nov 15 '22 08:11

ayush


MASM - is the Microsoft Macro Assembler. It is an assembler. It takes your code pre-processes it and converts it to binary. The links it to runnable executable or an OBJect file.

all Intel processors 32bit and em64t processors (80386 and up) support the 8086 compatability mode called "real mode". Wich means that all PCs to this day are backward compatible with say MS-DOS and all the games that used to run on IBM XT. Those will run on modern machines but really fast so those will be unplayable :-)

All PCs to this day are booting with their processor in the real mode and modern operating systems switch the processor to the 32bit/64bit "protected mode".

Basically what happens in real mode is that the CPU knows it is working as 8086. E.g : all operations are on 16bit registers and the memory is addressed by a segment:offset pair. The memory addresses are physical memory addresses and you have access to the first 1MB of RAM. Physical address is calculated by segment shifted left by 4 bits + offset. Thus 8000h:100h is the same address as 8010h:0h , physical address is 80100h in the memory.

Some modern machines have EFI instead of BIOS and those boot in the "protected mode" from the start. MAC machines are like that.

like image 27
bratner Avatar answered Nov 15 '22 08:11

bratner