instruction set need help

Status
Not open for further replies.

vead

Full Member level 5
Joined
Nov 27, 2011
Messages
285
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
india
Visit site
Activity points
3,815
hello experts
I need some help
I want to make 8 bit instruction using folloing component so I made one simple example

8 bit instruction set
4 bit opcode + 2 bit source register +2 bit destination register+ 4 bit data

accumulator A
memory register R1
memory register R2
memory register R3

0010 mov opcode

Code:
opcode         source       destination       data
0010               00               00                 xx
                 R1  01           A  01                xx
                 R2  10               XX                xx
                 R3  00               XX                xx

load data directly into R1
mov R1#data

Code:
opcode     source      destination       data
0010         R1 01          00                  data
load data directly into R2
mov R2#data

Code:
opcode     source      destination       data
0010         R2 10          00                  data
load data directly into R3
mov R3#data

Code:
opcode     source      destination       data
0010         R3 11          00                  data
load data directly into A
mov A#data

Code:
opcode     source      destination       data
0010            00         A  01                  data
mov the content of R1 into Accumulator
mov A, R1

Code:
opcode     source      destination       data
0010         R1 01          01                  disable
mov the content of R2 into Accumulator
mov A, R2

Code:
opcode     source      destination       data
0010         R2 10          01                  disable
mov the content of R3 into Accumulator
mov A, R3

Code:
opcode     source      destination       data
0010         R3 11          01                 disable
don't use any register disable

Code:
opcode       source       destination       data
0010               00               00                 xx      don't use register
I can do same thing for other instruction
0110 And logic
Code:
opcode         source       destination       data
0110               00               00                 xx
                 R1  01           A  01                xx
                 R2  10               XX                xx
                 R3  00               XX                xx
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…