?? select.txt
字號:
43 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 44 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 45 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 46 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 47 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 48 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 49 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 4a | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 4b | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 4c | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 4d | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 4e | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 4f | 00 | 00 | 08 | 00 | 0 0 0 0 0 0 0 0 | 50 | 00 | 00 | 09 | 00 | 0 0 0 0 0 0 0 0 | 51 | 00 | 04 | 03 | 03 | 0 0 0 0 0 4 1 3 | _getdents 52 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 53 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 54 | 00 | 00 | 0a | 00 | 0 0 0 0 0 0 0 0 | 55 | 00 | 06 | 04 | 03 | 0 0 0 0 3 1 1 3 | _getmsg 56 | 00 | 06 | 04 | 03 | 0 0 0 0 3 1 1 3 | _putmsg 57 | 00 | 05 | 03 | 03 | 0 0 0 0 0 3 5 1 | _poll 58 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 59 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 5a | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 5b | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 5c | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 5d | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 5e | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 5f | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 60 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 61 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 62 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 63 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 64 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 65 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 66 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 67 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 68 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 69 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 6a | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 6b | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 6c | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 6d | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 6e | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 6f | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 70 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 71 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 72 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 73 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 74 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 75 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 76 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 77 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 78 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 79 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 7a | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 7b | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 7c | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 7d | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 7e | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 7f | 00 | 05 | 05 | 0a | 0 0 0 0 0 0 0 0 | _clocal _v7sysent: 00 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | 01 | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _ftime 02 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 03 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nullsys 04 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 05 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 06 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 07 | 00 | 05 | 05 | 0a | 0 0 0 0 0 0 0 0 | _clocal 08 | 00 | 00 | 00 | 08 | 0 0 0 0 0 0 0 0 | _cxenix 09 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 0a | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 0b | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys _s3sysent: 01 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | 02 | 00 | 06 | 04 | 03 | 0 0 0 0 3 3 1 1 | _statfs 03 | 00 | 05 | 04 | 03 | 0 0 0 0 3 3 1 3 | _fstatfs 04 | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _setpgrp 05 | 00 | 00 | 00 | 08 | 0 0 0 0 0 0 0 0 | _cxenix 06 | 00 | 04 | 03 | 03 | 0 0 0 0 0 1 3 3 | _uadmin 07 | 00 | 00 | 00 | 09 | 0 0 0 0 0 0 0 0 | _utssys 08 | 00 | 03 | 03 | 03 | 0 0 0 0 0 3 3 3 | _fcntl 09 | 00 | 03 | 02 | 05 | 0 0 0 0 0 0 5 3 | _ulimit 0a | 00 | 00 | 01 | 03 | 0 0 0 0 0 0 0 1 | _rmdir 0b | 00 | 00 | 02 | 03 | 0 0 0 0 0 0 3 1 | _mkdir 0c | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys _svidsysent: 01 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | 02 | 00 | 06 | 04 | 03 | 0 0 0 0 3 3 1 1 | _statfs 03 | 00 | 05 | 04 | 03 | 0 0 0 0 3 3 1 3 | _fstatfs 04 | 00 | 00 | 01 | 03 | 0 0 0 0 0 0 0 3 | _setpgrp 05 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 06 | 00 | 00 | 03 | 03 | 0 0 0 0 0 1 3 3 | _uadmin 07 | 00 | 00 | 00 | 09 | 0 0 0 0 0 0 0 0 | _utssys 08 | 00 | 00 | 03 | 03 | 0 0 0 0 0 3 3 3 | _fcntl 09 | 00 | 00 | 02 | 05 | 0 0 0 0 0 0 5 3 | _ulimit 0a | 00 | 00 | 01 | 03 | 0 0 0 0 0 0 0 1 | _rmdir 0b | 00 | 00 | 02 | 03 | 0 0 0 0 0 0 3 1 | _mkdir 0c | 00 | 00 | 03 | 03 | 0 0 0 0 0 0 0 0 | _nosys _clentry: used for oem CLOCAL routines. Empty on my system._cxentry: used for SCO added stuff. 00 | 00 | 05 | 03 | 03 | 0 0 0 0 0 4 7 1 | _shutdown 01 | 00 | 04 | 03 | 03 | 0 0 0 0 0 7 3 3 | _locking 02 | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 1 | _creatsem 03 | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _opensem 04 | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _sigsem 05 | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _waitsem 06 | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _nbwaitsem 07 | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _rdchk 08 | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 4 | _stkgrow 09 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 0a | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 5 3 | _chsize 0b | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _ftime 0c | 00 | 02 | 01 | 05 | 0 0 0 0 0 0 0 5 | _nap 0d | 00 | 05 | 04 | 01 | 0 0 0 0 3 4 3 1 | _sdget 0e | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 7 | _sdfree 0f | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 7 | _sdenter 10 | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 7 | _sdleave 11 | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 7 | _sdgetv 12 | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 7 | _sdwaitv 13 | 00 | 05 | 03 | 01 | 0 0 0 0 0 7 5 3 | _brkctl 14 | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys 15 | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 1 3 | _nfs_sys 16 | 00 | 04 | 03 | 03 | 0 0 0 0 0 1 3 3 | _msgctl 17 | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 5 | _msgget 18 | 00 | 05 | 04 | 03 | 0 0 0 0 3 3 1 3 | _msgsnd 19 | 06 | 07 | 05 | 03 | 0 0 0 3 5 3 1 3 | _msgrcv 1a | 00 | 05 | 04 | 03 | 0 0 0 0 7 3 4 3 | _semctl 1b | 00 | 04 | 03 | 03 | 0 0 0 0 0 3 3 5 | _semget 1c | 00 | 04 | 03 | 03 | 0 0 0 0 0 4 1 3 | _semop 1d | 00 | 04 | 03 | 03 | 0 0 0 0 0 1 3 3 | _shmctl 1e | 00 | 04 | 03 | 03 | 0 0 0 0 0 3 4 5 | _shmget 1f | 00 | 04 | 03 | 06 | 0 0 0 0 0 3 7 3 | _shmat 20 | 00 | 04 | 03 | 03 | 0 0 0 0 0 1 3 3 | _proctl 21 | 00 | 03 | 00 | 06 | 0 0 0 0 0 0 3 7 | _execseg 22 | 00 | 02 | 00 | 03 | 0 0 0 0 0 0 0 7 | _unexecseg 23 | 00 | 00 | 03 | 03 | 0 0 0 0 0 5 5 1 | _swapon 24 | 00 | 09 | 05 | 03 | 0 0 0 1 1 1 1 3 | _selectI couldn't really figure out how uadmin() was accessed. libc'suadmin.o links in a routine that calls system call 0x37. Hmmm...The _cxentry is accessed by (documented in the programmer's referenceunder System Calls) setting a bit in the system call number. It seemsas though it actually shifts the system call number up half a word andputs 0x28 in the low order halfword.Now we see that select() exists as a cxenix function (number 0x24),There is also poll(), putmsg(), and getmsg() -- streams stuff.Since the tty device is not a streams device (actually it looks as ifthe streams stuff has been nulled out -- look at the master file formore information) it is highly unlikely that these routines will doanything useful. Infact, they don't. Change the SYSNUM (and symbols)in the example open.s above to their appropriate values to try out thestreams routines.select.s looks something like:; select;;; title select .386SYSNUM equ 2428hextrn _errno:dwordpublic _select_TEXT segment dword use32 public 'CODE' assume cs: _TEXT_select proc near mov eax, SYSNUM ; Get system call number. ; ; I don't even pretend to understand masm syntax. I tried ; the following line (and variations) without any success. ;; call far 7:0 ; Switch to kernel and call SYSNUM. ; ; Don't laugh, it works. ; db 9ah dw 0,0 dw 7 jb short _cerror ; below == error. xor eax, eax ; zero return value (no error). ret ; done._cerror: mov _errno, eax ; Save error code in _errno. mov eax, -1 ; Return -1 (as error). ret ; done._select endp_TEXT ends endThere is a header file you'll need in <sys/select.h> which has someinformation in it.A Synopsis of the SCO XENIX implementation: #include <sys/select.h> nfds = select(width readfds, writefds, exceptfds, timeout) int width, *readfds, *writefds, *exceptfds; struct timeval *timeout; /* timeval is a pointer to a structure */I tested select() and found it to be half way implemented. It seemsas if there must be some extra field in struct cdevsw <sys/conf.h>.So, I guess I wait 'til 3.2.Pax, KeithPs, FYI.Pps, if I made a mistake in my description of system call handling onSCO XENIX or what not, please correct me.Ppps, `call far 7:0' seems really reasonable to me.-- ag@elgar.CTS.COM Keith Gabryelski ...!{ucsd, crash}!elgar!ag
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -