summaryrefslogtreecommitdiff
path: root/cpu/instructions/opcode.txt
blob: f43f58a0ac6222c9371880f95891aba877eff4be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Binary format:
	is_conditional[1], instruction id[remaining bits]


is_conditional:
	n: number of bits for current mode
	s: minimum number of bits required to represent n-1
	/: integer division

	Appends 2 parameters to the normal parameter list for the instruction:
		First parameter:
			Lowest (n-s)/2 bits:
				Which bits to check
			Next (n-s)/2 bits:
				Value for each of the above that it should match
			Remaining bits:
				Bitwise offset into second parameter for value to be used
		Second parameter:
			Value to be used

	Conditional instructions will be executed after unconditional ones

	Conditional instructions will never set flags, if a conditional instruction references another, it will always be based on null flags