Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ADD_TESTS.BIN
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
>*܀��*���*�n�
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
# CSOC Systems Week 2
#CSOC week 2 submission - Tejas Masne

## Steps to Contribute
## work done -
### instruction groups implemented -
1. 8-bit load group
2. 16-bit load group
3. 8-bit arithmetic group
4. rotate and shift group
5. general purpose registers

### testing
1. added functions to check values of registers and flags

- Fork the project to your GitHub account
- Clone it in your system i.e. Linux/Windows
- Create a new branch for you to work on
- When done adding your files, commit your work locally and push it to the origin
- Make a pull request to the upstream (this repo)
- Wait for us to merge your PR :man_technologist:
### supporting fucntions
1. added functions to toggle flags
2. function to calculate two's complement displaced integer
3. function to extract bits from numbers
4. used parityLookupTable to calculate parity values
5. fucntions to calculate current address pointed by HL, IX+d and IY+d

### general description of how the program works
- the program loads the specified file into memory starting from 0x0000
- the while loop iterates over the the whole memory executing the opcodes loaded which are choosen from a switch-case
- the required opcodes are executed by calling to the specific function and the required changes to the memory and registers are made
1 change: 1 addition & 0 deletions SUB_TESTS.BIN
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
>*9�������n�z�
12 changes: 12 additions & 0 deletions add_tests.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ld a,42
ld b,220
add a,b
add a,b
add a,b
ld b,42
add a,b
ld b,128
add a,b
ld b,42
add a,b
ld b,110
Binary file added emulatorc
Binary file not shown.
Loading