Advertisement
opsftw

PASM DOCS

Apr 3rd, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.64 KB | None | 0 0
  1. +------------------+
  2. |PASM DOCUMENTATION|
  3. +------------------+
  4.  
  5. $ # <Some text>
  6. A coment, this line is skipped and not interpretted
  7.  
  8. $ FUNC <name> <args> ... ENDF
  9. A user defined function. in the function call the arg by putting its name not in quotes. Only supports 1 custom argument.
  10.  
  11. $ UF <name>
  12. Call a user defined function
  13.  
  14. $ PUSH <value or register name>
  15. Push a given value or a registers value onto the stack
  16.  
  17. $ POP <register name>
  18. pop a value off the top of the stack into a given register
  19.  
  20. $ MOV <value or register name> <register name>
  21. Move the value of the first argument into the register of the second argument
  22.  
  23. $ JE <value or register name> <value or register name> <Line Number>
  24. If the valuse from the 2 arguments are equal then the IP (Instruction Pointer) jumps to the specified line number
  25.  
  26. $ JN <value or register name> <value or register name> <Line Number>
  27. If the valuse from the 2 arguments are not equal then the IP (Instruction Pointer) jumps to the specified line number
  28.  
  29. $ JGT <value or register name> <value or register name> <Line Number>
  30. If the value from the 1st argument is greater-than that of the 2nd then the IP (Instruction Pointer) jumps to the specified line number
  31.  
  32. $ JLT <value or register name> <value or register name> <Line Number>
  33. If the value from the 1st argument is less-than that of the 2nd then the IP (Instruction Pointer) jumps to the specified line number
  34.  
  35. $ INT <interupt code>
  36. Execute the function of the given interupt code (Codes are documented in the source)
  37.  
  38.  
  39. # Print a string
  40. FUNC PS str
  41.     PUSH A
  42.     MOV A str
  43.     INT 80
  44.     POP A
  45. ENDF
  46.  
  47. # Prints out 'Hello world!'
  48. PS 'Hello world!'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement