Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions build.sh

This file was deleted.

6 changes: 1 addition & 5 deletions src/exit.s
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.intel_syntax noprefix
.global exit
.text

exit:
mov rax, 60
mov rax, 60
syscall
6 changes: 1 addition & 5 deletions src/fopen.s
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
.intel_syntax noprefix
.global fopen
.text

fopen:
mov rax, 2
mov rax, 2
syscall
ret
11 changes: 3 additions & 8 deletions src/lib.az
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

enum FD
Stdin
Stdout
Expand All @@ -12,16 +11,12 @@ enum FMODE
NoCreate
Create

@link("./sdk/build/exit.o")
@link("./sdk/src/exit.s")
op exit(const int val): void


@link("./sdk/build/write.o")
@link("./sdk/src/write.s")
op write(FD fd,const str val,const int size): void

@link("./sdk/build/fopen.o")
@link("./sdk/src/fopen.s")
op fopen(const str val, FLAG flag, FMODE mode): File

@link("./sdk/build/read.o")
op read(File file, const int size): str

8 changes: 1 addition & 7 deletions src/write.s
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
.intel_syntax noprefix
.global write
.text

write:
mov rax, 1
mov rax, 1
syscall
ret