Practical Course File For
|
|
- Isabella Marshall
- 6 years ago
- Views:
Transcription
1 Practical Course File For Microprocessor (IT 473) B.Tech (IT) IV-SEM Department of IT University Institute of Engineering & Technology Panjab University, Chandigarh Page 1
2 INTRODUCTION... 4 EXPERIMENT-1: Introduction to Microprocessor Trainer Kit... 7 EXPERIMENT-2 : 1 s complement of an 8-bit number EXPERIMENT-3: 2 s complement of an 8-bit number EXPERIMENT-4: 1 s complement of 16-bit number EXPERIMENT-5: 2 s complement of 16-bit number EXPERIMENT-6: Shift left 8-bit number by 1 bit EXPERIMENT-7: Shift right 8-bit number by 1 bit EXPERIMENT-8: Mask the lower nibble of an 8-bit number EXPERIMENT-9: Mask the higher nibble of an 8-bit number EXPERIMENT-10: Add two 8-bit numbers without considering the carry EXPERIMENT-11: Add two 8-bit numbers along with considering the carry EXPERIMENT-12: Subtract two 8-bit numbers without considering borrow EXPERIMENT-13: Subtract two 8-bit numbers along with considering the borrow EXPERIMENT-14: Add two 16-bit numbers without considering the carry EXPERIMENT-15: Subtract two 16-bit numbers without considering borrow EXPERIMENT-16: Add two 8-bit numbers and show the result in decimal number system Page 2
3 EXPERIMENT-17: Multiply two 8-bit numbers EXPERIMENT-18: Find square of an 8-bit number EXPERIMENT-19: Larger of two 8-bit numbers EXPERIMENT-20: Smaller of two 8-bit numbers EXPERIMENT-21: Addition of ten 8-bit numbers stored in memory EXPERIMENT-22: Find no. of negative elements in a block of data EXPERIMENT-23 : To sort numbers EXPERIMENT-24 : Alter the contents of flag register in EXPERIMENT-25 : Calculate the sum of series of numbers EXPERIMENT-26 : Division of 16 bit number by 8 bit number EXPERIMENT-27 : Find the number of negative elements EXPERIMENT-28 : Find the largest of given numbers EXPERIMENT-29:Count number of l's in the contents of a register EXPERIMENT-30: Transfer contents to overlapping memory blocks Appendix -1 : OPCODES TABLE OF INTEL 8085 in Alphabetical order Page 3
4 INTRODUCTION Microprocessor 8085 Prac Course File In all Experimental Laboratory, student will follow following procedural steps : Step 1: Analyzing/Defining the Problem: The first step in writing a program is to think very carefully about the problem that you want the program to solve. In other words, ask yourself many times, what do I really want this program to do? It is good idea to write down exactly what you want the program to do and the order in which you want the program to do it. At this point student should not write down program statements, should write the operations in general terms. Step 2: Designing the solution/representing Program Operations: The formula or sequence of operations used to solve a programming problem is often called the algorithm of the program. Draw flowchart or use pseudo code to represent program which you want to write to solve your problem. In EXPERIMENT it is better to use flowchart. Step 3: Implementing the Solution 3.1 Define your Constant, Variables & Pointers for the program. 3.2 Finding the right instruction: After student prepare flowchart of a program, the next step is to determine the instruction statements required to do each part of the program. Student has to remember the complete instruction set for 8085.Each statement in flow chart could be implemented using one or more instructions. Standard program format for assembly language program : Student should finally write the program in following format : Memory Address Label Mnemonics Label Hex Code Comments 2100 start : MVI A, 55 3E, 55H ; Acc= Constructing the machine codes from 8085 instructions: Student will refer the table and manually convert its assembly language program into machine code. Page 4
5 Step 4: Loading/Running the solution: Student will use trainer kit to load his machine code program in RAM and run his program. Student will use debugging tools availed in EXPERIMENT kit to find out the software bugs in the program. Step 5: Testing the Solution Test the solution by observing the content of various registers and memory addresses. This is the standard procedure for all experiments, hence not required to write separate procedure for all experiments. The list of experiments is attached. Example: Move a block of 8-bit numbers from one place to other place. Data(H): 37, A2, F2, 82, 57, 5A, 7F, DA, E5, 8B, A7, C2, B8, 10, 19, 98 Step 1: By analyzing the problem statement, you require following things. i) Block size (How many number of 8-bit numbers you want to move) ii) Source Memory Pointer iii) Destination Memory Pointer Step 2: Designing the solution/representing Program Operations. (Flow Chart for block transfer) Step 3: Implementing the Solution 3.1 Define your Constant, Variables & Pointers 3.2 Finding the right instruction: LXI H, XX50 LXI D, XX70 MVI B,10 NEXT: MOV A,M STAX D INX H INX D Set HL pointer for source memory Set DE pointer for destination memory Set B as a byte counter Get data from source memory Store data in destination memory Get ready for next byte Page 5
6 DCR B JNZ NEXT Go back to next byte if counter is not equal to Constructing the machine codes from 8085 instructions: Page 6
7 EXPERIMENT-1: Introduction to Microprocessor Trainer Kit AIM: Introduction to Microprocessor Trainer Kit Tools / Apparatus: 8085 microprocessor trainer kit Study of HEX Keypad: Study the functions of the following Keys: SAVE: This command is used to save the contents of specified block on to a audio cassette for permanent storage. LOAD: This command is opposite to save command. The contents of audio cassette block is loaded (retrieved back) in the system RAM from a given DS (file name) CODE: When this command key is pressed the address field remains blank, Data field shows a dot indicating that it expects a code. User is provided with a table of codes, indicating the meaning and Prerequisites of each code. User loads the appropriate code and executes it by pressing EXEC. The monitor branches to the appropriate sub-routines pointed by the code. STEP: Mere running a program with RUN is done whenever the program development is complete i.e. to run a final working program. During the program development stage some sort of aid to execute the part of program at a time and then test its success is required. The STEP command helps you to do the above. There are two ways of stepping the program. Page 7
8 SINGLE STEPPING: to execute single instruction at a time, using STEP command. The STEP command requires a start address, break address and the no.of times the br should occur. BREAK POINT: set a software breakpoint RST1. This software breakpoint can be done using the RUN command. It requires RST1 (CFH) to be inserted to a location where you want to break. The disadvantage of this method is that you have to insert and remove 'CF' and you have to operate in the RAM area only. VI: This key causes immediate recognition of RST 7.5 interrupt and control passes to location 003C in the monitor. This location has a jump to location 20CE in user RAM. You can put any instruction or jump in 20CE to 20D0 - Interrupts must be enabled (EI) instruction. - RST 7.5 must be unmasked (mask reset by SIM instruction) RUN: This command is used to execute your programs or subroutines from a Specified address. EXEC: Pressing EXEC will place the data field contents into the named register and terminate the command. REG: This command allows you to display and optionally modify the contents of 8085 CPU registers. The various registers are A, B, C, D, E, F, I, H, L, SPH, SPL, PCH, PCL. (H higher byte, L lower byte) RES: On RES, the display shows MP 85 as a sign on message, indicating that the monitor is ready to accept a command. Pressing any non-command key generates Err message. After - Err user can immediately give a valid command. SET: It is used to SET the address of a required memory location. A dot in the address field of display indicated that the entry will be displayed in the address field. INC: Pressing INC, first time will shift the dot to the data field of display. Data field will show the contents of the memory location pointed by the address set. One can modify or retain the data field to any value. DEC: DEC acts as similar to INC, except the address field is decremented, pointing to previous memory locations. SPH: Stack pointer Register (Higher byte) SPL: Stack pointer Register (Lower byte) Page 8
9 PCH: Program Counter Register (Higher byte) PCL: Program Counter Register (Lower byte) 0 F: Hex Keypad H,L: Registers H & L Study of following Devices: 1. IC 8251 (Programmable Synchronous and asynchronous serial data transmitter) 2. IC 8253 (Programmable interval Timer /Counter) 3. IC 8255 (Programmable Parallel IO Device) 4. IC 8279 (Keyboard Display Interface) 5. IC 6264 (RAM) 6. IC 2764 (EPROM) 7. ADC 8. DAC 9. IC 8085 (Microprocessor) Study of Memory Address Space: ROM :0000 1FFF RAM :2000 3FFF Memory Address Space Used by Firmware Program: FF Students should not use this address range for their program or do not modify the content of these locations. Memory is expandable to 64K Bytes by interfacing appropriate RAM IC in the empty sockets. Crystal Frequency: Crystal Frequency = MHz Study of Onboard Interfaces: The kit has following onboard Interfaces: Page 9
10 - Parallel I/O using Serial I/O using 8251/ Keyboard/Display using ADC/DAC using 8255 / Latch -373 Microprocessor 8085 Prac Course File Study of Interrupts: The Kit uses following interrupts - RST VI - RST NMI - Counter 0 output - RST Used to implement Single Step - INTR - Used to implement Single Step Pin Diagram of 8085: Page 10
11 How to run/execute the program on kits SI-Single step execution. (stop). (stop) GO (means run) Enter the beginning address of prog SI Enter the beginning address of prog Press next, next, next till the end of prog.(stop running) Examine mem/reg.(stop running) Examine mem/reg Page 11
12 EXPERIMENT-2 : 1 s complement of an 8-bit number AIM: WAP to find 1 s complement of an 8-bit number. Explanation: This program finds the 1 s complement of an 8-bit number stored in memory location 3000H. Page 12
13 Let us assume that the operand stored at memory location 3000H is 85H. The operand is moved to accumulator from memory location 3000H. Then, its complement is found by using CMA instruction. The result is stored at memory location 3001H. Output: Before Execution: 3000H: 85H After Execution: 3001H: 7AH Page 13
14 EXPERIMENT-3: 2 s complement of an 8-bit number. AIM: WAP to find 2 s complement of an 8-bit number. Page 14
15 Explanation: This program finds the 2 s complement of an 8-bit number stored in memory location 3000H. Let us assume that the operand stored at memory location 3000H is 85H. The operand is moved to accumulator from memory location 3000H. Then, its complement is found by using CMA instruction. One is added to accumulator by incrementing it to find its 2 s complement. The result is stored at memory location 3001H. Output: Before Execution: 3000H: 85H After Execution: 3001H: 7BH Page 15
16 EXPERIMENT-4: 1 s complement of 16-bit number. AIM: WAP to find 1 s complement of 16-bit number. Page 16
17 Explanation: This program finds the 1 s complement of 16-bit number stored in memory 3000H-3001H. There is no direct way to find 1 s complement of 16-bit number. Therefore, this can be accomplished by finding the 1 s complement of two 8-bit numbers. Let us assume that the operand stored at memory locations 3000H-3001H is 45H-6AH. The operand is loaded into H-L pair from memory locations 3000H-3001H. The lower-order is moved from register L to accumulator. Its complement is found by using CMA instruction. The result obtained is moved back to register L. Then, the higher-order is moved from register H to accumulator. Its complement is found by using CMA instruction. The result obtained is moved back to register H. Now, the final result is in H-L pair. The result is stored from H-L pair to memory locations 3002H-3003H. Output: Before Execution: After Execution: 3000H: 45H 3002H: BAH 3001H: 6AH 3003H: 95H Page 17
18 EXPERIMENT-5: 2 s complement of 16-bit number. AIM: WAP to find 2 s complement of 16-bit number. Page 18
19 Explanation: This program finds the 2 s complement of 16-bit number stored in memory locations 3000H- 3001H. There is no direct way to find 2 s complement of 16-bit number. Therefore, this can be accomplished by finding the 1 s complement of two 8-bit numbers and then incrementing it to get 2 s complement. Let us assume that the operand stored at memory locations 3000H-3001H is 12H-05H. The operand is loaded into H-L pair from memory locations 3000H-3001H. The lower-order is moved from register L to accumulator. Its complement is found by using CMA instruction. The result obtained is moved back to register L. Then, the higher-order is moved from register H to accumulator. Its complement is found by using CMA instruction. The result obtained is moved back to register H. H-L pair is incremented to get 2 s complement. Now, the final result is in H-L pair. The result is stored from H-L pair to memory locations 3002H-3003H. Output: Before Execution: After Execution: 3000H: 12H 3002H: EEH 3001H: 05H 3003H: FAH Page 19
20 EXPERIMENT-6: Shift left 8-bit number by 1 bit AIM: WAP to Shift left 8-bit number by 1 bit. Explanation: This program performs the left shift operation on an 8-bit number by one bit stored in memory location 3000H. Let us assume that the operand stored at memory location 3000H is 05H. The operand is moved to accumulator from memory location 3000H. Page 20
21 Then, shift left operation is done by using RAL instruction. The result is stored at memory location 3001H. Output: Before Execution: 3000H: 05H After Execution: 3001H: 0AH Page 21
22 EXPERIMENT-7: Shift right 8-bit number by 1 bit. AIM: WAP to Shift right 8-bit number by 1 bit. Page 22
23 Explanation: This program performs the right shift operation on an 8-bit number by one bit stored in memory location 3000H. Let us assume that the operand stored at memory location 3000H is 04H. The operand is moved to accumulator from memory location 3000H. Then, shift right operation is done by using RAR instruction. The result is stored at memory location 3001H. Output: Before Execution: 3000H: 04H After Execution: 3001H: 02H Page 23
24 EXPERIMENT-8: Mask the lower nibble of an 8-bit number. AIM: WAP to mask the lower nibble of an 8-bit number. Explanation: Page 24
25 This program masks the lower nibble of an 8-bit number stored in memory location 3000H. Let us assume that the operand stored at memory location 3000H is 45H. The operand is moved to accumulator from memory location 3000H. Then, AND operation of F0H is performed with accumulator. This results in the masking of lower nibble. The result is stored at memory location 3001H. Output: Before Execution: 3000H: 45H After Execution: 3001H: 40H Page 25
26 EXPERIMENT-9: Mask the higher nibble of an 8-bit number. AIM: WAP to mask the higher nibble of an 8-bit number. Page 26
27 Explanation: This program masks the higher nibble of an 8-bit number stored in memory location 3000H. Let us assume that the operand stored at memory location 3000H is 45H. The operand is moved to accumulator from memory location 3000H. Then, AND operation of 0FH is performed with accumulator. This results in the masking of higher nibble. The result is stored at memory location 3001H. Output: Before Execution: 3000H: 45H After Execution: 3001H: 05H Page 27
28 EXPERIMENT-10: Add two 8-bit numbers without considering the carry. AIM: WAP to add two 8-bit numbers without considering the carry Page 28
29 Explanation: This program adds two operands stored in memory location 3000H and 3001H, without considering the carry produced (if any). Let us assume that the operands stored at memory location 3000H is 04H and 3001H is 02H. Initially, H-L pair is loaded with the address of first memory location. The first operand is moved to accumulator from memory location 3000H and H-L pair is incremented to point to next memory location. The second operand is moved to register B from memory location 3001H. The two operands are added and the result is stored in accumulator. H-L pair is again incremented and the result is moved from accumulator to memory location 3002H. Output: Before Execution: 3000H: 04H 3001H: 02H After Execution: 3002H: 06H Page 29
30 EXPERIMENT-11: Add two 8-bit numbers along with considering the carry. AIM: WAP to add two 8-bit numbers along with considering the carry. Page 30
31 Explanation: This program adds two operands stored in memory location 3000H and 3001H, along with considering the carry produced (if any). Let us assume that the operands stored at memory location 3000H is FAH and 3001H is 28H. Initially, H-L pair is loaded with the address of first memory location. The first operand is moved to accumulator from memory location 3000H and H-L pair is incremented to point to next memory location. The second operand is moved to register B from memory location 3001H. Register C is initialized to 00H. It stores the carry (if any). The two operands stored in register A and B are added and the result is stored in accumulator. Then, carry flag is checked for carry. If there is a carry, C register is incremented. H-L pair is incremented and the result is moved from accumulator to memory 3002H. H-L pair is again incremented and carry (either 0 or 1) is moved from register C to memory Page 31
32 location 3003H Output: Before Execution: 3000H: FAH 3001H: 28H After Execution: 3002H: 22H 3003H: 01H Page 32
33 EXPERIMENT-12: Subtract two 8-bit numbers without considering borrow. AIM: WAP to subtract two 8-bit numbers without considering borrow. Page 33
34 Explanation: This program subtracts two operands stored in memory location 3000H and 3001H, without considering the borrow taken (if any). Let us assume that the operands stored at memory location 3000H is 05H and 3001H is 02H. Initially, H-L pair is loaded with the address of first memory location. The first operand is moved to accumulator from memory location 3000H and H-L pair is incremented to point to next memory location. The second operand is moved to register B from memory location 3001H. The two operands are subtracted and the result is stored in accumulator. H-L pair is again incremented and the result is moved from accumulator to memory location 3002H. Output: Before Execution: 3000H: 05H 3001H: 02H After Execution: 3002H: 03H Page 34
35 EXPERIMENT-13: Subtract two 8-bit numbers along with considering the borrow. AIM: WAP to Subtract two 8-bit numbers by considering the borrow Page 35
36 Explanation: This program subtracts two operands stored in memory location 3000H and 3001H, along with considering the borrow taken (if any). Let us assume that the operands stored at memory location 3000H is 05H and 3001H is 02H. Initially, H-L pair is loaded with the address of first memory location. The first operand is moved to accumulator from memory location 3000H and H-L pair is incremented to point to next memory location. The second operand is moved to register B from memory location 3001H. Register C is initialized to 00H. It stores the borrow (if any). The two operands stored in register A and B are subtracted and the result is stored in accumulator. Then, carry flag is checked for borrow. If there is a borrow, C register is incremented. H-L pair is incremented and the result is moved from accumulator to memory location Page 36
37 3002H. H-L pair is again incremented and borrow (either 0 or 1) is moved from register C to memory location 3003H. Output: Before Execution: 3000H: 05H 3001H: 02H After Execution: 3002H: 03H 3003H: 00H Page 37
38 EXPERIMENT-14: Add two 16-bit numbers without considering the carry. AIM: WAP to add two 16-bit numbers without considering the carry. Page 38
39 Explanation: This program adds two 16-bit operands stored in memory locations 3000H-3001H and 3002H-3003H, without considering the carry produced (if any). Let us assume that the operands stored at memory locations 3000H-3001H is 02H-04H and 3002H-3003H is 04H-03H. The H-L pair is loaded with the first 16-bit operand 0204H from memory locations 3000H- 3001H. Then, the first 16-bit operand is moved to D-E pair. The second 16-bit operand 0403H is loaded to H-L pair from memory locations 3002H- 3003H. The two operands are added and the result is stored in H-L pair. The result is stored from H-L pair to memory locations 3004H-3005H. Output: Before Execution: After Execution: 3000H: 02H 3004H: 06H 3001H: 04H 3005H: 07H 3002H: 04H 3003H: 03H Page 39
40 EXPERIMENT-15: Subtract two 16-bit numbers without considering borrow. AIM: WAP to subtract two 16-bit numbers without considering borrow. Page 40
41 Explanation: This program subtracts two 16-bit operands stored in memory locations 3000H-3001H and 3002H-3003H, without considering the borrow taken (if any). Let us assume that the operands stored at memory locations 3000H-3001H is 08H-06H and 3002H-3003H is 05H-04H. The H-L pair is loaded with the first 16-bit operand 0806H from memory locations 3000H- 3001H. Then, the first 16-bit operand is moved to D-E pair. The second 16-bit operand 0504H is loaded to H-L pair from memory locations 3002H- 3003H. Page 41
42 The lower-order of first number is moved from register E to accumulator. The lower-order of 2nd number in register L is subtracted from lower-order of 1st number in accumulator. The result of subtraction is moved from accumulator to register L. Then, the higher-order of 1st number is moved from register D to accumulator. The higher-order of 2nd number in register H is subtracted from higher-order of first number in accumulator, along with the borrow from the previous subtraction. The result of subtraction is moved from accumulator to register H. Now, the final result is in H-L pair. The result is stored from H-L pair to memory locations 3004H-3005H. Output: Before Execution: After Execution: 3000H: 08H 3004H: 03H 3001H: 06H 3005H: 02H 3002H: 05H 3003H: 04H Page 42
43 EXPERIMENT-16: Add two 8-bit numbers and show the result in decimal number system. AIM: WAP to add two 8-bit numbers and show the result in decimal number system. Page 43
44 Explanation: This program adds two operands stored in memory location 3000H and 3001H, and shows the result in decimal number system. Let us assume that the operands stored at memory location 3000H is 08H and 3001H is 05H. After addition, instead of showing the result in hexadecimal as 0DH, it shows the result in decimal as 13. Initially, H-L pair is loaded with the address of first memory location. The first operand is moved to accumulator from memory location 3000H and H-L pair is incremented to point to next memory location. The second operand is moved to register B from memory location 3001H. Register C is initialized to 00H. It stores the carry (if any). The two operands stored in register A and B are added and the result is stored in accumulator. Page 44
45 The result is converted to decimal by using the DAA instruction. Then, carry flag is checked for carry. If there is a carry, C register is incremented. H-L pair is incremented and the result is moved from accumulator to memory location 3002H. H-L pair is again incremented and carry (either 0 or 1) is moved from register C to memory location 3003H. Output: Before Execution: 3000H: 08H 3001H: 05H After Execution: 3002H: H: 00H Page 45
46 EXPERIMENT-17: Multiply two 8-bit numbers. AIM: WAP to multiply two 8-bit numbers. Page 46
47 Explanation: This program multiplies two operands stored in memory location 3000H and 3001H, using successive addition method. In successive addition method, the second operand is considered as counter, and the first number is added with itself until counter decrements to zero. Let us assume that the operands stored at memory location 3000H is 02H and 3001H is 05H. Then, by using successive addition method, we get 02H + 02H + 02H + 02H + 02H = 0AH. Initially, H-L pair is loaded with the address of first memory location. The first operand is moved to register B from memory location 3000H and H-L pair is incremented to point to next memory location. The second operand is moved to register C from memory location 3001H to act as counter. Accumulator is initialized to 00H. Register B is added with accumulator and the result is stored in accumulator. Register C (counter) is decremented by 1. Page 47
48 Then, counter is checked for zero. If it hasn t become zero yet, then register B is again added with accumulator, and counter is again checked for zero. If counter becomes zero, then H-L pair is incremented and the result is moved from accumulator to memory location 3002H. Output: Before Execution: 3000H: 02H 3001H: 05H After Execution: 3002H: 0AH Page 48
49 EXPERIMENT-18: Find square of an 8-bit number. AIM: WAP to find square of an 8-bit number Page 49
50 Explanation: This program finds the square of an 8-bit number stored in memory location 3000H. The square of a number is found by multiplying it by itself. Therefore, the number is added with itself and is also used as counter. Let us assume that the operands stored at memory location 3000H is 03H. Then, by using successive addition method, we get 03H + 03H + 03H = 09H. Initially, H-L pair is loaded with the address of the operand. The operand is moved to register B from memory location 3000H and then it is copied to register C. Accumulator is initialized to 00H. Register B is added with accumulator and the result is stored in accumulator. Register C (counter) is decremented by 1. Then, counter is checked for zero. If it hasn t become zero yet, then register B is again added Page 50
51 with accumulator, and counter is again checked for zero. If counter becomes zero, then H-L pair is incremented and the result is moved from accumulator to memory location 3001H. Output: Before Execution: 3000H: 03H After Execution: 3001H: 09H Page 51
52 EXPERIMENT-19: Larger of two 8-bit numbers. AIM: WAP to find larger of two 8-bit numbers. Page 52
53 Explanation: This program compares the two operands to find the largest out of them. After comparison, the largest of two must be in accumulator. If it is already in accumulator, then it is moved to memory. If it is not in accumulator, then first it is moved to accumulator and then from there, it is moved to memory. Let us assume that the operands stored at memory location 3000H is 25H and 3001H is 15H. Initially, H-L pair is loaded with the address of first memory location. The first operand is moved to accumulator from memory location 3000H and H-L pair is incremented to point to next memory location. The second operand is moved to register B from memory location 3001H. The two operands are compared. After comparison, if A > B, then CF = 0, and if A < B, then CF = 1. Carry flag is checked for carry. If there is a carry, it means B is greater than A and it is moved to accumulator. Page 53
54 At last, H-L pair is incremented and the largest number is moved from accumulator to memory location 3002H. Output: Before Execution: 3000H: 25H 3001H: 15H After Execution: 3002H: 25H Page 54
55 EXPERIMENT-20: Smaller of two 8-bit numbers. AIM: WAP to find smaller of two 8-bit numbers. Page 55
56 Explanation: This program compares two operands to find the smallest out of them. After comparison, the smallest of two must be in accumulator. If it is already in accumulator, then it is moved to memory. If it is not in accumulator, then first it is moved to accumulator and then from there, it is moved to memory. Let us assume that the operands stored at memory location 3000H is 25H and 3001H is 15H. Initially, H-L pair is loaded with the address of first memory location. The first operand is moved to accumulator from memory location 3000H and H-L pair is incremented to point to next memory location. The second operand is moved to register B from memory location 3001H. The two operands are compared. After comparison, if A > B, then CF = 0, and if A < B, then CF = 1. Carry flag is checked for carry. If there is no carry, it means B is smaller than A and it is moved to accumulator. Page 56
57 At last, H-L pair is incremented and the smallest number is moved from accumulator to memory location 3002H. Output: Before Execution: 3000H: 25H 3001H: 15H After Execution: 3002H: 15H Based on the format followed for the above programs, perform the rest of the experiments Page 57
58 EXPERIMENT-21: Addition of ten 8-bit numbers stored in memory. AIM: WAP to add ten 8-bit numbers stored in memory Instruction Used with description LXI Rp MOV R,M MOV M,R INX Rp ADD M MVI R, 8 bit data JNC 16-bit address DCR R Decrement Register Pair Initialization Memory Read Memory Write Pointer Increment Addition with Memory Contents Register initialization Branching Instruction Register Contents Study the above instructions from the book. As per the common procedure specified in this manual, perform the experiments. Testing: Test the program with worst case values. Page 58
59 EXPERIMENT-22: Find no. of negative elements in a block of data Instruction Used with description Page 59
60 EXPERIMENT-23 : To sort numbers AIM: Write a program to sort given 10 numbers from memory location 2200H in the ascending order. Source program : MVI B, 09 START : LXI H, 2200H : Initialize counter : Initialize memory pointer MVI C, 09H : Initialize counter 2 BACK: MOV A, M : Get the number Page 60
61 INX H CMP M JC SKIP JZ SKIP : Increment memory pointer : Compare number with next number : If less, don't interchange : If equal, don't interchange MOV D, M MOV M, A DCX H MOV M, D INX H : Interchange two numbers SKIP: DCR C : Decrement counter 2 JNZ BACK DCR B : If not zero, repeat : Decrement counter 1 JNZ START HLT : Terminate program execution Page 61
62 EXPERIMENT-24 : Alter the contents of flag register in AIM: Write a set of instructions to alter the contents of flag register in PUSH PSW POP H MOV A, L : Save flags on stack : Retrieve flags in 'L' :Flags in accumulator CMA MOV L, A PUSH H :Complement accumulator :Accumulator in 'L' :Save on stack POP PSW :Back to flag register HLT :Terminate program execution Page 62
63 EXPERIMENT-25 : Calculate the sum of series of numbers AIM: Calculate the sum of series of numbers. The length of the series is in memory location 4200H and the series begins from memory location 4201H. a. Consider the sum to be 8 bit number. So, ignore carries. Store the sum at memory location 4300H. b. Consider the sum to be 16 bit number. Store the sum at memory locations 4300H and 4301H. Flowchart for Source program1 Program 1: LDA 4200H MOV C, A : Initialize counter SUB A : sum = 0 LXI H, 420lH : Initialize pointer BACK: ADD M : SUM = SUM + data INX H : increment pointer DCR C : Decrement counter JNZ BACK : if counter 0 repeat STA 4300H : Store sum HLT :Terminate program execution Output: Page 63
64 Before Execution: 4200H = 04H 4201H = 10H 4202H = 45H 4203H = 33H 4204H = 22H After Execution: Result = = H 4300H = H Microprocessor 8085 Prac Course File Program 2 LDA 4200H MOV C, A : Initialize counter LXI H, 4201H : Initialize pointer SUB A :Sum low = 0 MOV B, A : Sum high = 0 BACK: ADD M : Sum = sum + data JNC SKIP INR B : Add carry to MSB of SUM SKIP: INX H : Increment pointer DCR C : Decrement counter JNZ BACK : Check if counter 0 repeat STA 4300H : Store lower byte MOV A, B STA 4301H : Store higher byte HLT :Terminate program execution Output: Before Execution: 4200H = 04H 420lH = 9AH 4202H = 52H 4203H = 89H 4204H = 3EH After Execution: Result = 9AH + 52H + 89H + 3EH = H 4300H = B3H Lower byte 4301H = 0lH Higher byte Page 64
65 EXPERIMENT-26 : Division of 16 bit number by 8 bit number AIM: Divide 16 bit number stored in memory locations 2200H and 2201H by the 8 bit number stored at memory location 2202H. Store the quotient in memory locations 2300H and 2301H and remainder in memory locations 2302H and 2303H. Flowchart Program: LHLD 2200H : Get the dividend LDA 2202H : Get the divisor MOV C, A LXI D, 0000H : Quotient = 0 Page 65
66 BACK: MOV A, L SUB C MOV L, A JNC SKIP DCR H SKIP: INX D MOV A, H CPI, 00 JNZ BACK MOV A, L CMP C JNC BACK SHLD 2302H XCHG SHLD 2300H HLT : Subtract divisor : Save partial result : if CY 1 jump : Subtract borrow of previous subtraction : Increment quotient : Check if dividend < divisor : if no repeat : Store the remainder : Store the quotient : Terminate program execution Output: Before Execution: (2200H) = 60H (2201H) = A0H (2202H) = l2h After Execution: Result = A060H/12H = 8E8H Quotient and 10H remainder (2300H) = E8H (2301H) = 08H (2302H= 10H (2303H) 00H Page 66
67 EXPERIMENT-27 : Find the number of negative elements AIM: Find the number of negative elements (most significant bit 1) in a block of data. The length of the block is in memory location 2200H and the block itself begins in memory location 2201H. Store the number of negative elements in memory location 2300H Flowchart Program: LDA 2200H MOV C, A : Initialize count MVI B, 00 : Negative number = 0 Page 67
68 BACK: LXI H, 2201H MOV A, M ANI 80H : Initialize pointer : Get the number : Check for MSB JZ SKIP : If MSB = 1 INR B SKIP: INX H DCR C JNZ BACK : Increment negative number count : Increment pointer : Decrement count : If count 0 repeat MOV A, B STA 2300H HLT : Store the result : Terminate program execution Output: Before Execution: (2200H) = 04H (2201H) = 56H (2202H) = A9H (2203H) = 73H (2204H) = 82H After Execution: Result = 02 since 2202H and 2204H contain numbers with a MSB of 1 Page 68
69 EXPERIMENT-28 : Find the largest of given numbers AIM: Find the largest number in a block of data. The length of the block is in memory location 2200H and the block itself starts from memory location 2201H. Store the maximum number in memory location 2300H. Assume that the numbers in the block are all 8 bit unsigned binary numbers. Source program : LDA 2200H MOV C, A : Initialize counter XRA A : Maximum = Minimum possible value = 0 LXI H, 2201H : Initialize pointer BACK: CMP M : Is number> maximum JNC SKIP : Yes, replace maximum MOV A, M SKIP: INX H DCR C JNZ BACK STA 2300H HLT : Store maximum number : Terminate program execution Output: Before Execution: (2200H) = 04 (2201H) = 34H (2202H) = A9H (2203H) = 78H (2204H) =56H After Execution: Result = (2202H) = A9H Page 69
70 EXPERIMENT-29:Count number of l's in the contents of a register AIM: WAP to count number of l's in the contents of D register and store the count in the B register. Flowchart Source program : MVI B, 00H MVI C, 08H MOV A, D BACK: RAR JNC SKIP Page 70
71 INR B SKIP: DCR C JNZ BACK HLT Output: Before Execution: (2200H) = 04 (2201H) = 34H (2202H) = A9H (2203H) = 78H (2204H) =56H After Execution: Result = (2202H) = A9H Page 71
72 EXPERIMENT-30: Transfer contents to overlapping memory blocks AIM: A block of data consisting of 256 bytes is stored in memory starting at 3000H. This block is to be shifted (relocated) in memory from 3050H onwards. Do not shift the block or part of the block anywhere else in the memory. Two blocks ( FF and F) are overlapping. Therefore it is necessary to transfer last byte first and first byte last. Source Program: MVI C, FFH LX I H, 30FFH LXI D, 314FH : Initialize counter : Initialize source memory pointer 3l4FH : Initialize destination memory pointer BACK: MOV A, M : Get byte from source memory block STAX D DCX H DCX SP DCR C JNZ BACK HLT : Store byte in the destination memory block : Decrement source memory pointer : Decrement destination memory pointer : Decrement counter : If counter 0 repeat : Stop execution Page 72
73 Appendix -1 : OPCODES TABLE OF INTEL 8085 in Alphabetical order Page 73
74 Page 74
75 Page 75
76 Page 76
77 Page 77
78 Page 78
79 Reference: Page 79
EXAMPLE PROGRAMS 8085
P! EXAMPLE PROGRAMS 8085 Statement:Multiply the 8-bit unsigned number in memory location 2200H by the 8-bit unsigned number in memory location 2201H. Store the 8 least significant bits of the result in
More informationAssembly Language Programming of 8085
Assembly Language Programming of 8085 1. Introduction A microprocessor executes instructions given by the user Instructions should be in a language known to the microprocessor Microprocessor understands
More informationLIST OF PROGRAMS. Prg. Name of the Program. 1 Study of Pin Diagram of Study of Architecture of Study of 8085 Kit.
LIST OF PROGRAMS Prg. Name of the Program No. 1 Study of Pin Diagram of 8085 2 Study of Architecture of 8085 3 Study of 8085 Kit 4 Reverse Order 5 Exchange of memory blocks 6 Absolute Difference 7 Even
More informationUNIT 1 REFERENCE 1 PREPARED BY S.RAVINDRAKUMAR, LECT/ECE, CHETTINAD COLLEGE OF ENGG AND TECH, KARUR
UNIT 1 REFERENCE 1 PROGRAMMING THE 8085 DEVELOPMENT OF PROGRAM A program is a sequence of instructions written to tell a computer to perform a specific function. The instructions are selected from the
More information(2) Explain the addressing mode of OR What do you mean by addressing mode? Explain diff. addressing mode for 8085 with examples.
(1) Explain instruction format and Opcode format of 8085 μp with example. OR With help of examples, explain the formation of opcodes of 8085 OR What is an instruction? List type of instruction based on
More informationAssembly Language Programming of 8085
Assembly Language Programming of 8085 Topics 1. Introduction 2. Programming model of 8085 3. Instruction set of 8085 4. Example Programs 5. Addressing modes of 8085 6. Instruction & Data Formats of 8085
More informationIntroduction to Assembly Language Programming (Instruction Set) 1/18/2011 1
Introduction to Assembly Language Programming (Instruction Set) 1/18/2011 1 High Level Language Compiler Assembly Language Assembler Machine Code Microprocessor Hardware 1/18/2011 2 8085A Instruction Set
More informationINSTRUCTION SET OF 8085
INSTRUCTION SET OF 8085 Instruction Set of 8085 An instruction is a binary pattern designed inside a microprocessor to perform a specific function. The entire group of instructions that a microprocessor
More informationInstruction Set Instruction set of 8085 can be classified in following groups: Data Transfer Instructions These instructions can perform data transfer operations between Registers of 8085 e.g. MOV 8085
More informationEXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER
OBJECT: EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER To understand the structure and operating instruction of the microprocessor trainer. INTRODUCTION: The MKT 8085 is a single-board microcomputer,
More information8085 INSTRUCTION SET INSTRUCTION DETAILS
8085 INSTRUCTION SET INSTRUCTION DETAILS DATA TRANSFER INSTRUCTIONS MOV Rd, Rs Copy from source to destination This instruction copies the contents of the source register Rs into the destination register
More informationSubject 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 information8085 Microprocessor Programs
8085 Microprocessor Programs Courtesy : www.8085projects.info Rachit Agrawal 07-CE-52 Kalol Institute of Technology & Research Center PROGRAMS FOR 8085 MICROPROCESSOR PROGRAMS FOR LEARNERS 1. Store 8-bit
More informationMAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI
MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI-621213. QUESTION BANK DEPARTMENT: EEE SUB CODE: EE2324 YR/ SEM:III/ VI SUB NAME: MICROPROCESSORS & MICROCONTROLLERS UNIT 2- PROGRAMMING OF 8085 MICROPROCESSORS
More informationMSMF GATE CENTRE. Sub: MICROPROCESSORS. Time: 50min Date: Marks:33
MSMF GATE CENTRE Sub: MICROPROCESSORS Time: 50min Date:20-12-16 Marks:33 1. Which interrupt has highest priority in 8085 microprocessor? a) INTR b) RST 4.5 c) RST 6.5 d) RST 7.5 2. In 8085 microprocessor,
More informationIts Assembly language programming
8085 Architecture & Its Assembly language programming Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati 8085 Era and Features 8085 Outline Block diagram (Data Path) Bus Structure Register Structure
More informationDelhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:
Serial :. PT_EE-EC_A_Microprocessor_968 Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: E-mail: info@madeeasy.in Ph: -452462 CLASS TEST 28-9 Subject : Microprocessors
More informationINDEX. 1 Study of intel 8085 micropeocessor kit. 2 Program to find addition of two 8 bit no. 3 Program to find subtraction of two 8 bit no.
INDEX PROGRAM NO. NAME OF THE PROGRAM 1 Study of intel 8085 micropeocessor kit SIGNATURE 2 Program to find addition of two 8 bit no. 3 Program to find subtraction of two 8 bit no. 4 Program to find 1 s
More informationAssembly language Programming
Assembly language Programming Applications With out the assembly language programming microprocessor can not works. Instructions are the patterns which is require by the microprocessor to done any task.
More informationDelhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:
Serial : 01. ND_EE_NW_Microprocessors_150718 Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: E-mail: info@madeeasy.in Ph: 011-45124612 CLASS TEST 2018-19 ELECTRICAL
More informationGATE Exercises on Microprocessors
1 GATE Exercises on Microprocessors Abstract This problem set has questions taken from GATE papers over the last twenty years. Teachers can use the problem set for courses tutorials. 1) The clock frequency
More informationINSTITUTE OF ENGINEERING AND MANAGEMENT, KOLKATA Microprocessor
INSTITUTE OF ENGINEERING AND MANAGEMENT, KOLKATA Microprocessor Subject Name: Microprocessor and Microcontroller Year: 3 rd Year Subject Code: CS502 Semester: 5 th Module Day Assignment 1 Microprocessor
More informationSIR C.R.REDDY COLLEGE OF ENGINEERING ELURU DIGITAL ELECTRONICS & MICROPROCESSOR LAB MANUAL 2/4 CSE: II- SEMESTER
SIR C.R.REDDY COLLEGE OF ENGINEERING ELURU 534007 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING DIGITAL ELECTRONICS & MICROPROCESSOR LAB MANUAL 2/4 CSE: II- SEMESTER Faculty: B.Homer Benny (Section- A
More informationMAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT I THE 8085 & 8086 MICROPROCESSORS. PART A (2 Marks)
MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI-621213. UNIT I THE 8085 & 8086 MICROPROCESSORS PART A (2 Marks) 1. Give the significance of SIM and RIM instruction available in 8085. [NOV/DEC 2006] Instruction
More informationEC2304-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 informationELECTRICAL ENGINEERING
Serial : 1. JP_EE_Microprocessor_130618 CLASS TEST Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: E-mail: info@madeeasy.in Ph: 011-45124612 ELECTRICAL ENGINEERING
More informationArchitecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller
of 8085 microprocessor 8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit microprocessor designed by Intel in 1977 using NMOS technology. It has the following configuration 8-bit
More informationSAMPLE STUDY MATERIAL
Microprocessor-IN Postal Correspondence Course 1 SAMPLE STUDY MATERIAL Instrumentation Engineering IN Postal Correspondence Course GATE & PSUs Microprocessor Microprocessor-IN Postal Correspondence Course
More informationCS2259-MICROPROCESSOR AND MICROCONTROLLER LABORATORY MANUAL
CS2259-MICROPROCESSOR AND MICROCONTROLLER LABORATORY LABORATORY MANUAL FOR IV SEMESTER B.TECH / IT ACADEMIC YEAR: 2012-2013 (FOR PRIVATE CIRCULATION ONLY) ANNA UNIVERSITY, CHENNAI. NAME REG.NO BATCH :
More informationProgramming of 8085 microprocessor and 8051 micro controller Study material
8085 Demo Programs Now, let us take a look at some program demonstrations using the above instructions Adding Two 8-bit Numbers Write a program to add data at 3005H & 3006H memory location and store the
More informationInstruction set of 8085
Instruction set of 05 /23/2016 ptkarule@rediffmail.com 1 Instruction set of 05 Instruction set is divided into various groups depending on the operations performed: 1. Data transfer 2. rithmetic 3. Logical
More informationSIR.C.R.R.COLLEGE OF ENGINEERING DEPT. OF ELECTRONICS AND INSTRUMENTATION ENGG. EIE-328: MICROPROCESSOR LABORATORY 3/4 B.E. EIE: SECOND SEMESTER
SIR.C.R.R.COLLEGE OF ENGINEERING DEPT. OF ELECTRONICS AND INSTRUMENTATION ENGG. EIE-328: MICROPROCESSOR LABORATORY 3/4 B.E. EIE: SECOND SEMESTER (AS PER UNIVERSITY SYLLABUS) LIST OF EXPERIMENTS 1. UNDERSTANDING
More informationLABORATORY MANUAL. PROGRAMME: B.Tech SEMESTER /YEAR: 3rd year 5th Semester SUBJECT CODE: CS592 SUBJECT NAME: Microprocessor & Microcontroller Lab
LABORATORY MANUAL PROGRAMME: B.Tech SEMESTER /YEAR: 3rd year 5th Semester SUBJECT CODE: CS592 SUBJECT NAME: Microprocessor & Microcontroller Lab DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING INSTITUTE OF
More informationMAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) MODEL ANSWER
MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microprocessor Subject Code: 17443 I m p o r t a n t I n s t r u c t i o n s t o e x a m i n e r s : 1) The answers should be examined by key words and
More informationThe due date for submitting this assignment has passed. 1) How many times will the following loop be executed? Depends on the initial value of A
X reviewer2@nptel.iitm.ac.in Courses» and Microcontrollers Unit 4 - Week 3 Announcements Course Ask a Question Progress Mentor Course outline How to access the portal Week 3 Assignment The due date for
More informationEKT222 Miroprocessor Systems Lab 5
LAB 5: Interrupts Objectives: 1) Ability to define interrupt in 8085 microprocessor 2) Ability to understanding the interrupt structure in the 8085 microprocessor 3) Ability to create programs using the
More informationContents 8051 Instruction Set BY D. BALAKRISHNA, Research Assistant, IIIT-H Chapter I : Control Transfer Instructions Lesson (a): Loop Lesson (b): Jump (i) Conditional Lesson (c): Lesson (d): Lesson (e):
More informationMGM S Jawaharlal Nehru Engineering College
MGM S Jawaharlal Nehru Engineering College Laboratory Manual MICROPROCESSOR AND INTERFACING TECHNIQUES For TE (EEP) Prof.J.R.Rana Author JNEC, Aurangabad PREFACE It is my great pleasure to present this
More informationValliammai Engineering College
Valliammai Engineering College SRM Nagar, Kattankulathur - 603203 Department of Electrical and Electronics Engineering EE6612 Microprocessors and Microcontrollers Laboratory LAB MANUAL VI Semester - Electrical
More information8051 Overview and Instruction Set
8051 Overview and Instruction Set Curtis A. Nelson Engr 355 1 Microprocessors vs. Microcontrollers Microprocessors are single-chip CPUs used in microcomputers Microcontrollers and microprocessors are different
More informationEXPERIMENT-1 AIM: Familiarization of different keys of 8085 microprocessor kit and its memory map. APPARATUS: 8085 kit. DIAGRAM:
EXPERIMENT-1 AIM: Familiarization of different keys of 8085 microprocessor kit and its memory map. APPARATUS: 8085 kit. DIAGRAM: Reset VCT INT Shift C D E F RTG SI INSD DELD 8 9 A B DEL GO INS BM REL EMEM
More informationS.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING
S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING QUESTION BANK Subject Code : EC307 Subject Name : Microprocessor and Interfacing Year & Sem : III Year, V Sem
More informationDelhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:
Serial : LS2_EE_S_Microprocessors_2688 Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: E-mail: info@madeeasy.in Ph: -452462 CLASS TEST 28-9 ELECTRICAL ENGINEERING
More informationUNIT I. Differences between: Microcomputer, Microprocessor and Microcontroller
UNIT I SYLLABUS INTRODUCTION TO 8085 Intel 8085 Microprocessor architecture signals Addressing modes Instruction classification Instruction set Timing diagram ALP format Programming 8085 8-bit and 16-bit
More information1-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م.م. ماجد عيدان. Introduction to microprocessor and microcomputer
Lect. (1) Introduction to microprocessor and microcomputer Reference Books: 1. Ramesh S. Gaonkar, "Microprocessor Architecture, Programming and Application with the 8085". 2. Anokh Singh, A.K. Chhabra,Fundamentals
More informationPERIPHERAL INTERFACING Rev. 1.0
This work is licensed under the Creative Commons Attribution-NonCommercial-Share Alike 2.5 India License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/2.5/in/deed.en
More informationMicroprocessor Micro Syllabus BSc. CSIT, IOST, TU. Microprocessor
Microprocessor Micro Syllabus BSc. CSIT, IOST, TU Microprocessor Course Title: Microprocessor Full Marks: 60 + 20 + 20 Course No: CSC162 Pass Marks: 24 + 8 + 8 Nature of the Course: Theory + Lab Credit
More informationXII HSC - BOARD - MARCH
Date: 17.03.2018 JEE MEDICAL-UG BOARDS KVPY NTSE OLYMPIADS XII HSC - BOARD - MARCH - 2018 COMPUTER SCIENCE - II ( D-9) QP + SOLUTIONS 1. (A) Select correct options and rewrite the following : (a) Intel
More informationComputer Organization
Computer Organization (Instruction set Architecture & Assembly Language Programming) KR Chowdhary Professor & Head Email: kr.chowdhary@gmail.com webpage: krchowdhary.com Department of Computer Science
More informationUnit 1 8 BIT MICROPROCESSOR ARCHITECTURE
Unit 1 8 BIT MICROPROCESSOR ARCHITECTURE 8085 -Internal Architecture - Addressing modes - Instruction set -Timing diagrams -Interrupts-Assembly language Programming 1. Internal Architecture of 8085 Microprocessor
More informationMicro Processor & Micro Controllers
Micro Processor & Micro Controllers 1. What is microprocessor? It is a program controlled semi conductor device (IC), which fetches, decodes and execute instructions. 2. What are the basic units of microprocessor?
More informationMicrocontroller Intel [Instruction Set]
Microcontroller Intel 8051 [Instruction Set] Structure of Assembly Language [ label: ] mnemonic [operands] [ ;comment ] Example: MOV R1, #25H ; load data 25H into R1 2 8051 Assembly Language Registers
More informationCOPYRIGHT IS NOT RESERVED BY AUTHORS. AUTHORS ARE NOT RESPONSIBLE FOR ANY LEGAL ISSUES ARISING OUT OF ANY COPYRIGHT DEMANDS
COPYRIGHT IS NOT RESERVED BY AUTHORS. AUTHORS ARE NOT RESPONSIBLE FOR ANY LEGAL ISSUES ARISING OUT OF ANY COPYRIGHT DEMANDS AND/OR REPRINT ISSUES CONTAINED IN THIS MATERIALS. THIS IS NOT MEANT FOR ANY
More informationControl Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.
Unit I 8085 and 8086 PROCESSOR Introduction to microprocessor A microprocessor is a clock-driven semiconductor device consisting of electronic logic circuits manufactured by using either a large-scale
More information1. What is Microprocessor? Give the power supply & clock frequency of 8085?
1. What is Microprocessor? Give the power supply & clock frequency of 8085? A microprocessor is a multipurpose, programmable logic device that reads binary instructions from a storage device called memory
More informationCHAPTER ASSEMBLY LANGUAGE PROGRAMMING
CHAPTER 2 8051 ASSEMBLY LANGUAGE PROGRAMMING Registers Register are used to store information temporarily: A byte of data to be processed An address pointing to the data to be fetched The vast majority
More informationMicroprocessors 1. The 8051 Instruction Set. Microprocessors 1 1. Msc. Ivan A. Escobar Broitman
Microprocessors 1 The 8051 Instruction Set Microprocessors 1 1 Instruction Groups The 8051 has 255 instructions Every 8-bit opcode from 00 to FF is used except for A5. The instructions are grouped into
More informationThe advantages of registers over memory locations are as follows:
Q.2 a. In a microprocessor, what is the use of a register? What are the advantages & disadvantages of using registers over a memory location? What is the speciality of register A (accumulator) over other
More informationCounters & Time Delays. Microprocessors & Interfacing 1
Counters & Time Delays Microprocessors & Interfacing 1 Counters A loop counter is set up by loading a register with a certain value Then using the DCR (to decrement) and INR (to increment) the contents
More informationSyllabus for Bachelor of Technology. Computer Engineering. Subject Code: 01CE0501. Subject Name: Microprocessor Fundamentals & Programming
Subject Code: 01CE0501 Subject Name: Microprocessor Fundamentals & Programming B.Tech. Year - III Objective: The objective of the course is to expose to the students to the architecture and instruction
More information(2½ Hours) [Total Marks: 75]
(2½ Hours) [Total Marks: 75] N. B.: (1) All questions are compulsory. (2) Make suitable assumptions wherever necessary and state the assumptions made. (3) Answers to the same question must be written together.
More informationMatrix Multiplication in 8085
Matrix Multiplication in 8085 Semester Project for B.Tech. (Computer Science & Engineering) by Praneeth A S (UG20110023) & Rohit Yeravothula (UG201110039) Project Guide: Dr. K R Chowdhary Head of Department,
More information1. 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 informationEE309: Computer Organization, Architecture and MicroProcessors. sumantra/courses/up/up.html GND HIGH ORDER ADDRESS BUS
CMP:8085 Primer-1 EE309: Computer Organization, rchitecture and MicroProcessors http://www.ee.iitb.ac.in/ sumantra/courses/up/up.html The 8085 Chip F LGS: S Z x x P x cy EXTERNLLY INITITED SIGNLS SERIL
More informationROEVER ENGINEERING COLLEGE
ROEVER ENGINEERING COLLEGE ELAMBALUR, PERAMBALUR- 621 212 DEPARTMENT OF INFORMATION TECHNOLOGY MICROPROCESSOR & MICROCONTROLLER 2 marks questions andanswers Unit I 1. Define microprocessor? A microprocessor
More informationAE66/AC66/AT66/ AE108/AC108/AT108 MICROPROCESSORS & MICROCONTROLLERS
Q.2 a. Draw pin diagram and signal group diagram of 8085 microprocessor. (8) b. List out the various categories of the 8085 instructions. Give examples of the instructions for each group. (8) Data transfer
More informationET2640 Microprocessors
ET2640 Microprocessors Unit -2 Processor Programming Concepts Basic Control Instructor : Stan Kong Email : skong@itt-tech.edu Figure 2 4 Bits of the PSW Register 8051 REGISTER BANKS AND STACK 80 BYTES
More informationPERIPHERAL INTERFACING Rev. 1.0
This work is licensed under the Creative Commons Attribution-NonCommercial-Share Alike 2.5 India License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/2.5/in/deed.en
More informationMICROPROCESSOR BASICS AND RELATED TERMS
MICROPROCESSOR BASICS AND RELATED TERMS Microprocessor: Programmable integrated device that has computing ability and decision making capacity. It is the CPU of computer. A multipurpose, programmable,
More information1. What is microprocessor? It is a program controlled semi conductor device (IC), which fetches, decodes and execute instructions.
Downloaded from www.books4career.blogspot.com 1. What is microprocessor? It is a program controlled semi conductor device (IC), which fetches, decodes and execute instructions. 2. What are the basic units
More informationENE 334 Microprocessors
Page 1 ENE 334 Microprocessors Lecture 10: MCS-51: Logical and Arithmetic : Dejwoot KHAWPARISUTH http://webstaff.kmutt.ac.th/~dejwoot.kha/ ENE 334 MCS-51 Logical & Arithmetic Page 2 Logical: Objectives
More informationET355 Microprocessors Thursday 6:00 pm 10:20 pm
ITT Technical Institute ET355 Microprocessors Thursday 6:00 pm 10:20 pm Unit 4 Chapter 6, pp. 139-174 Chapter 7, pp. 181-188 Unit 4 Objectives Lecture: BCD Programming Examples of the 805x Microprocessor
More informationVidyalankar T.E. Sem. V [EXTC] Microprocessors and Microcontrollers I Prelim Question Paper Solution V SS (GND)
1. (a) Pin configuration of 8085 X 1 X 2 CLKOUT TRAP RST 7.5 RST 6.5 RST 5.5 INTR INTA SID SOD RESET IN RESET OUT T.E. Sem. V [EXTC] Microprocessors and Microcontrollers I Prelim Question Paper Solution
More informationMemory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples.
MICROCONTROLLERS AND APPLICATIONS 1 Module 2 Module-2 Contents: Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples. MEMORY
More informationLABORATORY 1 INTRODUCTION TO 8085 MICROPROCESSOR DEVELOPMENT SYSTEM BOARD
LABORATORY 1 INTRODUCTION TO 8085 MICROPROCESSOR DEVELOPMENT SYSTEM BOARD 1. INTRODUCTION TO 8085 MICROPROCESSOR DEVELOPMENT SYSTEMS. The basic components of the 8085 Microprocessor Development System
More informationSN8F5000 Family Instruction Set
SONiX Technology Co., Ltd. 8051-based Microcontroller 1 Overview SN8F5000 is 8051 Flash Type microcontroller supports comprehensive assembly instructions and which are fully compatible with standard 8051.
More information1. Internal Architecture of 8085 Microprocessor
Practical 1 Date : AIM : Introduction Of Microprocessor 8085. 1. Internal Architecture of 8085 Microprocessor Control Unit Generates signals within µp to carry out the instruction, which has been decoded.
More informationUNIT 2 THE 8051 INSTRUCTION SET AND PROGRAMMING
UNIT 2 THE 8051 INSTRUCTION SET AND PROGRAMMING Instructions Alphabetical List of Instructions ACALL: Absolute Call ADD, ADDC: Add Accumulator (With Carry) AJMP: Absolute Jump ANL: Bitwise AND CJNE: Compare
More informationDHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING YEAR : III SEM : VI
DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING YEAR : III SEM : VI EE2354- MICROPROCESSORS AND MICROCONTROLLER UNIT I 8085 and 8086 PROCESSOR PART A 1. Define
More informationG. Pullaiah College of Engineering and Technology: Kurnool Department Of Electronics and Communication Engineering
G. Pullaiah College of Engineering and Technology: Kurnool Department Of Electronics and Communication Engineering LECTURE NOTES MICROPROCESSORS AND INTERFACING PREPARED BY V.SHANTHI ASST PROFESSOR DEPT
More informationQ. P. Code : b. Draw and explain the block dig of a computer with microprocessor as CPU.
Q. P. Code : 08235 (2½ Hours) [Total Marks: 75] N. B.: (1) All questions are compulsory. (2) Make suitable assumptions wherever necessary and state the assumptions made. (3) Answers to the same question
More informationVALLIAMMAI ENGINEERING COLLEGE
VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 603 203 DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK V SEMESTER EE6502- MICROPROCESSORS AND MICROCONTROLLERS Regulation 2013
More informationArithmetic 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 informationBHARATHIDASAN ENGINEERING COLLEGE. III Year / V Semester / EEE MICROPROCESSORS AND MICROCONTROLLERS (R-2013)
BHARATHIDASAN ENGINEERING COLLEGE III Year / V Semester / EEE MICROPROCESSORS AND MICROCONTROLLERS (R-2013) FREQUENTLY ASKED QUESTIONS IN UNIVERSITY EXAMINATION PART A UNIT 1-8085 PROCESSOR 1. Draw the
More informationMicroprocessor and Microcontroller question bank. 1 Distinguish between microprocessor and microcontroller.
Course B.E(EEE) Batch 2015 Semester V Subject code subject Name UAEE503 Microprocessor and Microcontroller question bank UNIT-1 Architecture of a Microprocessor PART-A Marks: 2 1 Distinguish between microprocessor
More informationMicrocontroller. Instruction set of 8051
UNIT 2: Addressing Modes and Operations: Introduction, Addressing modes, External data Moves, Code Memory, Read Only Data Moves / Indexed Addressing mode, PUSH and POP Opcodes, Data exchanges, Example
More informationEC 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 informationEASWARI ENGINEERING COLLEGE DEPARTMENT OF ELECTRONICS AND COMMUNICATION QUESTION BANK - V SEMESTER ECE EC2304 MICROPROCESSORS AND MICROCONTROLLERS UNIT I 1. When the 8086 processor is in minimum mode and
More informationLecture-12 INTERNAL ARCHITECTURE OF INTEL 8085: The Functional Block Diagram Of 8085 Is Shown In Fig 16.
Lecture-12 INTERNAL ARCHITECTURE OF INTEL 8085: The Functional Block Diagram Of 8085 Is Shown In Fig 16. It consists of five essential blocks. (1) ARITHMEDIC LOGIC SECTION (2) REGISTER SECTION (3) THE
More informationArithmetic 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 informationINSTRUCTOR: 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 informationThe 8085 Instruction Set
1 of 8 2/9/2011 5:14 PM The 8085 Instruction Set As I promised, in an earlier lesson, I am going to go through an in-depth explaination of ALL the 8085 instructions. Intel 88888 000 88888 5555555 A 8 8
More informationQUESTION BANK CS2252 MICROPROCESSOR AND MICROCONTROLLERS
FATIMA MICHAEL COLLEGE OF ENGINEERING & TECHNOLOGY Senkottai Village, Madurai Sivagangai Main Road, Madurai -625 020 QUESTION BANK CS2252 MICROPROCESSOR AND MICROCONTROLLERS UNIT 1 - THE 8085 AND 8086
More informationSri 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 informationWeek /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 informationB.C.A 2017 MICROPROCESSOR AND ASSEMBLY LANGUAGE MODULE SPECIFICATION SHEET. Course Outline
B.C.A 2017 MICROPROCESSOR AND ASSEMBLY LANGUAGE Course Outline MODULE SPECIFICATION SHEET The objective of the course is to expose to the students to the architecture and instruction set of typical 8-bit
More informationCC411: 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 informationMnem. 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 informationDEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING LAB MANUAL. Academic Year: ODD SEMESTER
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING LAB MANUAL Academic Year: 2015-16 ODD SEMESTER Programme (UG/PG) : UG-B.Tech Semester : 03 Course Code Course Title :CS1033 : MICROPROCESSOR & INTERFACING
More information