MOV CX,80 MOV CX,100. For example, MOV DI, OFFSET TEXT_STRING ;DI points to the TEXT_STRING in the extra segment ; Byte to be scanned in AL

Size: px
Start display at page:

Download "MOV CX,80 MOV CX,100. For example, MOV DI, OFFSET TEXT_STRING ;DI points to the TEXT_STRING in the extra segment ; Byte to be scanned in AL"

Transcription

1 Q1. Explain briefly the following instructions with examples. (a) IDIV (b)imul (c) SAR (d) SAL (a) IDIV: This instruction is used to divide a signed word by assigned byte, or to divide signed doubleword (32 bits) by a signed word. When dividing a signed word by a signed byte, the word must be in AX register. The divisor can be in an 8-bit register or a memory location. After the division, AL will contain the signed result (quotient) and AH will contain the signed remainder. If an attempt is made to divide by 0, 8086 will automatically do a type 0 interrupt. When dividing a signed double word by a signed word, the most significant word of the dividend must be in DX register and the least significant word must be in AX register. The divisor can be in a 16-bit register or a memory location. After the division, AX will contain the signed result (quotient) and DX will contain the signed remainder. If an attempt is made to divide by 0, 8086 will automatically do a type 0 interrupt. For example, MOV AX,03ABH ; AX=03ABH= =939 (Decimal) MOV BL,D3H ;BL= D3H= = -2DH=-45 (Decimal) IDIV BL ; AL=ECH=-14H=-20 (Decimal) and AH=27H =+39( Decimal) (b) IMUL: This instruction multiplies a signed byte from some source times a signed byte in AL or a signed word from some source times signed word in AX. The source can be a register or a memory location. When a byte from some source is multiplied by AL, the signed result (product) will be in AX. When a word from some source is multiplied by AX, the most significant word of the signed result is put in DX, and least significant word of the signed result is put in AX. For example, MOV AL, E4H ;AL=E4H= =-1AH= -28 (Decimal) MOV BL, 3BH ;BL=3BH= =59 (Decimal) IMUL BL ; AX=F98CH=-674H=-1652 (Decimal) (c) SAR (Shift arithmetic right): The arithmetic shift is used for signed numbers. MSB MSB LSB This instruction shifts each bit by bit to the right. As a bit is shifted out of the MSB position, a copy of the MSB is put in the MSB position For example, MOV AL,-10 ;AL=-10=F6H= SAR AL,1 ;AL= =FDH=-5 (d) SAL (Shift arithmetic left) is same as SHL Q2. Explain the following instructions with examples: (a) STOS (b) LODS (c) CMPS (d) REPZ (e) SCAS (f) XLAT (a) STOS: The STOS instruction copies a byte from AL or a word from AX to a memory location in the extra segment pointed by DI. After the copy, DI is automatically incremented by 1 for a byte string or CF Page: 1

2 incremented by 2 for a word string if the direction flag is cleared (DF=0) and DI is automatically decremented by 1 for a byte string or incremented by 2 for a word string if the direction flag is set (DF=1); For example, MOV DI, OFFSET TARGET_STRING ; DI is pointing to the TARGET_STRING STOSB ; AL is copied to the memory location pointed by DI (b) LODS: This instruction copies a byte from a string location pointer by SI to the register AL or it copies a word from the string location pointed by SI to the register AX. After the copy, SI is automatically incremented by 1 for a byte string or incremented by 2 for a word string if the direction flag is cleared (DF=0) and DI is automatically decremented by 1 for a byte string or incremented by 2 for a word string if the direction flag is set (DF=1); For example, MOV SI, OFFSET SOUR_STRING ; SI is pointing to the TARGET_STRING LODSB ; Content of memory location pointed by SI is copied to AL (c) CMPS: The CMPS instruction can be used to compare a byte in one string with a byte in another string or to compare a word in one string with a word in another string. The CMPS instruction can be used with a REPE or REPNE prefix to compare all elements of a string. For example, MOV SI, OFFSET FIRST_STRING ; SI pointing to the source string MOV DI, OFFSET SECOND_STRING ; DI pointing to the destination string CLD MOV CX,100 REPE CMPSB (d) REPZ: REPZ/REPE are often used as prefix written before CMPS (Compare string) or SCAS (Scan String). REPE and REPZ stand for Repeat if Equal and Repeat if zero respectively. REPE or REPZ causes the CX register to be decremented and string instruction to be repeated until CX=0. REPE and REPZ will cause the string instruction to be repeated as long as the compared bytes or words are equal and CX is not yet counted down to zero. For example, MOV SI, OFFSET FIRST_STRING ; SI pointing to the source string MOV DI, OFFSET SECOND_STRING ; DI pointing to the destination string CLD MOV CX,100 REPE CMPSB (e) SCAS: SCASB compares a byte in AL with a byte pointed by DI in Extra segment (ES). SCASW compares a word in AX with a word pointed by DI in Extra segment(es). If the direction flag is cleared (DF=0), then DI will be incremented by 1 after SCASB or DI will be incremented by 2 after SCASW. If the direction flag is set (DF=1), then DI will be decremented by 1 after SCASB or DI will be decremented by 2 after SCASW. For example, MOV DI, OFFSET TEXT_STRING ;DI points to the TEXT_STRING in the extra segment MOV AL,0DH ; Byte to be scanned in AL MOV CX,80 ;CX is used as element counter Page: 2

3 CLD ; Clear the direction flag (DF=0) REPNE SCASB ; Scanning is repeated until bytes are not equal or CX is not zero. (f) XLAT: The XLAT is used to translate a byte from one code to another code. This instruction replaces a byte in the AL register with a byte pointed to by BX in a look up table in the memory. Before the XLAT instruction to be executed, the look up table containing the values for the new code must be put in the memory and the offset address of the starting address of the look up table must be loaded in BX. The code byte to be translated is put in AL. To point to the desired byte in the lookup table, XLAT instruction add the byte in AL to the offset of the start of the lookup table in BX. It then copies the byte from the address pointed by (AL+BX) into AL. For example, MOV BX, OFFSET TABLE ; BX pointing to TABLE XLAT ; Replaces value in AL with the value from the TABLE Q3. Explain briefly the memory address decoding for 32KB memory chip for address 08000H to 0FFFFH. A 19 A 18 A 17 A 16 A 15 A 14 A 13 A 12 A 11 A 10 A 9 A 8 A 7 A 6 A 5 A 4 A 3 A 2 A 1 A H= FFFFH= K=32x1024=2 15 As the memory chip is of 32KB and hence 15 lower bits of the address (A 0 to A 14 ) are connected to the memory chip. Remaining 5 bits (A 15 to A 19 ) are connected to the NAND gate as input such that output of the NAND gate is LOW to enable the memory chip. The connection is shown below: A0 D0 Address Bus A14 D7 Data Bus 32K x 8 A15 A16 A17 A18 A19 CS OE WR MEMR MEMW Page: 3

