How to understand the first line of the DCPU-16 specs assembly example?

assembly, dcpu-16

Solution

Ah ok from the comments I finally got my answer.

You are missing the "Values" section from the spec, there it says:

Values:
....
0x1f: next word (literal)

So we have:

0x7c01 = 0111110000000001

0001 = SET
000000 = register A
011111 = 1F -> next word -> [PC++]

Next word is `0x0030`... voilà.

Problem

I am trying to understand the specs, but fail to understand the first line of the example given: ``` SET A, 0x30 ; 7c01 0030 ``` Here is what I understood from the specs: - the first word (7c01) fully defines the instruction - the operator is 0x1 which is the command `SET a, b` - b = 111100 = 0x3C (when I convert into Hex) = literal value 0x3C - a = 000000 = register A So I understand the instruction as SET A, 0x3C Can anyone advise where I go wrong?

Original source