-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstructions
52 lines (35 loc) · 1.23 KB
/
instructions
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
lda <getal> | <adres>
ldb <getal> | <adres>
add # regA + regB -> regR (result) -> RegA
sub
mul
div
push #push result to stack
pop #pop stack to regA
call <adres> #call an subroutine
ret #Return from subroutine
sto <adres> #stores result to memory
sta <adres>
stb <adres>
lma <adres> #loads from mem adres to regA
lmb <adres> #loads from mem adres to regB
lix <adres> # ld IX from memory
iix <adres> # ld IX from memory, inc in memory
dix <adres> # ld IX from memory, dec IX an store in memory
idx #regB to IX
stx <adres> + IX #store regR (result)
lxa <adres> + IX
lxb <adres> + IX
inc (a | b | x)
dec (a | b | x)
jmp <adres>
jmpx <adres> + IX
test (eq | gt | z) #result = 0 whem true, else result != 0
jmpt <adres> #jump to adres when zero bit is true (when last result = 0)
jmpf <adres> #jump to adres when zero bit is false (when last result !=0)
skip # skip (pc = pc + 1) when zero bit is false (when last result != 0)
ise # comapre the valuea at adres in RegA and at adres in regB
isz # comapre the valuea at adres in RegA and 0
out <device number> #result to buffer
in <device number> #Input buffer to regA
halt