Objective: Design and Develop a desktop Application to emulate the fuctionality of 8085 Microprocessor.
This microprocessor constains following instructions:
A. Load and Store:
1. MOV
2. MVI
3. LXI
4. LDA
5. STA
6. LHLD
7. SHLD
8. STAX
9. XCHG
B. Arithmetic:
1. ADD
2. ADI
3. SUB
4. INR
5. DCR
6. INX
7. DCX
8. DAD
9. SUI
C. Logical:
1. CMA
2. CMP
D. Branching:
1. JMP
2. JC
3. JNC
4. JZ
5. JNZ
E. Extra:
An additional command SET is used to set data into memory location.
SYNTAX: SET <Memory Address>, <2 Byte Hexadecimal Data>
eg: SET 2500, FF
You can also use inbuilt debugger to debug your 8085 program. The debugger has following 6 functionality/ commands:
1. break or b : It will set breakpoint on given line number.
Eg: break 10 or b 10
2. run or r : It will run the program until end of code or breakpoint is encountered.
Eg: run or r
3. step or s : It will run the program one instruction at a time.
Eg: step or s
4. print or p : It will print value of register, flags, current line number or memory location.
To print value of register use print or p . Eg: print A
or p A
.
To print value flag use print or p flag. Eg: print flag
or p flag
.
To print current line number use print or p loc. Eg: print loc
or p loc
.
To print value of memory location use print or p x. Eg: print x2000
or p x2000.
5. Quit or q : Quits the debugger.
Eg: quit
or q
6. help : It will show all the commands of the debugger.
Eg: help
HOW TO RUN THE 8085 MICROPROCESSOR SIMUATOR
- Download and extract the files from this repository.
- Copy all files from src directory and paste this in its parent directory directly.
- Open command prompt/ terminal and set its current path to the directory where you have stored your files.
- Type make in the terminal or command prompt.
- This will create your executable file of the code named 8085.
- Now that everything is ready you can run your code by following methods:
i.) To directly use the 8085 microprocessor simulator.
Eg:./8085
ii.) To use debugger pass --debugger as argument.
Eg:./8085 --debugger
iii.) You can also take input from file by passing the file name/path as argument.
Eg:./8085 input.asm
iv.) Or you can also both together by passing both as arguments together.
Eg:./8085 input.asm --debugger
IF YOU ENCOUNTER ANY BUGS OR FOR ANY SUGGESTIONS REGARDING THE IMPROVEMENT OF THE 8085 MICROPROCESSOR SIMULATOR FEEL FREE TO CONTACT US:
Shivani Mittal - [email protected]
Shivang Srivastava - [email protected]