Guest User

JASMtable

a guest
Nov 11th, 2018
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. Commands: (Program_Counter starts at 200)
  2. NON - Tells the CPU to not use New Lines on print functions
  3. CHC - Tells the CPU to do a Checksum function, sets Register_A to 1 if the checksum passes
  4. 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.
  5. SKP - Skips over next instruction.
  6. A,[value] - Sets Register_A to [value]
  7. B,[value] - Sets Register_B to [value]
  8. T,[value] - Sets Register_Temp to [value]
  9. 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.
  10. LIN - Tells the CPU to use New Lines on print functions
  11. CHK,[checksum] - Tells the compiler that the predefined checksum is the value next to it.
  12. END - Tells the CPU to stop executing code.
  13. ; - Comment (there is an error where it treats the Comment as character 0000, so dont use this only at the end of a file.)
  14. FJT - Tells the CPU to Jump from Register_Temp.
  15. J,[value] - Jumps to [value]. (basically sets Program_Counter to [value])
  16. Assembled CPU functions: (for those who want to make your own JASM compiler, these are all also in Hex)
  17. 0000 - Nothing
  18. 00EA - Skips over next instruction
  19. 0100 - Shift Register_A to Register_B
  20. 0200 - Shift Register_B to Register_A
  21. 0300 - Shift Register_Temp to Register_A
  22. 0400 - Shift Register_A to Register_Temp
  23. 00EB - Do an IF statement (RGAB type IF statement)
  24. 00EC - Do what CHC does
  25. 00ED - Enable Newlines on Print function
  26. 00EE - Disable newlines on Print function
  27. 00EF - Does what FJT does
  28. 1nnn - Sets Register_A to nnn
  29. 2nnn - Sets Register_B to nnn
  30. 3nnn - Sets Register_Temp to nnn
  31. 400n - Base print class
  32. 4001: Print from Register_A
  33. 4002: Print from Register_B
  34. 4003: Print from Register_Temp
  35. 4004: Print a Newline
  36. Default: Print from Register_A
  37. 5nnn - Jump to NNN (sets Program_Counter to NNN)
  38. 600n - Does math function (Register A Math Function Register B = Register Temp
  39. 0001 - Add
  40. 0002 - Subtract
  41. 0003 - Divide
  42. 0004 - Multiply
  43. 0005 - Modulo
  44. Default - Add
  45. 7nnn - Delays for nnn
  46. 8nnn - Byte writes Register_Temp to address NNN
  47. 9000 - Incomplete
  48. Annn - Byte reads Register_Temp from address NNN
  49. F000 - End program
Advertisement
Add Comment
Please, Sign In to add comment