CS609 ASSIGNMENT 1 SOLUTION 2021
Categories
CS609

CS609 ASSIGNMENT 1 SOLUTION 2021

Advertisement

CS609 ASSIGNMENT 1 SOLUTION 2021. Spring 2021cs609: gadget programming graded project no. 01total marks: 15 due date:19thmay 2021instructions: Please examine the subsequent instructions carefully earlier than submitting challenge. It should be clean that your assignment will not get any credit score if: ▪the submitted assignment does not open or report is corrupt. ▪you have not followed all steps described in bothquestions ▪challenge is copied(partial or complete) from any source (websites, boards, students, and so forth.)

strict movement may be taken in this regard.Be aware:you mustupload most effective a single word file (.Doc or .Docx). In question 1, best code of the function is required written in word document. There is no need to connect screenshot. If you offer screenshots, it’s going to no longer deliver any marks. Question 2 requires complete calculations (if any).Targets:the objective of this undertaking is to offer hands-on experience of device programming standards consisting of:•how to invoke softwareinterrupt

Advertisement

•idea of regs union•calculating values of popular-motive registers

Question 1: analyzing deliver flag’s fee using intdos()and regsunion(10 marks)write a c program languageperiod functionthat will perform the following: CS609 ASSIGNMENT 1 SOLUTION SPRING 2021.

Advertisement

•location ultimate digit of your student id in ah sign up and 2d final digit of your student identity in dl sign in (by using the usage of regs uniononly). CS609 ASSIGNMENT 1 SOLUTION 2021

•after that, read the value of convey flag with the aid of the usage of intdos()characteristic

Oif convey flag is set, print your scholar id,and

Oif bring flag isn’t always set, print your whole call

Unique instructions:all of the essential information is given beneath:

SEE ALSO:

CS431 ASSIGNMENT 1 SOLUTION 2021

1)data about intdos()feature:intdos()characteristic’s signature is:int intdos(union regs *in_regs, union regs *out_regs);this function units the check in values as given in in_regsand then calls dos machine call 0x21. On go back, out_regsis set to the value of the gadget registers. CS609 ASSIGNMENT 1 SOLUTION 2021

Advertisement

2)regs union:the whole regs union is defined in dos.H header record and it’s miles to be had in lecture 2 (web page 17 of handouts). Anticipate there is a cflagvariable described in fullstruct….Unsigned int cflag;…

Three)after invokingintdos()function, if deliver flag is about, printyour entire pupil identity and if carry flag is not set, print your whole name. CS609 ASSIGNMENT 1 SOLUTION 2021

Four)sample output:the output of this characteristic might also appear like:(screenshots in answer aren’t required. Screenshots do no longer deliver any marks. Simplest code of the feature is needed)

Checking bring flag = set

Advertisement

My student id is bc123456789

Checking carry flag = no longer-set

My name is muhammad umair

Query 2: calculating value of ax from ah and al(5 marks)in intel 8088/8086,the general-reason register ax includes parts, the excessive-part ah and the low-part al. Assume ah incorporates 10 and al contains 116. Calculate the cost of ax (show all calculations).

CS609 ASSIGNMENT 1 SOLUTION 2021

GET SOLUTION FILE FROM HERE