{"id":21190033,"url":"https://github.com/vanflux/viking-sim-web","last_synced_at":"2026-04-27T17:31:41.059Z","repository":{"id":117720663,"uuid":"383928930","full_name":"vanflux/viking-sim-web","owner":"vanflux","description":"Viking Simulator Web","archived":false,"fork":false,"pushed_at":"2021-09-23T03:30:38.000Z","size":11529,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T20:46:28.842Z","etag":null,"topics":["assembly","simulator","viking"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/vanflux.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":"2021-07-07T21:30:37.000Z","updated_at":"2022-05-24T03:12:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"d32d2647-a1fd-4e0c-9318-6bf69a7e3695","html_url":"https://github.com/vanflux/viking-sim-web","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vanflux/viking-sim-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanflux%2Fviking-sim-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanflux%2Fviking-sim-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanflux%2Fviking-sim-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanflux%2Fviking-sim-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vanflux","download_url":"https://codeload.github.com/vanflux/viking-sim-web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanflux%2Fviking-sim-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32348044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T17:12:42.749Z","status":"ssl_error","status_checked_at":"2026-04-27T17:12:41.658Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["assembly","simulator","viking"],"created_at":"2024-11-20T18:59:14.505Z","updated_at":"2026-04-27T17:31:41.050Z","avatar_url":"https://github.com/vanflux.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Viking Sim Web\n\nSimulador da viking CPU utilizando React.js \u0026 Monaco-Editor.\n\nLink site: [https://vanflux.github.io/viking-sim-web/](https://vanflux.github.io/viking-sim-web/)\n\nA implementação original foi feita por [sjohann81](https://github.com/sjohann81/) utiliza python2 e pode ser encontrada [AQUI](https://github.com/sjohann81/viking/).\n\nEsta implementação tem o objetivo de fazer algumas melhorias como por exemplo: o editor de código, na implementação original é um editor de texto simples, já nesta, foi utilizado o monaco-editor que possui syntax highlight e outras ferramentas como busca(ctrl+f), desfazer(ctrl+z), refazer(ctrl+y).\n\n---\n\nCaí aqui de paraquedas:\n- Nesse caso, recomenda-se olhar a documentação do repositório oficial, lá é explicado como que a arquitetura funciona e são oferecidos vários exemplos: [https://github.com/sjohann81/viking/](https://github.com/sjohann81/viking/)\n\n---\n\nScreenshot da aplicação:\n![](screenshot.png)\n\n##### **Atualmente, não é suportado pelo Internet Explorer \u0026 mobile(não responsivo).**\n\n---\n\nOperações básicas ✔️:\n| Operação  | Descrição                    | Operação  | Descrição                    |\n|-----------|------------------------------|-----------|------------------------------|\n| AND       | Logical product              | LDC       | Load constant                |\n| OR        | Logical sum                  | LSR       | Logical shift right          |\n| XOR       | Logical difference           | ASR       | Arithmetic shift right       |\n| SLT       | Set if less than             | ROR       | Rotate right through carry   |\n| SLTU      | Set if less than (unsigned)  | LDB       | Load byte                    |\n| ADD       | Add                          | STB       | Store byte                   |\n| ADC       | Add with carry               | LDW       | Load word                    |\n| SUB       | Subtract                     | STW       | Store word                   |\n| SBC       | Subtract with carry          | BEZ       | Branch if equal zero         |\n| LDR       | Load register                | BNZ       | Branch if not equal zero     |\n\n---\n\nPseudo operações 🟡 (em desenvolvimento):\n\n| Operação  | Descrição                       | Operação  | Descrição                       |\n|-----------|---------------------------------|-----------|---------------------------------|\n| ✔️ HCF    | Halt and catch fire             | ✔️ POP    | Pop to register from stack      |\n| ✔️ LDI    | Load immediate                  | ✔️ PUSH   | Push register to stack          |\n| ✔️ LSL    | Logical shift left              | ⭕ ret    | Return                          |\n| ✔️ nop    | No operation                    | ✔️ not    | One’s complement                |\n| ✔️ neg    | Two’s complement                | ✔️ mov    | Move register                   |\n| ⭕ rol    | Rotate left through carry       | ⭕ lsrm   | Logical shift right multiple    |\n| ⭕ asrm   | Arithmetic shift right multiple | ⭕ lslm   | Logical shift left multiple     |\n| ⭕ seq    | Set if equal                    | ⭕ sne    | Set if not equal                |\n| ⭕ sge    | Set if greater equal            | ⭕ sgeu   | Set if greater equal (unsigned) |\n| ⭕ beq    | Branch if equal                 | ⭕ bne    | Branch if not equal             |\n| ⭕ blt    | Branch if less than             | ⭕ bge    | Branch if greater equal         |\n| ⭕ bltu   | Branch if less than (unsigned)  | ⭕ bgeu   | Branch if greater equal(unsined)|\n| ⭕ sgt    | Set if greater equal            | ⭕ sle    | Set if less equal               |\n| ⭕ sgtu   | Set if greater than (unsigned)  | ⭕ sleu   | Set if less equal (unsigned)    |\n| ⭕ bgt    | Branch if greater than          | ⭕ ble    | Branch if less equal            |\n| ⭕ bgtu   | Branch if greater than(unsigned)| ⭕ bleu   | Branch if less equal(unsigned)  |\n| ⭕ jmp    | Jump                            | ⭕ jal    | Jump and link                   |\n| ⭕ jmpr   | Jump register                   | ⭕ jalr   | Jump and link register          |\n\n---\n\n* Para fazer operações I/O como ler/escrever no console ou interagir com o canvas é **Recomendado** usar os simbolos pré definidos ao invés dos endereços de forma fixa (0xf000, 0xf002). O motivo disso é que futuramente pretende-se suportar a arquitetura 32 bits e nela os endereços para fazer essas operações mudam, por exemplo: 0xf000 -\u003e 0xf0000000 (writec).\n\n* Símbolos pré definidos I/O\n  * Console:\n    * `console_writec`: Printa um caractere no output do console\n    * `console_writei`: Printa um inteiro no output do console\n    * `console_readc`: Lê um caractere do input do usuário\n    * `console_readi`: Lê um inteiro do input do usuário\n  * Canvas (experimental, veja os [Exemplos](./examples/canvas/) para enteder melhor):\n    * `canvas_clear`: Apaga/limpa o canvas\n    * `canvas_clearLine`: Apaga os pixels de uma linha (apaga uma linha)\n    * `canvas_clearPixel`: Apaga um pixel\n    * `canvas_drawLine`: Desenha uma linha\n    * `canvas_drawPixel`: Desenha um pixel\n    * `canvas_setP1`: Seta a primeira posição\n    * `canvas_setP2`: Seta a segunda posição\n    * `canvas_setX`: Seta o eixo X\n    * `canvas_setY`: Seta o eixo Y","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanflux%2Fviking-sim-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanflux%2Fviking-sim-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanflux%2Fviking-sim-web/lists"}