4 Q4. Explain briefly the memory address decoding for 64KB memory chip for address 90000H to 9FFFFH. A 19 A 18 A 17 A 16 A 15 A 14 A 13 A 12 A 11 A 10 A 9 A 8 A 7 A 6 A 5 A 4 A 3 A 2 A 1 A H= FFFFH= K=64x1024=2 16 As the memory chip is of 64KB and hence 16 lower bits of the address (A 0 to A 15 ) are connected to the memory chip. Remaining 4 bits (A 16 to A 19 ) are connected to the NAND gate as input such that output of the NAND gate is LOW to enable the memory chip. The connection is shown below: A0 D0 Address Bus A15 D7 Data Bus 64K x 8 A16 A17 A18 A19 CS OE WR MEMR MEMW Q5. Explain briefly the 74LS138 decoder. 74LS138 decoder has three inputs (C,B,A) and 8 active low outputs (Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7). There are another three additional enable inputs (G2A, G2B, G1) to enable the decoder. To activate the decoder, the G2A and G2B inputs must be low and G1 must be high. Once 74LS138 is enabled, the address inputs (C, B and A) select which output pin goes low. Following figure shows 74LS138: Page: 4

5 Selection Inputs A B C Y 0 Y 1 Y 2 Y 3 Y 4 Output Enable Inputs G2A G2B G1 Y 5 Y 6 Y 7 Following is the truth table of the decoder 74LS138: INPUTS Enable Select OUTPUTS G2A G2B G1 C B A Y 0 Y 1 Y 2 Y 3 Y 4 Y 5 Y 6 Y 7 1 X X X X X X 1 X X X X X X 0 X X X Q6. Explain briefly memory interface for the addresses F0000H to FFFFFH using eight 2764 EPROMs for 8088 microprocessor based system. A 19 A 18 A 17 A 16 A 15 A 14 A 13 A 12 A 11 A 10 A 9 A 8 A 7 A 6 A 5 A 4 A 3 A 2 A 1 A 0 F0000H= FFFFFH= F0000H FFFFFH=64KB 2764 EPROM= 8KB and hence total 8 numbers of 2764 EPROM are required. Page: 5

6 The connection is shown below: Address A 0 Data A 12 D 0 D MEMR OE A 13 A 14 A 15 A 17 A 18 A 19 A 16 A B C G1 G2A G2B F0000-F1FFF F2000-F3FFF F4000-F5FFF F6000-F7FFF F8000-F9FFF FA000-FBFFF FC000-FDFFF FE000-FFFFF Q7. Find the address range in the following figure for (a) Y4 (b) Y2 (c) Y7: Address A 0 A 13 A 14 A 15 A 16 A B C Y 0 Y 1 Y 2 Y 3 Data MEMR D 0 D 7 OE 16K X 8 ROM A 17 G2A Y 4 A 18 G2B Y 5 A 19 G1 Y 6 Y 7 (a) The address range for Y4: A 19 A 18 A 17 A 16 A 15 A 14 A 13 A 12 A 11 A 10 A 9 A 8 A 7 A 6 A 5 A 4 A 3 A 2 A 1 A =F0000H =F3000H Hence, the range of address for Y4 is F0000H to F3000H Page: 6

7 (b) The address range for Y2: A 19 A 18 A 17 A 16 A 15 A 14 A 13 A 12 A 11 A 10 A 9 A 8 A 7 A 6 A 5 A 4 A 3 A 2 A 1 A =E8000H =EBFFFH Hence, the range of address for Y2 is E8000H to EBFFFH (c) The address range for Y7: A 19 A 18 A 17 A 16 A 15 A 14 A 13 A 12 A 11 A 10 A 9 A 8 A 7 A 6 A 5 A 4 A 3 A 2 A 1 A =FC000H =FFFFFH Hence, the range of address for Y7 is FC000H to FFFFFH Q8. Find the address range in the following figure for Y4: Address A 0 A 15 A 16 A 17 A 18 A B C Y 0 Y 1 Y 2 Y 3 Data MEMR D 0 D 7 OE 64K X 8 ROM G2A Y 4 G2B Y 5 A 19 G1 Y 6 Y 7 The address range for Y4: A 19 A 18 A 17 A 16 A 15 A 14 A 13 A 12 A 11 A 10 A 9 A 8 A 7 A 6 A 5 A 4 A 3 A 2 A 1 A =C0000H =CFFFFH Hence, the range of address for Y4 is C0000H to CFFFFH Page: 7

8 Q9. Explain how 74LS138 decodes 2732 EPROMs for 32K x 8 section of memory. Assume the starting address is 40000H EPROM is 4KB memory device. 4K=2 12, hence A0 to A11 are connected to each of the memory devices. Number of memory devices required=32k/4k =8 4K-1=2 12-1= =FFFH Following table shows the address range for different memory devices. Memory device Address range H - 40FFFH H - 41FFFH H - 42FFFH H - 43FFFH H - 44FFFH H - 45FFFH H - 46FFFH H - 47FFFH The range of address is 40000H to 47FFFH. A 19 A 18 A 17 A 16 A 15 A 14 A 13 A 12 A 11 A 10 A 9 A 8 A 7 A 6 A 5 A 4 A 3 A 2 A 1 A =40000H =47FFFH Following figure shows decodes of 32K x 8 memory section using 2732 memory devices and 74LS138. Page: 8

9 Address A 0 Data A 11 D 0 D MEMR OE A 12 A 13 A 14 A 18 A 15 A 16 A 17 A 19 A B C G1 G2A G2B H - 40FFFH 41000H - 41FFFH 42000H - 42FFFH 43000H - 43FFFH 44000H - 44FFFH 45000H - 45FFFH 46000H - 46FFFH 47000H - 47FFFH Q10. Interface 512KB RAM using 64KB RAM with starting address 80000H. Number of memory devices required=512kb/64kb=8 64K=2 16, hence A0 to A15 are connected to each memory devices. 64K-1=2 16-1= =FFFFH Following table shows the address range for different memory devices. Memory device Address range H 8FFFFH H 9FFFFH 3 A0000H - AFFFFH 4 B0000H - BFFFFH 5 C0000H - CFFFFH 6 D0000H - DFFFFH 7 E0000H - EFFFFH 8 F0000H - FFFFFH The range of address is 80000H to FFFFFH. A 19 A 18 A 17 A 16 A 15 A 14 A 13 A 12 A 11 A 10 A 9 A 8 A 7 A 6 A 5 A 4 A 3 A 2 A 1 A =80000H =FFFFFH Page: 9

10 Following figure shows decodes 512KB memory section using 64KB memory devices and 74LS138. Address A 0 A 15 Data D 0 D 7 64KB MEMR OE A 16 A 17 A 18 A 19 A B C G1 G2A G2B H 8FFFFH 90000H 9FFFFH A0000H - AFFFFH B0000H - BFFFFH C0000H - CFFFFH D0000H - DFFFFH E0000H - EFFFFH F0000H - FFFFFH Q11. Explain briefly data integrity in ROM and RAM There are many ways to ensure data integrity depending on the type of storage. The checksum method is used for ROM and the parity bit method is used for DRAM. Use of checksum byte for error detection in ROM: To ensure the integrity of the content of ROM, every PC must perform a checksum calculation. The process of checksum will detect any corruption of the contents of the ROM. One of the ROM corruption is current surge, either when the PC is turned on or during operation. The checksum byte is an extra byte that is tagged to the end of a series of bytes of data. Checksum byte is calculated as follows: (i) Add the bytes together and drop the carries. (ii) Take 2 s complement of total sum and that is the checksum byte, which is last byte of the stored information. For example, suppose 4 bytes 25H, 62H, 3FH and 52H are to be stored along with checksum. The sum of 4 bytes is 25H+62H+3FH+52H=118H. Dropping the carry, the byte is 18H and 2 s complement of 18H is E8H. The checksum is E8H. Now, addition of the bytes stores (dropping carry) and checksum should produce result 00H, otherwise the store data have been corrupted. Use of parity bit in DRAM error detection: An extra bit (parity bit) is stored for every byte of data to be stored. With the extra parity bit, every bank requires an extra chip of x1 organization for parity check. There may be a bit change from 1 to 0 of from 0 to 1 due to current surge or certain kinds of particle radiations in the air. Parity is used to detect such errors. Including a parity bit to ensure data integrity in RAM is most widely used method. Page: 10

