Pages

CS401 ASSIGNMENT NO. 2 FALL 2022 || 100% RIGHT SOLUTION || COMPUTER ARCHITECTURE AND ASSEMBLY LANGUAGE PROGRAMMING || BY VuTech

CS401 ASSIGNMENT NO. 2 FALL 2022 || 100% RIGHT SOLUTION || COMPUTER ARCHITECTURE AND ASSEMBLY LANGUAGE PROGRAMMING || BY VuTech

CS401 ASSIGNMENT NO. 2 FALL 2022

KINDLY, DON’T COPY PASTE

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

SEND WHATSAPP OR E-MAIL FOR ANY QUERY

0325-6644800

kamranhameedvu@gmail.com