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.

CS401 Assignment No 03 Solution & Discussion Due Date:19-01-2017

Computer Architecture and Assembly Language Programming (CS401)

Assignment # 03

 

Total marks = 20                                                                              

 

Deadline Date

19th of Jan, 2017

 

Please carefully read the following instructions before attempting assignment.

 

RULES FOR MARKING

It should be clear that your assignment would not get any credit if:

  • The assignment is submitted after the due date.
  • The submitted assignment does not open or file is corrupt.
  • Strict action will be taken if submitted solution is copied from any other student or from the internet.

 

You should consult the recommended books to clarify your concepts as handouts are not sufficient.

 

You are supposed to submit your assignment in .doc or docx format.

Any other formats like scan images, PDF, zip, rar, ppt and bmp will not be accepted.

 

Topic Covered:

  • Display Memory
  • BIOS/DOS Interrupt
  • Hardware Interrupt
  • Ports
  • Parallel Port

 

 

NOTE

 

No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.

 

If you people find any mistake or confusion in assignment (Question statement), please consult with your instructor before the deadline. After the deadline no queries will be entertained in this regard.

For any query, feel free to email at: cs401@vu.edu.pk

 

 

 

 

Questions Statement                                                                            20 marks

 

You have to write an assembly language code that will:

  • Read a character (ASCII code) from keyboard using a BIOS interrupt.
  • You have to print that ASCII character in binary number system using DOS interrupt.
  • Then you have to invert that ASCII code and have to transmit it to a parallel port using a DOS interrupt.

 

For example,

  • If the you pressed ‘a’. Whose ASCII code is 61h (in hex).
  • You have to print the equivalent of 61h which is (1100001)2 in binary.
  • Then you have to invert the ASCII code so 11000012 will become 00111102.
  • At the end you have to transmit 00111102 to a parallel port.

 

+ 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: 8618

.

+ 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

brother iss ko edit kr k change kese krna hai yeh bhi bata do koi abb

change variable names and description given in her solution.i did write myself few lines,that is why i am saying after working on solution i realized her solution is correct at least you will get some marks if not 100%

all these files contain the same error at the starting point

please tell kidhar ha error

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

this solution is giving problems (errors in line 3) ... 

Please suggest any solution error free or how to remove it 

Cs401 Assignment Solution
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

RSS

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

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

.