From 3c6f886d5a8bfd36c796b963d6e3178ad9577742 Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 13 May 2009 16:55:17 +0200 Subject: * added documentation (no more TODOs) * added testsuite + testcase * used copyctor instead of assign operator more often --- ue3/mycpu/instructions.h | 57 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 15 deletions(-) (limited to 'ue3/mycpu/instructions.h') diff --git a/ue3/mycpu/instructions.h b/ue3/mycpu/instructions.h index 0e4d99c..a52b991 100644 --- a/ue3/mycpu/instructions.h +++ b/ue3/mycpu/instructions.h @@ -1,7 +1,7 @@ /** * @module instructions * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348) - * @brief TODO + * @brief Implementations of CInstruction * @date 10.05.2009 */ @@ -14,7 +14,9 @@ /** * @class CInstructionInc * - * TODO + * Implementation of assembler command "inc" + * Syntax: inc R1 + * (R1++) */ class CInstructionInc : public CInstruction @@ -41,7 +43,9 @@ class CInstructionInc /** * @class CInstructionDec * - * TODO + * Implementation of assembler command "dec" + * Syntax: dec R1 + * (R1--) */ class CInstructionDec : public CInstruction @@ -68,7 +72,9 @@ class CInstructionDec /** * @class CInstructionAdd * - * TODO + * Implementation of assembler command "add" + * Syntax: add R1, R2, R3 + * (R1 = R2 + R3) */ class CInstructionAdd : public CInstruction @@ -97,7 +103,9 @@ class CInstructionAdd /** * @class CInstructionSub * - * TODO + * Implementation of assembler command "sub" + * Syntax: sub R1, R2, R3 + * (R1 = R2 - R3) */ class CInstructionSub : public CInstruction @@ -126,7 +134,9 @@ class CInstructionSub /** * @class CInstructionMul * - * TODO + * Implementation of assembler command "mul" + * Syntax: mul R1, R2, R3 + * (R1 = R2 * R3) */ class CInstructionMul : public CInstruction @@ -155,7 +165,9 @@ class CInstructionMul /** * @class CInstructionDiv * - * TODO + * Implementation of assembler command "div" + * Syntax: div R1, R2, R3 + * (R1 = R2 / R3) */ class CInstructionDiv : public CInstruction @@ -184,7 +196,9 @@ class CInstructionDiv /** * @class CInstructionLoad * - * TODO + * Implementation of assembler command "load" + * Syntax: load R1, R2 + * (R1 = memory[R2]) */ class CInstructionLoad : public CInstruction @@ -212,7 +226,9 @@ class CInstructionLoad /** * @class CInstructionStore * - * TODO + * Implementation of assembler command "store" + * Syntax: store R1, R2 + * (memory[R2] = R1) */ class CInstructionStore : public CInstruction @@ -240,7 +256,9 @@ class CInstructionStore /** * @class CInstructionTest * - * TODO + * Implementation of assembler command "test" + * Syntax: test R1 + * (R1 == 0: zeroflag: true, R1 < 0: signflag: true) */ class CInstructionTest : public CInstruction @@ -267,7 +285,8 @@ class CInstructionTest /** * @class CInstructionLabel * - * TODO + * Implementation of assembler command "label" + * Syntax: label name: */ class CInstructionLabel : public CInstruction @@ -294,7 +313,9 @@ class CInstructionLabel /** * @class CInstructionJumpA * - * TODO + * Implementation of assembler command "jumpa" + * Syntax: jumpa labelname + * (jump to labelname) */ class CInstructionJumpA : public CInstruction @@ -321,7 +342,9 @@ class CInstructionJumpA /** * @class CInstructionJumpZ * - * TODO + * Implementation of assembler command "jumpz" + * Syntax: jumpz labelname + * (jump to labelname if zeroflag) */ class CInstructionJumpZ : public CInstruction @@ -348,7 +371,9 @@ class CInstructionJumpZ /** * @class CInstructionJumpS * - * TODO + * Implementation of assembler command "jumps" + * Syntax: jumps labelname + * (jump to labelname if signflag) */ class CInstructionJumpS : public CInstruction @@ -375,7 +400,9 @@ class CInstructionJumpS /** * @class CInstructionWrite * - * TODO + * Implementation of assembler command "write" + * Syntax: write DEV, R1 + * (write R1 to DEV, which is a name of a display) */ class CInstructionWrite : public CInstruction -- cgit v1.2.3