isa: add add as an example for new gentex
authorMartin Perner <martin@perner.cc>
Tue, 26 Oct 2010 13:07:03 +0000 (15:07 +0200)
committerMartin Perner <martin@perner.cc>
Tue, 26 Oct 2010 13:07:28 +0000 (15:07 +0200)
2_isa/arith.ptex
2_isa/isa.tex

index eb33a5c4d11dbf7ceaa3b9103391721f749a9afa..5abb0aca848bad25b6a986a49ef8168fbd5bc506 100644 (file)
@@ -1,4 +1,11 @@
-ins ('32', 'add', 'Add', '4 | 5 | 4 | 4 | 4 | 10 | 1', 'Conditions | OpCode | Register Destination|Register A (Source1)| Register B (Source2) | - | C');
+ins ('32', 'add', 'Add',
+'4 | 5 | 4 | 4 | 4 | 10 | 1',
+'Conditions | OpCode | Register Destination|Register A (Source1)| Register B (Source2) | - | C',
+'Adds Register A and Register B and save result in Register Destination \\\\
+When bit C is set, the content of the carry flag is also added.',
+'is set to the MSB of the result | is set if addition has a carry out | is set if a overflow occured | is set if the result is zero ',
+'add  r0, r2, r4 ; add low bytes
+ addc r1, r3, r5 ; add high bytes');
 
 ins ('32', 'addi', 'Add im', '4 | 5 | 4 | 4 | 12 | 1 | 1 | 1', 'Conditions | OpCode | Register Destination|Register A (Source1)| Immediate | H/L | S | C');
 
index 845454945327ee0a95208e6935f37caf370d2321..c0b5c925e78c5e7c342cde4b3f8d0a5102aa596b 100644 (file)
@@ -16,6 +16,7 @@
 
 \input{conds}
 if a condition is not met, the instruction is executed but no changes (on data or flags) occure.
+\clearpage
 \section{instr}
 
 \subsection{arith}