Monday, 28 March 2011

JIO AUR JINE DO!!!!!!!!

Har Saal Garmio Me Hazaron Panchi Pani K Na Milne Se Mar Jate Hai
So I Requst U Apne Ghar k Aangan ya Diwar Par Pani ka1 Bartan Jarur Rakhen
Taki Pyaase Panchi
Apni Pyaas Buzaa Sake Aur Marne se Bach Sake.
Ager Mera Pryas Achcha Lage to Plz Is sa Har INDIAN
Ko samjaoooooo
$Jio aur jine do$

The needs of birds aren’t much different than our own. Food and water are absolute basics, but so is shelter or cover to serve as protection from the weather and a safe place to raise a family. Provide these fundamental elements in your backyard habitat, and you will attract numerous visitors.

Food TypeNatural SourceSome of the birds attracted
   
NutsOak, hickory, buckeye, chestnut, walnutWoodpeckers, nuthatches, jays, turkeys
   
SeedsPine, spruce, fir, maple, alder, sunflowers, coneflowers, asters, goldenrod, grassesWoodpeckers, grosbeaks, finches, bobwhites, cardinals, Pine Siskins, chickadees, crossbills, jays, nuthatches, junco, sparrows, wild turkey, titmice, doves, blackbirds
   
FruitHolly, dogwood, serviceberry, cherry, elderberry, Red Mulberry, hackberry, bayberry, raspberry, blueberry, High-bush Cranberry, pokeberry, Virginia creeper, grape, cactusThrushes, Veery, robin, catbird, Cedar Waxwing, mockingbird, bluebirds, sparrows, woodpeckers, tanagers, junco, grouse, thrashers, wren, flickers, roadrunner, vireo, bobwhite, Yellow-rumped Warbler
   
NectarVarious flowers, especially red tubular flowers, such as columbine, lobelia, penstemon, azalea, fuchsia, Trumpet Vine, Bee Balm, and native honeysuckle; also yuccaHummingbirds, orioles



All birds need water for drinking and for bathing. By providing a clean, fresh source, you will attract more species than will visit bird feeders.
This is a simple, popular way to provide water, with endless designs available at garden centers and wild bird supply stores. The sides should incline gently to a depth of no more than two to three inches. The surface should be rough for better footing. To protect vulnerable bathing birds from lurking predators, locate the bath some distance from cover, about 15 feet is a good distance. Change the water every few days and keep the bath scrubbed clean. Birds are attracted to the sound of running water and a drip or misting feature will increase the number of visitors. Water heaters will keep the water free of ice during winter months in colder climates.
Hum logo ko pyasa lagti hai to 2 min. bhi nahi saha sakata hai .....
Pher socho ya ba jaban janwar kaisa saha ta ho ga....
ya to bichara kisi bol bhi nahi sakata hai .
aur apni jaan da da ta ha pani pani kar ka ..........
so pls. i request u people Apne Ghar k Aangan ya Diwar Par Pani ka1 Bartan Jarur Rakhen
taki ya khub surat ciz ya duiya sa  gayab na ho jaya ya....................


Wednesday, 16 March 2011

IGNOU BCA CS-66 Solved Assignments 2010


Course Code                          :           CS-66

Course Title                           :           Multimedia

Assignment Number              :           BCA(4)-66/Assignment/2010

Maximum Marks                   :           25

Last Date of Submission       :           30th April, 2010 (For January Session)
30th October, 2010 (For July Session)

There are five  questions in this assignment.  Answer all the questions.  You may use illustrations and diagrams to enhance explanations.

Question 1:  What is Multimedia? Explain different applications of Multimedia.                         (5 Marks)

Solution: Multimedia is media and content that uses a combination of different content forms. The term can be used as a noun (a medium with multiple content forms) or as an adjective describing a medium as having multiple content forms. The term is used in contrast to media which only use traditional forms of printed or hand-produced material. Multimedia includes a combination of text, audio, still images, animation, video, and interactivity content forms.
Multimedia is usually recorded and played, displayed or accessed by information content processing devices, such as computerized and electronic devices, but can also be part of a live performance. Multimedia (as an adjective) also describes electronic media devices used to store and experience multimedia content. Multimedia is distinguished from mixed media in fine art; by including audio, for example, it has a broader scope. The term "rich media" is synonymous for interactive multimedia. Hypermedia can be considered one particular multimedia application.
There are many types of application software:
                       An application suite consists of multiple applications bundled together. They usually have related functions, features and user interfaces, and may be able to interact with each other, e.g. open each other's files. Business applications often come in suites, e.g. Microsoft Office, OpenOffice.org, and iWork, which bundle together a word processor, a spreadsheet, etc.; but suites exist for other purposes, e.g. graphics or music.
                       Enterprise software addresses the needs of organization processes and data flow, often in a large distributed environment. (Examples include Financial, Customer Relationship Management, and Supply Chain Management). Note that Departmental Software is a sub-type of Enterprise Software with a focus on smaller organizations or groups within a large organization. (Examples include Travel Expense Management, and IT Helpdesk)
                       Enterprise infrastructure software provides common capabilities needed to support Enterprise Software systems. (Examples include Databases, Email servers, and Network and Security Management)
                       Information worker software addresses the needs of individuals to create and manage information, often for individual projects within a department, in contrast to enterprise management. Examples include time management, resource management, documentation tools, analytical, and collaborative. Word processors, spreadsheets, email and blog clients, personal information system, and individual media editors may aid in multiple information worker tasks.
                       Content access software is software used primarily to access content without editing, but may include software that allows for content editing. Such software addresses the needs of individuals and groups to consume digital entertainment and published digital content. (Examples include Media Players, Web Browsers, Help browsers, and Games)
                       Educational software is related to content access software, but has the content and/or features adapted for use in by educators or students. For example, it may deliver evaluations (tests), track progress through material, or include collaborative capabilities.
                       Simulation software are computer software for simulation of physical or abstract systems for either research, training or entertainment purposes.
                       Media development software addresses the needs of individuals who generate print and electronic media for others to consume, most often in a commercial or educational setting. This includes Graphic Art software, Desktop Publishing software, Multimedia Development software, HTML editors, Digital Animation editors, Digital Audio and Video composition, and many others.[2]
                       Product engineering software is used in developing hardware and software products. This includes computer aided design (CAD), computer aided engineering (CAE), computer language editing and compiling tools, Integrated Development Environments, and Application Programmer Interfaces.

====================================================================

Question 2: List different input/output devices used in Multimedia Applications. Also explain different components of multimedia.                                                                                  (5 Marks)

Solution: Coming soon….

====================================================================


Question 3: Explain the use of communication technologies in multimedia services.                    (5 Marks)

