Re: Is hex an ascii thing?



On Apr 12, 11:45 pm, "Evenbit" <nbaker2...@xxxxxxxxxxx> wrote:

Speaking of mess (locally and on the net), I have been looking all
over but still can't find the all the magic numbers I need to make
Linux sys-calls. Does anyone know the value for the 'flags' argument
to 'sys_open' when you want it read only? I know that sys_open is 5.

Nevermind -- I found it! Jeff Owen to my rescue...

; file_open - open named file
; INPUTS
; ebx = ptr to full file path
; ecx = access flags
; O_RDONLY 00
; O_WRONLY 01
; O_RDWR 02
;
; O_CREAT 0100
; O_EXCL 0200
; O_NOCTTY 0400
; O_TRUNC 01000
; O_APPEND 02000
; O_NONBLOCK 04000
; O_NDELAY O_NONBLOCK
; O_SYNC 010000 specific to ext2 fs and block devices
; FASYNC 020000 fcntl, for BSD compatibility
; O_DIRECT 040000 direct disk access hint-currently
ignored
; O_LARGEFILE 0100000
; O_DIRECTORY 0200000 must be a directory
; O_NOFOLLOW 0400000 don't follow links;
;
; edx = permissions used if file created
; S_ISUID 04000 set user ID on execution
; S_ISGID 02000 set group ID on execution
; S_ISVTX 01000 sticky bit
; S_IRUSR 00400 read by owner(S_IREAD)
; S_IWUSR 00200 write by owner(S_IWRITE)
; S_IXUSR 00100 execute/search by owner(S_IEXEC)
; S_IRGRP 00040 read by group
; S_IWGRP 00020 write by group
; S_IXGRP 00010 execute/search by group
; S_IROTH 00004 read by others
; S_IWOTH 00002 write by others
; S_IXOTH 00001 execute/search by others
; OUTPUT
; eax = negative if error (error number)
; eax = positive file handle if success
; flags are set for js jns jump

Nathan.

.