/
SampleSyntax
58 lines (43 loc) · 1.48 KB
/
SampleSyntax
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
General assembly syntax:
"Opcode <argument,argument> output" where the VAL was not used
"Opcode <argument,argument> VAL" where VAL is used
Example for each opcode group:
Syntax will be identical between opcodes of a common group
EX: LDI 3 1234 > C3001234
Loads (hex) value "1234" into register 3
EX: JMP 1234 > 1F001234
Jumps to (hex) address "1234"
EX: JMZ D,9 10F0 > 2FD910F0
Compares the values in registers D and 9; if they are equal, then jumps to (hex) address 10F0
EX: ADD F,3 2 0001 > 42F30001
Adds the values in VAL(register F) and register 3, stores the result in register 2
EX: ADD D,3 2 > 42D30000
Adds the values in registers D and 3, stores the result in register 2
EX: WTR A B > 80AB0000
Writes the data in register A into the address specified in register B
EX: WTR F B 0110 > 80FB0110
Writes the data in VAL (register F) to register B
EX: INP A > 9A000000
Inputs item from keyboard into register
EX: WOP A,B 0000 > A0AB0000
Writes 1 pixel to screen
EX: LDR D A > DAD00000
Loads data from memory address stored in register D into register A
EX: LDR F A 0110 > DAF00110
Loads data from memory address 0110 (register F) and stores in register A
Sample input (genuine test case):
LDI 3 1234
JMP 1234
JMZ D,9 10F0
ADD D,3 2
ADD F,3 2 1010
WTR A B
Sample output (genuine test case):
v2.0 raw
C3001234
1F001234
2FD910F0
42D30000
42F31010
80AB0000
https://hexed.it/#hex:Yes;76322e30207261770a43333030313233340a31463030313233340a32464439313046300a34324433303030300a384142303030300a