disasm/sim: changed interface, branch => br, features++
[calu.git] / 2_isa / misc.ptex
1 ins ('32', 'jumpop', 'Branch/ret operation', '4 | 5 | 16 | 3 | 2 | 1 | 1',
2 'Conditions | OpCode (10110) | Immediate | - | Type | +/- | S',
3 'This instruction should be used with it\'s aliases branch, call, ret and reti. No flags will be affected by this instructions.','','',
4 'br-Branch relative-4/00|call-Branch relative and save pc to stack-4/01|ret-Return to adress on stack-4/10|ret-Return from interrupt to adress on stack-4/11');
5
6 ins ('32', 'branchreg', 'Branch; jump to value of reg', '4 | 5 | 4 | 16 | 1 | 1 | 1',
7 'Conditions | OpCode (10111) | Register A | - | Type | +/- | -',
8 'This instruction should be used with it\'s aliases branchr and callr. No flags will be affected by this instructions. If Type is set to 1, the current value of the programcounter is pushed onto the stack.');
9
10 #ins ('32', 'call', 'Call; save pc+4 in stack, jump to pc+imm', '4 | 5 | 16 | 5 | 1 | 1', 'Conditions | OpCode | Immediate | - | +/- | S');
11
12 #ins ('32', 'branchreg', 'Branch; branch to value of reg', '4 | 5 | 4 | 17 | 1 | 1', 'Conditions | OpCode | Register Source| - | +/- | S');
13
14 #ins ('32', 'ret(i)', 'return (from interrupt)', '4 | 5 | 1 | 22 ', 'Conditions | OpCode | I |-');
15
16 #ins ('32', 'ret', 'ret', '4 | 5 | 23 ', 'Conditions | OpCode | -');
17
18 #ins ('32', 'reti', 'reti', '4 | 5 | 23 ', 'Conditions | OpCode | -');
19
20 ins ('32', 'cmp', 'compare (rS1 - rS2)', '4 | 5 | 4 | 4 | 15',
21 'Conditions | OpCode (11000) | Register A (Source1) | Register B (Source2) | -',
22 'This instructions compares the two source registers by subtraction of register B from register A and setting the flags accordingly',
23 'is set to the MSB of the result|is set if the subtraction has a carry out|is set if an overflow occurred|is set if the result is zero');
24
25 ins ('32', 'cmpi', 'compare (rS1 - imm)', '4 | 5 |  4 | 16 | 3',
26 'Conditions | OpCode (11001) | Register A (Source1) | Immediate | -',
27 'This instructions compares the the source register with the immediate be subtracting the immediate from register A and setting the flags accordingly',
28 'is set to the MSB of the result|is set if the subtraction has a carry out|is set if an overflow occurred|is set if the result is zero');