{"id":22531376,"url":"https://github.com/owaismohsin001/ameer-virtual-processor","last_synced_at":"2025-03-28T05:18:54.625Z","repository":{"id":193433073,"uuid":"237979755","full_name":"owaismohsin001/Ameer-Virtual-Processor","owner":"owaismohsin001","description":"This is virtual machine named Ameer Virtual Processor to which languages can be compiled to, and be ran on. This runs well with either Nuitka or PyPy","archived":false,"fork":false,"pushed_at":"2020-03-17T06:30:54.000Z","size":147,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-02T06:13:27.315Z","etag":null,"topics":["language-processing","programming-language","virtual-machine","virtual-processor"],"latest_commit_sha":null,"homepage":"","language":"Python","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/owaismohsin001.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}},"created_at":"2020-02-03T14:06:50.000Z","updated_at":"2023-12-03T22:09:38.000Z","dependencies_parsed_at":"2023-09-08T06:51:58.980Z","dependency_job_id":null,"html_url":"https://github.com/owaismohsin001/Ameer-Virtual-Processor","commit_stats":null,"previous_names":["ameerwasi001/ameer-virtual-processor","zaidharoon001/ameer-virtual-processor","owaismohsin001/ameer-virtual-processor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owaismohsin001%2FAmeer-Virtual-Processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owaismohsin001%2FAmeer-Virtual-Processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owaismohsin001%2FAmeer-Virtual-Processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owaismohsin001%2FAmeer-Virtual-Processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/owaismohsin001","download_url":"https://codeload.github.com/owaismohsin001/Ameer-Virtual-Processor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245972987,"owners_count":20702757,"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":["language-processing","programming-language","virtual-machine","virtual-processor"],"created_at":"2024-12-07T08:07:15.321Z","updated_at":"2025-03-28T05:18:54.609Z","avatar_url":"https://github.com/owaismohsin001.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ameer Virtual Processor\nThis is virtual machine named Ameer Virtual Processor to which languages can be compiled to, and be ran on.\n## Environment\nIt can be ran on any python environment but for the sake of let's say performance, it should be ran with either an AOT Compiler like Nuitka or a JIT Compiler like PyPy which this virtual machine can be compiled to.\n## Supported type of instructions\nThis VM is intended to be used for dynamic languages and so it's made dynamic in it's very nature. This currently supports variables in a heap and a string heap, arrays and strings. We hope to add built in functions in this very soon and to expand on our support of arrays and strings.\n## Instruction Chart\nWhat follows is a (hopefully) comprehensive description of each instruction that is currently avaliable in this virtual machine.\n\n**00 - End OF File |** This instruction is used to tell the program that the file is ended before it does or for cleanliness of code. \n\n**01 - End Of Instruction |** This code is used to end every instruction.\n\n**02 - push |** PUSH to the top of the stack.\n\n**03 - pop  |** Pop either top or a certain index from the stack.\n\n**04 - print |** Used to print the top of the sack.\n\n**05 - add |** Add two numbers at the top of the stack.\n\n**06 - substract |** Substract two numbers at the top of the stack.\n\n**07 - multipy |** Multiply two numbers at the top of the stack.\n\n**08 - divide |** Divide two numbers at the top of the stack\n\n**09 - shuffle |** Shuffle two elements from the stack, takes an argument as to what stack number should the first stack be shuffled with.\n\n**10 - GOTO |** Unconditional GOTO and it pops the line number of the stack.\n\n**11 - IFEQUAL |** Add either True or False on the stack depending on if first and second values on the stack are equal and pops conditions.\n\n**12 - modulus |** Modulus of first two values from stack and append the result onto it.\n\n**13 - INCrement |** Increment the last number from the stack.\n\n**14 - DECrement |** Decrement the last number from the stack.\n\n**15 - Exponent |** Exponent of first two values from stack and append the result onto it.   \n\n**16 - Store |** Store the first element from the stack in a heap of numbered name, numbered according to the given in the instruction.\n\n**17 - Retrive |** Retrive and append from the storage onto the stack.\n\n**18 - DELete |** Delete an item from storage.\n\n**19 - IFGREAT |** Adds either True or False on the stack depending on if first is greater than the and second value on the stack and pops conditions.\n\n**20 - IFNULL |** Adds either True or False on the stack depending on if the first value on the stack is null and pops conditions.\n\n**21 - IFPLUS |** Adds either True or False on the stack depending on if the first value on the stack is positive and pops conditions.\n\n**22 - IFMINUS |** Adds either True or False on the stack depending on if the first value on the stack is negative and pops conditions.\n\n**23 - IFUNEQUAL |** Adds either True or False on the stack depending on if first is unequal to the second value on the stack and pops conditions.\n\n**24 - IFEQUAL |** Adds either True or False on the stack depending on if first is equal to the second value on the stack and pops conditions. \n\n**25 - IFSMALL |** Adds either True or False on the stack depending on if first is unequal to the second value on the stack and pops conditions.\n\n**26 - GOTO_L |** GOTO without popping line number from stack.\n\n**27 - IFGREAT(0) |** Adds either True or False on the stack depending on if first is greater than the and second value on the stack.\n\n**28 - IFNULL(0) |** Adds either True or False on the stack depending on if the first value on the stack is null.\n\n**29 - IFPLUS(0) |** Adds either True or False on the stack depending on if the first value on the stack is positive.\n\n**30 - IFMINUS(0) |** Adds either True or False on the stack depending on if the first value on the stack is negative.\n\n**31 - IFUNEQUAL(0) |** Adds either True or False on the stack depending on if first is unequal to the second value on the stack.   \n\n**32 - IFEQUAL(0) |** Adds either True or False on the stack depending on if first is equal to the second value on the stack.\n\n**33 - IFSMALL(0) |** Adds either True or False on the stack depending on if first is unequal to the second value on the stack.\n\n**34 - SADD |** Concatenates first two elements of the stack and appends them.\n\n**35 - SCONV |** Converts the first element of the stack to a string.  \n\n**36 - POP_TOP |** Pops the first elememnts from the stack depending on the indx you provide.    \n\n**37 - GOTO_CONDITIONALLY |** Conditionally GOTO a line number depending on the first value on the stack and if it's True or False.\n\n**38 - GOTO_CONDITIONALLY_L |** Conditionally GOTO a line number depending on the first value on the stack and if it's True or False and don't pop conditions off the stack.\n\n**39 - LITERAL_PRINT |** Print stuff with literals. \n\n**40 - NOT |** Inverts the first condition on the stack.\n\n**41 - OR |** OR operation on the first condition on the stack. \n\n**42 - AND |** AND operation on the first condition on the stack.\n\n**43 - REGISTER |** Adds first element of the stack to this register with a string name.\n\n**44 - UNREGISTER |** Removes the given element from the register.\n\n**45 - GETREGISTER |** Add the given element from the register to the top of the stack.\n\n**46 - FLOATCONV |** Converts the first element of the stack to a float. \n\n**47 - INTCONV |** Converts the first element of the stack to a integer.  \n\n**48 - DUPLICATE |** Duplicate the first value of the stack.\n\n**49 - ARCREATE |** Creates an array with the array length on the top of the stack and append it onto the stack.\n\n**50 - ARCREATE(1) |** Creates an array with the array length on the top of the stack and append it onto the stack and removes those from the stack.\n\n**51 - MEMDUMP |** Print entire stack.\n\n**52 - ARDISASSEMBLE |** Disassemble the array on the top of the stack.      \n\n**53 - ARGET |** Get list's place from the top of the stack and them gets the reference from the stack. Either from the top or bottom depending on it's mode.\n\n**54 - ARSET |** Sets an array the same way it get's it. \n\n**55 - ARLEN |** Get the length of the array from the given index.\n\n**56 - ARAPPEND(0) |** Appends the memory on a certain index from top.\n\n**57 - ARAPPEND(1) |** Appends the memory on a certain index from bottom.   \n\n**58 - ARPOP(1) |** Pops array on a certain list's place counted from bottom.\n\n**59 - ARLEN(0) |** Length of an array from bottom.\n\n**60 - ARSET_TOP |** Set an array from top index.\n\n**61 - ARINSERT_TOP |** Insert into an array from top index.\n\n**62 - ARINSERT |** Insert into an array from bottom index.\n\n**63 - INPUT |** With this insruction you can input anything in a string form.\n\n**64 - PUSH_NONE |** With this insruction you can push none on to the stack.\n\n**65 - SHUFFLE(1) |** Shuffles the first item in the stack with another one given in the instruction itself, counted from bottom.\n\n**66 - ARPOP(0) |** Pops array on a certain list's place counted from top.\n\n**67 - ARPOP_TOP(1) |** Pops array's top index on a certain list's place counted from top.\n\n**68 - ARPOP_TOP(0) |** Pops array's top index on a certain list's place counted from bottom.\n\n**69 - PUSH_TRUE |** Pushes a true value onto the stack.\n\n**70 - PUSH_FALSE |** Pushes a false value onto the stack.\n\n**71 - XOR |** XOR gate that checks for first two value of the stack and pops them of it.\n\n**72 - ASSERT |** Assert statement that raises assertion error if condition on the top of the stack isn't true and proceeds if it is.\n\n**73 - NEGATE |** Negates the first value on the top of the stack.\n\n**74 - IFSAME |** Checks if two value on the top of the stack are the same value and pops them off the stack.\n\n**75 - IFSAME(0) |** Checks if two value on the top of the stack are the same value and doesn't pops them off the stack.\n\n**76 - Split |** Splits a string into an array by a seprator and pops it off the stack.\n\n**77 - Join |** Joins an array from a string by a seprator and pops it off the stack.\n\n**78 - StrINSERT |** Inserts into a string, specifically substitutes curly braces.\n\n**79 - RECORD |** Records current memory seprately.\n\n**80 - RECAP |** Sets currently recorded memory to current memory.\n\n**81 - FRAMDUMP |** Prints entire frame in which memories is recorded.\n\n**82 - RECORDHEAP |** Records current heap seprately, and choses it by an argument in which 0 means storage and 1 means register.\n\n**83 - RECAPHEAP |** Sets currently recorded heap to the current heap, and choses it by an argument in which 0 means storage and 1 means register.\n\n**84 - HEAPDUMP |** Prints entire frame in which heaps is recorded.\n\n**85 - PUSH_LAST |** Pushes the last heap frame's onto the memory.\n\nHey, btw, assembly for these instructions is already [avalible here](https://github.com/ameerwasi001/AVP-Assembler).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowaismohsin001%2Fameer-virtual-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fowaismohsin001%2Fameer-virtual-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowaismohsin001%2Fameer-virtual-processor/lists"}