组成原理第三章作业答案.ppt
FT0FT0:M IRM IRPC+1 PCPC+1 PCCPPCCPPCEMAREMARPC APC A A+1A+1R R SIRSIRDMDM1 ET1 ETCPFT(P)CPFT(P)CPET(P)CPET(P)CPT(P)CPT(P)1717)JMP R0 JMP R0;ET0ET0:R0 PC,MARR0 PC,MARDMDM CPPCCPPC输出输出A AR0 AR0 ACFT(P)CFT(P)CPST(P)CPST(P)CPDT(P)CPDT(P)CPMARCPMAR 1 FT1 FTCPFT(P)CPFT(P)CPST(P)CPST(P)CPDT(P)CPDT(P)CPET(P)CPET(P)1818)JMP X(PC)JMP X(PC);ET0ET0:PC MARPC MARM MDR CM MDR CET1ET1:DMDM CPMARCPMAR输出输出A APC APC AT+1T+1CPT(P)CPT(P)EMAREMAR R RSMDRSMDR MDR BMDR B输出输出B BDMDM CPCCPC T+1T+1 CPT(P)CPT(P)FT0FT0:M IRM IRPC+1 PCPC+1 PCCPPCCPPCEMAREMARPC APC A A+1A+1R R SIRSIRDMDM1 ET1 ETCPFT(P)CPFT(P)CPET(P)CPET(P)CFT(P)CFT(P)CPST(P)CPST(P)CPDT(P)CPDT(P)PC+C PC,MARPC+C PC,MARET2ET2:PC APC ADMDM CPPCCPPCCPMARCPMARA+BA+BC BC B1 1 F FT TCPPT(P)CPPT(P)CPET(P)CPET(P)CPT(P)CPT(P)CPST(P)CPST(P)CPDT(P)CPDT(P)1818)JMP X(PC)JMP X(PC);1919)RST(SP)+RST(SP)+;FT0FT0:M IRM IRPC+1 PCPC+1 PCCPPCCPPCEMAREMARPC APC AA+1A+1R R SIRSIRDMDM1 1 E ET TSP MARSP MARET0ET0:DMDMCPMARCPMAR输出输出A ASP ASP AT+1T+1CPT(P)CPT(P)CPPT(P)CPPT(P)CPET(P)CPET(P)CPT(P)CPT(P)CPST(P)CPST(P)CPDT(P)CPDT(P)T+1T+1ET1ET1:SP+1 SPSP+1 SPSP ASP AA+1A+1DMDMCPSPCPSPCPT(P)CPT(P)M MDR PC,MARM MDR PC,MARET2ET2:EMAREMAR R R SMDRSMDR MDR BMDR B输出输出B BDMDMCPPCCPPC1919)RST(SP)+RST(SP)+;CPMARCPMAR1 FT1 FTCPFT(P)CPFT(P)CPET(P)CPET(P)CPT(P)CPT(P)CPST(P)CPST(P)CPDT(P)CPDT(P)4 4)SUB(R1)+,(R2)SUB(R1)+,(R2);00-01-02-0C-4C-4E-4F-0D-60-6500-01-02-0C-4C-4E-4F-0D-60-65-66-0E-0F-14-15-07-08-09-00-66-0E-0F-14-15-07-08-09-00000001010202FT0FT0:M IRM IRPC+1 PCPC+1 PCR2 MARR2 MARST0ST0:ST1ST1:M MDR CM MDR C0C0C4C4C4E4E4F4F0D0D60606565取指取指双操作数指令入口双操作数指令入口取源操作数入口取源操作数入口进入寄存器间址进入寄存器间址返回转目的地址入口返回转目的地址入口取目的地址入口取目的地址入口进入自增型寄存器间址进入自增型寄存器间址DT0DT0:R1 MARR1 MAR4 4)SUB(R1)+,(R2)SUB(R1)+,(R2);00-01-02-0C-4C-4E-4F-0D-60-6500-01-02-0C-4C-4E-4F-0D-60-65-66-0E-0F-14-15-07-08-09-00-66-0E-0F-14-15-07-08-09-0066660E0E0F0FDT1DT1:R1+1 R1R1+1 R1C-D MDRC-D MDRET0ET0:ET1ET1:MDR MMDR M141415150707080809090000返回返回减法操作减法操作转取指入口转取指入口ET2ET2:PC MARPC MARDT2DT2:M MDR DM MDR D取指取指5 5)NEG-(R2)NEG-(R2);00-01-02-24-60-63-64-62-00-01-02-24-60-63-64-62-25-26-2B-2C-07-08-09-0025-26-2B-2C-07-08-09-00000001010202FT0FT0:M IRM IRPC+1 PCPC+1 PCR2-1 R2R2-1 R2DT0DT0:24246060636364646262取指取指单操作数指令入口单操作数指令入口取目的地址入口取目的地址入口DT1DT1:R2 MARR2 MAR进入自减型寄存器间址进入自减型寄存器间址5 5)NEG-(R2)NEG-(R2);00-01-02-24-60-63-64-62-00-01-02-24-60-63-64-62-25-26-2B-2C-07-08-09-0025-26-2B-2C-07-08-09-00252526262B2BDT2DT2:M MDR DM MDR DD+1 MDRD+1 MDRET0ET0:2C2C0707080809090000ET1ET1:MDR MMDR MET2ET2:PC MARPC MAR求补操作求补操作转取指入口转取指入口取指取指返回返回