You are on page 1of 14
L-vP-SpecinVEBE-421 + ENGINEERING @ Teeanemmgeeem” CHITTAGONG UNIVERSITY OI ae ECTRICAL & ELECTRONIC ENGINEERING eee su EBEE-421 (Microprocessor and Interfacing) Full Marks: 210 Time: 3 Hours ‘The figures inthe right margin indicat ful marks, Answer any three questions from each re separate script for each section SECTION-A La) What do you mean by 8-bit and 16-bit microprocessor? What is meant by real 10 mode operation of a microprocessor? 1b) Differentiate between machine language and assembly language. Define: 15 i) Assembles, ii) Complies i) Interpreter 1,6) Briefly explain various roles of flag bits in 8086 with example. 10 2a) Discuss in details: 12 i) Register Relative Addressing, ii) Scaled Indexed Addressing, 2,(b) An assembly language program and two memory maps are given. Determine all 12 consequences with explanation, MOV D1, 2004 H MOV AX, 5566 H sTD STOS B STOS W Ds. ES 2009 # [20 22] 2000 H 2008 H | 19 23 | 2001 H 2007 H |_18 24 | 2002 H 2006 H | __17 25 | 2003 H 2005 H |__16 26 | 2004 H 2004 H | 15 27__| 2005 H 2003 H | 14 28 | 2006 H 2002 H | _13. 29 | 2007 H 2001 H [12 30] 2008 H 2000 # [11] [31 ~] 2009 H Fi 2(b) 2(c) An assembly language program is iven below, where assume st segment = 1000 Hand stack position = Pag rere oaatme that, atack 12 ~ 1009 H, Flag register F = 6677 H. MOV AX, 1122 H MOV CX, 2233 H MOV BX, AX MOV BX, cx PUSH AX PUSH F PUSH BX PUSH CX POP BX POP cx, Cont eP Scanned with CamScanner Find out Te ply adres, ‘The value of SP after the end of program. As x the of The value of AX, BX, CX, 8S, P and Flag register F alter the end of _ program, : iv) Draw the memory map in details, 3.(a) Find the value of AX after each instruction: MOV AX, 1234 H INC AH DEC AL MOV BX, 3333 H CMP AL, BL MUL BH DIV BL. TEST AX, BX NOT AX NEG AX SAR AL, 2H. XOR AX, OH 3.(b) Write an assembly language program to multiply AX by 5, using shift 11 operation. 3,(e) Develop a sequence of instructions that sets the rightmost 4 bits of AX, clears 12 the leftmost 3 bits of AX, inverts bits 7, 8, and 9 of AX. Then select an instruction that tests bit position 2 of register CH. 12 4a) Use jump instruction to solve: 145494134174... ... HOT 4b) Write down the test condition and operation of the following instructions: 1s i, UNC ii, JNO ii uz iv. JCXZ ve JS ‘“c) Differentiate between “CALL” and ‘Interrupt’. What are the consequences of 12 software interrupts? SECTION-B 5a) Define bus Ls Ppl »— 1 >of 4 — port ¢ (Pe) Wh. Tele Big. for 0. 8 8.(b) Explain the different modes of 8254 programmable internal timer with neat 10 sketch, Bc) 10 Write a complete assembly language program to display “Hello” in LCD ‘monitor. The display should be in slow motion and as a complete line. Scanned with CamScanner / ' University of Engineering & Technology Iectrical & Electronic Engineering 4 Short ‘Term Examination 2017 (712 Batch) Chittagong Unit Department of Engineering Level BS course rm! : Me COURSE NO, ae mes STHOURS if margin indicate full marks, Answer any THREE questions from each section, Use The figures inthe right separate script for each seetion ion-A (a), Draw the block diagram of a computer system showing address, data and control bus structure, ictoprocessor position with 08 1(b). Find the correct and incorreet instruction and conneet the incorreet one, 20 i) POP'S' ii) OUTDX. AL. iii) CMP DI HOME [PL] iy) NEG AX.BX yy IDIV BX 1(¢), What are the basie functional differences between EU and BIU of a microprocessor? 7 2(a). Define “opeode” and “operand”. Differentiate between immediate addressing and direct 13, addressing mode 24h). An assembly language program and two memory maps are given in Fig. 2(b). Determine 12 all the consequences Ds ES srD 20091 [20 22 | 20H wey Re 200s [19 23 | 2001 any 2007 [18 24 | 2002 STOS W 200611 [17 25 | 20034 200s [16 26 | 200811 oon [1s 27 | 20054 2003H | 28 | 200611 2002H [13 29 | 200711 2001 [2 30 | 200811 200001 [at 31} 200911 Fig. 210) %e), Define “Cache Memory” and explain how it works: wo 3(a), When an arithmetic or logie instruction exe change’? Write an assembly language prog Wes, which contents of flag register usually — 12 mv for BO86 to add N40 32 bit numbers, Mb). Deseribe the difference between AND and TES a sequence of 12 instructions that sets the rightmost S bits of DI without ehuging. the remaining bits of Save the results in SI, Salient orien 3 9 assembly. Ia , {sembly language program to ald five 16-bit numbers, Put tem in DS 1 een ald hem and then store the final result in ES memory. fm DSS OOLOI : 200411 and E'S: DI» O1OOIT : 200811 4). Using Jump instruction, write r 1o8 Zap esiuston, write an sam eo fr the Holling " Scanned with CamScanner 4b). Write short notes on the following instructions: i WAIT ii, HLT ili, NOP nd SJUMP™. Why T and I flag bits 4(e), Define “Procedure”. Differentiate between “CALL” a should be cleared in case of a software interrupt Scction-B w i) MOV AX. DS: WORD PTR [0000] ii) MOV AH. DS: WORD PTR [0010] 25 5(b). Design a 8086 based system having following components: (a). What are the major sources of interrupt? 10 6(b). Draw the internal block diagram af IC 8259, 1S Aa). Discuss details about double-handshake data transfer. 10 7(b). What is Hall effect and capacitive key switches? 10, Ac), Initialize an 8255, as shown in the Fig. 7(e). Consider the following operation 1s 8255 A PCy= PC, > LEDs Fig. H(c) ‘8(a). What is bit rate and band rate? w ‘8(b). Write an assembly program to send data ‘on polled basis. 10 8(c). Discuss about the method of data transfer using modem, 1s Scanned with CamScanner it hh i ‘ing & Technolo; Chittagong University of Engineering & Technology Department of Electrical & Electronic Engineering B.Se. Engincering Level-4 Term-1 Examination "2017 COURSE TITLE + Microprocessor and Interfacing COURSE NO. BEE 421 FULL MARKS TIM Te figures in the right margin indicate full marks Answer any THREE separate scripl for each section. Ha). 1¢b), 2b). 2). 3@). 3b). 3(6), (a), 4) Section-A Differentiate between machine language and assembly language with examples, What are the three main tasks of a microprocessor? 2 Draw the intemal bus structure of a microprocessor. What do you understand by MRDC What are special-purpose registers? Explain the operation of Zand I flags with appropriate examples. What is the only instruction that adds an 8-bit into a 16-bit number? Find the value of AX and Flag after each instruction of the given program. MOV AX, 0000 H MOV FL, OFOO H LAHF MOV AX, 55661 SAHF Given, AL= 15 H. CL = 03 H and CF = 0H. Show the state of AL and CF after each instruction of the given program, Show each step in clear diagrams, SHL AL, 1H SHR AL, CL SAL AL, 5H SAR AL, 2H What are the effects of the following two instructions: i) XOR AX, AX ii) MOV AX, 0000H Which one will be faster and why? Write an assembly code which can calculate the sum of first N Fibonacci numbers. For each of the following statements state the addressing modes of the source and destination operands MOV BX, 10000H MOV ALPHA, AX; where ALPHA is a word variable ) ADD. AX, [BX] iv) SUB_CX, 2[BX] v) MOV [BX]+ALPHA,CX Write an assembly program to multiply AX by 7, using shift operation, Define interrupt and write down the consequences of software interrupts. CS and S$ maps are given in Fig, 4(b). Assume, SP before ‘SS maps and find out i, $8 before CALL. fi. IP before CALI. iii, SP after CALL iv.$8 after CALL, Vv. IP after CALL Wi.CS afier CALL, is FFEEL, Complete the CS and Scanned with CamScanner ‘questions from each section. Use i 2 12 10 15 10 10 10 1B 440), sia) si) S(e). 64a) 6). 7a). 7b). 8(e). 8b), 8(6). 8254 Control Word. AFFFF ‘ABFEE ArFro| os ARFFC ‘APFEB, MU 003 002 noo! 11000 cs toons 003 1002 ‘oot +0000 Fig. 4(b) Use jump instruction to solve the following series in asm: Led tO 16+. +64 Sketch the timing diagram of the write cycle of 8086 and briefly explain sch the contents of address bus in an 8086 based system? ‘What instruction can be used to disable the INTR input of 8086? What is the ICW3 for master and slave 8259 devices? Why is the INTR input automatically disabled as a part of the response to an INTR interrupt? Why is it important 10 ‘What are the significances of following instructions? i, MOV AX, DS: WORD PTR [0000] ii, MOV AH, DS: WORD PTR [0010] iii, MOV_AL,DS: WORD PTR [0111] Design an 8086 based system with two 2Kx8 RAMs and four 1Kx8 ROMs. The RAMS are placed from the starting address of 1B800H and the ROMs are placed from the addeess just after the RAMs. Implement even-odd banking. Show the memory map and connection schematic including address decoder. Draw a circuit diagram using timer 0 of an 8254 timer/counter IC that ean be used to determine power line failure for an 8086 system considering the internal address ofthe 8254 to be FFOOH, FFO2H, FFOSH and FFO6H respectively. Ifthe power line signal is 220V, $0 Iz and the $254 is connected to a 1 MH¥z clock, what can be a possible count value loaded to the counter and why ? In which mode will you operate the counter? Write an assembly cove to initialize the counter, inking. How does an 8086 Explain the necessity of the implementation of even and odd transfer a word data from an odd address, Differentiate between band rate and bit rate. What is their mathematical relationship? fe 8251. Suppose your mode and command Write an assembly language program to initial words are 1101110 and 00110111 respectively, Deseribe the methods of data transmission using: modem, J 3 { l Mode set Flag | PORTA mode | "O/T PORTA Scanned with CamScanner 1s os 34646 =15 Chittagong University-of Engineering & Technology Department of Electrical, & Electronic Engineering B.Sc. Engineering bevel-4,Term-1 Examination ’2018 COURSE TITLE Microprocessor and Interfacing COURSE NO. u . FULL MARKS: TIME : JHOURS, . The figures in the right margin. indicate full marks. Answer any THREE questions from each section. Use separate script for each section. | Sect L_ SeetionsA 1(@). What is cache memory? How does if speed up the operation of a microprocessor? 10 Explain. i y (0). Desetibe the function and’ purpose of general and special purpose register used in 10 8086 microprocessor, | 1(@). What is pipelining? Briefly explain the functions of BIU and BU of 8086 15 microprocessor. 2(@). Find out the cortect and incorrect instructions from the following instructions. 15 Comet te incorrect instructions showing appropriate causes: i) MOV CS,AX fi) MOV DS, 1000H ili) XLAT DX. iv) XCHG AL, 77H v) OUT-p8, AL 2(b). An assembly language program is given below, where stack segment 2000H, stack 15 position = 2009H, value of flag register, F= FEEEH MOV AX, 1122H MOV BX, 22331 wos MOV CX, 3344 MOV AX, BX : MOV DX; CX, 7 PUSH DX ‘ PUSH AX - 7 PUSH BX eV nayeaet vive tie PUSH F POP CX PUSH CX & wor POP DX POP AX trtder bse “une Find out: as i) The physical address he 1) The final value of SS and SP after the end of the program ill) The value AX, BX, CX, DX and Fag, Faller the ead ofthe program, iv) Draw the memory map in details 2(€), Write down the significance of assembler dlrectives with necessary examples, os 340) Dilfrentite betwen the following statements ari istuctios: 10 i) JREPEAT- UNTIL and, WHILE - .ENDW stat ‘ ii) NOT end NEG instructions eee 3(b). Find out the equivalent machine language of the following statements: 10” i) MOV SP, AX ji) ADD AX, 11H 3(¢). Two blank memory maps are shown ix Fig, 4(¢)! Let’ = ‘ one in Et 3(! Let ode segment = 1000H, stk 15° 4) "Value of SP, SS, IP before execution of CALL : il) Value ofSP, SS, Pater he eal HPO 4) Find out te address ofthe procedure and fill the memory maps. Scanned with CamScanner 4@. 40). 4). 4(6). 5). 5). 64a). (0). (6). 710). 106). 7). 8(a). 8(b),. 86), “Memory. u AFFFFH | AFFFEH AFFFDH AFFFCH IK ss 11005H 11004H 11003H 11002H NoolH 11000 cs NIT 10044 1003 10024 1001 10001 CALL | Fig. (6) Using JUMP instruction sum the following series in assembly language SOB in +110 ‘Woite an assembly program that ses right most three bits clears the bit mimber 6, 7 and 8 and invert the 12" and 13" bit position ofthe given value 77FFH, Explain why we use NOP, WAIT and HLT instructions. Differentiate between TEST and CMP instructions, Sec n- Design ati 8086 microprocessor based system having i) eight (4Kx8) ROM ii) eight (2Kx8) RAM ili) eight port devices (1 byte each) and iv) an A/D converter having the address of FFOI. Show detail worksheets and necessary connections, Explain the instructions with necessary details i) MOV AH, DS: BYTE PTR (0000) y ii) MOV AX, DS: WORD PTR [0000} ‘What are the'indjor aétions taken by 8086, when ian interrupt is called? f Draw the internal block dingrany 8f§259 PIC" { u! i ae ‘ I Define i) Microinsiuction i) Macroinstruction’ iii) Control matrix iv) Microprogramming, ‘What is Simple Strobe 1/0 and Single handshake 110? Draw te low char of detecting a key press from mati key board, Write down the types of switches used in keybbards, Draw the intemal block diagram of 8251 USART, ii Discus detalls about how we can transmit data using modes, “yo IF, Define Half duplex transmission, ° aia . Scanned with CamScanner " 08 04 25 10 3 2 10 20 os 15 Is 05 7 » / CHITTAGONG UNIVERSITY OF ENGINEERING AND TECHNOLOGY / pc ENGINEERING LEVEL-t SELF STUDY EXAMINATION 2018 Batch 2014) DEPARTMENT ELECTRICAL AND ELECTRONIC ENGINEERING FULL TITLE OF PAPER ficroprocessor and Interfacing COURSE NO. ULL MARKS TIME ‘The figures inthe right margin indicate ull marks. Fae acer THREE questions from each section. Use sePareie seript for each section. .gram of a computer system showing the microprocessor u Q.i(a)_ Describe and draw the block di position with address, data and control IRUCTIT: ()_ Describe the function and purpose of each Pros visi flag register and purpose of each bit. ible register in $086. Describe the IT (6). Whatis DOS memory? Briefly explain the purpose ‘and functions of segment registers used 13 in $086 microprocessor. Q.2(a)_ Find out the correct and incorrect instructions from the following instructions. Comect the 15 incorrect instructions showing appropriate ¢2t i. MOVES DS ii, POP AH, iii, XCHG [BX]. [AX] iv. INAL DX v. OUT ALP? ()_Afer executing the following program what wil be the valoes of register at S086: 10 MOV AX. 6655H ' CMP AX. BX RET 10 (eo) What willbe te value of BS and DI after the end of the program: (Use DS memory map) MOV BX, 2001H LES DI, [BX] DS memory map FF [2000 or) 201 a 35 [__2003 66 2008 77 [2005 032). Write an assembly language program to cleat leftmost 3 bit to set bit m and to invert 11 and 12* bit position of a given value DDE. — * (©). Write an assembly language program for the following series: D2S3(x + 1). 10 (©) For the following code and memory map shown in Fig. 3(c), determine 15 i. What is the final value of AX after last instruction? ii. What are the changes of flag bit? MOV AX, TIT a MOV BX, 6677H aa u MOV CX, 2000H < a XCHO BX. Cx pa B \T 2012 DEC WORD PTR [BX] Gad 1S ADD AX, [BX+10] aaa 16 2 17 2016 18 2017 19 ai iii Figure: 3) ee Scanned with CamScanner Q44(a) Differentiate between near and far call. Define procedure. (Welt down the consequence of afar eall, According to the consequence, show the necessary memory map forthe following instructions: CALL 1100 : 0004 Take present instruction pointer at OOO1H and CS 1111H. (© Write short notes: (any 2 of the followings) i, Software interruption Instruction Queue iii, Unconditional Jump 4 jection Q.5(@) Discuss about the structure and working principle of a 8086 microprocessor based system. (b) Discuss about the read and write mache cycle with neat timing diagram. Q.6(@) What are the sources of interrupt? (©) What are the methods of reading counts from 8259 counter? Discuss in details. (©) What is microprogramming of a SAP? Q.7(a) Define single handshake VO, simple input, and output data transfer. () Write an assembly code for sending control word in 8255 PPI. Control word is 10001111 and address is FFEFH. (©) Explain the operation of software multiplexed LED displays. Q.8(@) Define: Bit rate, Baud rate, Synchronous and Asynchronous data transfer. {b) Write an assembly code for reading data to 8251 USART using polled basis. THE END Scanned with CamScanner 10 20 15 10 20 os 10 10 15 20 15 LArTSelf Study/EEE-421 Date: 07/11/2019 CHITTAGONG UNIVERSITY OF ENGINEERING & TECHNOLOGY DEPARTMENT OF ELECTRICAL & ELECTRONIC ENGINEERING Level 4 Term Self Study B.Sc. Engineering Final Examination, 2019 Sub: EEE-421 (Microprocessor and Interfacing) Full Marks: 210 ‘Time: 3 Hours The figures in the right margin indicate full marks. Answer any three questions from each section. Use separate script for each section. SECTION =A fa) Mention the name of the types of buses. Draw the block diagram of © 15 computer system showing the bus structure and explain its operation 1.(o) What do you understand by physical address and logical address? Explain 08 clearly: “how many’ logical addresses may one physical address haw What is the actual location for 1100: ; 2 Le) Find out which of the following instructions are correct and incorrect. Also correct the incorrect instructions showing proper causes. i) MOV AX, CALL{SI] ii) LBACL, LIST ii) IN OTH, AL iv) XOR CS, AX ‘) DIV DX-AX, BX vi) MOVS BYTEI, BYTE2 2.(a) An assembly language program and 12 memory map is shown in Fig. 2(a). ‘and flag register at the end of the Find out the contents of the AX, BX, i program, Also, show the changes in the DS memory map. The initisl content of the FLAG register is 8A05H. ; . Ds MOV AX, 2233 1 [CAB] 0533 LAHF [3c] 0534 ‘MOV BX, 2000 H [-4D_] 0535 XCHG AX, BX ‘9F | 0536 INC AX [247 0537 XLAT 36 | 0538 SAHF BA_| 0539 XCHG [BX+5], FLAG 4E_| 0540 12] 0541 Fig. for O. 2fa) | 2,o) A program and memory maps are shown in Fig. 2(b). Determine the 15 followings: i) The value of AX, SI, DI registers after the last instruction. ii) The final changes in DS and ES memory maps. Ds ES 2000 [17 ‘AE _] A000 MOV AX, 7788 H 2001 | 23) FD_| A001 MOV SI, 2005 H 2002 [19 BC_| A002 ‘MOV DI, A006 H 2003 [21 E9_| A003 cD 2004 | 3a E8_| A004 sTosB 2005 | “BE E9_| AOOS INC SI 2006 | 9D. FA_| A006, INC DI 2007 |"39) ‘9C_| A007 sTD 2008 [~43, 4C_| A008 LoDsB 2009 | “58, 4A_| A009 Movsw 2010 | 63. '50_| A010 XCHG AX, [S1#6] 2011 [87 60_] A011 XCHG AX, [DI+5] 2012 [AS 75_| A012 2013 [“4F 80] A013 Fig. for O. 2(b) 2.(e| Write down the “tested condition” and “operation” for the following jump 08 instruction JA, JG, JL, JBE, JLE, JGE, JPO, JNZ. Conta Scanned with CamScanner 3,a) 3.(b) 3ule} 4.(a) 4.(b) 4c) 5a) 5b) » 2200 H and initially FL ig. (e). ee mente of AX, BX, 85, SP and FLAC Sad ma A th fin changes in the atack segment Lisl ne Se eat het de Yon pi conalder the changes of FLAG register arithmetic operation, LAG# 5890 H, then determine the 1 \ MOV AX, 9431 HL MOV BX, 8123 H ADC AX, BX PUSH AX PUSH BX PUSHE NEG BYTE PTR $S:{SP] NEG BYTE PTR SS:{SP+1] POP AX opr POP BX for Q. 3tal Write down the only necessary instructions ‘in assembly Iniguage to 13 perform the following tasks; 3} (Bitx3)-(41/) a “BY, Find out the content of the BX register after the execution of the last 10 instruction of the following program, MOV BX, 7788 H AND BX, 8877 H OR BX, 8877 H SAL BX, 1 RCL BX, 1 RCR BX, 2 XOR BX, FFED H. pee assembly language program (only the necessary instructions) for the 15 following series using, . ) REPEAT-UNTIL loop ii) JE and JMP instructions only, Toa gnerating a series 1,1, 2,3, 5,8, 19 .... (20 terms), Fon data should be stored in data segment memory loestion, Pon ReTUPL vectors and CS map shown in Fig 4b), ‘olowings alter the execution of the “INT 21 H? instr ote §) CS, IP, SP, FLAG register contents, i ih change in the SS memory map, {nitally SS=B000 H, SP= 1234 11, FLAG 5566 H, pareaGS MEMEFY maps are shown in Fig. 4(¢), For each case determine the 10 followings after the execution of a “CALL instruction; §) The physical address of the procedure aly age the SS memory map, if any, andthe fal va 1 of SP, Initially SS* A000 H, SP= FPRP If — determine the 10 SECTION - 1B 3086 et etch of timing diagram, expan the read and write 8086 MPU showing all control signals, Sus eyle of 13 In Fig, 5(b), two 3-t0-8 Decoder (interconnected) are conn buses of port A and port B. j} What are the addresses of ports A and Bp ji) dentify ports A and B as input n output ports, 4) Write the assembly language progean Feuardling the decoder circuit, Write the assembly language program regarding the decoder circuit, rected to the data 13 Cm PAB Scanned with CamScanner Big. for 0. 50 1 apped 09 8.(c) Differentiate between I/O mapped interfacing and memory mapp« interfacing of 8086 microprocessor. = 6.{a) What is handshaking and why handshake signals are oe Write the Si) Pe ate el Glan 9 cme: We ee te oon a es Ce as Me Ea eta onl word end cig, nS Hea pi denein 9 1 a rat 2 a Scie Beret ue DP vats and dpe th eg 05, 15 tim TOS ean geDoe OY mT % j _——. & AE ein] oa Po ee dar © | ; ae BrP cour Geet) < Pa z “3v Bit. for 7-(a) Mention several applications of 8254 PIT. With necessary diagram explain 12 various modes of 8254 PIT. 7(0) What is DMA operation? Explain the DMA operation with the help of 13 necessary diagram, 7(e) Draw the block diagram of 8259A and explain its three modes of operation, 10 8.2) Differentiate between maskable and non maskable interrupt, 05 5:0) Determine the value of ICW of 8259A for 8086 mode, if it is triggered by 18 rising edge trigger and there is a single PIC ICW4 is needed and use intermed 4. £10 How does the Master-Slave concept work in 8259 interrupt controller? 10 S(@) Mention the names of the registers of 8259 PIC that handles external 05 interrupt request and also mention their functions, Scanned with CamScanner

You might also like