{"id":18006346,"url":"https://github.com/kully/vlahb","last_synced_at":"2025-03-26T12:30:26.248Z","repository":{"id":109386886,"uuid":"180901416","full_name":"Kully/VLAHB","owner":"Kully","description":"A Virtual Machine written in C and an Assembler written in Python.","archived":false,"fork":false,"pushed_at":"2023-11-12T17:04:48.000Z","size":2872,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-11-13T17:58:28.992Z","etag":null,"topics":["assembler","compiler","ram","statically-linked","virtual-machine"],"latest_commit_sha":null,"homepage":"","language":"Assembly","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/Kully.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}},"created_at":"2019-04-12T00:47:56.000Z","updated_at":"2023-11-12T16:56:58.000Z","dependencies_parsed_at":"2023-03-13T14:13:55.956Z","dependency_job_id":null,"html_url":"https://github.com/Kully/VLAHB","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kully%2FVLAHB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kully%2FVLAHB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kully%2FVLAHB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kully%2FVLAHB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kully","download_url":"https://codeload.github.com/Kully/VLAHB/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222144723,"owners_count":16938456,"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":["assembler","compiler","ram","statically-linked","virtual-machine"],"created_at":"2024-10-30T01:08:01.541Z","updated_at":"2024-10-30T01:08:02.099Z","avatar_url":"https://github.com/Kully.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VLAHB\n\n- An original assmebly langauge you can use to write your own games.\n- For details on the underlying mechanics of the language, read this [blog post](http://adamkulidjian.com/vlahb.html).\n\n![Image](gifs/conway2.gif)\n\n`V`irtual machine\u003cbr\u003e\n`L`inker\u003cbr\u003e\n`A`ssembly\u003cbr\u003e\n`H`ex\u003cbr\u003e\n`B`inary\u003cbr\u003e\n\n## Building\n\n`$ ./run.sh`\n\n(NB Pick which asm files to compile on [this line of run.sh](https://github.com/Kully/VLAHB/blob/master/run.sh#L3))\n\n#### Statically Linking files\n`-s` is a flag for statically-linking all the .asm files in the /asm directory. If you list 1 or more .asm filenames w/o the -s flag, it will only compile those files and start at the first one. If you list 1 or more .asm filenames with the `-s` flag, it will compile _all_ the files in the /asm directory and start with the first one.\n\n| code | meaning |\n|:-------|:------|\n| `$ python3 assembler.py A.asm B.asm C.asm` | Compile A, B and C and start the vm at A.asm |\n| `$ python3 assembler.py C.asm -s` | Compile all files in /asm and start at top of C.asm |\n| `$ python3 assembler.py B.asm C.asm -s` | Compile all files in /asm and start at top of B.asm |\n\n#### Debug Messages\nTurn on DEBUG mode [here](https://github.com/Kully/VLAHB/blob/master/vm.c#L17) to get helpful debug messages printed per instruction in terminal. _Slows down virtual machine a ton._\n\n#### View Machine Code\nRun `$ xxd -c 4 bin/file.bin` to view the machine code displayed as hex in the terminal.\n\n#### Specs\n\n- virtual machine, assembler/compiler\n- 48 opcodes\n- 262KB of ram\n- 160x144 pixel display\n- static linking capable\n- 60 fps\n- vm runs on SDL2\n- written in C and Python\n- lots of fun! :smile_cat:\n\n![Image](gifs/opcodes.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkully%2Fvlahb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkully%2Fvlahb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkully%2Fvlahb/lists"}