projects
/
rrq
/
jonasforth.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add alternative Linux backend
[rrq/jonasforth.git]
/
impl.asm
diff --git
a/impl.asm
b/impl.asm
index e8cd883b2eb8c9c845e187ca98c041568f1e83e2..67d11b57ac02a3b7378c6f87d6b0276d39c91b19 100644
(file)
--- a/
impl.asm
+++ b/
impl.asm
@@
-1,6
+1,4
@@
-;; vim: syntax=fasm
-
-section '.text' code readable executable
+os_code_section
macro printlen msg, len {
push rsi
macro printlen msg, len {
push rsi
@@
-8,7
+6,7
@@
macro printlen msg, len {
mov rcx, msg
mov rdx, len
mov rcx, msg
mov rdx, len
-
sy
s_print_string
+
call o
s_print_string
sub rsp, 8
pop rsi
sub rsp, 8
pop rsi
@@
-183,9
+181,10
@@
parse_number:
pop rdi
printlen rdi, [.length]
newline
pop rdi
printlen rdi, [.length]
newline
- sys_terminate 100
+ mov rax, 100
+ call os_terminate
-section '.data' readable writable
+os_data_section
find.search_length dq ?
find.search_buffer dq ?
find.search_length dq ?
find.search_buffer dq ?