about summary refs log tree commit diff stats
path: root/subx/teensy/test6-global.s
diff options
context:
space:
mode:
Diffstat (limited to 'subx/teensy/test6-global.s')
-rw-r--r--subx/teensy/test6-global.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/subx/teensy/test6-global.s b/subx/teensy/test6-global.s
new file mode 100644
index 00000000..9b981b62
--- /dev/null
+++ b/subx/teensy/test6-global.s
@@ -0,0 +1,13 @@
+; Example with a data segment.
+; nasm -f elf test6-global.s
+; gcc -Wall -s test6-global.o -o test6
+BITS 32
+
+SECTION .data
+foo: dd 42
+
+SECTION .text
+GLOBAL main
+main:
+  mov eax, foo
+  ret