Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Commands: (Program_Counter starts at 200)
- NON - Tells the CPU to not use New Lines on print functions
- CHC - Tells the CPU to do a Checksum function, sets Register_A to 1 if the checksum passes
- RGAB - Compares Register B and Register A, if Register A = Register B then do next instruction otherwise do second instruction from the RGAB instruction. Use this in conjunction with CHC to create a Checksum verify technique.
- SKP - Skips over next instruction.
- A,[value] - Sets Register_A to [value]
- B,[value] - Sets Register_B to [value]
- T,[value] - Sets Register_Temp to [value]
- P,[value] - If [value] is 1 then it prints ASCII from Register A, if [value] is 2 it prints ASCII from Register B, if [value] is 3 then it prints ASCII from Register Temp, if [value] is 4 then it prints a new line.
- LIN - Tells the CPU to use New Lines on print functions
- CHK,[checksum] - Tells the compiler that the predefined checksum is the value next to it.
- END - Tells the CPU to stop executing code.
- ; - Comment (there is an error where it treats the Comment as character 0000, so dont use this only at the end of a file.)
- FJT - Tells the CPU to Jump from Register_Temp.
- J,[value] - Jumps to [value]. (basically sets Program_Counter to [value])
- Assembled CPU functions: (for those who want to make your own JASM compiler, these are all also in Hex)
- 0000 - Nothing
- 00EA - Skips over next instruction
- 0100 - Shift Register_A to Register_B
- 0200 - Shift Register_B to Register_A
- 0300 - Shift Register_Temp to Register_A
- 0400 - Shift Register_A to Register_Temp
- 00EB - Do an IF statement (RGAB type IF statement)
- 00EC - Do what CHC does
- 00ED - Enable Newlines on Print function
- 00EE - Disable newlines on Print function
- 00EF - Does what FJT does
- 1nnn - Sets Register_A to nnn
- 2nnn - Sets Register_B to nnn
- 3nnn - Sets Register_Temp to nnn
- 400n - Base print class
- 4001: Print from Register_A
- 4002: Print from Register_B
- 4003: Print from Register_Temp
- 4004: Print a Newline
- Default: Print from Register_A
- 5nnn - Jump to NNN (sets Program_Counter to NNN)
- 600n - Does math function (Register A Math Function Register B = Register Temp
- 0001 - Add
- 0002 - Subtract
- 0003 - Divide
- 0004 - Multiply
- 0005 - Modulo
- Default - Add
- 7nnn - Delays for nnn
- 8nnn - Byte writes Register_Temp to address NNN
- 9000 - Incomplete
- Annn - Byte reads Register_Temp from address NNN
- F000 - End program
Advertisement
Add Comment
Please, Sign In to add comment