11 Q12. Assume that we have 4 bytes of hexadecimal data: 25H, 62H, 3FH and 52H. (a) Find the checksum byte. (b) Perform the checksum operation to ensure data integrity. (c) If the second byte had been changed to 22H, show how checksum detect the error. (a) The sum of 4 bytes is 25H+62H+3FH+52H=118H. Dropping the carry, the byte is 18H and 2 s complement of 18H is E8H. The checksum is E8H. (b) Adding all the 4 bytes along with checksum, 25H+62H+3FH+52H+E8H=200H Dropping carry, the byte is 00H. Hence, the data is not corrupted. (c) If 62H is changed to 22H, Then, adding all the 4 bytes along with checksum, 25H+22H+3FH+52H+E8H=1C0H Dropping the carry the byte is C0H. Hence, the data is corrupted. Q13. Explain briefly 16-bit memory interface. In a 16-bit memory interface, memory location 00000H-FFFFFH are separated in Odd and Even banks as shown in the figure blow. Odd Bank (BHE=0) Even Bank (A0=0) D15 D8 D7 D FFFF FFFE Odd and Even Banks of memory To distinguish between odd and even bytes, the microprocessor provides a signal called BHE( Bus High Enable). BHE and A0 are used to select either Odd or Even byte. Following table shows selection of Odd bank or Even bank. BHE A0 0 0 Even word D0-D Odd byte D8-D Even byte D0-D7 1 1 None Page: 11

12 Q14. Explain the 8255 control word format. Following is the control word format for 8255: D7 D6 D5 D4 D3 D2 D1 D0 Group B Port C (Lower) 1=Input 0=Output Port B 1=Input 0=Output Mode selection 0=Mode 0 1=Mode 1 Group A Port C (Upper) 1=Input 0=Output Port A 1=Input 0=Output Mode selection 00=Mode 0 01=Mode 1 1x=Mode 2 1=I/O Mode 0= BSR MOde Q15. Explain briefly the difference between peripheral I/O (Isolated I/O) and memory mapped I/O. Peripheral I/O (Isolated I/O) Memory mapped I/O IN and OUT instructions to be used for data transfer MOV instruction can be used for data transfer between microprocessor accumulator and port. between microprocessor accumulator and port. For example, IN AL,DX ; This instruction load the For example, MOV AL,[2000H] will transfer AL register from the port addressed by DX. data from input port of address 2000H to AL OUT DX, AL ; This instruction load the port register. addressed by DX from AL register. MOV [2010H],AL will transfer data from AL register to output port of address 2010H. Memory space is not used. Memory space is used. Only 16 bits addresses(a0-a15) are decoded. Entire26 bits addresses(a0-a19) are decoded. Limited to 2 16 (65536) ports. Limited to 2 20 ( ) ports Control signals IOR and IOW are used. Control signals MEMR and MEMW are used. Q26. Explain briefly I/O address map of x86 PCs. Designer of the original IBM PC assigned different port addresses to various peripherals. The list of the designated I/O port addresses is referred to as I/O map. Table below shows some of the port addresses those are assigned to different peripherals. Range of port addresses Peripherals 000H-01FH DMA controller 020H-03FH Interrupt controller 040H-05FH Timer 060H-06FH Keyboard 070H-07FH Real time clock, NMI mask Page: 12

13 0F8H-0FFH 1F0H-1F8H 278H-27FH 2F8H-2FFH Math coprocessor Fixed disk Parallel printer port Serial port Q17. (a) Find the control word if PA=out, PB=in, PC0-PC3=in and PC4-PC7=out (b) Write ALP program to get data from port B and send it to the port A. (c) Write ALP program send data from PCL to PCU. Use port addresses of 300H-303H for the 8255 chip. (a) =83H (b).model small.data pa equ 300h pb equ 301h pc equ 302h cwr equ 303h.code mov ax,@data mov ds,ax mov al,83h mov dx,cwr mov dx,pb in al,dx mov dx,pa mov ah,4ch int 21h end (c).model small.data pa equ 300h pb equ 301h pc equ 302h cwr equ 303h.code mov ax,@data mov ds,ax mov al,83h mov dx,cwr mov dx,pc Page: 13

14 in al,dx and al,0fh rol al,1 rol al,1 rol al,1 rol al,1 mov ah,4ch int 21h end Q18. The 8255 shown in the figure below configured as follows: port A as input, B as output and all the bits of port C as output. D0-D7 A A2 A3 IOW IOR A B CL A4 A5 A6 A1 CS CU A7 A8 A9 AEN (a) Find the port addresses assigned to A,B,C and control word register. (b) Find the control byte for this configuration. (c) Program the ports to input data from port A and send it to both port B and port C. (a) The port addresses are as follows: CS A1 A0 Address Port H Port A H Port B H Port C H Control register (b) Control word byte is =90H Page: 14

15 (c).model small.data pa equ 310h pb equ 311h pc equ 312h cwr equ 313h.code mov mov ds,ax mov al,90h mov dx,cwr mov dx,pa in al,dx mov dx,pb mov dx,pc mov ah,4ch int 21h end Q19. Implement a BCD up-down counter on the Logic Controller Interface..model small.stack 64.data pa equ 0b490h pb equ 0b491h pc equ 0b492h cwr equ 0b493h.code mov ax,@data mov ds,ax mov al,82h mov dx,cwr call up_down call delay mov ah,4ch int 21h up_down proc push ax push dx Page: 15

16 mov dx,pa mov al,00h again: call delay inc al cmp al,09h jl again again1: call delay dec al cmp al,00h jg again1 pop dx pop ax ret up_down endp delay proc push bx push cx mov cx,0ffffh outloop:mov bx,0fffh inloop: nop nop dec bx jnz inloop loop outloop pop cx pop bx ret delay endp end Q20. Read the status of two 8-bit inputs(x & Y) from Logic Controller Interface and display X*Y..model small.stack 64.data pa equ 0b490h pb equ 0b491h pc equ 0b492h cwr equ 0b493h x db? y db? msg db 10,13,"2nd number $",10,13 res dw? Page: 16

17 .code mov mov ds,ax mov al,82h mov dx,cwr mov dx,pb in al,dx mov x,al push dx lea dx,msg mov ah,09h int 21h pop dx call delay call delay in al,dx mov y,al mul x mov res,ax mov dx,pa call delay call delay mov al,ah mov ah,4ch int 21h ;delay procedure delay proc push bx push cx mov cx,0ffffh outloop:mov bx,0fffh inloop:nop nop dec bx jnz inloop loop outloop pop cx pop bx ret delay endp end Page: 17

