VUsolutions Transferred to AchiKhasi.com

From December 2011, this blog www.VUsolutions.blogspot.com is transferred to http://achikhasi.com/vu/ . So, you may visit http://achikhasi.com/vu/ for latest study related help.

Back to home VUsolutions

VUsolutions Fans Club [join us for MORE solutions]

VUsolutions on Facebook

CS401 Assignment 2 Solution

Thursday, November 22, 2012 Edit This




Question No. 2:

After attempting previous question, u are now able to write, assemble and debug a Subroutine program. Write an assembly language code to find the minimum number from an array of ten numbers using a subroutine. Explain each instruction of program in your own words and also attach the snapshot of your AFD (A Fullscreen Debugger) showing the executed code of final results. 
(10 marks)

(Program using subroutine: 5 marks, Explanation: 3 marks, Snapshot: 2 marks)




Q 1:
Name:  01.PNG
Views: 10
Size:  86.2 KB
Name:  02.PNG
Views: 9
Size:  84.4 KB
Name:  03.PNG
Views: 9
Size:  48.6 KB

Q- 2 Solution
@ All-- This is just idea. es ki logic mai koi galti nai hai. 10000 percent theeek execute ho k theek result deta hai. but overall gud programing practice nai ki mai nai es mai. Coz yeh mjy just as idea share krna tha .

Name:  111.png
Views: 9
Size:  50.5 KB


Solution of Q2: 

; To All, kindly make changes before submit.
; I know the logic of the program is very bad. But this is just Idea.
[ORG 0x0100]
mov ax, 0 
mov bx, 2
mov cx, 18
mov dx, [values]

CALL l1 
mov [minimum], dx 

mov ax, 0x4C00 
int 0x21
values: dw 9,72,7,11,6,8,14,5,10,2 
minimum: dw 0
l1: mov ax, [values + bx] 
cmp dx, ax 
jge l2 

add bx, 2 
sub cx, 2 
jnz l1
ret 

l2: mov dx, ax 
add bx, 2
sub cx, 2
jnz l1
ret

Back to home VUsolutions

Shaadi.com: Just create ur account & find ur partner or EARN money, its reall & EASY

VUsolutions Followers (Join NOW and Get Extra Benefits)

Install LATEST toolbar having lot of features - GET solutions on Desktop

toolbar powered by Conduit
Caliplus 300x250 NoFlam VitoLiv 468x60 GlucoLo