summaryrefslogtreecommitdiff
path: root/tests/projects/asm/fasm/src/main.S
diff options
context:
space:
mode:
authorruki <[email protected]>2020-05-19 23:12:09 +0800
committerruki <[email protected]>2020-05-19 13:12:57 +0800
commit26880aba618ec5aab600170f1d695d34ee742068 (patch)
tree19652683a75411bf6dbbca04f1067a3a9e8c6342 /tests/projects/asm/fasm/src/main.S
parentea6b12de91048a1fe404bbad8b14ed2a148730a7 (diff)
add gas tests
Diffstat (limited to 'tests/projects/asm/fasm/src/main.S')
-rw-r--r--tests/projects/asm/fasm/src/main.S28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/projects/asm/fasm/src/main.S b/tests/projects/asm/fasm/src/main.S
new file mode 100644
index 000000000..90f4b88b4
--- /dev/null
+++ b/tests/projects/asm/fasm/src/main.S
@@ -0,0 +1,28 @@
+format MZ
+
+entry main:start ; program entry point
+stack 100h ; stack size
+
+segment main ; main program segment
+
+ start:
+ mov ax,text
+ mov ds,ax
+
+ mov dx,hello
+ call extra:write_text
+
+ mov ax,4C00h
+ int 21h
+
+segment text
+
+ hello db 'Hello world!',24h
+
+segment extra
+
+ write_text:
+ mov ah,9
+ int 21h
+ retf
+