Assembly Language Programming: Creating a Procedure to Fill an Uninitialized Array, Slides of Assembly Language Programming

Instructions for writing an assembly language program that includes a calling procedure to pass the base address and number of elements of an uninitialized array to another procedure. The called procedure uses loops, memory indirect addressing, and procedures to start placing incremented values into the array. It covers various addressing modes such as base plus index, register relative, and base index plus displacement.

Typology: Slides

2011/2012

Uploaded on 07/26/2012

parina
parina 🇮🇳

4.4

(67)

222 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
QUIZ
Write an assembly language program in
which there is a calling procedure that
gives the base of an un-initialized array, and
number of elements in the array to another
procedure. The called procedure starts
putting values into the array starting from 0
and in each cell it places an incremented
value. Use procedures, memory indirect
addressing and loops.
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Assembly Language Programming: Creating a Procedure to Fill an Uninitialized Array and more Slides Assembly Language Programming in PDF only on Docsity!

QUIZ

  • Write an assembly language program in

which there is a calling procedure thatgives the base of an un-initialized array, andnumber of elements in the array to anotherprocedure. The called procedure startsputting values into the array starting from 0and in each cell it places an incrementedvalue. Use procedures, memory indirectaddressing and loops.

Procedures

• PUSHA• POPA• PUSHF• POPF• PUSHAD• POPAD\• .286? .386?

FAR CALL

  • Multiple code segments• Call far ptr sub1• Sub1 proc far

Addressing Modes

: Base Plus Index Addressing

  • Base holds the address of the base of the

array

  • Index holds the element position• In book , page 111 with name Base-Index

operands

  • Two dimensional array

Addressing modes:

Register Relative Addressing

  • In book: Based and indexed operand• Adding a displacement to the contents of

base or index register (BX,BP, SI, DI)

BASED-Indexed formats

  • MOV AX, [DI+100H]• MOV array[SI], BL• MOV LIST[SI+2],CL• MOV DI, SET_IT[BX]• MOV DI, [EAX+10H]• MOV ARRAY[EBX], EAX

Scaled Addressing

  • Do it yourself

Sorting program

  • Insertion sort