{"id":29192286,"url":"https://github.com/linuskmr/intcode-go","last_synced_at":"2025-07-02T01:06:05.318Z","repository":{"id":55609178,"uuid":"318812277","full_name":"linuskmr/intcode-go","owner":"linuskmr","description":"An Intcode interpreter for Advent of Code 2019","archived":false,"fork":false,"pushed_at":"2022-12-20T11:36:36.000Z","size":5649,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-21T03:25:17.143Z","etag":null,"topics":["golang","intcode"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linuskmr.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":"2020-12-05T14:44:53.000Z","updated_at":"2021-10-08T16:15:35.000Z","dependencies_parsed_at":"2023-01-30T00:30:53.763Z","dependency_job_id":null,"html_url":"https://github.com/linuskmr/intcode-go","commit_stats":null,"previous_names":["linus-k519/intcode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/linuskmr/intcode-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuskmr%2Fintcode-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuskmr%2Fintcode-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuskmr%2Fintcode-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuskmr%2Fintcode-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linuskmr","download_url":"https://codeload.github.com/linuskmr/intcode-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuskmr%2Fintcode-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263056763,"owners_count":23406818,"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":["golang","intcode"],"created_at":"2025-07-02T01:06:04.712Z","updated_at":"2025-07-02T01:06:05.284Z","avatar_url":"https://github.com/linuskmr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# intcode\n\n## Usage\n\n```go\nintcode \u003cflags\u003e \u003cpath\u003e\n```\n\n## Intcode Language Specifications\n\n### Opcodes\n\nThe Opcodes 01-09 and 99 are defined in [Advent of Code 2019](https://adventofcode.com/2019).\n\nThe Opcodes 10-19 and 80 are an extension by me.\n\n| Opcode | Params | Description                                                  |\n| ------ | ------ | ------------------------------------------------------------ |\n| 01     | 3      | first arg + second arg = third arg                           |\n| 02     | 3      | first arg * second arg = third arg                           |\n| 03     | 1      | Inputs an integer and stores it in the first arg             |\n| 04     | 1      | Outputs the first arg                                        |\n| 05     | 2      | If the first arg is non-zero, sets the instruction pointer to the second arg |\n| 06     | 2      | If the first arg is zero, sets the instruction pointer to the second arg. |\n| 07     | 3      | If the first arg is less than the second argument, sets the third arg to 1. If not less, sets it to 0 |\n| 08     | 3      | If the first arg is equal to the second argument, sets the third arg to 1. If not equal, sets it to 0 |\n| 09     | 1      | Adds the first arg to the relative base register             |\n| **—**  | **—**  | **Additional section below**                                 |\n| 10     | 3      | Bitwise AND: first arg \\\u0026 second arg = third arg             |\n| 11     | 3      | Bitwise OR: first arg \\| second arg = third arg              |\n| 12     | 3      | Bitwise XOR: first arg ^ second arg = third arg              |\n| 13     | 3      | Integer Division: first arg / second arg = third arg         |\n| 14     | 3      | Modulo: first arg % second arg = third arg                   |\n| 15     | 3      | Left shift: first arg \u003c\u003c second arg = third arg              |\n| 16     | 3      | Right shift: first arg \u003e\u003e second arg = third arg             |\n| 17     | 3      | Negate: If first arg is 0, return 1. Otherwise return 0      |\n| 18     | 3      | Unix Timestamp: Sets the first arg to the current unix timestamp |\n| 19     | 3      | Random: Sets the first arg to a random positive number       |\n| *80*   | *3*    | **Future:** *Syscall: Perform a syscall with eax=first arg, ebx=second arg, ecx=third arg* |\n| 99     | 0      | Ends the program                                             |\n\n\u003e From [esolangs.org/wiki/Intcode](https://esolangs.org/wiki/Intcode)\n\n### Parameter Modes\n\n| Mode | Name           | Description                                                  |\n| ---- | -------------- | ------------------------------------------------------------ |\n| 0    | Position Mode  | The parameter is the address of the value.                   |\n| 1    | Immediate Mode | The parameter is the value itself (Not used for writing).    |\n| 2    | Relative Mode  | The parameter is added to the relative base register, which results in the memory address of the value. |\n\n\u003e From [esolangs.org/wiki/Intcode](https://esolangs.org/wiki/Intcode)\n\n```bash\nABCDE\n 1002\n\nDE - two-digit opcode,      02 == opcode 2\n C - mode of 1st parameter,  0 == position mode\n B - mode of 2nd parameter,  1 == immediate mode\n A - mode of 3rd parameter,  0 == position mode,\n                                  omitted due to being a leading zero\n```\n\n\u003e From [adventofcode.com/2019/day/5](https://adventofcode.com/2019/day/5)\n\n### Examples\n\n```bash\n1, 3, 4, 2, 99\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuskmr%2Fintcode-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuskmr%2Fintcode-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuskmr%2Fintcode-go/lists"}