{"id":24935795,"url":"https://github.com/hellebenjamin/wpp","last_synced_at":"2025-03-28T16:13:05.244Z","repository":{"id":248669309,"uuid":"829358340","full_name":"HelleBenjamin/wpp","owner":"HelleBenjamin","description":"Simple low-level programming language","archived":false,"fork":false,"pushed_at":"2024-08-22T20:42:02.000Z","size":190,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T15:56:53.251Z","etag":null,"topics":["compiled-language","custom-programming-language","interpreted-language","programming-language"],"latest_commit_sha":null,"homepage":"","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/HelleBenjamin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-16T09:14:24.000Z","updated_at":"2024-07-21T11:36:05.000Z","dependencies_parsed_at":"2024-09-13T07:54:33.038Z","dependency_job_id":null,"html_url":"https://github.com/HelleBenjamin/wpp","commit_stats":null,"previous_names":["pepe-57/wpp","hellebenjamin/wpp"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelleBenjamin%2Fwpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelleBenjamin%2Fwpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelleBenjamin%2Fwpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelleBenjamin%2Fwpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HelleBenjamin","download_url":"https://codeload.github.com/HelleBenjamin/wpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246059339,"owners_count":20717085,"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":["compiled-language","custom-programming-language","interpreted-language","programming-language"],"created_at":"2025-02-02T15:56:58.424Z","updated_at":"2025-03-28T16:13:05.209Z","avatar_url":"https://github.com/HelleBenjamin.png","language":"C++","readme":"# Wuf++\n**Wuf++**(wuf plus plus, wpp) is a low-level programming language. Can be interpreted or compiled. It is possible to run wpp programs on any cpu architecture, for example x86 and Z80, requires custom compiler for different architectures. For cross-compatibility use interpreter.\n### Registers:\n- **bx** - main register, bl mainly used\n- **cx** - main pointer\n- **sp** - stack pointer\n- **dx** - temp register\n- **pc** - program counter, instruction pointer\n### Syntax:\n- **+** - increment main register, *bx = bx + 1*\n- **-** - decrement main register, *bx = bx - 1*\n- **}** - push main register to stack, *[sp+2] = bx*\n- **{** - pop main register from stack, *bx = [sp-2]*\n- **.** - print main register as ascii character\n- **,** - read ascii character to main register\n- **\u0026** - jump to location pointed by pointer, *pc = cx*\n- **]** - jump to location pointed by instruction pointer + main pointer, *pc = pc + cx*\n- **[** - jump to location pointed by instruction pointer - main pointer, *pc = pc - cx*\n- **!** - invert main register, *bx = ~bx*\n- **\u003e** - increment pointer, *cx = cx + 1*\n- **\u003c** - decrement pointer, *cx = cx - 1*\n- **$** - print pointer as ascii character\n- **#[char]** - load char to main register\n- **(** - loop start, loads dx with loop start address, *dx = pc*\n- **)** - loop end, decrement pointer and loop until pointer = 0, *cx = cx - 1, if cx != 0 jump to dx*\n- **\"** - swap registers, *bx = dx, dx = bx*\n- **%[char]** - compare main register with char, jump if equal to location pointed by pointer, *if bx == char jump to cx*\n- **=** - halt program, *halt = 1*\n- **/** - add main register and pointer, *bx = bx + cx*\n- **\\\\** - sub main register and pointer, *bx = bx - cx*\n- **@** - load zero to main register, *bx = 0*\n- **^** - swap bl with bh, *bx = bh, bh = bl*\n\n### Code examples:\n#### Hello World\n```wpp\nio #H.#e.#l.#l.#o.# .#W.#o.#r.#l.#d.=\n```\n#### Hello World printed 2x times\n```wpp\nio \u003e\u003e(#H.#e.#l..#o.# .#W.#o.#r.#l.#d.)=\n```\n**Note:** Include 'io' at the beginning of the program to use input and output functions. This tells the compiler that the program uses the standard input and output functions. Interpreted programs doesn't need this.\n\nIn x86 assembly:\n```asm\nglobal _start\n;wic v0.1.0\nsection .text\njp_cx:\n     jmp edx\nreadc:\n     mov edi, ecx\n     mov eax, 0x3\n     mov ebx, 0x0\n     mov ecx, ebx\n     mov edx, 1\n     int 0x80\n     mov ecx, edi\n     ret\nprintc:\n     mov edi, ecx\n     push ebx\n     mov eax, 0x4\n     mov ebx, 0x1\n     mov ecx, esp\n     mov edx, 1\n     int 0x80\n     pop ebx\n     mov ecx, edi\n     ret\n_start:\n     mov ebx, 0\n     mov ecx, 0\n     mov edx, 0\n     push ebp\n     mov ebp, esp\n     sub esp, 0x200\nmain:\n     inc ecx\n     inc ecx\nloop0:\n     mov bx, 'H'\n     call printc\n     mov bx, 'e'\n     call printc\n     mov bx, 'l'\n     call printc\n     call printc\n     mov bx, 'o'\n     call printc\n     mov bx, ' '\n     call printc\n     mov bx, 'W'\n     call printc\n     mov bx, 'o'\n     call printc\n     mov bx, 'r'\n     call printc\n     mov bx, 'l'\n     call printc\n     mov bx, 'd'\n     call printc\n     cmp ecx, 0\n     dec ecx\n     jne loop0\n     .loop0_end:\n     mov eax, 1\n     mov ebx, 0\n     int 0x80\n```\n\n## WIC\n**WIC**(Wuf++ Interpreter Compiler) is a compiler and interpreter for the Wuf++ language. A file can be compiled or interpreted. Nasm is used for assembling and C++ is used for interpretation. \n### Command line arguments:\n- **-s** - source file\n- **-o** - output file\n- **-c** - compile\n- **-i** - interpret\n- **-?** - print syntax\n- **-I** - interpret in terminal\n- **-h** - help\n- **-v** - version\n- **-asm** - save assembly code\n\nAn example of using the compiler:\n```bash\nwic -c -s example.wpp -o example\n```\n**Note:** X86 is only supported. Arm support is coming later.\n\nAn example of using the interpreter:\n```bash\nwic -i -s example.wpp\nwic -I\n```\n### Required tools:\n- Nasm\n- gcc/g++\n\n# Changelog\n## WIC 0.1.1\n- Fixed jump related bugs in compiler\n- Added Windows support (beta version)\n## WIC 0.1.0\n- Initial release\n- Supported compiled architectures: X86\n# Wuf++ versions\n## Wuf++ 1.0.0\n- First version\n- Basic syntax:\n```wpp\n+ - { } . , \u0026 [ ] ! \u003c \u003e $ # ( ) \" % = / \\ @ ^\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellebenjamin%2Fwpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellebenjamin%2Fwpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellebenjamin%2Fwpp/lists"}