18 Q21. Display messages FIRE and HELP alternately with flickering effects on a 7-segment display interface for a suitable period of time. Ensure a flashing rate that makes it easy to read both messages..model small.stack 64.data msg db 8eh,0cfh,88h,86h ; FIRE msg1 db 89h,86h,0c7h,8ch ; HELP pa equ 0b490h pb equ 0b491h pc equ 0b492h cwr equ 0b493h.code mov ax,@data mov ds,ax mov al,80h mov dx,cwr mov si,0003h repeat1: lea bx,msg[si] call display call delay ;2nd message lea bx,msg1[si] call display call delay mov ah,01h int 16h jz repeat1 mov ah,4ch int 21h ;Display procedure display proc push ax mov ah,04h continue: mov al,[bx] dec bx mov cl,08 again:rol al,01h mov dx,pb push ax mov al,00h mov dx,pc Page: 18

19 mov al,0ffh pop ax loop again dec ah jnz continue pop ax ret display endp ;Delay procedure delay proc push bx push cx mov cx,0ffffh outloop: mov bx,0fffh inloop: nop nop dec bx jnz inloop loop outloop pop cx pop bx ret delay endp end Q22. Drive a stepper motor interface to rotate the motor in specified direction (Clockwise or Counter clockwise) by N steps. Introduce suitable delay between successive steps..model small.stack 64.data n db 100 pa equ 0b490h pb equ 0b491h pc equ 0b492h cwr equ 0b493h.code mov ax,@data mov ds,ax mov al,80h mov dx,cwr mov al,88h Page: 19

20 mov dx,pa mov cl,n again: call delay rol al,01h loop again mov ah,4ch int 21h ;delay procedure delay proc push bx push cx mov cx,0ffffh outloop: mov bx,0fffh inloop: nop nop dec bx jnz inloop loop outloop pop cx pop bx ret delay endp end Page: 20

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI Note: PUSHF / POPF have no operands The figure below shows that if (SS) = 3000H, (SP) = 0042H, so the execution of POP CX loads CX by the word 4050H form the stack segment. The SP is incremented by 2.

More information

Intel 8086: Instruction Set

Intel 8086: Instruction Set IUST-EE (Chapter 6) Intel 8086: Instruction Set 1 Outline Instruction Set Data Transfer Instructions Arithmetic Instructions Bit Manipulation Instructions String Instructions Unconditional Transfer Instruction

More information

Week /8086 Microprocessor Programming I

Week /8086 Microprocessor Programming I Week 4 8088/8086 Microprocessor Programming I Example. The PC Typewriter Write an 80x86 program to input keystrokes from the PC s keyboard and display the characters on the system monitor. Pressing any

More information

PESIT Bangalore South Campus

PESIT Bangalore South Campus INTERNAL ASSESSMENT TEST 2 Date : 02/04/2018 Max Marks: 40 Subject & Code : Microprocessor (15CS44) Section : IV A and B Name of faculty: Deepti.C Time : 8:30 am-10:00 am Note: Note: Answer any five complete

More information

WINTER 12 EXAMINATION Subject Code : Model Answer Page No : / N. a) Describe the function of SID and SOD pins of 8085 microprocessor

WINTER 12 EXAMINATION Subject Code : Model Answer Page No : / N. a) Describe the function of SID and SOD pins of 8085 microprocessor Subject Code : Model Answer Page No : / N Q.1) SOLVE ANY FIVE : (20 MARKS) a) Describe the function of SID and SOD pins of 8085 microprocessor Ans: - SID: - (2 Mark) Serial Input Data SID pin is used to

More information

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI 8 Unsigned and Signed Integer Numbers 1. Unsigned integer numbers: each type of integer can be either byte-wide or word-wide. This data type can be used to represent decimal numbers in the range 0 through

More information

US06CCSC04: Introduction to Microprocessors and Assembly Language UNIT 3: Assembly Language Instructions II

US06CCSC04: Introduction to Microprocessors and Assembly Language UNIT 3: Assembly Language Instructions II Unconditional & Conditional JUMP instructions: Conditional JUMP instructions: JA/JNBE Jump if above / Jump if not Below or Equal These two mnemonics represent the same instruction. The term above and below

More information

EC 333 Microprocessor and Interfacing Techniques (3+1)

EC 333 Microprocessor and Interfacing Techniques (3+1) EC 333 Microprocessor and Interfacing Techniques (3+1) Lecture 6 8086/88 Microprocessor Programming (Arithmetic Instructions) Dr Hashim Ali Fall 2018 Department of Computer Science and Engineering HITEC

More information

CS-202 Microprocessor and Assembly Language

CS-202 Microprocessor and Assembly Language CS-202 Microprocessor and Assembly Language Lecture 2 Introduction to 8086 Assembly Language Dr Hashim Ali Spring - 2019 Department of Computer Science and Engineering HITEC University Taxila!1 Lecture

More information

8086 INSTRUCTION SET

8086 INSTRUCTION SET 8086 INSTRUCTION SET Complete 8086 instruction set Quick reference: AAA AAD AAM AAS ADC ADD AND CALL CBW CLC CLD CLI CMC CMP CMPSB CMPSW CWD DAA DAS DEC DIV HLT IDIV IMUL IN INC INT INTO I JA JAE JB JBE

More information

.code. lea dx,msg2. Page 1/8. Problem 1: Programming in Assembly [25 Points]

.code. lea dx,msg2. Page 1/8. Problem 1: Programming in Assembly [25 Points] Problem : Programming in Assembly [ Points] The following assembly program is supposed to: receive three integer numbers from the console, call a function, name sort, function sort arranges the three input

More information

Assignment no:4 on chapter no :3 : Instruction set of 8086

Assignment no:4 on chapter no :3 : Instruction set of 8086 Assignment no:4 on chapter no :3 : Instruction set of 8086 1) Describe any two string operation instruction of 8086 with syntax & one example of each. 1] REP: REP is a prefix which is written before one

More information

Week /8086 Microprocessor Programming II

Week /8086 Microprocessor Programming II Week 5 8088/8086 Microprocessor Programming II Quick Review Shift & Rotate C Target register or memory SHL/SAL 0 C SHR 0 SAR C Sign Bit 2 Examples Examples Ex. Ex. Ex. SHL dest, 1; SHL dest,cl; SHL dest,

More information

CC411: Introduction To Microprocessors

CC411: Introduction To Microprocessors CC411: Introduction To Microprocessors OBJECTIVES this chapter enables the student to: Describe the Intel family of microprocessors from 8085 to Pentium. In terms of bus size, physical memory & special

More information

Experiment N o 8. String Handling Instructions

Experiment N o 8. String Handling Instructions Experiment N o 8 String Handling Instructions Introduction: In this experiment you will deal with string handling instructions, such as reading a string, moving a string from one memory location to another,

More information

8088/8086 Programming Integer Instructions and Computations

8088/8086 Programming Integer Instructions and Computations Unit3 reference 2 8088/8086 Programming Integer Instructions and Computations Introduction Up to this point we have studied the software architecture of the 8088 and 8086 microprocessors, their instruction

More information

Kingdom of Saudi Arabia Ministry of Higher Education. Taif University. Faculty of Computers & Information Systems