Solution:
Basic multimedia communication technology tends to cover a range of multimedia devices, such as sound cards and graphic cards that allow users to create visual presentations that output sound and /or images. Multimedia generally means the combination of two or more continuous media. The two media are normally audio and video, sound plus moving pictures. For example the digital camera may be used externally to the PC, and allows the user to record images. When connecting the camera to the computer, using a cord, images will be formatted and printed. Various computers have sound cards stored within them, this allows output of sound from speakers through the use of CD's, and other formats that may have music attached to it. Sound cards allow individuals to listen to music played or stored on their computer.
Whereas Communications technology refers to the transmission of data from one computer to another from one device to another. Computer systems refer to an entire working computer. All computer systems consist of various components they include the case of the computer the power supply and many other components.
The Motherboard in a computer that manages the communication and function of all information. The Processor is another term for (CPU) Control Panel Unit. A microprocessor chip, the CPU is the brain of the computer; it uses mathematical functions to perform calculations.
Random Access Memory
Also referred to as the (RAM) holds the application programs and data in current use, it may also be occupied by software as operating systems and interpreters.
Computer systems also include a Bus, the Hard Drive which has encoding data on the hard drive there has been two approaches firstly being the MFM, and the next being RLL. Other components include Peripherals, Monitor, Keyboard, and various Pointed Devices including Joysticks.
Computer Networks
Computer networks are able to achieve communication between a couple of computers. Networks are split into three parts.
Local Area Network
A Local Area Network is also known as a (LAN) they are privately owned networks within a single building or campus. LANs are distinguished from other kinds of networks by three characteristics (1) their size, (2) their transmission technology, and (3) their topology.
Hub
This is a LAN device that broadcasts the information it receives to all attached devices and segments of the network.
Bridge
This limits the collision domain, can extend network distances, and can also filter packets on their MAC addresses and ease congestion.
Router
These have two functions firstly to determine the best path to a destination and to share path information the "route" with other routes. A router can also connect networks using different media and architectures, which enable them to determine the best path for a packet to reach another network. They can also filter broadcasts.
Network Interface Card
The Network Interface Card allows devices to connect to the network. They provide connections for any type of networking media, including wireless media. Internal hardware installed within computer amongst other devices that allow them to communicate on a network.
Metropolitan Area Network
This is constructed of LANs that are interconnected across a city or metropolitan area. An example of a MAN is the cable television network available in many cities. MANs require routers, telephone and ATM switches, and microwave antennas. They produce single points of connection between each LAN.
ATM Switch
A network device which is used by telecommunications companies like the local telephone company to support multiple connections on an ATM network.
Wide Area Network
This is also referred to as a (WAN) Two or more LANs or MANs, which are interconnected using slow-speed connections over telephone lines.
Modem
A modem is a device used by telecommunications companies like the local telephone company to support multiple connections on an ATM network.

====================================================================

Question 4: List the features required in the Multimedia Authoring Software. Compare and contrast the features of Flash and Authorware.                                                                        (5 Marks)

Solution: coming soon…

====================================================================


Question 5: Explain the various techniques for animation in Multimedia. Also explain how  a multimedia package to be designed for awareness about “Uses of Internet”.        (5 Marks)

