forked from zeroflag/punyforth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmacros.S
More file actions
37 lines (35 loc) · 719 Bytes
/
Copy pathmacros.S
File metadata and controls
37 lines (35 loc) · 719 Bytes
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
.macro defprimitive name, namelen, label, flags
.section .rodata
.align WORD_ALIGN
.globl name_\label
name_\label :
.int link
.set link,name_\label
.byte \flags + \namelen
.ascii "\name"
.align WORD_ALIGN
.globl xt_\label
xt_\label :
.int code_\label
CODE_SECTION
.align WORD_ALIGN
.globl code_\label
code_\label :
.endm
.macro defword name, namelen, label, flags
.section .rodata
.align WORD_ALIGN
.globl name_\label
name_\label :
.int link
.set link,name_\label
.byte \flags + \namelen
.ascii "\name"
.align WORD_ALIGN
.globl xt_\label
xt_\label :
.int ENTERCOL
.endm
.macro lbl label
.int \label - . - CELLS
.endm