Kingdom of Saudi Arabia Ministry of Higher Education. Taif University. Faculty of Computers & Information Systems Kingdom of Saudi Arabia Ministry of Higher Education Taif University Faculty of Computers & Information Systems المملكة العربية السعودية وزارة التعليم العالي جامعة الطاي ف آلية الحاسبات ونظم المعلومات

More information

Signed number Arithmetic. Negative number is represented as

Signed number Arithmetic. Negative number is represented as Signed number Arithmetic Signed and Unsigned Numbers An 8 bit number system can be used to create 256 combinations (from 0 to 255), and the first 128 combinations (0 to 127) represent positive numbers

More information

9/25/ Software & Hardware Architecture

9/25/ Software & Hardware Architecture 8086 Software & Hardware Architecture 1 INTRODUCTION It is a multipurpose programmable clock drive register based integrated electronic device, that reads binary instructions from a storage device called

More information

Mr. Sapan Naik 1. Babu Madhav Institute of Information Technology, UTU

Mr. Sapan Naik 1. Babu Madhav Institute of Information Technology, UTU 5 Years Integrated M.Sc.(IT) Semester 4 060010402 System Programming Question Bank Unit 1: Introduction 1. Write the decimal equivalent for each integral power of 2 from 2! to 2!". 2. Convert the following

More information

Arithmetic and Logic Instructions And Programs

Arithmetic and Logic Instructions And Programs Dec Hex Bin 3 3 00000011 ORG ; FOUR Arithmetic and Logic Instructions And Programs OBJECTIVES this chapter enables the student to: Demonstrate how 8-bit and 16-bit unsigned numbers are added in the x86.

More information

Microprocessor. By Mrs. R.P.Chaudhari Mrs.P.S.Patil

Microprocessor. By Mrs. R.P.Chaudhari Mrs.P.S.Patil Microprocessor By Mrs. R.P.Chaudhari Mrs.P.S.Patil Chapter 1 Basics of Microprocessor CO-Draw Architecture Of 8085 Salient Features of 8085 It is a 8 bit microprocessor. It is manufactured with N-MOS technology.

More information

Week /8086 Microprocessor Programming

Week /8086 Microprocessor Programming Week 5 8088/8086 Microprocessor Programming Multiplication and Division Multiplication Multiplicant Operand Result (MUL or IMUL) (Multiplier) Byte * Byte AL Register or memory Word * Word AX Register or

More information

CS401 Assembly Language Solved MCQS From Midterm Papers

CS401 Assembly Language Solved MCQS From Midterm Papers CS401 Assembly Language Solved MCQS From Midterm Papers May 14,2011 MC100401285 Moaaz.pk@gmail.com MC100401285@gmail.com PSMD01(IEMS) Question No:1 ( Marks: 1 ) - Please choose one The first instruction

More information

Assembly Language Lab # 12 Part A: Strings and Arrays Part B: Drawing Graphics Using INT 10h

Assembly Language Lab # 12 Part A: Strings and Arrays Part B: Drawing Graphics Using INT 10h Faculty of Engineering Computer Engineering Department Islamic University of Gaza 2011 Assembly Language Lab # 12 Part A: Strings and Arrays Part B: Drawing Graphics Using INT 10h Eng. Doaa Abu Jabal Objective:

More information

Program controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions.

Program controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions. 2 Microprocessor Program controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions. It is used as CPU (Central Processing Unit) in computers. 3 Microprocessor

More information

b) List the 16 Bit register pairs of 8085?(Any 2 pair, 1 Mark each) 2M Ans: The valid 16 bit register pair of 8085 are

b) List the 16 Bit register pairs of 8085?(Any 2 pair, 1 Mark each) 2M Ans: The valid 16 bit register pair of 8085 are Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The model answer and the answer written by candidate

More information

BLDEA S V.P. DR. P.G. HALAKATTI COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA

BLDEA S V.P. DR. P.G. HALAKATTI COLLEGE OF ENGINEERING & TECHNOLOGY, VIJAYAPURA EXPERIMENT NO.:- 1. BINARY SEARCH Work Space: Register Used Memory Address Data DI 10000H 11H 10001H 11H 10002H 22H 10003H 22H BX 10004H 33H 10005H 33H 10006H 44H 10007H 44H CX 10008H 55H 10009H 55H 24

More information

APPENDIX C INSTRUCTION SET DESCRIPTIONS

APPENDIX C INSTRUCTION SET DESCRIPTIONS APPENDIX C INSTRUCTION SET DESCRIPTIONS This appendix provides reference information for the 80C186 Modular Core family instruction set. Tables C-1 through C-3 define the variables used in Table C-4, which

More information

Chapter 2 COMPUTER SYSTEM HARDWARE

Chapter 2 COMPUTER SYSTEM HARDWARE Chapter 2 COMPUTER SYSTEM HARDWARE A digital computer system consists of hardware and software. The hardware consists of the physical components of the system, whereas the software is the collection of

More information

Question Bank Unit-1

Question Bank Unit-1 Question Bank Unit-1 1.Define a microprocessor. Explain in detail the evolution of microprocessor in microprocessor age from 4004 MP to core-2 system. 2.What is microprocessor? Explain how data, address

More information

UNIT III MICROPROCESSORS AND MICROCONTROLLERS MATERIAL OVERVIEW: Addressing Modes of Assembler Directives. Procedures and Macros

UNIT III MICROPROCESSORS AND MICROCONTROLLERS MATERIAL OVERVIEW: Addressing Modes of Assembler Directives. Procedures and Macros OVERVIEW: UNIT III Addressing Modes of 8086 Assembler Directives Procedures and Macros Instruction Set of 8086 Data Transfer Group Arithmetic Group Logical Instructions Rotate and Shift instructions Loop

More information

Advanced Microprocessors

Advanced Microprocessors Advanced Microprocessors Notes #7 I/O Interfacing EE 467/567 Winter 2012 By Avinash Kodi IO.1 Background Materials Textbook: See Web Other: IA-32 Intel Architecture Software Developer s Manual Volume 1

More information

Intel 8086 MICROPROCESSOR ARCHITECTURE

Intel 8086 MICROPROCESSOR ARCHITECTURE Intel 8086 MICROPROCESSOR ARCHITECTURE 1 Features It is a 16-bit μp. 8086 has a 20 bit address bus can access up to 2 20 memory locations (1 MB). It can support up to 64K I/O ports. It provides 14, 16

More information

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY BACKGROUND Segment The "SEGMENT" and "ENDS" directives indicate to the assembler the beginning and ending of a segment and have the following format label SEGMENT [options] ;place the statements belonging

More information

PESIT Bangalore South Campus Hosur road, 1km before Electronic City, Bengaluru -100 Department of Electronics and Communication

PESIT Bangalore South Campus Hosur road, 1km before Electronic City, Bengaluru -100 Department of Electronics and Communication USN 1 P E PESIT Bangalore South Campus Hosur road, 1km before Electronic City, Bengaluru -100 Department of Electronics and Communication INTERNAL ASSESSMENT TEST 1 Date : 26/02/2018 Marks: 40 Subject

More information

Babu Madhav Institute of Information Technology, UTU

Babu Madhav Institute of Information Technology, UTU 5 Years Integrated M.Sc.(IT) Semester 4 060010309 : DSE3 Microprocessor Programming and Interfacing Question Bank 1. Write an assembly language program to check whether the given number is odd or even.

