We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 7967

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

[org 0x0100]

jmp start

number: db 02
multiplicand: db 0
multiplier: db 0
multiResult: dw 0
squareResult: dd 0

square: mov [multiplicand], ax
        mov [multiplier], ax
        call multi
        mov ax, [multiResult]
        mov [squareResult], ax
        ret
        
multi: mov cl, 8
       mov bx, [multiplicand]
       mov dx, [multiplier]
       
carryCheck: shr bx, 1
            jnc skip
            add [multiResult], bx

skip: shl bx, 1
      dec cl
      jnz carryCheck
      ret
      
start: mov ax, [number]
       call square
       mov dx, [squareResult]
       sub byte[number], 1
       add dx, ax
       add byte[number], 2
       mov ax,[number]
       mov[multiplicand], ax
       mov byte[multiplier], 2
       
       call multi
       
       add dx, [multiResult]
       shr dx, 1 ;diviion by 2
       

mov ax, 0x4c00
int 0x21

naam thoray change kr k send krna mojain krro

How we can install nasm on Windows 64-Bit

Dosbox install karo..subjects download men parda hai...guide line be ppardi hai..

What naam we can change

[Org 0x0100]
Jmp start
Number: db 02
Multiplicand: db 0
Multiplier: db 0
Multiresult: dw 1
Squraresult: dd 0

Square: mov [multiplicand], ax
Mov [multiplier], ax
Call multi
Mov [square result], ax
ret
Multi: movcl, 8
Mov bx, [multiplicand]
Mov dx, [multiplier]
Carry check: shr bx, 1
Jnc skip
Add [multiresult], bx
Skip: shl bx, 1
Dec cl
Jnz carry check
Ret
Start: mov ax, [number]
Call square
Mov dx, [square result]
Sub byte [number], 1
Add dx, ax
Add byte [number], 2
Mov ax, [number]
Mov [multiplicand], ax
Mov byte [multiplier], 2

Call multi
Add dx, [multiresult]
Shr dx, 1; division by 2
Mov ax, 0x4c00
Int0x21

vvv thankss

SOLUTION:

[org 0x0100]

jmp start

number:      db02

 

multiplicand:db0

multiplier:    db0

multiResult:   dw0

squareResult:dd0

 

 

square:    mov[multiplicand], AX

mov[multiplier], AXcallmulti

movAX,[multiResult]mov[squareResult], AX

ret

 

multi:        movCL,8

movBX,[multiplicand]movDX,[multiplier]

carryCheck:    shr BX, 1jncskip

 

add[multiResult],BX

 

skip:      shl BX, 1

decCL

jnzcarryCheckret

 

start:        movAX,[number]

call  square

movDX,[squareResult]

subbyte[number],

1addDX, AX

add byte[number],

 2movAX,

[number]mov[multiplicand],

AXmovbyte[multiplier],

2call  multi

addDX,[multiResult]

 

shr DX,1    ; divisionby2

movAX,0x4c00             ;ending programint0x21

Q 1: Write a complete assembly language code for the following pseudo code:
Initialize a variable named “NUM1” with “04 as a Hexadecimal Number”
Initialize a variable named “NUM2” with “08 as a Hexadecimal Number”
Initialize a variable named “NUM3” with “12 as a Hexadecimal Number”
Initialize a variable named “NUM4” with “00 as a Hexadecimal Number”
Initialize AX with zero “0”
Initialize BX with zero “0”
Move NUM1 into AX
Move NUM2 into BX
Add BX into AX
Move NUM3 into BX
Add BX into AX
Store AX into NUM4

Solution :
[org 0x0100]
mov bx, 0
mov ax ,[num1]
mov bx ,[num2]
add ax, bx
mov bx, [num3]
add ax, bx
mov [num4], ax
mov ax, 0x4c00
Int 0x21
num1: dw 4
num2: dw 8
num 3: dw 12
num 4: dw 00

Questions No 02 10 marks
Suppose, we have the following register values:

AX 0150
BX AB5D
CX FF0A
DX 1234
DS CC20
CS EF10
ES 225F
SS E25F
SI 1212
SP CD0F
BP 95F8
DI BDEF

You are required to calculate the physical address generated by each of the following instructions.

ADD [bx+Di], CX
MOV DX, [SP+1652H]

Note: Each provided instruction is independent.
Solution:
Answer i:
Effective Address EA= Base +Index +Offset
=0x AB5D +0x BDEF +0x0000
=0x 1694c
Physical Address = segment*0x10+Effective Address
= 0x000*0x10+0x0110
=0x120
ANSWER ii:
Effective Address EA = Base + Index + Offset
=0x AB5D + 0x000 +0x1652
=0xC1AF
Physical Address = segment * 0x10 + Effective Address
= 0x0000 * 0x10 + 0xc1AF
=0xC1BF

This solution is for assignment 1.. and we are having assignment 2 now

Check another Idea 

Attachments:

ye bilkul thek solution hy kiya...???

RSS

Today Top Members 

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.