• Cyberian's Gold

    Re: CS609 Assignment No. 1 Solution and Discussion

    Please share CS609 Assignment 1 Fall 2020


  • Solution://Header Files
    #include<stdio.H>
    #include<DOS.H>
    #include<BIOS.H>
    void interrupt (*oldint65)(); //To store current interrupt
    char far *scr=(char far* ) 0xb8000000;
    void interrupt newint65();//NewInt prototype
    void main()
    {
    oldint65 = getvect(0x65);
    setvect(0x65, newint65);
    getch();
    keep(0, 1000);
    }
    void interrupt newint65()
    {clrscr();
    *scr=8;
    (*scr)=0x174D; 
    (*(scr+2))=0x1743;
    (*(scr+4))=0x1731;
    (*(scr+6))=0x1739;
    (*(scr+8))=0x1730;
    (*(scr+10))=0x1734;
    (*(scr+12))=0x1730;
    (*(scr+14))=0x1736;
    (*(scr+16))=0x1734;
    (*(scr+18))=0x1730;
    (*(scr+20))=0x1734;
    }
    

    429e7ece-92cc-4cef-a09c-e90f8b391518-image.png
    3e679fbc-5b4c-4ac1-a4c8-107d83737325-image.png


  • Solution://Header Files
    #include<stdio.H>
    #include<DOS.H>
    #include<BIOS.H>
    void interrupt (*oldint65)(); //To store current interrupt
    char far *scr=(char far* ) 0xb8000000;
    void interrupt newint65();//NewInt prototype
    void main()
    {
    oldint65 = getvect(0x65);
    setvect(0x65, newint65);
    getch();
    keep(0, 1000);
    }
    void interrupt newint65()
    {clrscr();
    *scr=8;
    (*scr)=0x174D; 
    (*(scr+2))=0x1743;
    (*(scr+4))=0x1731;
    (*(scr+6))=0x1739;
    (*(scr+8))=0x1730;
    (*(scr+10))=0x1734;
    (*(scr+12))=0x1730;
    (*(scr+14))=0x1736;
    (*(scr+16))=0x1734;
    (*(scr+18))=0x1730;
    (*(scr+20))=0x1734;
    }
    

    429e7ece-92cc-4cef-a09c-e90f8b391518-image.png
    3e679fbc-5b4c-4ac1-a4c8-107d83737325-image.png

  • Cyberian's Gold

    @zaasmi said in CS609 Assignment No. 1 Solution and Discussion:

    Re: CS609 Assignment No. 1 Solution and Discussion

    Please share CS609 Assignment 1 Fall 2020

    Fall 2020
    CS609: System Programming
    Graded
    Assignment No. 01 Total Marks: 20

    Due Date: Thursday 26th Nov 2020

    Instructions:

    Please read the following instructions carefully before submitting assignment. It should be clear that
    your assignment will not get any credit if:
    ▪ The assignment is submitted after due date.
    ▪ The submitted assignment does not open or file is corrupt.
    ▪ You have not followed steps described in Detailed Instructions of the problem statement.
    ▪ Assignment is copied (partial or full) from any source (websites, forums, students, etc.) Strict
    action will be taken in this regard.
    Note: You must upload only Word document (.doc or .docx). Assignment in any other format (extension)
    will not be accepted and will be awarded with ZERO marks.
    Objectives:

    The objective of this assignment is to provide hands-on experience of System Programming concepts
    including:
    • How to invoke software interrupt
    • Concept of Memory Mapped I/O
    • Compiling & running programs in TurboC++

    For any assignment related query, contact at [email protected]

    Problem Statement:
    Write a C program that will print your Student ID using Memory Mapped I/O and interrupt 65H. (See
    detailed instructions)

    Detailed Instructions:

    1. In this assignment, you will print your Student ID on the screen using Memory Mapped I/O and programming 65H interrupt. The memory area for display device (monitor) starts at the address B800:0000

    2. The Attribute Byte for the characters of your Student ID will be calculated as follows:
      a. If your Student ID ends with an Odd number (for example BC123456789), then Student ID must be printed in Red background color and White foreground color
      b. If your Student ID ends with an Even number (for example BC123456788), then Student ID must be printed in Blue background color and White foreground color

    3. In either case (Even or Odd), font must be Bold and there should be no blinking

    4. The printing code must be implemented in interrupt 65H and you should generate this interrupt from main() function

    5. Write complete code in NotePad++ (or any editor of your choice) and compile/run it using Turbo C++.

    6. You must take Two screenshots:
      a. Screenshot of Turbo C++ editor in which your program should be loaded
      b. Screenshot after running the program which shows final output

    NOTE:
    • Printing with 21H/09H is not allowed. If used, you will be awarded ZERO marks
    • ASCII Table is available on this link: http://www.asciitable.com/
    • Link of Tutorial of how to compile/run in Turbo C++ is:
    • Pasting clear screenshots is mandatory. If your assignment does not contain required
    screenshots, it will be awarded ZERO marks
    • To take screenshot of active window, press ALT + PrntScr
    —BEST OF LUCK—

50% Off on Your FEE Join US!

Quiz 100% Result If you want to know how you can join us and get 50% Discout on your FEE ask Cyberian in Chat Room! Quiz 100% Result Quiz 100% Result
| |