projects
/
fifth.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Ignore IntelliJ project files
[fifth.git]
/
kernel
/
define.inc
1
; Virtual CPU machine code definitions
\r
2
; For assembling with FASM (Flat Assembler).
\r
3
; Rest is defined in highlevel code.
\r
4
\r
5
macro xnop
\r
6
{ db 0 }
\r
7
macro xhalt
\r
8
{ db 1 }
\r
9
macro kbd@
\r
10
{ db 2 }
\r
11
macro xnum arg1
\r
12
{ db 3
\r
13
dd arg1 }
\r
14
macro head arg1, arg2, arg3, arg4
\r
15
{ dd link
\r
16
link = $-4
\r
17
db arg1
\r
18
db arg2
\r
19
len = (24-5)-($-link)
\r
20
times len db 177
\r
21
db arg3
\r
22
dd arg4 }
\r
23
macro xjmp arg1
\r
24
{ db 4
\r
25
dd arg1 }
\r
26
macro xcall arg1
\r
27
{ db 5
\r
28
dd arg1 }
\r
29
macro xinc
\r
30
{ db 6 }
\r
31
macro xdec
\r
32
{ db 7 }
\r
33
macro xdup
\r
34
{ db 8 }
\r
35
macro xdrop
\r
36
{ db 9 }
\r
37
macro xif arg1
\r
38
{ db 10
\r
39
dd arg1 }
\r
40
macro xret
\r
41
{ db 11 }
\r
42
macro xc@
\r
43
{ db 12 }
\r
44
macro xc!
\r
45
{ db 13 }
\r
46
macro xpush
\r
47
{ db 14 }
\r
48
macro xpop
\r
49
{ db 15 }
\r
50
macro xrot
\r
51
{ db 17 }
\r
52
macro xdisk@
\r
53
{ db 18 }
\r
54
macro xdisk!
\r
55
{ db 19 }
\r
56
macro x@
\r
57
{ db 20 }
\r
58
macro x!
\r
59
{ db 21 }
\r
60
macro xover
\r
61
{ db 22 }
\r
62
macro xswap
\r
63
{ db 23 }
\r
64
macro xplus
\r
65
{ db 24 }
\r
66
macro xminus
\r
67
{ db 25 }
\r
68
macro xmul
\r
69
{ db 26 }
\r
70
macro xcmpg
\r
71
{ db 28 }
\r
72
macro xcmpl
\r
73
{ db 29 }
\r
74
macro xcprt!
\r
75
{ db 33 }
\r
76
macro xcmove
\r
77
{ db 43 }
\r
78
macro xcfill
\r
79
{ db 44 }
\r