More information

EC-333 Microprocessor and Interfacing Techniques

EC-333 Microprocessor and Interfacing Techniques EC-333 Microprocessor and Interfacing Techniques Lecture 3 The Microprocessor and its Architecture Dr Hashim Ali Fall - 2018 Department of Computer Science and Engineering HITEC University Taxila Slides

More information

db "Please enter up to 256 characters (press Enter Key to finish): ",0dh,0ah,'$'

db Please enter up to 256 characters (press Enter Key to finish): ,0dh,0ah,'$' PA4 Sample Solution.model large.stack 100h.data msg1 db "This programs scans a string of up to 256 bytes and counts the repetitions of the number 4206 and sums them.",0dh,0ah,'$' msg2 db "Please enter

More information

Week 7. Input/Output Interface Circuits and LSI Peripheral Devices

Week 7. Input/Output Interface Circuits and LSI Peripheral Devices Week 7 Input/Output Interface Circuits and LSI Peripheral Devices Core and Special Purpose I/O Interfaces Special purpose I/O interfaces display parallel printer interface serial communication interface

More information

Code segment Stack segment

Code segment Stack segment Registers Most of the registers contain data/instruction offsets within 64 KB memory segment. There are four different 64 KB segments for instructions, stack, data and extra data. To specify where in 1

More information

Basic characteristics & features of 8086 Microprocessor Dr. M. Hebaishy

Basic characteristics & features of 8086 Microprocessor Dr. M. Hebaishy Basic characteristics & features of 8086 Microprocessor Dr. M. Hebaishy Digital Logic Design Ch1-1 8086 Microprocessor Features: The 8086 microprocessor is a 16 bit microprocessor. The term 16 bit means

More information

Logic Instructions. Basic Logic Instructions (AND, OR, XOR, TEST, NOT, NEG) Shift and Rotate instructions (SHL, SAL, SHR, SAR) Segment 4A

Logic Instructions. Basic Logic Instructions (AND, OR, XOR, TEST, NOT, NEG) Shift and Rotate instructions (SHL, SAL, SHR, SAR) Segment 4A Segment 4A Logic Instructions Basic Logic Instructions (AND, OR, XOR, TEST, NOT, NEG) Shift and Rotate instructions (SHL, SAL, SHR, SAR) Course Instructor Mohammed Abdul kader Lecturer, EEE, IIUC Basic

More information

Marking Scheme. Examination Paper Department of CE. Module: Microprocessors (630313)

Marking Scheme. Examination Paper Department of CE. Module: Microprocessors (630313) Philadelphia University Faculty of Engineering Marking Scheme Examination Paper Department of CE Module: Microprocessors (630313) Final Exam Second Semester Date: 02/06/2018 Section 1 Weighting 40% of

More information

We will first study the basic instructions for doing multiplications and divisions

We will first study the basic instructions for doing multiplications and divisions MULTIPLICATION, DIVISION AND NUMERICAL CONVERSIONS We will first study the basic instructions for doing multiplications and divisions We then use these instructions to 1. Convert a string of ASCII digits

More information

16.317: Microprocessor Systems Design I Fall 2013

16.317: Microprocessor Systems Design I Fall 2013 16.317: Microprocessor Systems Design I Fall 2013 Exam 1 Solution 1. (20 points, 5 points per part) Multiple choice For each of the multiple choice questions below, clearly indicate your response by circling

More information

Intel 8086 MICROPROCESSOR. By Y V S Murthy

Intel 8086 MICROPROCESSOR. By Y V S Murthy Intel 8086 MICROPROCESSOR By Y V S Murthy 1 Features It is a 16-bit μp. 8086 has a 20 bit address bus can access up to 2 20 memory locations (1 MB). It can support up to 64K I/O ports. It provides 14,

More information

Vidyalankar. Vidyalankar T.E. Sem. V [CMPN] Microprocessors Prelim Question Paper Solution. 1. (a)

Vidyalankar. Vidyalankar T.E. Sem. V [CMPN] Microprocessors Prelim Question Paper Solution. 1. (a) 1. (a) Step 1 : Total EPROM required Chip size available No.of chips required = 2 T.E. Sem. V [CMPN] Microprocessors Prelim Question Paper Solution = 64 KB = 32 KB No.of sets required = 2 1 2 Set 1 = Ending

More information

EEM336 Microprocessors I. Data Movement Instructions

EEM336 Microprocessors I. Data Movement Instructions EEM336 Microprocessors I Data Movement Instructions Introduction This chapter concentrates on common data movement instructions. 2 Chapter Objectives Upon completion of this chapter, you will be able to:

More information

if 2 16bit operands multiplied the result will be

if 2 16bit operands multiplied the result will be how many operands in ADC? ans:3 how 32 bit word is defined? ans define double if 2 16bit operands multiplied the result will be ans 32bit if div by ero occurs then?? ans div by zero int for software int

More information

Weeks 9-10 Input/Output Interface Circuits and LSI Peripheral Devices Core and Special Purpose I/O Interfaces

Weeks 9-10 Input/Output Interface Circuits and LSI Peripheral Devices Core and Special Purpose I/O Interfaces Weeks 9-10 Input/Output Interface Circuits and LSI Peripheral Devices Core and Special Purpose I/O Interfaces Special purpose I/O interfaces are implemented as add-on cards on the PC display parallel printer

More information

Arithmetic Instructions

Arithmetic Instructions Segment 3C Arithmetic Instructions This topic covers the following instructions: Addition (ADD, INC, ADC) Subtraction (SUB, DEC, SBB,CMP) Multiplication (MUL, IMUL) Division (DIV, IDIV) BCD Arithmetic

More information

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013)

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013) SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013) UNIT I THE 8086 MICROPROCESSOR PART A (2 MARKS) 1. What are the functional

More information

Lecture 9. INC and DEC. INC/DEC Examples ADD. Arithmetic Operations Overflow Multiply and Divide

Lecture 9. INC and DEC. INC/DEC Examples ADD. Arithmetic Operations Overflow Multiply and Divide Lecture 9 INC and DEC Arithmetic Operations Overflow Multiply and Divide INC adds one to a single operand DEC decrements one from a single operand INC destination DEC destination where destination can

More information

CS401 Assembly Language Solved Subjective MAY 03,2012 From Midterm Papers. MC

CS401 Assembly Language Solved Subjective MAY 03,2012 From Midterm Papers. MC CS401 Assembly Language Solved Subjective MAY 03,2012 From Midterm Papers MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01 MIDTERM FALL 2011 CS401 Assembly Language Q: Affected flag of AND operation

More information

3.1 DATA MOVEMENT INSTRUCTIONS 45

3.1 DATA MOVEMENT INSTRUCTIONS 45 3.1.1 General-Purpose Data Movement s 45 3.1.2 Stack Manipulation... 46 3.1.3 Type Conversion... 48 3.2.1 Addition and Subtraction... 51 3.1 DATA MOVEMENT INSTRUCTIONS 45 MOV (Move) transfers a byte, word,

More information

EXPERIMENT - 1: ADDITION & SUBTRACTION

