Initial commit
This commit is contained in:
parent
a8bf8841c2
commit
6c6bed6c7e
11
cat.s
11
cat.s
@ -1,8 +1,13 @@
|
||||
;; -*- mode: nasm -*-
|
||||
;; Select the one that matches your os
|
||||
%include "linux.s"
|
||||
;%include "freebsd.s"
|
||||
%define SYS_open 0x2
|
||||
%define SYS_close 0x3
|
||||
%define SYS_write 0x1
|
||||
%define SYS_read 0x0
|
||||
%define SYS_lseek 0x8
|
||||
%define SYS_exit 0x3c
|
||||
|
||||
%define O_RDONLY 0x0
|
||||
%define SEEK_SET 0x0
|
||||
%define FD_stderr 2
|
||||
%define FD_stdout 1
|
||||
%define FD_stdin 0
|
||||
|
12
freebsd.s
12
freebsd.s
@ -1,12 +0,0 @@
|
||||
;; -*- mode: nasm -*-
|
||||
;; FreeBSD system calls
|
||||
%define SYS_open 0x5
|
||||
%define SYS_close 0x6
|
||||
%define SYS_write 0x4
|
||||
%define SYS_read 0x3
|
||||
%define SYS_lseek 0x1de
|
||||
%define SYS_exit 0x1
|
||||
|
||||
;; FreeBSD constants
|
||||
%define O_RDONLY 0x0
|
||||
%define SEEK_SET 0x0
|
Loading…
Reference in New Issue
Block a user