codifica_istruzioni.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #include "elea_tipi.h"
  2. /*
  3. * Istruzioni memoria-accumulatore
  4. */
  5. #define OP_DA CAR_A /* Dispone Accumulatore */
  6. #define OP_MA CAR_F /* Trasferisce da memoria ad accumulatore */
  7. #define OP_AM CAR_G /* Trasferisce da accumulatore a memoria (senza azzeramento) */
  8. #define OP_AoM CAR_B /* Trasferisce da accumulatore a memoria con azzeramento */
  9. #define OP_PIU_MA CAR_C /* Somma memoria ad accumulatore, risultato in accumulatore */
  10. #define OP_PIU_AM CAR_GAMMA /* Somma accumulatore e memoria, risultato in memoria */
  11. #define OP_MENO_MA CAR_H /* Sottrae memoria da accumulatore, risultato in accumulatore */
  12. #define OP_CMA CAR_E /* Confronta memoria con accumulatore */
  13. #define OP_FAM CAR_DELTA /* Fine accumulatore in memoria */
  14. /*
  15. * Istruzioni memoria-memoria
  16. */
  17. #define OP_PUM CAR_DIVISO /* Prepara uscita memoria */
  18. #define OP_MEM CAR_UNO /* Trasferisce da memoria a memoria */
  19. #define OP_PIU_MM CAR_TRE /* Somma memoria a memoria */
  20. #define OP_MENO_MM CAR_OTTO /* Sottrae memoria da memoria */
  21. #define OP_CMM CAR_BARRA /* Confronta memoria con memoria */
  22. /*
  23. * Istruzioni memoria-registri
  24. */
  25. #define OP_MT CAR_X /* Trasferisce da memoria a registro T */
  26. #define OP_TM CAR_Y /* Trasferisce da registro T a memoria */
  27. #define OP_ToM CAR_T /* Trasferisce da registro T a memoria con azzeramento */
  28. #define OP_PIU_MT CAR_U /* Somma memoria a registro T, risultato in registro */
  29. #define OP_PIU_TM CAR_MOLTIPLICATO_PER /* Somma registro a memoria, risultato in memoria */
  30. #define OP_MENO_MT CAR_Z /* Sottrae memoria da registro T, risultato in registro */
  31. #define OP_CMT CAR_W /* Confronta memoria con registro */
  32. #define OP_FTM CAR_TETA /* Fine registro T in memoria */
  33. /*
  34. * Istruzioni costanti-registri
  35. */
  36. #define OP_CT CAR_NOVE /* Trasferisce una costante in registro T */
  37. #define OP_PIU_CT CAR_PIU /* Somma costante a registro T */
  38. #define OP_MENO_CT CAR_QUATTRO /* Sottrae costante da registro T */
  39. #define OP_CCT CAR_DIESIS /* Confronta costante con registro T */
  40. /*
  41. * Istruzioni per la moltiplicazione
  42. */
  43. #define OP_Y CAR_6 /* Trasferisce il moltiplicatore nel registro T */
  44. #define OP_PIU_X CAR_UGUALE /* Moltiplicazione additiva */
  45. #define OP_MENO_X CAR_VIRGOLA /* Moltiplicazione sottrattiva */
  46. /*
  47. * Istruzioni per la ricerca in memoria
  48. */
  49. #define OP_RIa CAR_DUE /* Ricerca Avanti */
  50. #define OP_RIi CAR_SETTE /* Ricerca Indietro */
  51. /*
  52. * Istruzioni logiche
  53. */
  54. #define OP_XLD CAR_ESCLAMATIVO /* Moltiplicazione logica diretta (AND) */
  55. #define OP_XLN CAR_E_COMMERCIALE /* Moltiplicazione logica negata (NAND) */
  56. #define OP_PIU_LD CAR_V /* Somma logica (OR) */
  57. /*
  58. * Istruzioni relative al tavolo di comando
  59. */
  60. #define OP_CM CAR_PERCENTO /* Da tavolo/telescrivente/fotolettore a memoria */
  61. #define OP_MS CAR_PHI /* Da memoria a telescrivente */
  62. /*
  63. * Istruzioni di salto *TODO: sottocodici*
  64. */
  65. #define OP_SALTO CAR_ZERO