home *** CD-ROM | disk | FTP | other *** search
- (* ----------------------------------------------------------------------- *)
- (* DCTRAN.PAS *)
- (* hier werden die Ablauefe auf dem Bildschirm sichtbar gemacht *)
- (* ----------------------------------------------------------------------- *)
- PROCEDURE Read_Cycle; (* der Lese-Zyklus *)
- BEGIN
- Print_Cycle('MEMORY -> DR'); Gate(rd,43,9,TRUE); Display_DR;
- Wait; Gate(sp2,43,9,FALSE);
- END;
-
- PROCEDURE Write_Cycle; (* der Schreib-Zyklus *)
- BEGIN
- Print_Cycle('DR -> MEMORY'); Gate(wr,43,9,TRUE);
- Print_Cell(address); Wait; Gate(sp2,43,9,FALSE);
- END;
-
- PROCEDURE Inc_PC; (* Programmzaehler erhoehen *)
- BEGIN
- Print_Cycle('PC+1 -> PC'); Gate(ipc,15,4,TRUE); Display_PC;
- Wait; Gate(sp2,15,4,FALSE);
- END;
-
- PROCEDURE Transfer_IA_AR; (* Interrupt-Adresse in's Adress-Register *)
- BEGIN
- Print_Cycle('IA -> AR'); Gate(bar,41,2,TRUE); Gate(d_arrow,51,2,TRUE);
- Display_AR; Wait; Gate(sl,41,2,FALSE); Gate(sl,51,2,FALSE);
- END;
-
- PROCEDURE Transfer_IA_PC; (* Interrupt-Adresse in den Programmzaehler *)
- BEGIN
- Print_Cycle('IA -> PC'); Gate(bar,41,2,TRUE); Gate(d_arrow,11,2,TRUE);
- Display_PC; Wait; Gate(sl,41,2,FALSE); Gate(sl,11,2,FALSE);
- END;
-
- PROCEDURE Transfer_PC_AR; (* Programmzaehler in's Adress-Register *)
- BEGIN
- Print_Cycle('PC -> AR'); Gate(bar,11,2,TRUE); Gate(d_arrow,51,2,TRUE);
- Display_AR; Wait; Gate(sl,11,2,FALSE); Gate(sl,51,2,FALSE);
- END;
-
- PROCEDURE Transfer_DR_IR; (* Daten-Register in's Befehlsregister *)
- BEGIN
- Print_Cycle('DR -> IR'); Gate(bar,49,15,TRUE); Gate(u_arrow,8,15,TRUE);
- Display_IR; Wait; Gate(sl,49,15,FALSE); Gate(sl,8,15,FALSE);
- END;
-
- PROCEDURE Transfer_AC_DR; (* Akku in's Datenregister *)
- BEGIN
- Print_Cycle('AC -> DR'); Gate(bar,19,15,TRUE); Gate(u_arrow,49,15,TRUE);
- Display_DR; Wait; Gate(sl,19,15,FALSE); Gate(sl,49,15,FALSE);
- END;
-
- PROCEDURE Transfer_AD_PC; (* Adressteil des Befehls in den Programmzaehler *)
- BEGIN
- Print_Cycle('XXX -> PC'); Gate(bar,17,2,TRUE); Gate(d_arrow,11,2,TRUE);
- Display_PC; Wait; Gate(sl,17,2,FALSE); Gate(sl,11,2,FALSE);
- END;
-
- PROCEDURE Transfer_AD_AR; (* Adressteil des Befehls in's Adress-Register *)
- BEGIN
- Print_Cycle('XXX -> AR'); Gate(bar,17,2,TRUE); Gate(d_arrow,51,2,TRUE);
- Display_AR; Wait; Gate(sl,17,2,FALSE); Gate(sl,51,2,FALSE);
- END;
-
- PROCEDURE Transfer_DR_ALU; (* Daten-Register ueber die ALU in den Akku *)
- BEGIN
- Print_Cycle('DR -> AC'); Gate(bar,49,15,TRUE); Gate(bar,32,15,TRUE);
- Gate(u_arrow,28,6,TRUE); Display_AC; Wait;
- Gate(sl,49,15,FALSE); Gate(sl,32,15,FALSE); Gate(sl,28,6,FALSE);
- END;
-
- PROCEDURE Transfer_DR_PC; (* Daten-Register in den Programmzaehler *)
- BEGIN
- Print_Cycle('DR -> PC'); Gate(bar,49,15,TRUE); Gate(bar,56,2,TRUE);
- Gate(d_arrow,11,2,TRUE); Display_PC; Wait;
- Gate(sl,49,15,FALSE); Gate(sl,56,2,FALSE); Gate(sl,11,2,FALSE);
- END;
-
- PROCEDURE Transfer_PC_DR; (* Programmzaehler in's Daten-Register *)
- BEGIN
- Print_Cycle('PC -> DR'); Gate(bar,11,2,TRUE); Gate(bar,56,2,TRUE);
- Gate(u_arrow,49,15,TRUE); Display_DR; Wait;
- Gate(sl,11,2,FALSE); Gate(sl,56,2,FALSE); Gate(sl,49,15,FALSE);
- END;
-
- PROCEDURE Transfer_SP_AR; (* Stackpointer in's Adress-Register *)
- BEGIN
- Print_Cycle('SP -> AR'); Gate(bar,4,2,TRUE); Gate(d_arrow,51,2,TRUE);
- Display_AR; Wait; Gate(sl,4,2,FALSE); Gate(sl,51,2,FALSE);
- END;
-
- PROCEDURE Inc_SP; (* Stackpointer erhoehen *)
- BEGIN
- Print_Cycle('SP+1 -> SP'); Gate(ipc,11,7,TRUE); Display_SP;
- Wait; Gate(sp2,11,7,FALSE);
- END;
-
- PROCEDURE Dec_SP;
- BEGIN
- Print_Cycle('SP-1 -> SP'); Gate(dpc,11,7,TRUE); Display_SP;
- Wait; Gate(sp2,11,7,FALSE);
- END;
- (* ----------------------------------------------------------------------- *)
- (* DCTRAN.PAS *)
-