[Wisp-cvs] wisp/src/native boxes.s,1.7,1.8 boxes.wth,1.3,1.4 records.nasm,1.27,1.28 sys.s,1.7,1.8 sy
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2002-09-18 20:55:21
|
Update of /cvsroot/wisp/wisp/src/native In directory usw-pr-cvs1:/tmp/cvs-serv25146/src/native Modified Files: boxes.s boxes.wth records.nasm sys.s sys.wth sys_raw.nasm Log Message: Dropped |sys:raw:ioctl|. Index: boxes.s =================================================================== RCS file: /cvsroot/wisp/wisp/src/native/boxes.s,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- boxes.s 7 Sep 2002 22:02:43 -0000 1.7 +++ boxes.s 18 Sep 2002 20:55:17 -0000 1.8 @@ -51,3 +51,20 @@ .long record_constructor_body - (.+4) .global N_make_box,NN_make_box .equiv NN_make_box, N_make_box + 1 +.section .text +.align 16 +N_box_huh: +.byte 144,186 +.long RT_box +.byte 233 +.long discriminator_body - (.+4) +.global N_box_huh,NN_box_huh +.equiv NN_box_huh, N_box_huh + 1 +.section .text +.align 16 +RT_box: +.long RT_record_type +.byte 1,0,0,0 +.long NN_box_huh +.long NN_box_ref +.global RT_box Index: boxes.wth =================================================================== RCS file: /cvsroot/wisp/wisp/src/native/boxes.wth,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- boxes.wth 26 Aug 2002 16:18:24 -0000 1.3 +++ boxes.wth 18 Sep 2002 20:55:17 -0000 1.4 @@ -8,8 +8,17 @@ (include wisptyp) +(assemble RT_box + (tetra RT_record_type) + (tetra 1) + (tetra NN_box_huh) + (tetra NN_box_ref)) + (extern RT_box) (extern WB_undefined) + +(native box_huh + 'RT_box go-discriminate) (native make_box dup 0 = if UNDEF swap 1+ then Index: records.nasm =================================================================== RCS file: /cvsroot/wisp/wisp/src/native/records.nasm,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- records.nasm 26 Aug 2002 16:18:24 -0000 1.27 +++ records.nasm 18 Sep 2002 20:55:17 -0000 1.28 @@ -227,12 +227,6 @@ rt_slot_count 3 endrectype -; The box type -rectype box - rt_slot_count 1 - rt_ref NN_box_ref -endrectype - ; FOR INTERNAL USE BY |make-record-type| ONLY! ; It is an important guarantee that it's safe to share record-type:s ; without need to fear undue influence. Index: sys.s =================================================================== RCS file: /cvsroot/wisp/wisp/src/native/sys.s,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- sys.s 13 Sep 2002 16:35:33 -0000 1.7 +++ sys.s 18 Sep 2002 20:55:17 -0000 1.8 @@ -1,16 +1,79 @@ .section .text .align 16 +N_sys_low_tcsetattr: +.byte 144,81,131,249,3,15,132,8,0,0,0,88,137,193,233 +.long N_signal_argcount - (.+4) +.byte 88,88,91,89,83,80,104 +.long N_sys_low_tcsetattr.L1 +.byte 81,233 +.long decui$1 - (.+4) +.byte 91,89,83,80,81,129,249 +.long WB_now +.byte 15,133,11,0,0,0,88,104,2,84,0,0,233,60,0,0,0,88,80,61 +.long WB_drain +.byte 15,133,11,0,0,0,88,104,3,84,0,0,233,36,0,0,0,88,80,61 +.long WB_flush +.byte 15,133,11,0,0,0,88,104,4,84,0,0,233,12,0,0,0,88,104 +.long WB_unknown +.byte 80,233 +.long raise$2 - (.+4) +.byte 88,91,89,137,207,131,231,3,83,80,81,81,133,255,15,132,8,0,0,0,88 +.byte 106,19,233,22,0,0,0,88,80,133,192,15,133,8,0,0,0,88,106,19,233,4,0 +.byte 0,0,88,139,0,80,88,61,9,0,0,0,15,132,12,0,0,0,88,104 +.long WB_c8string_huh +.byte 80,233 +.long raise$2 - (.+4) +.byte 88,137,195,131,195,4,139,27,80,131,251,60,15,132,12,0,0,0,88,104 +.long WB_range +.byte 80,233 +.long raise$2 - (.+4) +.byte 88,137,195,131,195,8,139,0,83,61,9,0,0,0,15,133,4,0,0,0,88,139,0 +.byte 80,88,137,194,88,137,193,88,137,195,184,54,0,0,0,205,128,80,233 +.long encsi$1 - (.+4) +.byte 88,195 +.global N_sys_low_tcsetattr,NN_sys_low_tcsetattr,N_sys_low_tcsetattr.L1 +.equiv NN_sys_low_tcsetattr, N_sys_low_tcsetattr + 1 +.equiv N_sys_low_tcsetattr.L1, N_sys_low_tcsetattr + 36 +.section .text +.align 16 +N_sys_low_tcgetattr: +.byte 144,81,133,201,15,133,17,0,0,0,88,184,224,1,0,0,13,7,0,0,0,80,233 +.byte 185,0,0,0,88,80,61,2,0,0,0,15,132,8,0,0,0,88,137,193,233 +.long N_signal_argcount - (.+4) +.byte 88,88,91,80,104 +.long N_sys_low_tcgetattr.L3 +.byte 83,233 +.long decui$1 - (.+4) +.byte 91,137,217,131,225,3,80,83,83,133,201,15,132,8,0,0,0,88,106,19,233 +.byte 22,0,0,0,88,80,133,192,15,133,8,0,0,0,88,106,19,233,4,0,0,0,88,139 +.byte 0,80,88,61,9,0,0,0,15,132,12,0,0,0,88,104 +.long WB_c8string_huh +.byte 80,233 +.long raise$2 - (.+4) +.byte 88,137,195,131,195,4,139,27,80,131,251,60,15,132,12,0,0,0,88,104 +.long WB_range +.byte 80,233 +.long raise$2 - (.+4) +.byte 88,137,195,131,195,8,139,0,83,61,9,0,0,0,15,133,4,0,0,0,88,139,0 +.byte 80,88,137,194,185,1,84,0,0,88,137,195,184,54,0,0,0,205,128,80,233 +.long encsi$1 - (.+4) +.byte 88,195 +.global N_sys_low_tcgetattr,NN_sys_low_tcgetattr,N_sys_low_tcgetattr.L3 +.equiv NN_sys_low_tcgetattr, N_sys_low_tcgetattr + 1 +.equiv N_sys_low_tcgetattr.L3, N_sys_low_tcgetattr + 63 +.section .text +.align 16 N_sys_low_getcwd: .byte 144,81,131,249,1,15,132,8,0,0,0,88,137,193,233 .long N_signal_argcount - (.+4) .byte 88,88,137,195,131,227,3,80,80,133,219,15,132,8,0,0,0,88,106,19,233 .byte 22,0,0,0,88,80,133,192,15,133,8,0,0,0,88,106,19,233,4,0,0,0,88,139 -.byte 0,80,88,80,61,9,0,0,0,15,132,13,0,0,0,88,88,104 +.byte 0,80,88,61,9,0,0,0,15,132,12,0,0,0,88,104 .long WB_c8string_huh .byte 80,233 .long raise$2 - (.+4) -.byte 88,88,137,195,131,195,8,137,193,139,9,80,83,131,249,9,15,133,4,0,0 -.byte 0,88,139,0,80,88,91,131,195,4,139,27,137,217,137,195,184,183,0,0,0 +.byte 88,137,195,131,195,8,137,193,139,9,80,83,131,249,9,15,133,4,0,0,0 +.byte 88,139,0,80,88,91,131,195,4,139,27,137,217,137,195,184,183,0,0,0 .byte 205,128,137,195,247,219,80,131,251,34,15,133,8,0,0,0,88,106,19,233 .byte 5,0,0,0,233 .long encsi$1 - (.+4) Index: sys.wth =================================================================== RCS file: /cvsroot/wisp/wisp/src/native/sys.wth,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- sys.wth 13 Sep 2002 16:35:33 -0000 1.8 +++ sys.wth 18 Sep 2002 20:55:17 -0000 1.9 @@ -12,10 +12,14 @@ (extern WB_c8string_huh) (extern WB_cons_huh) (extern WB_core) +(extern WB_drain) (extern WB_exit) +(extern WB_flush) +(extern WB_now) (extern WB_range) (extern WB_signal) (extern WB_stop) +(extern WB_unknown) (extern cons$2) (extern decsi$1) (extern decui$1) @@ -130,8 +134,7 @@ (native sys_ns_read dup 4 = argc drop ; ( fd buffer delta amount ) 3 dig decui - 3 dig dup get-type - NC_C8STRING <> if 'WB_c8string_huh swap go-raise then cell+ cell@ + 3 dig require-c8string string-length 3 dig decui 3 dig decui ; ( fd buffer delta amount *fd *length *delta *amount ) @@ -195,8 +198,7 @@ (native sys_ns_write dup 4 = argc drop ; ( fd buffer delta amount ) 3 dig decui - 3 dig dup get-type - NC_C8STRING <> if 'WB_c8string_huh swap go-raise then cell+ cell@ + 3 dig require-c8string string-length 3 dig decui 3 dig decui ; ( fd buffer delta amount *fd *length *delta *amount ) @@ -261,9 +263,46 @@ sizeof.struct-stat.aligned 1 deallocate) (native sys_low_getcwd dup 1 = argc drop - dup get-type dup NC_C8STRING <> if drop 'WB_c8string_huh swap go-raise - then drop dup string-data swap cell+ cell@ + require-c8string + dup string-data swap string-length sys.getcwd dup negate ERANGE = if drop FALSE else (flush) 'encsi$1 jump then) + +; |sys:low:tcgetattr| returns the required buffer size +; if called with no arguments +(native sys_low_tcgetattr + dup 0 = if + drop sizeof.struct-termios tag-fixnum + else + dup 2 = argc drop + swap decui swap require-c8string + dup string-length sizeof.struct-termios <> if + 'WB_range swap go-raise + else + string-data TCGETS swap sys.ioctl (flush) 'encsi$1 jump + then + then) + +(native sys_low_tcsetattr dup 3 = argc drop + rot decui rot + dup 'WB_now = if + drop TCSETS + else + dup 'WB_drain = if + drop TCSETSW + else + dup 'WB_flush = if + drop TCSETSF + else + 'WB_unknown swap go-raise + then + then + then + rot require-c8string + dup string-length sizeof.struct-termios <> if + 'WB_range swap go-raise + else + string-data sys.ioctl (flush) 'encsi$1 jump + then) ; vim: ft=worth Index: sys_raw.nasm =================================================================== RCS file: /cvsroot/wisp/wisp/src/native/sys_raw.nasm,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- sys_raw.nasm 13 Sep 2002 16:35:33 -0000 1.49 +++ sys_raw.nasm 18 Sep 2002 20:55:17 -0000 1.50 @@ -9,4 +9,3 @@ ident '@(#) $Id$' native_syscall execve, 3 -native_syscall ioctl, 3 |