EXPERIMENT - 1: ADDITION & SUBTRACTION EXPERIMENT - 1: ADDITION & SUBTRACTION 1.1 OBJECTIVE To add and subtract two 8 bit or 16-bit numbers residing in memory and store the result in memory. 1.2 RESOURCES The 8086 Microprocessor kit, Power

More information

8086 INTERNAL ARCHITECTURE

8086 INTERNAL ARCHITECTURE 8086 INTERNAL ARCHITECTURE Segment 2 Intel 8086 Microprocessor The 8086 CPU is divided into two independent functional parts: a) The Bus interface unit (BIU) b) Execution Unit (EU) Dividing the work between

More information

Marking Scheme. Examination Paper. Module: Microprocessors (630313)

Marking Scheme. Examination Paper. Module: Microprocessors (630313) Philadelphia University Faculty of Engineering Marking Scheme Examination Paper Department of CE Module: Microprocessors (630313) Final Exam Second Semester Date: 12/06/2017 Section 1 Weighting 40% of

More information

Subject Code: Model Answer Page No: /25

Subject Code: Model Answer Page No: /25 Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The model answer and the answer written by candidate

More information

Unit 5 DOS INTERRPUTS

Unit 5 DOS INTERRPUTS Unit 5 DOS INTERRPUTS 5.1 Introduction The DOS (Disk Operating System) provides a large number of procedures to access devices, files and memory. These procedures can be called in any user program using

More information

ADVANCE MICROPROCESSOR & INTERFACING

ADVANCE MICROPROCESSOR & INTERFACING VENUS INTERNATIONAL COLLEGE OF TECHNOLOGY Gandhinagar Department of Computer Enggineering ADVANCE MICROPROCESSOR & INTERFACING Name : Enroll no. : Class Year : 2014-15 : 5 th SEM C.E. VENUS INTERNATIONAL

More information

Midterm Exam #2 Answer Key

Midterm Exam #2 Answer Key Midterm Exam #2 Answer Key Name: Student ID #: I have read and understand Washington State University s policy on academic dishonesty and cheating YOU Signed: Problem 1) Consider the following fragment

More information

WINTER 17 EXAMINATION

WINTER 17 EXAMINATION Subject Name: Microprocessor and Programming Model Answer Sub Code: Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer

More information

icroprocessor istory of Microprocessor ntel 8086:

icroprocessor istory of Microprocessor ntel 8086: Microprocessor A microprocessor is an electronic device which computes on the given input similar to CPU of a computer. It is made by fabricating millions (or billions) of transistors on a single chip.

More information

Question Bank Part-A UNIT I- THE 8086 MICROPROCESSOR 1. What is microprocessor? A microprocessor is a multipurpose, programmable, clock-driven, register-based electronic device that reads binary information

More information

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY BACKGROUND 8086 CPU has 8 general purpose registers listed below: AX - the accumulator register (divided into AH / AL): 1. Generates shortest machine code 2. Arithmetic, logic and data transfer 3. One

More information

Instructions moving data

Instructions moving data do not affect flags. Instructions moving data mov register/mem, register/mem/number (move data) The difference between the value and the address of a variable mov al,sum; value 56h al mov ebx,offset Sum;

More information

16.317: Microprocessor Systems Design I Spring 2014

16.317: Microprocessor Systems Design I Spring 2014 16.317: Microprocessor Systems Design I Spring 2014 Exam 1 Solution 1. (20 points, 5 points per part) Multiple choice For each of the multiple choice questions below, clearly indicate your response by

More information

Program controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions.

Program controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions. 8086 Microprocessor Microprocessor Program controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions. It is used as CPU (Central Processing Unit) in computers.

More information

L1 Remember, L2 Understand, L3 - Apply, L4 Analyze, L5 Evaluate, L6 Create

L1 Remember, L2 Understand, L3 - Apply, L4 Analyze, L5 Evaluate, L6 Create Sample µp questions Syllabus: Microprocessors And Microcontrollers - 15CS44: Modules 1, 2, 3, 4, 5 Text book: Muhammad Ali Mazidi, Janice GillispieMazidi, Danny Causey, The x86 PC Assembly Language Design

More information

Microprocessor and Assembly Language Week-5. System Programming, BCS 6th, IBMS (2017)

Microprocessor and Assembly Language Week-5. System Programming, BCS 6th, IBMS (2017) Microprocessor and Assembly Language Week-5 System Programming, BCS 6th, IBMS (2017) High Speed Memory Registers CPU store data temporarily in these location CPU process, store and transfer data from one

More information

Hardware and Software Architecture. Chapter 2

Hardware and Software Architecture. Chapter 2 Hardware and Software Architecture Chapter 2 1 Basic Components The x86 processor communicates with main memory and I/O devices via buses Data bus for transferring data Address bus for the address of a

More information

Microcomputer Architecture..Second Year (Sem.2).Lecture(2) مدرس المادة : م. سندس العزاوي... قسم / الحاسبات

Microcomputer Architecture..Second Year (Sem.2).Lecture(2) مدرس المادة : م. سندس العزاوي... قسم / الحاسبات 1) Input/output In computing, input/output or I/O, is the communication between an information processing system (such as a computer) and the outside world, possibly a human or another information processing

More information

UNIT 2 PROCESSORS ORGANIZATION CONT.

UNIT 2 PROCESSORS ORGANIZATION CONT. UNIT 2 PROCESSORS ORGANIZATION CONT. Types of Operand Addresses Numbers Integer/floating point Characters ASCII etc. Logical Data Bits or flags x86 Data Types Operands in 8 bit -Byte 16 bit- word 32 bit-

More information

Lecture (08) x86 programming 7

Lecture (08) x86 programming 7 Lecture (08) x86 programming 7 By: Dr. Ahmed ElShafee 1 Conditional jump: Conditional jumps are executed only if the specified conditions are true. Usually the condition specified by a conditional jump

More information

Logical and bit operations

Logical and bit operations Assembler lecture 6 S.Šimoňák, DCI FEEI TU of Košice Logical and bit operations instructions performing logical operations, shifts and rotations logical expressions and bit manipulations strings Logical

More information

String Processing. Chapter 9 S. Dandamudi

String Processing. Chapter 9 S. Dandamudi String Processing Chapter 9 S. Dandamudi Outline String representation Using string length Using a sentinel character String instructions Repetition prefixes Direction flag String move instructions String

More information

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE: 1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE: A microprocessor is a programmable electronics chip that has computing and decision making capabilities similar to central processing unit

More information

Summer 2003 Lecture 4 06/14/03

