{"id":26065222,"url":"https://github.com/notfounds/pl0dash-run","last_synced_at":"2025-07-03T21:36:20.300Z","repository":{"id":86238746,"uuid":"49481490","full_name":"NotFounds/pl0dash-run","owner":"NotFounds","description":null,"archived":false,"fork":false,"pushed_at":"2016-01-17T14:32:40.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-02-26T14:11:54.231Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/NotFounds.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}},"created_at":"2016-01-12T07:00:23.000Z","updated_at":"2023-03-18T07:46:07.872Z","dependencies_parsed_at":"2023-03-01T23:30:20.261Z","dependency_job_id":null,"html_url":"https://github.com/NotFounds/pl0dash-run","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotFounds%2Fpl0dash-run","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotFounds%2Fpl0dash-run/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotFounds%2Fpl0dash-run/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotFounds%2Fpl0dash-run/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotFounds","download_url":"https://codeload.github.com/NotFounds/pl0dash-run/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242595950,"owners_count":20155377,"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":[],"created_at":"2025-03-08T18:54:23.462Z","updated_at":"2025-03-08T18:54:24.414Z","avatar_url":"https://github.com/NotFounds.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pl0dash-run\n\n# What is this?\n+ The program is for  running the PL0dash assembly.\n+ PL0dash compiler is in [simozono/pl0dash](https://github.com/simozono/pl0dash).\n\n# Environment\n+ Mac OS X El Capitan\n+ Mono 4.2.0\n+ C# 6.0\n\n# How to Use\n\n## installation\n`git clone this`\n\n## build\n`mcs pl0-run.cs`\n\n## run\n`mono pl0-run.exe [Option] pl0dash assembly file path`\n\n### options\n|Option|Arguments|About|\n|:-----|:--------|:----|\n|`-t`  |[time]   |Measure the time. And Set Timeout. Default is 5000ms.|\n|`-v`  |none     |Show Version.|\n|`-h`  |none     |Show Help.|\n\n# Example\n\nThis is simple pl0dash code.\n```c\nbegin\n  write 1;\n  writeln;\nend.\n```\nCompile with [simozono/pl0dash(pl0-last-compiler)](https://github.com/simozono/pl0dash)\n\nAnd get this assembly code.\n```text\nLOAD A,1\nPUSH A\nPOP A\nPRINT A\nPRINTLN\nEND\n```\n\nRun.\n`mono pl0-run.exe Example/pl0-1.asm`\n\nResult.\n`\n1\n`\n\n# Virtual CPU\n+ CPU has 3 registers, `A` and `B`, `C`.\n+ ProgramCounter : `PC`\n+ FlamePointer : `FP`\n+ StackPointer : `SP`\n\n# Instruction Set\n|Instrunction|               syntax                 |About|\n|:-----------|:-------------------------------------|:----|\n|LOAD        |LOAD reg,num\u003cbr\u003eLOAD reg,#(adr)       |substitute `num` for `reg`\u003cbr\u003esubstitute memory in pointed by `adr` for `reg`.|\n|STORE       |STORE reg,#(adr)\u003cbr\u003eSTORE reg1,#(reg2)|write `reg` to memory in pointed by `adr`\u003cbr\u003ewrite `reg1` to memory in pointed by `reg2`.|\n|PUSH        |PUSH reg                              |append `reg` to stack.|\n|POP         |POP reg                               |pop value to `reg` from stack.|\n|PLUS        |PLUS                                  |registerA + registerB = registerC.|\n|MINUS       |MINUS                                 |registerA - registerB = registerC.|\n|MULTI       |MULTI                                 |registerA * registerB = registerC.|\n|DIV         |DIV                                   |registerA / registerB = registerC.|\n|CMPODD      |CMPODD                                |if registerA is odd then registerC = `1`, else `0`.|\n|CMPEQ       |CMPEQ                                 |if registerA == registerB then registerC = `1`, else `0`.|\n|CMPLT       |CMPLT                                 |if registerA \u003c registerB then registerC = `1`, else `0`.|\n|CMPGT       |CMPGT                                 |if registerA \u003e registerB then registerC = `1`, else `0`.|\n|CMPNOTEQ    |CMPNOTEQ                              |if registerA != registerB then registerC = `1`, else `0`.|\n|CMPLE       |CMPLE                                 |if registerA \u003c= registerB then registerC = `1`, else `0`.|\n|CMPGE       |CMPGE                                 |if registerA \u003e= registerB then registerC = `1`, else `0`.|\n|JMP         |JMP adr                               |jump to `adr`.|\n|JPC         |JPC adr                               |if registerC is `0` then jump to `adr`.|\n|CALL        |CALL adr                              |append PC + 1 to stack. and jump to `adr`.|\n|RET         |RET num                               |return to invoker. `num` is the number of arguments of the function.|\n|PUSHUP      |PUSHUP                                |decrement the `SP` by `1`. for declare a variable in function.|\n|PRINT       |PRINT reg                             |write `reg` to console.|\n|PRINTLN     |PRINTLN                               |write `\\n`.|\n|END         |END                                   |end of program.|\n|DEBUG       |DEBUG                                 |output stack-length and memory, registers, `PC`, `FP`, `SP` to error stream.|\n\n# Debugging\nDebugging information is output when you describe at the beginning of a line `@`.\n\n# License\nCopyright (c) 2015 Iori Ikeda\nThis software is released under the MIT License, see [License](https://github.com/NotFounds/pl0dash-run/blob/master/LICENSE)。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotfounds%2Fpl0dash-run","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotfounds%2Fpl0dash-run","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotfounds%2Fpl0dash-run/lists"}