Computer Architecture and Assembly Language Programming - CS401 Fall 2009 Assignment 02 Solution
Computer Architecture and Assembly Language Programming - CS401 Fall 2009 Assignment 02 Solution
net
CS401- Computer Architecture and Assembly Language
Programming
Solution to Assignment # 2
Fall 2009
Total Marks: 20
Solution
[org 0x0100]
jmp start
data: dw 60, 55, 45, 50, 40, 35, 25, 30, 10, 0
swap: db 0
cmp byte[swap], 1
je start
mov ax, [data] ; First number is min as array is sorted in ascending order
mov dx, [data+18] ; Similarly last number is max