CS201 MID TERM SOLVED MCQs || PAST PAPERS || GROUP-1 || INTRODUCTION TO PROGRAMMING || VuTech Visit Website For More Solutions www.vutechofficial.blogspot.com …
CS401 ASSIGNMENT NO. 2 FALL 2022 || 100% RIGHT SOLUTION || COMPUTER ARCHITECTURE AND ASSEMBLY LANGUAGE PROGRAMMING || BY VuTech
Visit Website For More Solutions
www.vutechofficial.blogspot.com
SEND WHATSAPP OR E-MAIL FOR ANY QUERY
0325-6644800
kamranhameedvu@gmail.com
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 concern 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 etc. will not be accepted.
Topic Covered:
·Clearing
the Screen and String Printing, keyboard
interrupt service routine.
·Interrupts Handling,
Dos Interrupt,BIOS Video Services.
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.
Syllabus:-
Lectures # 01 - 33.
For any query,
feel free to email at:
cs401@vu.edu.pk
SOLUTION
Q- Write
an assembly language program that performs the following operations :
PART-1:
While
pressing the right shift button clear the screen and print your name on
the console screen using BIOS Video Services.
ANSWER:
section .data
name db 'Your
Name',0
section .text
global _start
_start:
;check for right shift button press
in al, 0x60
cmp al, 0x36
jne exit
;clear screen and print name
mov ah, 0x00
mov al, 0x03
int 0x10
mov ah, 0x09
mov dx, name
int 0x21
exit:
;exit program
mov eax, 0x1
xor ebx, ebx
int 0x80
PART-2:
While
pressing the left shift button clear the screen and Prints your VU ID on
the console screen using BIOS Video Services.
ANSWER:
section .data
vu_id db 'Your VU
ID',0
section .text
global _start
_start:
;check for left shift button press
in al, 0x60
cmp al, 0x2A
jne exit
;clear screen and print VU ID
mov ah, 0x00
mov al, 0x03
int 0x10
mov ah, 0x09
mov dx, vu_id
int 0x21
exit:
;exit program
mov eax, 0x1
xor ebx, ebx
int 0x80
Note: Make sure to use your
own VUID, otherwise zero marks will be awarded.
Requirements:
The following are required in
a single MS Word document.
· Assembly language program (Code).
· Screenshots showing both
outputs.
------------------------------------------------ Best Of Luck
---------------------------------------
Visit Website For More Solutions
www.vutechofficial.blogspot.com
KINDLY, DON’T COPY PASTE
SUBSCRIBE, SHARE, LIKE AND COMMENTS FOR MORE UPDATES
We provide Virtual University of Pakistan Study Materials such as Solution of Assignments, GDBs, Mid Term Solved Papers, Final Term Solved Papers, Mid Term Solved MCQs, and Final Term Solved MCQs. We also provide regular Semester Quizzes, Updated Handouts, and Short Questions and Answers. We help you with your research and many other educational-related topics, as far as we know. Furthermore, Share your problem with us and Please feel free to ask any related questions.