-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestNK
More file actions
61 lines (44 loc) · 1.02 KB
/
TestNK
File metadata and controls
61 lines (44 loc) · 1.02 KB
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
59
60
61
INF 9001
#a comment
NND lit[F]
NOT ACC
#Trying a nested Macro
NEG ACC
#The carry macro
GETCARR ACC
#Test out the include statements!
INCL TestINCL
#simple acc stuff - being exhaustive in my tests
INC ACC
DEC ACC
#shifts
LSHIFT ACC
LROT ACC
label:
#unary macros! Testing simple first
MOV lit[F] INTO place
#testing that the math works
MOV64 place[3] INTO elsewhere[A]
#does recursion between acc and unary work?
NOT somewhere[1f] INTO place
#more complex recursion - 8-bit negations!
NEG8 source INTO dest
#test addition
ADD8 num othernum INTO sum
#subtraction uses lots of macro memory
SUB32 firstop secondop INTO dest
#Addressing operations?
MOVADDR place[3] INTO somewhere
#and again
MOVADDR somewhere INTO place[3]
;alternate comment syntax
;jump macros?
JMPEQ place N_[f] TO label
#Letting people use whatever the hell value type they want
MOV N_[0b0101] INTO label
MOV N_[0d11] INTO label
MOV N_[0o10] INTO label
MOV label[010] INTO label
#Now less picky! Assumes INTO $op1 if no dest given
NEG8 this[1]
TestData: .data 5