Summer 2003 Lecture 4 06/14/03 Summer 2003 Lecture 4 06/14/03 LDS/LES/LSS General forms: lds reg,mem lseg reg,mem Load far pointer ~~ outside of current segment {E.g., load reg w/value @ mem, & seg w/mem+2 XCHG Exchange values General

More information

Chapter 3. Assembly Language Programming with 8086

Chapter 3. Assembly Language Programming with 8086 Chapter 3 Assembly Language Programming with 8086 UNIT - III Assembly Language Programming with 8086- Machine level programs, Machine coding the programs, Programming with an assembler, Assembly Language

More information

Sri Krishna Engineering College Panapakkam, Chennai 601 301 Lab Manual CS2259 MICROPROCESSORS LAB Department of Electronics and Communication Engineering CS 2259 Microprocessors Lab SKEC Page 1 List of

More information

Q1: Define a character string named CO_NAME containing "Internet Services" as a constant?

Q1: Define a character string named CO_NAME containing Internet Services as a constant? CS 321 Lab Model Answers ١ First Lab : Q1: Define a character string named CO_NAME containing "Internet Services" as a constant? ANS: CO_NAME EQU ' Internet Services' Q2: Define the following numeric values

More information

Syllabus: Microprocessors And Microcontrollers - 15CS44:

Syllabus: Microprocessors And Microcontrollers - 15CS44: Syllabus: Microprocessors And Microcontrollers - 15CS44: Module 3: 8255 I/O programming: I/O addresses MAP of x86 PC s, programming and interfacing the 8255. Text book: Muhammad Ali Mazidi, Janice GillispieMazidi,

More information

8086 ASSEMBLY LANGUAGE PROGRAMMING

8086 ASSEMBLY LANGUAGE PROGRAMMING UNIT-II 8086 ASSEMBLY LANGUAGE PROGRAMMING Contents at a glance: 8086 Instruction Set Assembler directives Procedures and macros. 8086 MEMORY INTERFACING: 8086 addressing and address decoding Interfacing

More information

Programmable Peripheral Interface (PPI) 8255A. CEN433 King Saud University Dr. Mohammed Amer Arafah

Programmable Peripheral Interface (PPI) 8255A. CEN433 King Saud University Dr. Mohammed Amer Arafah Programmable Peripheral Interface (PPI) 8255A CEN433 King Saud University Dr. 1 Functional Diagram 2 Pin Description 3 8255A Basic Operation A 1 A 0 Port 0 0 Port A 0 1 Port B 1 0 Port C 1 1 Control Word

More information

8086 programming Control Flow Instructions and Program Structures

8086 programming Control Flow Instructions and Program Structures 8086 programming Control Flow Instructions and Program Structures Example: write a procedure named Square that squares the contents of BL and places the result in BX. Square: PUSH AX MOV AL, BL MUL BL

More information

PESIT Bangalore South Campus

PESIT Bangalore South Campus INTERNAL ASSESSMENT TEST 2 Date : 28/03/2016 Max Marks: 50 Subject & Code : Microprocessor (10CS45) Section: IV A and B Name of faculty: Deepti.C Time: 8:30-10:00 am Note: Answer any complete five questions

More information

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATION ENGINEERING QUESTION BANK

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATION ENGINEERING QUESTION BANK Course Name Course Code Class Branch INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad - 500 04 ELECTRONICS AND COMMUNICATION ENGINEERING QUESTION BANK : Microprocessors and Microcontrollers :

More information

1-Operand instruction types 1 INC/ DEC/ NOT/NEG R/M. 2 PUSH/ POP R16/M16/SR/F 2 x ( ) = 74 opcodes 3 MUL/ IMUL/ DIV/ DIV R/M

1-Operand instruction types 1 INC/ DEC/ NOT/NEG R/M. 2 PUSH/ POP R16/M16/SR/F 2 x ( ) = 74 opcodes 3 MUL/ IMUL/ DIV/ DIV R/M Increment R16 1-Operand instruction types 1 INC/ DEC/ NOT/NEG R/M 4 x (16+48) = 256 opcodes 2 PUSH/ POP R16/M16/SR/F 2 x (8+24+4+1) = 74 opcodes 3 MUL/ IMUL/ DIV/ DIV R/M 4 x (16+48) = 256 opcodes INC

More information

Ex: Write a piece of code that transfers a block of 256 bytes stored at locations starting at 34000H to locations starting at 36000H. Ans.

Ex: Write a piece of code that transfers a block of 256 bytes stored at locations starting at 34000H to locations starting at 36000H. Ans. INSTRUCTOR: ABDULMUTTALIB A H ALDOURI Conditional Jump Cond Unsigned Signed = JE : Jump Equal JE : Jump Equal ZF = 1 JZ : Jump Zero JZ : Jump Zero ZF = 1 JNZ : Jump Not Zero JNZ : Jump Not Zero ZF = 0

More information

Defining and Using Simple Data Types

Defining and Using Simple Data Types 85 CHAPTER 4 Defining and Using Simple Data Types This chapter covers the concepts essential for working with simple data types in assembly-language programs The first section shows how to declare integer

More information

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers 1. Define microprocessors? UNIT-I A semiconductor device(integrated circuit) manufactured by using the LSI technique. It includes

More information

Memory address space is selected when which of the following instructions is given to the processor MOV DEC IN ADD My Ok Page # 115

Memory address space is selected when which of the following instructions is given to the processor MOV DEC IN ADD My Ok Page # 115 Muhammad Rizwan Ashraf 0300-7487664 bits of the work independently and individually index register base register flags register accumulator Page # 12 Motorola 68K processors have 23bit general purpose

More information

Lecture 9. INC and DEC. INC/DEC Examples ADD. ADD Examples SUB. INC adds one to a single operand DEC decrements one from a single operand

Lecture 9. INC and DEC. INC/DEC Examples ADD. ADD Examples SUB. INC adds one to a single operand DEC decrements one from a single operand Lecture 9 INC and DEC Arithmetic Operations Shift Instructions Next week s homework! INC adds one to a single operand DEC decrements one from a single operand INC destination DEC destination where destination

More information

Data Movement Instructions

Data Movement Instructions Segment 3B Data Movement Instructions PUSH/POP Contents Load-Effective address (LEA, LDS, LES) String Data Transfer (LODS, STOS, MOVS) XCHG, XLAT IN and OUT Course Instructor Mohammed Abdul kader Lecturer,

More information

Q1: Multiple choice / 20 Q2: Memory addressing / 40 Q3: Assembly language / 40 TOTAL SCORE / 100

Q1: Multiple choice / 20 Q2: Memory addressing / 40 Q3: Assembly language / 40 TOTAL SCORE / 100 16.317: Microprocessor-Based Systems I Summer 2012 Exam 1 July 20, 2012 Name: ID #: For this exam, you may use a calculator and one 8.5 x 11 double-sided page of notes. All other electronic devices (e.g.,

More information

16-Bit Intel Processor Architecture

16-Bit Intel Processor Architecture IBM-PC Organization 16-Bit Intel Processor Architecture A-16 bit microprocessor can operate on 16 bits of data at a time. 8086/8088 have the simplest structure 8086/8088 have the same instruction set,

More information

CG2007 Microprocessor systems.

CG2007 Microprocessor systems. CG2007 Microprocessor systems Tutorial 1 Semester 2 AY 2011-12 Ganesh Iyer ganesh.vigneswara@gmail.com http://ganeshniyer.com About Me I have 3 years of Industry work experience in Bangalore, India. I

More information

Mnem. Meaning Format Operation Flags affected ADD Addition ADD D,S (D) (S)+(D) (CF) Carry ADC Add with ADC D,C (D) (S)+(D)+(CF) O,S,Z,A,P,C

Mnem. Meaning Format Operation Flags affected ADD Addition ADD D,S (D) (S)+(D) (CF) Carry ADC Add with ADC D,C (D) (S)+(D)+(CF) O,S,Z,A,P,C ARITHMETIC AND LOGICAL GROUPS 6-1 Arithmetic and logical groups: The arithmetic group includes instructions for the addition, subtraction, multiplication, and division operations. The state that results

More information