home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1987 / 12 / dc / dctran.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1987-09-21  |  4.2 KB  |  105 lines

  1. (* ----------------------------------------------------------------------- *)
  2. (*                                 DCTRAN.PAS                              *)
  3. (*      hier werden die Ablauefe auf dem Bildschirm sichtbar gemacht       *)
  4. (* ----------------------------------------------------------------------- *)
  5. PROCEDURE Read_Cycle;                                   (* der Lese-Zyklus *)
  6. BEGIN
  7.   Print_Cycle('MEMORY -> DR');  Gate(rd,43,9,TRUE);    Display_DR;
  8.   Wait;                         Gate(sp2,43,9,FALSE);
  9. END;
  10.  
  11. PROCEDURE Write_Cycle;                               (* der Schreib-Zyklus *)
  12. BEGIN
  13.   Print_Cycle('DR -> MEMORY');         Gate(wr,43,9,TRUE);
  14.   Print_Cell(address);          Wait;  Gate(sp2,43,9,FALSE);
  15. END;
  16.  
  17. PROCEDURE Inc_PC;                              (* Programmzaehler erhoehen *)
  18. BEGIN
  19.   Print_Cycle('PC+1 -> PC');  Gate(ipc,15,4,TRUE);  Display_PC;
  20.   Wait;                       Gate(sp2,15,4,FALSE);
  21. END;
  22.  
  23. PROCEDURE Transfer_IA_AR;        (* Interrupt-Adresse in's Adress-Register *)
  24. BEGIN
  25.   Print_Cycle('IA -> AR');  Gate(bar,41,2,TRUE);  Gate(d_arrow,51,2,TRUE);
  26.   Display_AR;  Wait;        Gate(sl,41,2,FALSE);  Gate(sl,51,2,FALSE);
  27. END;
  28.  
  29. PROCEDURE Transfer_IA_PC;      (* Interrupt-Adresse in den Programmzaehler *)
  30. BEGIN
  31.   Print_Cycle('IA -> PC');  Gate(bar,41,2,TRUE);  Gate(d_arrow,11,2,TRUE);
  32.   Display_PC;  Wait;        Gate(sl,41,2,FALSE);  Gate(sl,11,2,FALSE);
  33. END;
  34.  
  35. PROCEDURE Transfer_PC_AR;          (* Programmzaehler in's Adress-Register *)
  36. BEGIN
  37.   Print_Cycle('PC -> AR');  Gate(bar,11,2,TRUE);  Gate(d_arrow,51,2,TRUE);
  38.   Display_AR;  Wait;        Gate(sl,11,2,FALSE);  Gate(sl,51,2,FALSE);
  39. END;
  40.  
  41. PROCEDURE Transfer_DR_IR;           (* Daten-Register in's Befehlsregister *)
  42. BEGIN
  43.   Print_Cycle('DR -> IR');  Gate(bar,49,15,TRUE);  Gate(u_arrow,8,15,TRUE);
  44.   Display_IR;  Wait;        Gate(sl,49,15,FALSE);  Gate(sl,8,15,FALSE);
  45. END;
  46.  
  47. PROCEDURE Transfer_AC_DR;                       (* Akku in's Datenregister *)
  48. BEGIN
  49.   Print_Cycle('AC -> DR');  Gate(bar,19,15,TRUE);  Gate(u_arrow,49,15,TRUE);
  50.   Display_DR;  Wait;        Gate(sl,19,15,FALSE);  Gate(sl,49,15,FALSE);
  51. END;
  52.  
  53. PROCEDURE Transfer_AD_PC; (* Adressteil des Befehls in den Programmzaehler *)
  54. BEGIN
  55.   Print_Cycle('XXX -> PC'); Gate(bar,17,2,TRUE);   Gate(d_arrow,11,2,TRUE);
  56.   Display_PC;  Wait;        Gate(sl,17,2,FALSE);   Gate(sl,11,2,FALSE);
  57. END;
  58.  
  59. PROCEDURE Transfer_AD_AR;   (* Adressteil des Befehls in's Adress-Register *)
  60. BEGIN
  61.   Print_Cycle('XXX -> AR'); Gate(bar,17,2,TRUE);   Gate(d_arrow,51,2,TRUE);
  62.   Display_AR;  Wait;        Gate(sl,17,2,FALSE);   Gate(sl,51,2,FALSE);
  63. END;
  64.  
  65. PROCEDURE Transfer_DR_ALU;     (* Daten-Register ueber die ALU in den Akku *)
  66. BEGIN
  67.   Print_Cycle('DR -> AC');  Gate(bar,49,15,TRUE);  Gate(bar,32,15,TRUE);
  68.   Gate(u_arrow,28,6,TRUE);  Display_AC;            Wait;
  69.   Gate(sl,49,15,FALSE);     Gate(sl,32,15,FALSE);  Gate(sl,28,6,FALSE);
  70. END;
  71.  
  72. PROCEDURE Transfer_DR_PC;         (* Daten-Register in den Programmzaehler *)
  73. BEGIN
  74.   Print_Cycle('DR -> PC');  Gate(bar,49,15,TRUE);  Gate(bar,56,2,TRUE);
  75.   Gate(d_arrow,11,2,TRUE);  Display_PC;            Wait;
  76.   Gate(sl,49,15,FALSE);     Gate(sl,56,2,FALSE);   Gate(sl,11,2,FALSE);
  77. END;
  78.  
  79. PROCEDURE Transfer_PC_DR;           (* Programmzaehler in's Daten-Register *)
  80. BEGIN
  81.   Print_Cycle('PC -> DR');  Gate(bar,11,2,TRUE);   Gate(bar,56,2,TRUE);
  82.   Gate(u_arrow,49,15,TRUE); Display_DR;            Wait;
  83.   Gate(sl,11,2,FALSE);      Gate(sl,56,2,FALSE);   Gate(sl,49,15,FALSE);
  84. END;
  85.  
  86. PROCEDURE Transfer_SP_AR;             (* Stackpointer in's Adress-Register *)
  87. BEGIN
  88.   Print_Cycle('SP -> AR');  Gate(bar,4,2,TRUE);    Gate(d_arrow,51,2,TRUE);
  89.   Display_AR;  Wait;        Gate(sl,4,2,FALSE);    Gate(sl,51,2,FALSE);
  90. END;
  91.  
  92. PROCEDURE Inc_SP;                                 (* Stackpointer erhoehen *)
  93. BEGIN
  94.   Print_Cycle('SP+1 -> SP');  Gate(ipc,11,7,TRUE);   Display_SP;
  95.   Wait;                       Gate(sp2,11,7,FALSE);
  96. END;
  97.  
  98. PROCEDURE Dec_SP;
  99. BEGIN
  100.   Print_Cycle('SP-1 -> SP');  Gate(dpc,11,7,TRUE);   Display_SP;
  101.   Wait;                       Gate(sp2,11,7,FALSE);
  102. END;
  103. (* ----------------------------------------------------------------------- *)
  104. (*                                 DCTRAN.PAS                              *)
  105.