Offset is use to get the offset address of the variable in register specified

Offset is use to get the offset address of the

This preview shows page 8 - 12 out of 59 pages.

Offset is use to get the offset address of the variable in register specified. MOV instruction Copies the second operand (source) to the first operand (destination). The source operand can be an immediate value, general-purpose register or memory location. The destination register can be a general-purpose register, or memory location. Both operands must be the same size, which can be a byte or a word. Syntax: mov destination, source
Image of page 8
Example: mov ax, 10 ; puts the value of 10 in the register ax mov cx, ax ; puts the value contained in the register ax into cx Register is a series of memory cells inside the CPU itself. Because registers are inside the CPU there is very little overhead in working with them. There are four general purpose registers, AX, BX, CX, and DX. These are the registers you will be using often. Each of these general registers is 16- bit. They also have 8-bit counterparts. AX is 16 bits where as AH and AL is 8bit. Note: - AH being the high bit, and AL being the low bit. Together AH and AL make AX. Procedure is a part of code that can be called from your program in order to make some specific task. Procedures make program more structural and easier to understand. Generally procedure returns to the same point from where it was called. Web Resources Videos Resources EXERCISES Exercise 1.1 Load all example of assembly language one by one in Emu8086 and execute them. Practice all these examples and analyses output.
Image of page 9
EXPERIMENT 2 –REGISTER, INPUT/ OUTPUT CHARACTERS & DISPLAY STRINGS Objective In this lab students will learn registers Practice how to Input, Output and Display Characters as well as strings. Time Required : 3 hrs Programming Language : Assembly Language Software Required : EMU 8086 Hardware Required : NIL Registers Registers are high-speed storage locations directly inside the CPU, designed to be accessed at much higher speed than conventional memory. Types of registers General purpose Registers Segment Registers Status Flags Register Instruction Pointer General Purpose Register: Can be divided into Data and Index Data Registers: Are used for arithmetic and data movement A AX (Accumulator register) A BX (Base Register) A CX (Counter Register) A DX (Data Register) Index Register: Contains the offsets of data and instructions. A BP (Base pointer Register) A SP (Stack pointer Register) A SI (Source Index Register) A DI (Destination Index Register) CX (Count Register)
Image of page 10
Contains the count for certain instructions e,g shift count, rotate the number of bytes and a counter with loop instruction. Can be accessed as 32 bit (ECX), 16 bit (CX) or 8 bit (CH or CL) register 32 bit General Purpose use in ADD, MUL, DIV, MOV Special Purpose use in LOOP etc.
Image of page 11
Image of page 12

You've reached the end of your free preview.

Want to read all 59 pages?

  • Spring '17
  • habeel
  • Central processing unit, X86, Processor register, CPU cache

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes