So ich hab jetzt mal ein Konzept für das instruktion-set kreiert:
Numer Name |Operanden |Beschreibung |Operation
---------------------------------------------------------------------
1 |ADD |Rd,Rs |Addiert |Rd+Rs -> Rd
---------------------------------------------------------------------
2 |ADCI |Rd,Wert |Addiere Wert dazu |Rd+Wert -> Rd
---------------------------------------------------------------------
3 |Sub |Rd,Rs |Subtrahiert |Rd-Rs -> Rd
---------------------------------------------------------------------
4 |SBCI |Rd,Wert |Subtrahiere wert ab |Rd-wert -> Rd
----------------------------------------------------------------------
5 |MUL |Rd,Rs |Multipliziere |Rd*Rs -> Rd
---------------------------------------------------------------------
6 |MLCI |Rd,Wert |Multipliziere mit Wert |Rd*Wert -> Rd
---------------------------------------------------------------------
7 |DIV |Rd,Rs |Divison |Rd/Rs -> Rd
---------------------------------------------------------------------
8 |DVCI |Rd,Wert |Dividiere mit Wert |Rd/wert - Rd
---------------------------------------------------------------------
9 |AND |Rd,Rs |AND |Rd•Rs -> Rd
---------------------------------------------------------------------
10 |ANDI |Rd,Wert |AND mit wert |Rd•Wert -> Rd
---------------------------------------------------------------------
11 |OR |Rd,Rs |OR |Rd v Rs -> Rd
---------------------------------------------------------------------
12 |ORI |Rd,Wert |OR mit wert |Rd v Wert -> Rd
---------------------------------------------------------------------
13 |XOR |Rd,Rs |XOR |Rd "XOR" Rs -> Rd
--------------------------------------------------------------------------
14 |XORI |Rd,Wert |XOR mit Wert |Rd "Xor" Wert -> Rd
----------------------------------------------------------------------------
15 |NEG |Rd |Zweierkompliment |$00-Rd -> Rd
----------------------------------------------------------------------------
16 |INC |Rd |Incrementieren |Rd+1 -> Rd
-----------------------------------------------------------------------
17 |DEC |Rd |Decrementieren |Rd-1 -> Rd
-----------------------------------------------------------------------
Sprung- und Rücksprung Befehle
-----------------------------------------------------------------------
18 |JmP |adr |Springe zur adresse |Adr -> PC
-----------------------------------------------------------------------
19 |JE |Rd,RS,adr |Springe wenn gleich |Rd==Rs Adr->PC
-----------------------------------------------------------------------
20 |JG |Rd,Rs,adr |Springe wenn größer |Rd>Rs Adr->PC
-----------------------------------------------------------------------
21 |JGE |Rd,Rs,adr |Springe wenn gr od. gl |Rd=>Rs Adr->PC
-----------------------------------------------------------------------
22 |JL |Rd,Rs,adr |Springe wenn kleiner |Rd<Rs Adr->PC
-----------------------------------------------------------------------
23 |JLE |Rd,Rs,adr |Springe wenn gl od. kl |Rd=<Rs Adr->PC
-----------------------------------------------------------------------
24 |JNE |Rd,Rs,adr |Spinge wenn nicht gl. |Rd!=Rs Adr->PC
-----------------------------------------------------------------------
25 |JNG |Rd,Rs,adr |Springe wenn nicht gr. |Rd!>RS Adr->PC
-----------------------------------------------------------------------
26 |JNGE |Rd,Rs,adr |Spr wenn nicht gl od gr|Rd!=>RS Adr->PC
-----------------------------------------------------------------------
27 |JNL |Rd,Rs,adr |Spr wenn nicht kleiner |Rd!<Rs Adr->PC
-----------------------------------------------------------------------
28 |JNLE |Rd,Rs,adr |Spr Wenn nicht kl od gr|Rd!=<Rs Adr->PC
-------------------------------------------------------------------------
29 |JSR |adr |Sprung, ablage des PC |adr->PC
-----------------------------------------------------------------------
30 |RETS | |Rücksprung aus UP |(FP-1)->PC
-----------------------------------------------------------------------
31 |RETI | |Rücksprung aus ISR |(FP-1 bis FP-32) -> Registerblock
-------------------------------------------------------------------------
Register-Transfer-Befehle
-------------------------------------------------------------------------
32 |MOV |Rd,Rs |Kopiere Register |Rs -> Rd
-------------------------------------------------------------------------
33 |LDK |Rd,Wert |Lade Konstante |Wert->Rd
-------------------------------------------------------------------------
LOAD-Befehle
-------------------------------------------------------------------------
34 |LD |Rd |Lade aus Bussystem |(AP)->Rd
-------------------------------------------------------------------------
35 |LDPOI |Rd |Lade, Post-Increment |(AP)->Rd, AP+1->AP
-------------------------------------------------------------------------
36 |LDPOD |Rd |Lade, Post-Decrement |(AP)->Rd, AP-1->AP
-------------------------------------------------------------------------
37 |LDPRI |Rd |Lade,Pre-Increment |(AP+1->AP)->Rd
-----------------------------------------------------------------------
38 |LDPRD |Rd |Lade,Pre-Decrement |(AP-1->AP)->Rd
-----------------------------------------------------------------------
39 |LDAR |Rd,Rx |Lade,Add Register |(AP+Rx)->Rd
-----------------------------------------------------------------------
40 |LDSR |Rd,Rx |Lade,Sub Register |(AP-Rx)->Rd
-----------------------------------------------------------------------
41 |LDAW |Rd,wert(8 bit) |Lade, Add Wert |(AP+wert)->Rd
-----------------------------------------------------------------------
42 |LDSW |Rd,wert(8 bit) |Lade, sub wert |(AP-wert)->Rd
-----------------------------------------------------------------------
Store-Befehle
-------------------------------------------------------------------------
43 |ST |Rs |Speicher,aus Bussystem |(AP)<-Rs
-------------------------------------------------------------------------
44 |STPOI |Rs |Speicher,Post-Increment|(AP)<-Rs, AP+1->AP
-------------------------------------------------------------------------
45 |STPOD |Rs |Speicher,Post-Decrement|(AP)<-Rs, AP-1->AP
-------------------------------------------------------------------------
46 |STPRI |Rs |Speicher,Pre-Increment |(AP+1->AP)<-Rs
-----------------------------------------------------------------------
47 |STPRD |Rs |Speicher,Pre-Decrement |(AP-1->AP)<-Rs
-----------------------------------------------------------------------
48 |STAR |Rs,Rx |Speicher,Add Register |(AP+Rx)<-Rs
-----------------------------------------------------------------------
49 |STSR |Rs,Rx |Speicher,Sub Register |(AP-Rx)<-Rs
-----------------------------------------------------------------------
50 |STAW |Rs,wert(8 bit) |Speicher, Add Wert |(AP+wert)<-Rs
-----------------------------------------------------------------------
51 |STSW |Rs,wert(8 bit) |Speicher, sub wert |(AP-wert)<-Rs
-----------------------------------------------------------------------
Push/POP Befehle
-----------------------------------------------------------------------
52 |push |Rs |Push auf Stack |(SP)<-Rs, SP-1->SP
-----------------------------------------------------------------------
53 |pop |Rd |pop von Stack |(SP)->Rs, SP+1->SP
-----------------------------------------------------------------------
Schiebe Befehle
-----------------------------------------------------------------------
54 |SHR |Rd |Shift logisch nach rechts
-----------------------------------------------------------------------
55 |SHL |Rd |Shift logisch nach Links
-----------------------------------------------------------------------
56 |SAR |Rd |Shift Arithmetisch nach Rechts
-----------------------------------------------------------------------
57 |ROR |Rd |Rotieren logisch nach rechts
-----------------------------------------------------------------------
58 |ROL |Rd |Rotieren logisch nach Links
-----------------------------------------------------------------------
59 |NOP |
(man ist das lang
. )
Nun hat jemand vielleicht Kritik, bzw ne idee was man besser machen könne