|Published (Last):||9 January 2009|
|PDF File Size:||9.77 Mb|
|ePub File Size:||1.78 Mb|
|Price:||Free* [*Free Regsitration Required]|
But even if you are familiar with assembler, it is still a good idea to look through this document in order to study Emu syntax. What is an assembly language? Assembly language is a low level programming language.
You need to get some knowledge about computer structure in order to understand anything. The simple computer model as I see it: The system bus shown in yellow connects the various components of a computer. RAM is a place to where the programs are loaded in order to be executed. SI - source index register. BP - base pointer. SP - stack pointer. The main purpose of a register is to keep a number variable. Therefore, when you modify any of the 8 bit registers 16 bit register is also updated, and vice-versa.
The same is for other 3 registers, "H" is for high and "L" is for low part. Because registers are located inside the CPU, they are much faster than memory. Accessing a memory location requires the use of a system bus, so it takes much longer. Accessing data in a register usually takes no time. Therefore, you should try to keep variables in the registers. Register sets are very small and most registers have special purposes which limit their use as variables, but they are still an excellent place to store temporary data of calculations.
DS - generally points at segment where variables are defined. SS - points at the segment containing the stack. Although it is possible to store any data in the segment registers, this is never a good idea. The segment registers have a very special purpose - pointing at accessible blocks of memory. Segment registers work together with general purpose register to access any memory value.
This is good, since this way we can access much more memory than with a single register that is limited to 16 bit values. Other general purpose registers cannot form an effective address! Flags Register - determines the current state of the processor.
IP register always works together with CS segment register and it points to currently executing instruction. Flags Register is modified automatically by CPU after mathematical operations, this allows to determine the type of the result, and to determine conditions to transfer control to other parts of the program. Generally you cannot access these registers directly.
MASM using DOSBOX in Windows 10
8086 PROGRAMS IN MASM PDF