No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

instructions.h 669B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef __INSTRUCTIONS_H__
  2. #define __INSTRUCTIONS_H__
  3. #define ADD 1
  4. #define MUL 2
  5. #define SOU 3
  6. #define DIV 4
  7. #define COP 5
  8. #define AFC 6
  9. #define JMP 7
  10. #define JMF 8
  11. #define LT 9
  12. #define GT 10
  13. #define EQ 11
  14. #define PRI 12
  15. #define LTE 13
  16. #define GTE 14
  17. #define NEQ 15
  18. #define AND 16
  19. #define OR 17
  20. #define NOT 18
  21. #define LEA 19
  22. #define COP_LD 20
  23. #define COP_STR 21
  24. #define CALL 22
  25. #define RET 23
  26. #define MAX_INSTRUCTIONS_SIZE 256
  27. #define MAX_MEMORY_SIZE 256
  28. void asm_init();
  29. void asm_add_3(char ins, int arg1, int arg2, int arg3);
  30. void asm_add_2(char ins, int arg1, int arg2);
  31. void asm_add_1(char ins, int arg1);
  32. void asm_run();
  33. #endif // #ifndef __INSTRUCTIONS_H__