var searchIndex = {}; searchIndex["reustmann"] = {"doc":"## Overview\nThe Reustmann machine is a tiny programming language and abstract processing\nengine designed for educational use for experimentation with automatic program generation.\nIt has the following properties:","items":[[3,"Program","reustmann","Give it to the Interpreter !",null,null],[3,"Interpreter","","The main interpreter, execute instructions, read from input,\nwrite to output",null,null],[3,"Statement","","Type used to return the opcode executed with its execution status",null,null],[12,"0","","",0,null],[12,"1","","",0,null],[3,"DebugInfos","","A Debug structure to help debugging :)",null,null],[12,"memory","","",1,null],[12,"pc","","",1,null],[12,"sp","","",1,null],[12,"nz","","",1,null],[11,"new","","Construct a new Program from a source.",2,{"inputs":[{"name":"read"},{"name":"bool"}],"output":{"name":"result"}}],[11,"memory","","Get the u8 representation of the source.",2,null],[11,"clone","","",0,null],[11,"fmt","","",0,null],[11,"fmt","","",1,null],[11,"new","","Construct a new Interpreter with an existing Program.",3,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"result"}}],[11,"copy_program","","Copy your program in the memory of the machine, a reset is done after\nprogram was loaded.",3,null],[11,"arch_length","","return the interpreter arch length",3,null],[11,"arch_width","","return the interpreter arch width",3,null],[11,"reset","","Reset `pc`, `sp` and `nz` to `0`, `0` and `false` respectively.",3,null],[11,"step","","Use [Empty](https://doc.rust-lang.org/std/io/struct.Empty.html) and/or\n[Sink](https://doc.rust-lang.org/std/io/struct.Sink.html)\nif you don't want to give input and/or output.",3,null],[11,"debug_infos","","Get a debug struct that can help for debugging programs",3,null],[0,"instruction","","## Instruction Set Summary\nThese are the opcodes of the Reustmann instruction set, shown with their\nsingle-character mnemonics and long mnemonics.",null,null],[4,"Instruction","reustmann::instruction","These are the opcodes of the Reustmann instruction set,\nshown with their single-character mnemonics and long mnemonics.",null,null],[13,"Nop","","No-operation, do-nothing",4,null],[13,"Reset","","Reset",4,null],[13,"Halt","","Halt program execution",4,null],[13,"In","","Input a char from stdin, push it onto the stack",4,null],[13,"Out","","Pop a word from the stack, output to stdout",4,null],[13,"Pop","","Pop a word from the stack",4,null],[13,"Dup","","Duplicate the last stacked value",4,null],[13,"PushPc","","Push the PC onto the stack",4,null],[13,"PopPc","","Pop the PC from the stack",4,null],[13,"PopSp","","Pop the SP from the stack",4,null],[13,"SpTgt","","Set the SP to the next TARGET opcode",4,null],[13,"PushNz","","Push the NZ flag",4,null],[13,"Swap","","Swap the top two items on the stack",4,null],[13,"Push0","","Push a zero onto the stack",4,null],[13,"Add","","Add the top two stacked words, push the result",4,null],[13,"Sub","","Subtract the top two stacked words and push the result",4,null],[13,"Inc","","Increment the item at the top of the stack",4,null],[13,"Dec","","Decrement the item on the top of the stack",4,null],[13,"Mul","","Multiply the top two stacked words and push the result",4,null],[13,"Div","","Pop two words, divide, push the quotient and remainder",4,null],[13,"Xor","","Bitwise XOR the top two stacked words and push the result",4,null],[13,"And","","Bitwise AND the top two stacked words and push the result",4,null],[13,"Or","","Bitwise OR the top two stacked words and push the result",4,null],[13,"Shl","","Logical shift left",4,null],[13,"Shr","","Logical shift right",4,null],[13,"Not","","Bitwise NOT",4,null],[13,"Bz","","Branch if zero (NZ flag is false)",4,null],[13,"Bnz","","Branch if nonzero (NZ flag is true)",4,null],[13,"Beq","","Compare top two stacked words, branch if equal",4,null],[13,"Bgt","","Compare top two stacked words, branch if greater than",4,null],[13,"Blt","","Compare top two stacked words, branch if less than",4,null],[13,"Bge","","Compare top two stacked words, branch if greater than or equal",4,null],[13,"Loop","","Repeat the following instructions up to the next ENDL",4,null],[13,"EndL","","End of LOOP",4,null],[13,"BraN","","Branch to the next TARGET opcode",4,null],[13,"BraP","","Branch to the previous TARGET opcode",4,null],[13,"Target","","Branch target for BRAN and BRAP",4,null],[13,"Skip1","","Skip one instruction",4,null],[13,"Skip2","","Skip two instructions",4,null],[13,"Skip3","","Skip three instructions",4,null],[13,"Skip4","","Skip four instructions",4,null],[13,"Skip5","","Skip five instructions",4,null],[13,"Skip6","","Skip five instructions",4,null],[13,"Skip7","","Skip five instructions",4,null],[13,"Skip8","","Skip five instructions",4,null],[13,"Skip9","","Skip five instructions",4,null],[5,"is_valid_op_code","","Check if a op_code is a direct command\nor will be interpreted as NOP",null,{"inputs":[{"name":"opcode"}],"output":{"name":"bool"}}],[5,"is_valid_mnemonic","","Check if a op_code is a direct command\nor will be interpreted as NOP",null,{"inputs":[{"name":"mnemonic"}],"output":{"name":"bool"}}],[0,"mnemonics","","",null,null],[6,"Mnemonic","reustmann::instruction::mnemonics","",null,null],[17,"NOP","","",null,null],[17,"RESET","","",null,null],[17,"HALT","","",null,null],[17,"IN","","",null,null],[17,"OUT","","",null,null],[17,"POP","","",null,null],[17,"DUP","","",null,null],[17,"PUSHPC","","",null,null],[17,"POPPC","","",null,null],[17,"POPSP","","",null,null],[17,"SPTGT","","",null,null],[17,"PUSHNZ","","",null,null],[17,"SWAP","","",null,null],[17,"PUSH0","","",null,null],[17,"ADD","","",null,null],[17,"SUB","","",null,null],[17,"INC","","",null,null],[17,"DEC","","",null,null],[17,"MUL","","",null,null],[17,"DIV","","",null,null],[17,"XOR","","",null,null],[17,"AND","","",null,null],[17,"OR","","",null,null],[17,"SHL","","",null,null],[17,"SHR","","",null,null],[17,"NOT","","",null,null],[17,"BZ","","",null,null],[17,"BNZ","","",null,null],[17,"BEQ","","",null,null],[17,"BGT","","",null,null],[17,"BLT","","",null,null],[17,"BGE","","",null,null],[17,"LOOP","","",null,null],[17,"ENDL","","",null,null],[17,"BRAN","","",null,null],[17,"BRAP","","",null,null],[17,"TARGET","","",null,null],[17,"SKIP1","","",null,null],[17,"SKIP2","","",null,null],[17,"SKIP3","","",null,null],[17,"SKIP4","","",null,null],[17,"SKIP5","","",null,null],[17,"SKIP6","","",null,null],[17,"SKIP7","","",null,null],[17,"SKIP8","","",null,null],[17,"SKIP9","","",null,null],[0,"long_mnemonics","reustmann::instruction","",null,null],[6,"LongMnemonic","reustmann::instruction::long_mnemonics","",null,null],[17,"NOP","","",null,null],[17,"RESET","","",null,null],[17,"HALT","","",null,null],[17,"IN","","",null,null],[17,"OUT","","",null,null],[17,"POP","","",null,null],[17,"DUP","","",null,null],[17,"PUSHPC","","",null,null],[17,"POPPC","","",null,null],[17,"POPSP","","",null,null],[17,"SPTGT","","",null,null],[17,"PUSHNZ","","",null,null],[17,"SWAP","","",null,null],[17,"PUSH0","","",null,null],[17,"ADD","","",null,null],[17,"SUB","","",null,null],[17,"INC","","",null,null],[17,"DEC","","",null,null],[17,"MUL","","",null,null],[17,"DIV","","",null,null],[17,"XOR","","",null,null],[17,"AND","","",null,null],[17,"OR","","",null,null],[17,"SHL","","",null,null],[17,"SHR","","",null,null],[17,"NOT","","",null,null],[17,"BZ","","",null,null],[17,"BNZ","","",null,null],[17,"BEQ","","",null,null],[17,"BGT","","",null,null],[17,"BLT","","",null,null],[17,"BGE","","",null,null],[17,"LOOP","","",null,null],[17,"ENDL","","",null,null],[17,"BRAN","","",null,null],[17,"BRAP","","",null,null],[17,"TARGET","","",null,null],[17,"SKIP1","","",null,null],[17,"SKIP2","","",null,null],[17,"SKIP3","","",null,null],[17,"SKIP4","","",null,null],[17,"SKIP5","","",null,null],[17,"SKIP6","","",null,null],[17,"SKIP7","","",null,null],[17,"SKIP8","","",null,null],[17,"SKIP9","","",null,null],[0,"op_codes","reustmann::instruction","",null,null],[6,"OpCode","reustmann::instruction::op_codes","",null,null],[17,"NOP","","",null,null],[17,"RESET","","",null,null],[17,"HALT","","",null,null],[17,"IN","","",null,null],[17,"OUT","","",null,null],[17,"POP","","",null,null],[17,"DUP","","",null,null],[17,"PUSHPC","","",null,null],[17,"POPPC","","",null,null],[17,"POPSP","","",null,null],[17,"SPTGT","","",null,null],[17,"PUSHNZ","","",null,null],[17,"SWAP","","",null,null],[17,"PUSH0","","",null,null],[17,"ADD","","",null,null],[17,"SUB","","",null,null],[17,"INC","","",null,null],[17,"DEC","","",null,null],[17,"MUL","","",null,null],[17,"DIV","","",null,null],[17,"XOR","","",null,null],[17,"AND","","",null,null],[17,"OR","","",null,null],[17,"SHL","","",null,null],[17,"SHR","","",null,null],[17,"NOT","","",null,null],[17,"BZ","","",null,null],[17,"BNZ","","",null,null],[17,"BEQ","","",null,null],[17,"BGT","","",null,null],[17,"BLT","","",null,null],[17,"BGE","","",null,null],[17,"LOOP","","",null,null],[17,"ENDL","","",null,null],[17,"BRAN","","",null,null],[17,"BRAP","","",null,null],[17,"TARGET","","",null,null],[17,"SKIP1","","",null,null],[17,"SKIP2","","",null,null],[17,"SKIP3","","",null,null],[17,"SKIP4","","",null,null],[17,"SKIP5","","",null,null],[17,"SKIP6","","",null,null],[17,"SKIP7","","",null,null],[17,"SKIP8","","",null,null],[17,"SKIP9","","",null,null],[11,"clone","reustmann::instruction","",4,null],[11,"fmt","","",4,null],[11,"from","","",4,{"inputs":[{"name":"mnemonic"}],"output":{"name":"self"}}],[11,"from","","",5,{"inputs":[{"name":"instruction"}],"output":{"name":"self"}}],[11,"from","","",4,{"inputs":[{"name":"opcode"}],"output":{"name":"self"}}],[11,"from","","",6,{"inputs":[{"name":"instruction"}],"output":{"name":"self"}}],[0,"memory","reustmann","",null,null],[3,"OpCodes","reustmann::memory","A struct that get all instruction in bytes (used in the Interpreter).",null,null],[12,"0","","",7,null],[3,"Mnemonics","","A struct containing all mnemonic names of each instruction.",null,null],[12,"0","","",8,null],[3,"LongMnemonics","","A struct containing all long names of each instruction.",null,null],[12,"0","","",9,null],[11,"clone","","",7,null],[11,"fmt","","",7,null],[11,"clone","","",8,null],[11,"fmt","","",8,null],[11,"clone","","",9,null],[11,"fmt","","",9,null],[11,"deref","","",7,null],[11,"deref","","",8,null],[11,"deref","","",9,null],[11,"from","","",7,{"inputs":[{"name":"mnemonics"}],"output":{"name":"self"}}],[11,"from","","",7,{"inputs":[{"name":"mnemonics"}],"output":{"name":"self"}}],[11,"from","","",8,{"inputs":[{"name":"opcodes"}],"output":{"name":"self"}}],[11,"from","","",8,{"inputs":[{"name":"opcodes"}],"output":{"name":"self"}}],[11,"from","","",9,{"inputs":[{"name":"opcodes"}],"output":{"name":"self"}}],[11,"from","","",9,{"inputs":[{"name":"opcodes"}],"output":{"name":"self"}}],[11,"from","","",9,{"inputs":[{"name":"mnemonics"}],"output":{"name":"self"}}],[11,"from","","",9,{"inputs":[{"name":"mnemonics"}],"output":{"name":"self"}}]],"paths":[[3,"Statement"],[3,"DebugInfos"],[3,"Program"],[3,"Interpreter"],[4,"Instruction"],[6,"Mnemonic"],[6,"OpCode"],[3,"OpCodes"],[3,"Mnemonics"],[3,"LongMnemonics"]]}; initSearch(searchIndex);