Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6, Assembly programming: fill in the blanks 30% (1). Calculate the sum of 4231D000H + 54573000H DATAS SEGMENT data segment code DATA1 4231D000H DATA2 DATAS

image text in transcribed
image text in transcribed
6, Assembly programming: fill in the blanks 30% (1). Calculate the sum of 4231D000H + 54573000H DATAS SEGMENT data segment code DATA1 4231D000H DATA2 DATAS ENDS STACKS SEGMENT stack segment code STACKS ENDS CODES SEGMENT ASSUME CS:CODES,DS:DATAS,SS:STACKS START: MOV AX,DATAS MOV DS,AX code segment code LEA LEA_,DATA2 MOV_[SI] ADD MOV [SI],AX MOV AX,[SI+2] ; after this step, the value of register AX is ADC AX, ,[DI+2] ;after this step, the value of register AX is MOV [SI+2],AX MOV AH,4CH INT 21H CODES ENDS END START (2). Write an assembly program to find the largest number from 6 (16 bits) numbers (data can be defined by yourself) DATAS SEGMENT ;data DATA 3,2,1,9,8,7 MAX ? DATAS ENDS STACKS SEGMENT ;stack STACKS ENDS CODES SEGMENT ASSUME CS:CODES,DS:DATAS, SS:STACKS START: MOV AX,DATAS MOV DS,AX ;code LEA BX, MOV CX, MOV AX,[BX] ; after this step, the value of register AX is NEXT: ADD BX, CMP AX,[BX] JG MOV AX,[BX] GREAT: MOV MAX,AX DEC CX JNZ MOV AH,4CH ; after this step, the value of register AX is INT 21H

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions