{"id":22536073,"url":"https://github.com/selma-belhadj/monty","last_synced_at":"2025-03-28T06:31:59.520Z","repository":{"id":104228339,"uuid":"577910785","full_name":"selma-belhadj/monty","owner":"selma-belhadj","description":"Monty, an interpreter built specially for the Monty Bytecodes files.","archived":false,"fork":false,"pushed_at":"2022-12-16T22:07:42.000Z","size":31,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T07:25:08.227Z","etag":null,"topics":["betty","c"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/selma-belhadj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-12-13T20:10:07.000Z","updated_at":"2023-03-27T07:25:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"9c450d8e-8056-4e80-b9d6-3166d4013288","html_url":"https://github.com/selma-belhadj/monty","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selma-belhadj%2Fmonty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selma-belhadj%2Fmonty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selma-belhadj%2Fmonty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selma-belhadj%2Fmonty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selma-belhadj","download_url":"https://codeload.github.com/selma-belhadj/monty/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245984551,"owners_count":20704792,"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":["betty","c"],"created_at":"2024-12-07T10:42:32.537Z","updated_at":"2025-03-28T06:31:59.497Z","avatar_url":"https://github.com/selma-belhadj.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Monty\n`Monty` is a scripting language that is first compiled into monty byte codes (Just like python). It relies on a unique stack, with specific instructions to manipulate it. **`monty`** is an interpreter built specially for the Monty Bytecodes files.\n\n## More About the Monty language\nThis is a language that contains specific instructions to manipulate data information (stacks or queues), where each instruction (*called opcode*) is sended per line. Files which contains Monty byte codes usually have the `.m` extension.\n\n## Environment\n* Language: C\n* OS: Ubuntu 14.04 LTS\n* Compiler: gcc 4.8.4\n* Style guidelines: [Betty style](https://github.com/holbertonschool/Betty/wiki)\n\n## Getting Started\n- clone the repository\n`git clone https://github.com/selma-belhadj/monty.git`\n- navigate to the repository\n`cd monty`\n## Usage\nTo compile all files:\n\n```bash\n$ gcc -Wall -Werror -Wextra -pedantic *.c -o monty\n$\n```\n\nThe **synopsis** of the interpreter is the following:\n\n```bash\n$ ./monty [filename]\n$\n```\n\nTo run the interpreter:\n\n```bash\n$ ./monty file.m\n2\n1\n0\n0\n3\n2\n1\n$\n```\n## Features\n### Opcodes\n`monty` executes the following opcodes:\n\n| Opcode | Description |\n| -------- | ----------- |\n| `push` | Pushes an element to the stack |\n| `pall` | Prints all the values on the stack |\n| `pint` | Prints the value at the top of the stack |\n| `pop` | Removes the top element of the stack |\n| `swap` | Swaps the top two elements of the stack |\n| `queue` | Sets the format of the data to a queue (FIFO) |\n| `stack` | Sets the format of the data to a stack (LIFO) |\n| `nop` | Doesn't do anything |\n| `add` | Adds the top two elements of the stack |\n| `sub` | Subtracts the top element of the stack from the second top element of the stack |\n| `mul` | Multiplies the second top element of the stack with the top element of the stack |\n| `div` | Divides the second top element of the stack by the top element of the stack |\n| `mod` | Computes the rest of the division of the second top element of the stack by the top element of the stack |\n| `pchar` | Prints the char at the top of the stack |\n| `pstr` | Prints the string starting at the top of the stack |\n| `rotl` | Rotates the stack to the top |\n| `rotr` | Rotates the stack to the bottom |\n\nComments, indicated with `#`, are not executed by the interpreter.\n\nWhen a **nonextistent opcode** is passed, the interpreter prints an error message and stops:\n\n```bash\n$ cat errorfile.m\npush 1\npint\npcx\n$ ./monty errorfile.m\n1\nL3: unknown instruction pcx\n```\n\n## Authors\n👤 **Selma Belhadj**\n\n- GitHub: [@selma-belhadj](https://github.com/selma-belhadj)\n- Twitter: [@Bel_Selma16](https://twitter.com/selma_bel_hadj)\n- LinkedIn: [@selma-belhadj](https://www.linkedin.com/in/selma-belhadj/)\n\n## 🤝 Contributing\n\nContributions, issues, and feature requests are welcome!\n\nFeel free to check the [issues page](https://github.com/selma-belhadj/monty/issues).\n\n## Show your support\n\nGive a ⭐️ if you like this project!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselma-belhadj%2Fmonty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselma-belhadj%2Fmonty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselma-belhadj%2Fmonty/lists"}