{"id":19303019,"url":"https://github.com/antosmichael07/mispasm","last_synced_at":"2026-06-17T19:31:58.272Z","repository":{"id":246906340,"uuid":"824510280","full_name":"antosmichael07/MispASM","owner":"antosmichael07","description":"My high-level programming language with the syntax of assembly","archived":false,"fork":false,"pushed_at":"2025-01-16T14:45:37.000Z","size":9767,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-24T01:51:28.556Z","etag":null,"topics":["asm","go","golang","language","programming-language","virtual-machine","vm"],"latest_commit_sha":null,"homepage":"","language":"Go","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/antosmichael07.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":"2024-07-05T09:33:46.000Z","updated_at":"2025-01-16T14:45:38.000Z","dependencies_parsed_at":"2025-02-24T01:44:53.676Z","dependency_job_id":"2b62ae74-7542-4c94-82c3-69b311db2eec","html_url":"https://github.com/antosmichael07/MispASM","commit_stats":null,"previous_names":["antosmichael07/mispasm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/antosmichael07/MispASM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antosmichael07%2FMispASM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antosmichael07%2FMispASM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antosmichael07%2FMispASM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antosmichael07%2FMispASM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antosmichael07","download_url":"https://codeload.github.com/antosmichael07/MispASM/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antosmichael07%2FMispASM/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34463552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["asm","go","golang","language","programming-language","virtual-machine","vm"],"created_at":"2024-11-09T23:24:39.808Z","updated_at":"2026-06-17T19:31:58.257Z","avatar_url":"https://github.com/antosmichael07.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MispASM\n\n- I made an [example folder](https://github.com/antosmichael07/MispASM/tree/main/examples) with examples to help you\n\n## Getting started\n\n- You need the [Misp virtual machine](https://github.com/antosmichael07/MispASM/tree/main/mispasm-vm) `mispvm` and [Misp assembler](https://github.com/antosmichael07/MispASM/tree/main/mispassembler) `mispc`\n- Optionally you can have the [Misp library builder](https://github.com/antosmichael07/MispASM/tree/main/mispasm-lib-builder) `misplib` for making libraries\n\n### Your first program\n\n- Start by making a main [function](#functions) like this :\n\n```\nglobal _start\n\n_start\n```\n\n- The `global _start` says that the `_start` [function](#functions) is gonna be the main [function](#functions)\n- Then store `\"Hello World!\"` in a [register](#registers)\n\n```\nglobal _start\n\n_start\n    mov s0 \"Hello World!\"\n```\n\n- Now print `\"Hello World!\"`\n\n```\nglobal _start\n\n_start\n    mov s0 \"Hello World!\"\n    \n    push s0\n    call \"std.print\"\n    pop s0\n```\n\n- Great you wrote your first program, if it didn't work, you might not have the std [library](#writing-a-library), you can get the code from the [lib folder](https://github.com/antosmichael07/MispASM/tree/main/lib) here on github and compile it manually\n\n## What MispASM offers\n\n### Types\n\n- int, float, string, register, variable, constant\n- To differentiate between numbers you can type :\n```\ni8-123\ni16-123\ni32-123\ni64-123\nu8-123\nu16-123\nu32-123\nu64-123\nf32-123.45\nf64-123.45\n```\n- If you just type a number it is automatically `i32` and if you type a `.` in the number it is automatically `f32`\n- Strings are typed : `\"Hello World!\"`\n\n### Functions\n\n- Functions start with `_`\n- Declare main function at the start of the program : `global _start`\n- Call a function : `fcal \u003cfunction\u003e`\n- Functions are typed as strings in [arguments](#types)\n- Call a function from a [library](#writing-a-library) : `call \"std.print\"`\n- When calling a [library](#writing-a-library) from a program, the `.misplib` file has to be located in `../lib/\u003cname\u003e.misplib`\n- You can pass [registers](#registers) to the [library](#writing-a-library) with [stack](#stack)\n\n### Variables and constants\n\n- Variables have to be set at the start of the program and can be changed with : `set \u003cvariable\u003e \u003carg2\u003e`\n- Constants cannot be changed\n- You need to declare them before global [function](#functions)\n\n```\nconst:\n    hello \"Hello World!\"\n\nvar:\n    bye \"Goodbye!\"\n\nglobal _start\n```\n\n- They have to be declared in this order, firstly constants and then variables, but you don't need to use both\n\n### Instructions\n\n- They have a maximum of 2 [arguments](#types)\n- Syntax : `\u003cinstruction\u003e \u003carg1\u003e \u003carg2\u003e`\n\n### Registers\n\n- Registers are typed : `li0`, the zero indicates that it is the first long integer\n- There is 256 of every register\n- Are used as [variables](#variables-and-constants), but they can perform operations, [variables](#variables-and-constants) can only be set\n- Can be used as [arguments](#types) to [instructions](#instructions)\n- Store data with : `mov \u003cregister\u003e \u003carg2\u003e`\n- Return registers are used for storing data after an [instruction](#instructions) that performs a calulation, for example `add` sets the register : `rli` return long integer or other if you use different [type](#types) than `i32`\n\n### Stack\n\n- Stores data and passes them to [libraries](#writing-a-library)\n- Only [registers](#registers) can be stored\n- Store data with : `push \u003cregister\u003e`\n- Delete data with : `pop \u003cregister\u003e`\n\n## Writing a library\n\n### What you need\n\n- [Misp virtual machine](https://github.com/antosmichael07/MispASM/tree/main/mispasm-vm) `mispvm`\n- [Misp assembler](https://github.com/antosmichael07/MispASM/tree/main/mispassembler) `mispc`\n- [Misp library builder](https://github.com/antosmichael07/MispASM/tree/main/mispasm-lib-builder) `misplib`\n- [Go programming language](https://go.dev/) `go`\n\n### How to\n\n- When [calling](#functions) a library from a program, the `.misplib` file has to be located in `../lib/\u003cname\u003e.misplib`\n- Use the [Misp Library builder](https://github.com/antosmichael07/MispASM/tree/main/mispasm-lib-builder), it will generate a structure of files\n    - `./build.bat` for building your library\n    - `./lib/lib.go` is for decoding and encoding data between a program and your library, you don't need to worry about it\n    - `./lib/\u003cname\u003e.go` is for your functions in the library, there is a map of functions where you write your functions\n    - `./test/test.mispasm` the `.mispasm` program that is used to test your library\n- The command [misplib](https://github.com/antosmichael07/MispASM/tree/main/mispasm-lib-builder) needs these arguments : `misplib \u003cdestination\u003e \u003cname\u003e`\n\n## Cheatsheet\n\n|[Instruction](#instructions)|Description             |\n|----------------------------|------------------------|\n|`add`                       |Addition                |\n|`sub`                       |Subtraction             |\n|`fcal`                      |Function call           |\n|`mul`                       |Mulitplication          |\n|`div`                       |Division                |\n|`call`                      |Call from library       |\n|`push`                      |Push to the stack       |\n|`pop`                       |Pop from the stack      |\n|`mov`                       |Move to register        |\n|`label`                     |Label                   |\n|`jmp`                       |Jump to label           |\n|`mod`                       |Modulo                  |\n|`cmp`                       |Compare                 |\n|`je`                        |Jump equal              |\n|`jne`                       |Jump not equal          |\n|`jg`                        |Jump greater            |\n|`jge`                       |Jump greater or equal   |\n|`jl`                        |Jump less               |\n|`jle`                       |Jump less or equal      |\n|`inc`                       |Increase                |\n|`dec`                       |Decrease                |\n|`ret`                       |Return                  |\n|`def`                       |Defenestrate the program|\n|`set`                       |Set a variable          |\n|`and`                       |Logical AND             |\n|`or`                        |Logical OR              |\n|`xor`                       |Logical XOR             |\n|`shr`                       |Shift bits right        |\n|`shl`                       |Shift bits left         |\n|`not`                       |Logical NOT             |\n|`hlt`                       |Halt                    |\n\n|[Register](#registers)|Description                            |\n|----------------------|---------------------------------------|\n|`bi`                  |Byte integer `i8`                      |\n|`si`                  |Short integer `i16`                    |\n|`li`                  |Long integer `i32`                     |\n|`lli`                 |Long long integer `i64`                |\n|`bui`                 |Byte unsigned integer `u8`             |\n|`sui`                 |Short unsigned integer `u16`           |\n|`lui`                 |Long unsigned integer `u32`            |\n|`llui`                |Long long unsigned integer `u64`       |\n|`lf`                  |Long float `f32`                       |\n|`llf`                 |Long long float `f64`                  |\n|`s`                   |String                                 |\n|`rbi`                 |Return byte integer `i8`               |\n|`rsi`                 |Return short integer `i16`             |\n|`rli`                 |Return long integer `i32`              |\n|`rlli`                |Return long long integer `i64`         |\n|`rbui`                |Return byte unsigned integer `u8`      |\n|`rsui`                |Return short unsigned integer `u16`    |\n|`rlui`                |Return long unsigned integer `u32`     |\n|`rllui`               |Return long long unsigned integer `u64`|\n|`rlf`                 |Return long float `f32`                |\n|`rllf`                |Return long long float `f64`           |\n|`rs`                  |Return string                          |\n\n|[Type](#types)|Description            |\n|--------------|-----------------------|\n|`i8 `         |8-bit integer          |\n|`i16`         |16-bit integer         |\n|`i32`         |32-bit integer         |\n|`i64`         |64-bit integer         |\n|`u8 `         |8-bit unsigned integer |\n|`u16`         |16-bit unsigned integer|\n|`u32`         |32-bit unsigned integer|\n|`u64`         |64-bit unsigned integer|\n|`f32`         |32-bit float           |\n|`f64`         |64-bit float           |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantosmichael07%2Fmispasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantosmichael07%2Fmispasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantosmichael07%2Fmispasm/lists"}