{"id":16589311,"url":"https://github.com/sadrasabouri/mpf","last_synced_at":"2025-07-19T12:38:12.817Z","repository":{"id":152275372,"uuid":"333746009","full_name":"sadrasabouri/MPF","owner":"sadrasabouri","description":"Micro-Professor (MPF - I) for 8051 Instruction Set","archived":false,"fork":false,"pushed_at":"2021-02-06T23:25:42.000Z","size":2100,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-21T19:11:19.531Z","etag":null,"topics":["8051","8051-architecture","8051-projects","assembly","microcontroller"],"latest_commit_sha":null,"homepage":"","language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sadrasabouri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-01-28T12:03:01.000Z","updated_at":"2024-11-13T01:58:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"d3b07442-eabe-4e5f-b2e2-b60694606d2e","html_url":"https://github.com/sadrasabouri/MPF","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sadrasabouri/MPF","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sadrasabouri%2FMPF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sadrasabouri%2FMPF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sadrasabouri%2FMPF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sadrasabouri%2FMPF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sadrasabouri","download_url":"https://codeload.github.com/sadrasabouri/MPF/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sadrasabouri%2FMPF/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265934249,"owners_count":23852092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["8051","8051-architecture","8051-projects","assembly","microcontroller"],"created_at":"2024-10-11T23:08:26.001Z","updated_at":"2025-07-19T12:38:12.809Z","avatar_url":"https://github.com/sadrasabouri.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MPF\nMicro-Professor MPF for 8051 Instruction Set\n\nMicro-Professor is a system wich can simulate any assembly (`8051` in this case) code on it's RAM which is inputted as Opcodes and Operands -in HexDecimal mode- before execution.\nIt has a funny name which comes from combination of Micro-Processor and Professor which means it can be as a Professor (which may know all the instruction set) that run your code in its head and show it's answer to you.\n\nMain challeng is the fact that executing these instructions is normally done inside the `8051` by hardware dedicated to each `Fetch`, `Execute` and `Run` cycle and here we should simulate them by a software program using 8051 insturctions.\n\n\u003cimg src=\"https://github.com/sadrasabouri/MPF/blob/main/Others/MAIN_CIRCUIT.PNG\"\u003e\n\n## Developers\n\n* **Mohammad Qumi** [Mohammad Qumi](https://github.com/Mohammad-Qumi)\n* **Sadra Sabouri** [Sadra Sabouri](https://github.com/sadrasabouri)\n* **Mohammad Sina Hassan Nia** [Mohammad Sina Hassan Nia](https://github.com/sinahsnn)\n\n##  How to Use\n\nFallowing steps may be needed for starting a simulation on the desired code:\n\n1.  Press `PC` key. (Any other key will be ignored)\n\n2.  Enter two Hex number dedicating RAM address, after this step RAM address will be shown on 7-segments for a while. (Any other key except keys from `0` - `F` will be igonred)\n\n3.  Press `EXE` key. (Any other key will be igonred)\n\n4.  Enter two Hex number dedicating OpCode of instruction, after this data will be shown on 7-segments for a while. (Any other key except keys from `0` - `F` will be igonred)\n\n5.  Press `EXE` key. (Any other key will be igonred)\n\n6.  For selecting next home of RAM you can easily press:\n+   `+` for going forward on RAM\n+   `-` for coming backward on RAM\n\nAfter this situation you don't have to press `EXE` again, just input your desired data and then press `EXE`. You can end this process anytime you want by simply pressing `END` key.\nYou should put an `00` at the end of your code which makes it easier for simulator to find where should it stop.\n\n7.  After pressing `END` a number will be shown on 7-segment which is the result of calculations, it'll show `88` if there is somthing wrong with at least a OpCode.\n\n\u003cb\u003e After this process whole system may need a reset \u003c/b\u003e\n\n## Technical Detail\n\nFor saving states and assigning a transition function between them corresponding to each input key, we can have a DFA(FSM - Finite State Machine) which describes these transitions.\n\nFallowing Registors are specific registors on code:\n\n| Registor | Use |\n|:-------:|:-------:|\n| R0 | State index (Values in circles in fallowing FSM) |\n| R1 | Inputted key value (Values on edges in fallowing FSM) |\n| R2 | Address Buffer (Containing last inputted address of RAM) |\n| R3 | Data Buffer (Containing last inputted address to be saved on RAM)\n\n\u003cimg src=\"https://github.com/sadrasabouri/MPF/blob/main/Others/Working_FSM.png\"\u003e\n\n`R0` Registor - which is filled by situation index - might get some values which is described case by case in fallowing table:\n\n| Value | Situation |\n|:-------:|:-------:|\n| `00H` | Wait for user to push `PC` |\n| `01H` | Wait for user to enter higher part of start address |\n| `02H` | Wait for user to enter lower part of start address |\n| `03H` | The address is entered and the user should enter `EXE` |\n| `04H` | Address is sent to controller and now it's time to enter higher part of data which you want to send to that memory address |\n| `05H` | Address is sent to controller and now it's time to enter Lower part of data which you want to send to that memory address |\n| `06H` | Data is sent to choosen memory address and user must click on `EXE` |\n| `07H` | Wait for user to enter higher part of the next address |\n| `08H` | Wait for user to enter lower part of the next address |\n\n\n`R1` Registor - which is filled by inputted key value - might get some values which is described case by case in fallowing table:\n\n| Value | Corresponding Key |\n|:-------:|:-------:|\n| `00H` - `0FH` | `0` to `F` keys on keypad |\n| `10H` | `PC` |\n| `20H` | `F1` |\n| `30H` | `ADR` |\n| `40H` | `F2` |\n| `50H` | `+` |\n| `60H` | `F3` |\n| `70H` | `-` |\n| `80H` | `F4` |\n| `90H` | `DATA` |\n| `A0H` | `F5` |\n| `B0H` | `MOD` |\n| `C0H` | `F6` |\n| `D0H` | `EXE` |\n| `E0H` | `F7` |\n| `F0H` | `END` |\n| `F1H` | `F8` |\n\n## Supported Instructions\n\nFallowing 8051 instrucrions are now guaranteed to be worked well:\n \n+   `MOV`\n\n+   `CALL`\n\n+   `AJUMP`\n\n+   `RET`\n\n+   `ADD`\n\n+   `ADDC`\n\n+   `SUB`\n\n+   `INC`\n\n+   `DEC`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsadrasabouri%2Fmpf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsadrasabouri%2Fmpf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsadrasabouri%2Fmpf/lists"}