aboutsummaryrefslogtreecommitdiffstats
path: root/src/u_write.S
diff options
context:
space:
mode:
authorJozanLeClerc <JozanLeClerc@noemail.net>2020-11-18 14:47:40 +0000
committerJozanLeClerc <JozanLeClerc@noemail.net>2020-11-18 14:47:40 +0000
commit74ea3ddf1053c35f205b0a2b3d15678c357c4964 (patch)
tree6d64e5f9026bf2bf6cca4d2dfb32d28a4f6b8ec2 /src/u_write.S
parentFirst check-in (diff)
downloadbsdsetsid-74ea3ddf1053c35f205b0a2b3d15678c357c4964.tar.gz
bsdsetsid-74ea3ddf1053c35f205b0a2b3d15678c357c4964.tar.bz2
bsdsetsid-74ea3ddf1053c35f205b0a2b3d15678c357c4964.tar.xz
bsdsetsid-74ea3ddf1053c35f205b0a2b3d15678c357c4964.tar.zst
bsdsetsid-74ea3ddf1053c35f205b0a2b3d15678c357c4964.zip
This is the beginning
FossilOrigin-Name: 6db238a60f5173c98996ae2a135f762a21fdce4f
Diffstat (limited to 'src/u_write.S')
-rw-r--r--src/u_write.S14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/u_write.S b/src/u_write.S
new file mode 100644
index 0000000..efd7b9c
--- /dev/null
+++ b/src/u_write.S
@@ -0,0 +1,14 @@
+.text
+.globl u_write
+
+u_write:
+ movq $0x4, %rax
+ syscall
+ movq %rax, %rcx
+ jc u_err
+ movq %rcx, %rax
+ retq
+
+u_err:
+ movq $0xffffffffffffffff, %rax
+ retq