Solution: Computer animation encompasses a variety of techniques on a computer. Figures are created and/or edited on the computer using 2D bitmap graphics or created and edited using 2D vector graphics. This includes automated computerized versions of traditional animation techniques such as of twining, morphing, onion skinning and interpolated rotoscoping. Some of the commonly used methods are: Analog computer animation Flash animation PowerPoint animation. As any online user knows, the Internet has grown at a blazing speed. It was only in the mid 1990s that the Internet became a reality for average computer users, but since that time, the Internet has grown rapidly and it affects almost every area of our lives. Estimates show that there would be about 165 million online users in United States till 2002. The rapid growth of Internet has affected research in all
types of businesses, including mass media research (Wimmer& Dominick, 2003). But we can say that the effects of the Internet are obvious in almost every field of Human Life.
The Internet has had a dramatic affect on the way people communicate, conduct business, and process information, and it has affected mass media and research as well. For instance, the Internet has:
• Created new methods for gathering Mass Media data (Web search).
• Changed the way researchers search for and disseminate information.
• Simplified collaboration and interaction among researchers.
• Provided new material for analysis (Ibid)
In spite of research, Internet offers exciting opportunities and possibilities for users like: -
• Use of broadband Internet access people can easily download movies, songs, games,
informative data about new trends, cooking recipes, etc. From any library or organization
of the world.
• Interaction with the different peoples with the help of chat rooms, e-mails, e-cards, net
SMS, etc. one can easily communicate in less expensive way.
• E-commerce – involves buying and selling goods and services across the Internet, rather
than traditional outlets such as retail stores etc., also called online marketing to reach the
potential buyers across the globe through Internet. (Jones, 2003, P.162)
• Online journalism-offers a level of interactivity-direct communication between news
organizations and audiences made possible by news forums (Ibid P. 356.). Publishing a
high volume daily newspaper is an intricate business requiring the synchronization of
many different activities. Publishing online can both open new avenues in information
dissemination and build a more dynamic relationship with the reader. This provides
European Journal of Social Sciences – Volume 6, Number 4 (2008)
immediacy, multi-paging, multi media, flexible delivery platforms, and facilities like
archiving. (Adams & Clark, 2001, PP.29-32)
• Learning and sharing cultures-Mcluhan believed that Hollywood and the industry of
advertisers and marketing specialists provided the content for collective hallucination.
Many media were deliberately used to manufacture demand by saturating popular culture
with commercial messages. The resulting polluted mental environment was the most
dangerous consequence of many new Media (Jones, 2003, P.305). Likewise the concepts
of westernization, global culture, pop culture and feminism are penetrated in the
developing countries with the help of New Media.
• Net conferencing-as conference is a task-oriented meeting between two or more people.
Likewise net conferencing mediated by network computers, with or without video or its
like interpersonal or small group communication through which multinational companies
work all over the globe and big celebrities transmit their messages to their associate by
sitting in any corner of the world and get connected via the internet. (Adams& Clark,
2001)
• Researching on the Internet locating the exact data according to your needs by net.
Numbers of websites are available for the students / researchers all over the world to get
any kind of academic or non-academic information from the Internet. Since these tools
search through vast databases, they are more likely to give you too many results than not
enough. (Ibid)
• Web creating / designing – every individual or organization can easily creates its own
web site and get connected with the world and be the member of exciting cyber space
literally wrap yourself in media and not have to see what’s really going on around you
(William Gibson) (http://www.w3c.com).
• Online books/E-Books -one cannot only consult E-newspaper and e-magazines but lots of books are also available online. Online booksellers give you a variety of books, which can be purchased online (http://www.amazon/e-books.com).
• Internet radio and recordings- making the airwaves surfer friendly. As the speed of the net has been increased, it has made it possible for richer media to be transmitted over the
web. No longer limit to text, we can now send audio and video as well. But one of the
more significant advances has been the development of streaming audio (files can be
playing during down loads) (http://realaudio/realoneplayer.internetradio).
• Internet film – micro cinema movement- term coined in 1991 is a community of       independent film makers who produce everything from animated shorts to feature length
movies at a fraction of the cost of the major studios. With digital equipment, these films
are now rivaling the quality of multimillion-dollar productions. Web as distribution medium, the micro cinema community is rapidly growing (http://www.automfilms.com).
The aforesaid uses also shows that how Internet is affecting human life and provide new
insights in the field of mass media.
Basic multimedia communication technology tends to cover a range of multimedia devices, such as sound cards and graphic cards that allow users to create visual presentations that output sound and /or images. Multimedia generally means the combination of two or more continuous media. The two media are normally audio and video, sound plus moving pictures. For example the digital camera may be used externally to the PC, and allows the user to record images. When connecting the camera to the computer, using a cord, images will be formatted and printed. Various computers have sound cards stored within them, this allows output of sound from speakers through the use of CD's, and other formats that may have music attached to it. Sound cards allow individuals to listen to music played or stored on their computer.
Whereas Communications technology refers to the transmission of data from one computer to another from one device to another. Computer systems refer to an entire working computer. All computer systems consist of various components they include the case of the computer the power supply and many other components.
The Motherboard in a computer that manages the communication and function of all information. The Processor is another term for (CPU) Control Panel Unit. A microprocessor chip, the CPU is the brain of the computer; it uses mathematical functions to perform calculations.
Random Access Memory
Also referred to as the (RAM) holds the application programs and data in current use, it may also be occupied by software as operating systems and interpreters.
Computer systems also include a Bus, the Hard Drive which has encoding data on the hard drive there has been two approaches firstly being the MFM, and the next being RLL. Other components include Peripherals, Monitor, Keyboard, and various Pointed Devices including Joysticks.
Computer Networks
Computer networks are able to achieve communication between a couple of computers. Networks are split into three parts.
Local Area Network
A Local Area Network is also known as a (LAN) they are privately owned networks within a single building or campus. LANs are distinguished from other kinds of networks by three characteristics (1) their size, (2) their transmission technology, and (3) their topology.
Hub
This is a LAN device that broadcasts the information it receives to all attached devices and segments of the network.
Bridge
This limits the collision domain, can extend network distances, and can also filter packets on their MAC addresses and ease congestion.
Router
These have two functions firstly to determine the best path to a destination and to share path information the "route" with other routes. A router can also connect networks using different media and architectures, which enable them to determine the best path for a packet to reach another network. They can also filter broadcasts.
Network Interface Card
The Network Interface Card allows devices to connect to the network. They provide connections for any type of networking media, including wireless media. Internal hardware installed within computer amongst other devices that allow them to communicate on a network.
Metropolitan Area Network
This is constructed of LANs that are interconnected across a city or metropolitan area. An example of a MAN is the cable television network available in many cities. MANs require routers, telephone and ATM switches, and microwave antennas. They produce single points of connection between each LAN.
ATM Switch
A network device which is used by telecommunications companies like the local telephone company to support multiple connections on an ATM network.
Wide Area Network
This is also referred to as a (WAN) Two or more LANs or MANs, which are interconnected using slow-speed connections over telephone lines.
Modem
A modem is a device used by telecommunications companies like the local telephone company to support multiple connections on an ATM network.


By Nikhil Trivedi


IGNOU BCA CS-65 Solved Assignments 2010


Course Code                          :           CS-65

Course Title                           :           Windows Programming
Assignment Number              :           BCA(4)-65/Assignment/2010

Maximum Marks                   :           25

Last Date of Submission       :           30th April, 2010 (For January Session)
30th October, 2010 (For July Session)


There are five questions in this Assignment. Answer all the questions. You may use illustrations and diagrams to enhance explanations.


Question 1:           Design a database application to generate Cinema Hall Transactions using Visual Basic. Provide necessary documentation, reports, screen layouts etc. for the project.
       (7 Marks)

Solution:

==================================================================================

Question 2:           What is a significance of Crystal Reports? How are these used? Explain.
       (3 Marks)

Solution: 'Crystal Reports' is a popular third party package that is included with Visual Basic, which allows you to create reports for your application. The package consists of a designer - where you can design and test the reports, Crystal Reports API calls and Crystal Reports control.
Note: Crystal Reports is shipped and installed as part of the VB installation package except in VB6. This can be found in \common\tools\crysrep double click on crystl32.exe to install.
Creating a Report
VB5 or less
To access the Crystal Report Designer, select the Report Designer from the Add-In menu in the VB environment
VB6
To access the Crystal Report Designer, a Start menu group and shortcut will have been automatically created.
Lets have a quick look at the Designer

crystald
Initially there is one tab on the report - Design - when you select the print preview to see how the report looks with data in, another tab named Preview will appear.
While you are in design mode you can draw and arrange the data fields on the report. This is done in a similar way to creating controls on a form in VB.
For the purposes of this tutorial we will be creating a simple report from the sample database BIBLIO.
Start the Crystal Reports Designer
Create a new report by choosing File menu - New and the Create New Report dialog box will appear (see picture below)
dialog
Click on the Custom button to display the Choose Report Type and Data Type frames.
Select the Custom Report and click on the Data File.
Specify the location of the BIBLIO.MDB Access database
Select which tables from the database you want. For this example we will need the authors table and the Title table.
check that the joins are correct in the Linking Export
Now we are ready to draw the report
report
Drag and drop the fields you want on to the report. So that it looks like the report above.
Now if you run it by selecting Print Preview, you can see what the report looks like.
Now save the report and we have a template that now can be used in VB.
Note: Turn off the Save Data with report option if you want the data to contain new information each time the report is used. Going to the File menu, selecting Options and clicking on the Reporting Tab sets the option
This is fine I hear you say, but what if I don't want all the data. There are many options in the Crystal Reports and as this tutorial is more of an overview I will not be going into it. But one important thing to do is to get specific data. This is done by a selection formula (i.e. the Where clause of a SQL statement).
select
The above formula will only show Authors that have had their book published in 1984.
Using Crystal Reports in VB
When you have designed your report, the saved file should have an extension .rpt. You can use this report with the Crystal Report control to display or print your report in a VB application.
Note:Check the crystal report help files for the files you need to distribute with the control. You will also need any .rpt files that you have created
You will have to add the Crystal Report control to the toolbox, this is done by going to the Project menu and selecting Components, then looking down the list for the control and clicking on it
To use the control add it to a form and set the following properties
  • ReportFileName - The path and the filename of the .rpt file you have created
  • DataFiles(0) - The path and the filename of the database that you want it to use.
    If this is left blank it will use the one in the report.
  • SelectionFormula - The formula to select the subset of data that you want.
  • Destination - 0 to Preview, 1 to Print
To display the report use the .printreport method i.e CrystalReport1.PrintReport


==================================================================================



Question 3:           What are different the built-in functions and their use in Visual Basic. Also, discuss the need of Module level variables with example.
       (5 Marks)

Solution:
Function

Name
Return Type
Description
CBool
Boolean
Converts an expression into a Boolean value
CByte
Byte
Converts an expression into Byte number
CDate
Date
Converts and expression into a date or time value
CDbl
Double
Converts an expression into a flowing-point (decimal) number
CInt
Integer
Converts an expression into an integer (natural) number
CCur
Currency
Converts an expression into a currency (monetary) value
CLng
Long
Converts an expression into a long integer (a large natural) number
CSng
Single
Converts an expression into a flowing-point (decimal) number
CStr
String
Converts an expression into a string
A variable that is recognized among all of the procedures on a module sheet is called a "module-level" variable. A module-level variable is available to all of the procedures in that module, but it is not available to procedures in other modules. A module-level variable remains in existence while Visual Basic is running until the module in which it is declared is edited. Module-level variables can be declared with a Dim or Private statement at the top of the module above the first procedure definition.

At the module level, there is no difference between Dim and Private. Note that module-level variables cannot be declared within a procedure.

Note If you use Private instead of Dim for module-level variables, your code may be easier to read (that is, if you use Dim for local variables only, and Private for module-level variables, the scope of a particular variable will be more clear).

In the following example, two variables, A and B, are declared at the module level. These two variables are available to any of the procedures on the module sheet. The third variable, C, which is declared in the Example3 macro, is a local variable and is only available to that procedure.

Note that in Example4, when the macro tries to use the variable C, the message box is empty. The message box is empty because C is a local variable and is not available to Example4, whereas variables A and B are.
   Dim A As Integer        ' Module-level variable.
   Private B As Integer    ' Module-level variable.
 
   Sub Example1()
       A = 100
       B = A + 1
   End Sub
 
   Sub Example2()
       MsgBox "The value of A is " & A
       MsgBox "The value of B is " & B
   End Sub
 
   Sub Example3()
        Dim C As Integer    ' Local variable.
        C = A + B
        MsgBox "The value of C is " & C
   End Sub
 
   Sub Example4()
        MsgBox A
        ' The message box displays the value of A.
        MsgBox B
        ' The message box displays the value of B.
        MsgBox C
        ' The message box displays nothing because C was a local variable.
   End Sub


==================================================================================



Question 4:           List the controls and items those can/cannot be implemented over Multiple Document interface (MDI). Also, discuss the use of MDI in the development of Visual Basic application.
       (5 Marks)

Solution: A document management system (DMS) is a computer system (or set of computer programs) used to track and store electronic documents and/or images of paper documents. The term has some overlap with the concepts of content management systems. It is often viewed as a component of enterprise content management (ECM) systems and related to digital asset management, document imaging, workflow systems and records management systems.
In the broadest sense, document management systems can range from a shoebox all the way to an enterprise content management system. There are several common issues that are involved in managing documents, whether the system is an informal, ad-hoc, paper-based method for one person or if it is a formal, structured, computer enhanced system for many people across multiple offices. Most methods for managing documents address the following areas:
Location
Where will documents be stored? Where will people need to go to access documents? Physical journeys to filing cabinets and file rooms are analogous to the onscreen navigation required to use a document management system.
Filing
How will documents be filed? What methods will be used to organize or index the documents to assist in later retrieval? Document management systems will typically use a database to store metadata about documents and a File System to store the actual physical files.
Retrieval
How will documents be found? Typically, retrieval encompasses both browsing through documents and searching for specific information. What kind of information about documents are indexed for rapid retrieval?
Security
How will documents be kept secure? How will unauthorized personnel be prevented from reading, modifying or destroying documents?
Disaster recovery
How can documents be recovered in case of destruction from fires, floods or natural disasters?
How long should documents be kept, i.e. retained? As organizations grow and regulations increase, informal guidelines for keeping various types of documents give way to more formal records management practices.
How can documents be preserved for future readability?
Distribution
How can documents be available to the people that need them?
Workflow
If documents need to pass from one person to another, what are the rules for how their work should flow?
Creation
How are documents created? This question becomes important when multiple people need to collaborate, and the logistics of version control and authoring arise.
Authenticity
Is there a way to vouch for the authenticity of a document ?

When, where and by whom are documents created, modified, published and stored [1]?



==================================================================================



Question 5:           What is data control? Explain the use of different data controls available in
                                Visual Basic with example.    (5 Marks)


Solution: The Visual Basic 6.0 Data control is used as a mechanism for binding controls to a database using DAO. Visual Basic 2005 has no equivalent for the Data control; the data-binding architecture has changed and DAO is no longer supported. For more information, see Data Access for Visual Basic 6.0 Users.
The Data control also provides an interface for navigating data, with buttons for moving back and forth through rows in a database table. Visual Basic 2005 has an equivalent control, the BindingNavigator control, which also contains buttons for adding and deleting rows
The Visual Basic 6.0 Data control is used as a mechanism for binding controls to a database using DAO. Visual Basic 2005 has no equivalent for the Data control; the data-binding architecture has changed and DAO is no longer supported. For more information, see Data Access for Visual Basic 6.0 Users.
The Data control also provides an interface for navigating data, with buttons for moving back and forth through rows in a database table. Visual Basic 2005 has an equivalent control, the BindingNavigator control, which also contains buttons for adding and deleting rows.

==================================================================================
By Nikhil Trivedi

IGNOU BCA CS-64 Solved Assignments 2010


Course Code                          :           CS-64

Course Title                           :           Introduction to Computer Organisation
Assignment Number              :           BCA (4)-64/Assignment/2010

Maximum Marks                   :           25

Last Date of Submission       :           30th April, 2010 (For January Session)
30th October, 2010 (For July Session)

There are three questions in this assignment.  Answer all the questions.  You may use illustrations and diagrams to enhance your explanations.  You may use illustrations and diagrams to enhance the explanations.  Please go through the guidelines regarding assignments given in the Programme Guide for the format of presentation.  Answer to each part of the question should be confined to about 300 words.


Questions 1

(a)                 Convert the following decimal numbers to binary, octal and hexadecimal.
(1 Mark)
(i)                 1259
(ii)               3500
(iii)              256
(iv)             1039

Solution: Q1 (a)

Decimal

BINARY

OCTAL

HEXADECIMAL

 

 

1259

10011101011

2353

4EB

 

 

3500

110110101100

6654

DAC

 

 

256

100000000

400

100

 

 

1039

10000001111

2017

40F

 

 



==================================================================================

(b)                 Perform the following arithmetic operations using binary Signed 2’s complement notation. (Please note that all the numbers given in this question are in decimal notation). Use only 8 bit representation. Indicate the overflow, if any.                                                                                                                                                                                                                                                   (1 Mark)
(i)                 +35 – 75
(ii)               –35 – 93
(iii)              +35 – (–93)
(iv)             +35 – 24

Solution: coming soon……

==================================================================================



(c)                 Consider an 8-bit data 11100010 along with its Single Error Correcting (SEC) code bits was sent across a communication channel and was received at the destination as 01100010. (You may assume that all the Single Error Correcting code bits that were sent were received correctly at the destination). Find out the SEC bits that were generated at the Source and at the destination of data. Show how these error correcting bits can be used to flag and correct the error in the received data              (2 Mark)

Solution: coming soon….

==================================================================================



(d)                 Design and draw a combinational circuit using AND-OR-NOT gates that accepts an input number of three bits. The output of the circuit is a 6 bit number that is the square of the input number. Make the truth table for the circuit and use K-maps to design the circle  (1 Mark)


Solution: coming soon….

==================================================================================


(e)                 Draw the circuit for a decoder and explain the working of this decoder. List the possible uses of the decoder circuit.                                                                                                                   (1 Mark)


Solution: Decoders can detect a code and activate a single output to signal the presence of that code. Decoders have many applications, from producing system alerts in alarm systems to performing the task of driving multiple devices in microprocessor systems (e.g. memory).

Basic Binary Decoder

The function of the binary decoder is to determine if a given input combination has occurred. For example, if we wish to detect that 1011 occurs on the inputs of a digital circuit we must design a decoder which only outputs ‘1’ for this instance. Accordingly, a 4-input AND gate and an Inverter may be employed as illustrated in Figure 2-7.

fig2-7.gif (1848 bytes)

The Three Bit Binary Decoder

In order to decode all possible combinations of three bits, eight (23=8) decoding logic gates are required. This type of decoder is called the 3-line-to-8-line decoder because they are 3 inputs and 8 outputs. Let us consider the design of such a decoder and assume that we require ACTIVE HIGH outputs. That is, for a given input combination the decoder outputs ‘1’. To illustrate lets consider Table 2-11 which list the decoding functions and truth tables for the 3-line-to-8-line decoder.


Decimal Digit
Binary Inputs
Logic Function
Outputs
D0
D1
D2
D3
D4
D5
D6
D7
0
0
0
0
Image133
1
0
0
0
0
0
0
0
1
0
0
1
Image134
0
1
0
0
0
0
0
0
2
0
1
0
Image135
0
0
1
0
0
0
0
0
3
0
1
1
Image136
0
0
0
1
0
0
0
0
4
1
0
0
Image137
0
0
0
0
1
0
0
0
5
1
0
1
Image138
0
0
0
0
0
1
0
0
6
1
1
0
Image139
0
0
0
0
0
0
1
0
7
1
1
1
Image140
0
0
0
0
0
0
0
1
Table 2-11 Decoding functions and truth tables for the 3-line-to-8-line decoder

Now, we can develop a decoder based on each logic function and implement the SOP logic circuit. This is illustrated below in Figure 2-8.
Figure 2-8 Internal Circuitry for 3-line-to-8-line decoder
It is far more convenient to use the logic symbol for the3-line-to-8-line decoder as illustrated in Figure 2-9 rather than repeating the complex internal circuitry each time. 
 fig2-9.gif (2581 bytes)
Figure 2-9 Logic Symbol for 3-line-to-8-line decoder


==================================================================================


(f)                  Explain the concept of Direct mapping Cache memory with the help of an diagram/example. How is this Direct mapping cache different to that of 2 way set associative cache memory?  (1 Mark)

Solution: Cache Memory - Direct Mapped Cache

If each block from main memory has only one place it can appear in the cache, the cache is said to be Direct Mapped. Inorder to determine to which Cache line a main memory block is mapped we can use the formula shown below


Cache Line Number = (Main memory Block number) MOD (Number of Cache lines)
Let us assume we have a Main Memory of size 4GB (232), with each byte directly addressable by a 32-bit address. We will divide Main memory into blocks of each 32 bytes (25). Thus there are 128M (i.e. 232/25 = 227) blocks in Main memory.

We have a Cache memory of 512KB (i.e. 219), divided into blocks of each 32 bytes (25). Thus there are 16K (i.e. 219/25 = 214) blocks also known as Cache slots or Cache lines in cache memory. It is clear from above numbers that there are more Main memory blocks than Cache slots.


NOTE: The Main memory is not physically partitioned in the given way, but this is the view of Main memory that the cache sees.


NOTE: We are dividing both Main Memory and cache memory into blocks of same size i.e. 32 bytes.


A set of 8k (i.e. 227/214 = 213) Main memory blocks are mapped onto a single Cache slot. In order to keep track of which of the 213 possible Main memory blocks are in each Cache slot, a 13-bit tag field is added to each Cache slot which holds an identifier in the range from 0 to 213 – 1.


All the tags are stored in a special tag memory where they can be searched in parallel. Whenever a new block is stored in the cache, its tag is stored in the corresponding tag memory location.

Direct Mapped Cache
When a program is first loaded into Main memory, the Cache is cleared, and so while a program is executing, a valid bit is needed to indicate whether or not the slot holds a block that belongs to the program being executed. There is also a dirty bit that keeps track of whether or not a block has been modified while it is in the cache. A slot that is modified must be written back to the main memory before the slot is reused for another block. When a program is initially loaded into memory, the valid bits are all set to 0. The first instruction that is executed in the program will therefore cause a miss, since none of the program is in the cache at this point. The block that causes the miss is located in the main memory and is loaded into the cache.

This scheme is called "direct mapping" because each cache slot corresponds to an explicit set of main memory blocks. For a direct mapped cache, each main memory block can be mapped to only one slot, but each slot can receive more than one block.

The mapping from main memory blocks to cache slots is performed by partitioning an main memory address into fields for the tag, the slot, and the word as shown below:
Direct Mapped Cache
The 32-bit main memory address is partitioned into a 13-bit tag field, followed by a 14-bit slot field, followed by a 5-bit word field. When a reference is made to a main memory address, the slot field identifies in which of the 214 cache slots the block will be found if it is in the cache.
Set Associative mapping scheme combines the simplicity of Direct mapping with the flexibility of Fully Associative mapping. It is more practical than Fully Associative mapping because the associative portion is limited to just a few slots that make up a set.

In this mapping mechanism, the cache memory is divided into 'v' sets, each consisting of 'n' cache lines. A block from Main memory is first mapped onto a specific cache set, and then it can be placed anywhere within that set. This type of mapping has very efficient ratio between implementation and efficiency. The set is usually chosen by

Cache set number = (Main memory block number) MOD (Number of sets in the cache memory)

If there are 'n' cache lines in a set, the cache placement is called n-way set associative i.e. if there are two blocks or cache lines per set, then it is a 2-way set associative cache mapping and four blocks or cache lines per set, then it is a 4-way set associative cache mapping.

Let us assume we have a Main Memory of size 4GB (232), with each byte directly addressable by a 32-bit address. We will divide Main memory into blocks of each 32 bytes (25). Thus there are 128M (i.e. 232/25 = 227) blocks in Main memory.

We have a Cache memory of 512KB (i.e. 219), divided into blocks of each 32 bytes (25). Thus there are 16K (i.e. 219/25 = 214) blocks also known as Cache slots or Cache lines in cache memory. It is clear from above numbers that there are more Main memory blocks than Cache slots.



Cache Size = (Number of Sets) * (Size of each set) * (Cache line size)

So even using the above formula we can find out number of sets in the Cache memory i.e.

219 = (Number of Sets) * 2 * 25


Number of Sets = 219 / (2 * 25) = 213.


Set Associative Mapped Cache



==================================================================================

(g)                 Differentiate between the access mechanism of a magnetic disk to that of CD ROM? Why do you need a number of disks (RAID)? Define different levels of RAID?                               (1 Mark)

RAID is an acronym first defined by David A. Patterson, Garth A. Gibson, and Randy Katz at the University of California, Berkeley in 1987 to describe a redundant array of inexpensive disks,[1] a technology that allowed computer users to achieve high levels of storage reliability from low-cost and less reliable PC-class disk-drive components, via the technique of arranging the devices into arrays for redundancy.
There are various combinations of these approaches giving different trade-offs of protection against data loss, capacity, and speed. RAID levels 0, 1, and 5 are the most commonly found, and cover most requirements.
] RAID 0
RAID 0 (striped disks) distributes data across multiple disks in a way that gives improved speed at any given instant. If one disk fails, however, all of the data on the array will be lost, as there is neither parity nor mirroring. In this regard, RAID 0 is somewhat of a misnomer, in that RAID 0 is non-redundant. A RAID 0 array requires a minimum of two drives. A RAID 0 configuration can be applied to a single drive provided that the RAID controller is hardware and not software (i.e. OS-based arrays) and allows for such configuration. This allows a single drive to be added to a controller already containing another RAID configuration when the user does not wish to add the additional drive to the existing array. In this case, the controller would be set up as RAID only (as opposed to SCSI only (no RAID)), which requires that each individual drive be a part of some sort of RAID array.
] RAID 1
RAID 1 mirrors the contents of the disks, making a form of 1:1 ratio realtime backup. The contents of each disk in the array are identical to that of every other disk in the array. A RAID 1 array requires a minimum of two drives. Although RAID 1's writing process copies the data identically to all drives, a RAID 1 mirror would not be suitable as a permanent backup solution for businesses, since RAID architecture by design allows for certain failures to take place (e.g. vandalism or accidental file deletion). However for home or other applications, where vandalism is very unlikely and accidental file deletion is put up with, RAID 1 offers a good backup solution.
RAID 3/4
RAID 3 or 4 (striped disks with dedicated parity) combines three or more disks in a way that protects data against loss of any one disk. Fault tolerance is achieved by adding an extra disk to the array, which is dedicated to storing parity information; the overall capacity of the array is reduced by one disk. A RAID 3 or 4 array requires a minimum of three drives: two to hold striped data, and a third for parity. With the minimum three drives needed for RAID 3, the storage efficiency is 66 percent. With six drives, the storage efficiency is 87 percent. The main disadvantage is poor performance for multiple, simultaneous, and independent read/write operations.
 RAID 5
Striped set with distributed parity or interleave parity requiring 3 or more disks. Distributed parity requires all drives but one to be present to operate; drive failure requires replacement, but the array is not destroyed by a single drive failure. Upon drive failure, any subsequent reads can be calculated from the distributed parity such that the drive failure is masked from the end user. The array will have data loss in the event of a second drive failure and is vulnerable until the data that was on the failed drive is rebuilt onto a replacement drive. A single drive failure in the set will result in reduced performance of the entire set until the failed drive has been replaced and rebuilt.
RAID 6

=================================================================================


(h)                 What is the need of Direct Memory Access (DMA) in a Single User Computer? What is DMA module? Explain the functions of a DMA module.               (1 Mark)
Solution: Direct memory access is system that can control the memory system without using the CPU. On a specified stimulus, the module will move data from one memory location or region to another memory location or region. While it is limited in its flexibility, there are many situations where automated memory access is much faster than using the CPU to manage the transfers. Systems like the ADC, DAC and PWM capturing all require frequent and regular movements of memory out of their respective systems. The DMA can be configured to handle moving the collected data out of the peripheral module and into more useful memory locations (like arrays). Only memory can be accessed this way, but most peripheral systems, data registers, and control registers are accessed as if they were memory. The DMA is intended to be used in low power mode because it uses the same memory bus as the CPU and only one or the other can use the memory at the same time.
The DMA system is organized into three largely independent parts. Though the three compete for the same memory bus, they have can be configured for independent triggers and memory regions.

DMA Operation

There are three independent channels for DMA transfers. Each channel receives its trigger for the transfer through a large multiplexer that chooses from among a large number of signals. When these signals activate, the transfer occurs. The DMAxTSELx bits of the DMA Control Register 0 (DMACTL0). The DMA controller receives the trigger signal but will ignore it under certain conditions. This is necessary to reserve the memory bus for reprogramming and non-maskable interrupts etc. The controller also handles conflicts for simultaneous triggers. The priorities can be adjusted using the DMA Control Register 1 (DMACTL1). When multiple triggers happen simultaneously, they occur in order of module priority. The DMA trigger is then passed to the module whose trigger activated. The DMA channel will copy the data from the starting memory location or block to the destination memory location or block. There are many variations on this, and they are controlled by the DMA Channel x Control Register (DMAxCTL):
  1. Single Transfer - each trigger causes a single transfer. The module will disable itself when DMAxSZ number of transfers have occurred (setting it to zero prevents transfer). The DMAxSA and DMAxDA registers set the addresses to be transferred to and from. The DMAxCTL register also allows these addresses to be incremented or decremented by 1 or 2 bytes with each transfer. This transfer halts the CPU.
  2. Block Transfer - an entire block is transferred on each trigger. The module disables itself when this block transfer is complete. This transfer halts the CPU, and will transfer each memory location one at a time. This mode disables the module when the transfer is complete.
  3. Burst-Block Transfer - this is very similar to Block Transfer mode except that the CPU and the DMA transfer can interleave their operation. This reduces the CPU to 20% while the DMA is going on, but the CPU will not be stopped altogether. The interrupt occurs when the block has completely transferred. This mode disables the module when the transfer is complete.
  4. Repeated Single Transfer - the same as Single Transfer mode above except that the module is not disabled when the transfer is complete.
  5. Repeated Block Transfer - the same as Block Transfer mode above except that the module is not disabled when the transfer is complete.
  6. Repeated Burst-Block Transfer - the same as Burst Block Transfer mode above except that the module is not disabled when the transfer is complete.
==================================================================================


(i)                   What is the concept of Interrupt driven Input/ Output? Assume that while a computer is going through a Read operation from the keyboard, an interrupt occurs that requests for writing a file to the disk. Write the steps that will be involved for the situation as above, if interrupt driven Input/Output is used. Explain each step.(1 Mark)
Solution:  Literally to interrupt means to break the continuity of some on going task. When we talk of computer interrupt we mean exactly the same in terms of the processor. When an interrupt occurs the continuity of the processor is broken and the execution branches to an interrupt service routine. This interrupt service routine is a set of instruction carried out by the CPU to perform or initiate an I/O operation generally. When the routine is over the execution of the CPU returns to the point of interruption and continues with the on going process.

Interrupts can be of two types
1.                              Hardware interrupts
2.                              Software interrupts
Only difference between them is the method by which they are invoked. Software interrupts are invoked by means of some software instruction or statement and hardware interrupt is invoked by means of some hardware controller generally.

InterruptMechanism
Interrupts are quite similar to procedures or function because it is also another form temporary execution transfer, but there some differences as well. Note that when procedures are invoked by there names which represents their addresses is specified whereas in case of interrupts their number is specified. This number can be any 8 bit value which certainly is not its address. So the first question is what is the significance of this number? Another thing should also be noticed that procedures are part of the program but the interrupts invoked in the program are no where declared in the program. So the next question is where do these interrupts reside in memory and if they reside in memory then what would be the address of the interrupt?

Firstly lets see where do interrupts reside. Interrupts certainly reside somewhere in memory, the interrupts supported by the operating system resides in kernel which you already know is the core part of the operating system. In case of DOS the kernel is io.sys which loads in memory at boot time and in case of windows the kernel is kernel32.dll or kernel.dll. these files contain most of the I/O routines and are loaded as required. The interrupts supported by the ROM BIOS are loaded in ROM part of the main memory which usually starts at the address F000:0000H. Moreover it is possible that some device drivers have been installed these device drivers may provide some I/O routines so when the system boots these I/O routines get memory resident at interrupt service routines. So these are the three possibilities.

Secondly a program at compile time does not know the exact address where the interrupt service routine will be residing in memory so the loader cannot assign addresses for interrupt invocations. When a device driver loads in memory it places the address of the services provided by itself in the interrupt vector table. Interrupt Vector Table (IVT) in short is a 1024 bytes sized table which can hold 256 far addresses as each far address occupies 4 bytes. So its possible to store the addresses of 256 interrupts hence there are a maximum of 256 interrupt in a standard PC. The interrupt number is used as an index into the table to get the address of the interrupt service routine.


==================================================================================

               
Questions 2

(a)                 Write a program to evaluate the following statement:
Z = A × B – C ÷ D + A × E   using
                                                (i)   zero address machine instructions
                                                (ii)  three address machine instructions
                                                Explain the difference in the size of the programs.                                       (1 Mark)

(b)                 Assume a machine that has no registers except for PC, AC and MAR. Also assume that the machine has fixed length instructions and have commands for subroutine call and return. For most of the arithmetic instructions in this machine one of the operand is the AC register. Select five addressing modes for the machine. Give reasons for your selection.             (1 Mark)

(c)            Explain the micro-operation sequence that will result in fetching an instruction and executing it. You may assume that it is an ADD instruction which have one direct operand. On execution of this ADD instruction, the direct operand is added to the register AC and the result is left in the AC register. You may assume suitable set of registers for the machine.                    
                                                                                                                                                                     (1 Marks)
(d)                 Assume that an 8-bit Register R has the binary value 100111001. Perform the following operations on the register R (possibly using another register R2, if needed):                                                                                     (1 Mark)
(i)    Selective Clear the lower 4 bits of R
(ii)   Masking out the upper 4 bits of R
(iii)  Complementing the value of the register R
(iv)  Inserting a value 0111 in the upper 4 bits of the register R.

==================================================================================

(e)                 Represent 2.0625 and 254.125 into IEEE 754 floating point double precision format. (1 Mark)
Solution : 2.0625 = 0f4000800000000000…..254.125 = 0f406FC40000000000
==================================================================================

(f)                  How a control unit controls the operations of a computer? Explain with the help of an example/diagram.         (1 Mark)

Control Unit Co-ordinates the input and output devices of a computer system

Functions of the Control Unit

  1. It controls and monitors the hardware attached to the system to make sure that the commands given to it by the application software are used. For example, if you send something to print, the control unit will keep a check that the instructions are sent to the printer correctly.
  2. It controls the input and output of data so that the signals go to the right place at the right time
  3. It controls the flow of data within the CPU


cpuparts


==================================================================================

(g)                 What are the micro-instructions? Explain the different types of micros-instructions that can be used in a computer system. Explain the process of micro-instruction execution.                                                              (1 Mark)

A micro-instruction is a simple command that makes the hardware operate properly. The format is unique to each computer, but our example has a 24 bit micro-instruction. Our instruction is broken down into nine parts:
  • Bits 0-6: ADDR This part of the micro-instruction is used to specify a point in the code to jump to next. Whether or not the jump is made depends upon the result of the ALU operation (see bits 21-23) and the COND field (see bits 7-8). It is just the number of another micro-instruction in the control store.
  • Bits 7&8: COND This part of the micro-instruction determines whether a jump in the code should be made, or if simply the next instruction is to be executed. It can have the following values:
    • 00: Never jump.
    • 01: Jump if the ALU's N bit is 1.
    • 10: Jump if the ALU's Z bit is 1.
    • 11: Always jump.
  • Bits 9-11: A This part of the micro-instruction is used to determine what register will be the first input to the ALU. It is simply a number from zero to seven.
  • Bits 12-14: B This part of the micro-instruction is used to determine what register will be the second input to the ALU. If the second input is not used, this field's value does not matter.
  • Bits 15-17: C This part of the micro-instruction is used to determine where the output from the ALU is stored, and again is just the number of a register.
  • Bit 18: ENC This part of the micro-instruction is used to determine whether or not the ALU's output is stored in the register specified by the C field (see bits 15-17). If the instruction were just testing to see if a number was zero, for example, the result would not need to be stored anywhere, only the Z flag from the ALU would be important.
  • Bit 19: WR This part of the micro-instruction is used to determine whether or not the contents of the MBR register are written to RAM. It also uses the MAR register to determine which address to write to. Every write takes two cycles (in our example), so a write started in one instruction must be continued in the next.
  • Bit 20: RD This part of the micro-instruction is used to determine if the MBR register is filled with a word from RAM. It uese the MAR register to determine which address to read from. Like a write, a read also requires two cycles.
  • Bits 21-23: ALU This part of the micro-instruction is used to determine what operation the ALU performs on its inputs.

An execution unit which is part of a general-purpose microprocessor, partitioned between two integrated circuit chips, with the execution unit on one chip and an instruction unit on another chip. The execution unit provides the interface for accessing a main memory to thereby fetch data and macroinstructions for transfer to the instruction unit when requested to do so by the instruction unit. The execution unit receives arithmetic microinstructions in order to perform various arithmetic operations, and receives access-memory microinstructions in order to develop memory references from logical addresses received from the instruction unit. Arithmetic operations are performed by a data manipulation unit which contains registers and arithmetic capability, controlled by a math sequencer. Memory references are performed by a reference-generation unit which contains base-and-length registers and an arithmetic capability to generate and check addresses for referencing an off-chip main memory, and is controlled by an access sequencer.
TYPES OF MICROINSTRUCTION
Each "normal" instruction actually consists of a set of microinstructions. The microinstructions can load an address into the memory address register, cause the value that is referenced by the memory address register into an internal register, or perform some mathematical operation on a value in an internal register.

The programmer cannot directly execute microinstruction but can redefine or simply define a set of microinstructions and make an new or improved instruction. This is useful when a piece of software needs to execute some set of operations repeatedly
==================================================================================

Questions 3


(a)                 How is a 16 bit segment address and 16 bit offset of an instruction and data converted to a 20 bit address in 8086 microprocessor? Explain with the help of examples. Give at least two advantages of using such segmentation in 8086 microprocessor.                                                                                                                           (1 Mark)


Q(3)


http://www.electronics.dit.ie/staff/tscarff/8086_address_modes/8086_address_modes.gif
 

(c) .








Q(3)
Function 0- Program terminate
Action:
On execution the call restores vectors for INTS 22h to 24h from the PSP, flushes any buffers and transfers control to the terminate handler address.
On entry:
AH = 0
CS = Segment address of PSP
Returns:
Nothing
Notes:
Equivalent of CP/M BDOS call 00h. INT 21h function 4Ch is preferred.
Function 1- Character input with echo
Action:
Reads a character from the standard input device and echoes it to the standard output device.
If no character is ready it waits until one is available.
I/O can be re-directed, but prevents detection of OEF.
On entry:
AH = 01h
Returns:
AL = 8 bit data input
Notes:
Equivalent to CP/M BDOS call 01h, except that if the character is CTRL-C an INT 23h is performed.
Function 2 - Character output
Action:
Outputs a character to the standard output device. I/O can be re-directed, but prevents detection of 'disc full'.
On entry:
AH = 02h
DL = 8 bit data (usually ASCII character)
Returns:
Nothing
Notes:

Function 3- Auxiliary input
Action:
Reads a character from the current auxilliary device.
On entry:
AH = 03h
Returns:
AL = 8 bit data input
Notes:
There is no way to read the status of the serial port or to detect errors through this call, therefore most PC comms packages drive the hardware directly, hence their general incompatibility with the 512.
Function 4- Auxiliary output
Action:
Outputs a character to the current auxiliary device.
On entry:
AH = 04h
DL = 8 bit data
Returns:
Nothing
Notes:
There is no way to read the status of the serial port or to detect errors through this call. Comments as Function 3.
Function 5- Printer output
Action:
Sends a Character to the current listing device.
On entry:
AH = 05h
DL = 8 bit data
Returns:
Nothing
Notes:
If the printer is busy this call will wait until the data is sent.
There is no way to poll the printer status in DOS.
Function 6- Direct console I/O
Action:
Reads a character from the standard input device or returns zero if no character available. Also can write a character to the current standard output device. I/O can be redirected but prevents detection of EOF on input or 'disc full' on output.
On entry:
AH = 06h
DL = function requested: 0Ch to 0FEh = output
(DL = character to be output)
0FFh = Input request
Returns:
If output - nothing
If input - data ready: zero flag clear, AL = 8 bit data
If data not ready: zero flag set
Notes:
This call ignores CTRL-X.




==================================================================================


(b)                 Explain SAL, DAA, CMP, JMP instructions of 8086 processor with the help of one example each.                    (1 Mark)

SAL

memory, immediate
REG, immediate

memory, CL
REG, CL



Shift Arithmetic operand1 Left. The number of shifts is set by operand2.

Algorithm:
  • Shift all bits left, the bit that goes off is set to CF.
  • Zero bit is inserted to the right-most position.
Example:
MOV AL, 0E0h      ; AL = 11100000b
SAL AL, 1         ; AL = 11000000b,  CF=1.
RET

DAA


Decimal adjust After Addition.
Corrects the result of addition of two packed BCD values.

Algorithm:

if low nibble of AL > 9 or AF = 1 then:
  • AL = AL + 6
  • AF = 1
if AL > 9Fh or CF = 1 then:
  • AL = AL + 60h
  • CF = 1

Example:
MOV AL, 0Fh  ; AL = 0Fh (15)
DAA          ; AL = 15h
RET

CMP


REG, memory
memory, REG
REG, REG
memory, immediate
REG, immediate

Compare.

Algorithm:

operand1 - operand2

result is not stored anywhere, flags are set (OF, SF, ZF, AF, PF, CF) according to result.

Example:
MOV AL, 5
MOV BL, 5
CMP AL, BL  ; AL = 5, ZF = 1 (so equal!)
RET


JMP

label
4-byte address


Unconditional Jump. Transfers control to another part of the program. 4-byte address may be entered in this form: 1234h:5678h, first value is a segment second value is an offset.


Algorithm:
always jump
Example:
   include 'emu8086.inc'
   ORG 100h
   MOV AL, 5
   JMP label1    ; jump over 2 lines!
   PRINT 'Not Jumped!'
   MOV AL, 0
label1:
   PRINT 'Got Here!'
   RET

=================================================================================


(c)                 Explain the addressing mode in 8086 microprocessor that can be used for efficient handling of arrays. Explain this with the help of suitable examples.                                                                                                                  (1 Mark)


==================================================================================

(d)                 Explain any two input and any two output functions of INT 21h for the purpose of input/ output in 8086 microprocessor, with the help of example(s).                                                                                                           (1 Mark)


==================================================================================

(e)                 Write a program in 8086 assembly language that compares the first 4 characters of two strings. If the program finds that the compared portion of strings are the same then it also finds the length of the first string. You may assume that both the strings are at least 5 characters long and are available in the data / extra data segment and the last character of the string is #. (2 Marks)

==================================================================================


(f)                  Write a program in 8086 assembly language that multiplies two single digit ASCII numbers. You must first convert these ASCII numbers to equivalent binary. The result of the multiplication must be converted to unpacked decimal number. This resultant unpacked binary coded decimal (BCD) number should have its units digit in AL register and tens digit in AX register.
                                                              (2 Marks)

Multiplication and Division

The instructions for multiplication and division are mul and div. Both only operate on the accumulator register (eax) and use the data register (edx) as an overflow. The part of the registers affected are determined by the size of the operand.
The following diagram demonstrates how the accumulator and the data registers fit together when being used by the instructions.
get_image
Therefore, to get expected results, it is recommended that you set edx to zero before calling mul or div. For example:
TestProc proc
 
   mov eax, 10
   xor edx, edx    ; set edx to zero
 
   mul 10
   div 10
 
   ret
 
TestProc endp

==================================================================================


 By Nikhil Trivedi