From: Richard [maher_rjNOmaSPAM@hotmail.com.invalid] Sent: Friday, March 03, 2000 8:48 AM To: Info-VAX@Mvb.Saic.Com Subject: Re: UWSS ALPHA Arg list homing and read access Is everyone else really struggling with C to do this? All I want to know is "Has everyone else stopped probing the arg list on Alpha?" In the test code below you can see the probe commented out. A pointer to a manual would be great. I couldn't find it. Cheers Richard Maher. ;++ ; (c) Copyright Tier3 Software ;-- .TITLE Test Alpha User Written System Services .LIBRARY "SYS$LIBRARY:LIB.MLB" .MACRO DEFINE_SERVICE,NAME,NARG=0,MODE=EXEC,EACCVIO,?CHKCNT,? ENDMACRO 'MODE'_ROUTINE_COUNT='MODE'_ROUTINE_COUNT+1 .CALL_ENTRY MAX_ARGS=NARG, - HOME_ARGS=TRUE, - LABEL=NAME .SAVE_PSECT LOCAL_BLOCK .PSECT 'MODE'_LIST,LONG,WRT,NOEXE,PIC,CON .ADDRESS NAME .RESTORE_PSECT .IF NOT_EQUAL NARG ; IFNORD #<+4>,(AP),EACCVIO ; BRB CHKCNT ;EACCVIO: ; MOVZWL #SS$_ABORT,R0 ; RET ;CHKCNT: CMPB (AP),#NARG BGEQ ENDMACRO MOVZWL #SS$_INSFARG,R0 RET ENDMACRO: .ENDC .ENDM $PLVDEF $SSDEF KERNEL_ROUTINE_COUNT=0 EXEC_ROUTINE_COUNT=0 .PSECT EXEC_LIST,LONG,WRT,NOEXE,PIC,CON EXEC_TABLE: .PSECT KERNEL_LIST,LONG,WRT,NOEXE,PIC,CON KERNEL_TABLE: .PSECT USER_CODE,BYTE,NOWRT,EXE,PIC DEFINE_SERVICE USER_GET_TODR,1 MOVL 4(AP),R5 ; Get address to store time of day register IFNOWRT #4,(R5),10$ ; Branch if not writable MOVL #SS$_NORMAL,R0 ; Set normal completion status RET ; and return 10$: MOVZWL #SS$_ACCVIO,R0 ; Indicate access violation RET ; DEFINE_SERVICE USER_SET_PFC,2 MOVL 8(AP),R6 ; Get address to store previous value BEQL 10$ ; Branch if none IFNOWRT #4,(R6),30$ ; Branch if not writable 10$: MOVL #SS$_NORMAL,R0 ; Set normal completion status RET ; and return 30$: MOVZWL #SS$_ACCVIO,R0 ; Indicate access violation RET ; DEFINE_SERVICE USER_NULL MOVZWL #SS$_NORMAL,R0 ; Set normal completion status RET ; and return ;+ ; Any psect with the VEC attribute will be automatically moved to the start of the image. ;- .PSECT USER_SERVICES,PAGE,VEC,PIC,NOWRT,EXE .LONG PLV$C_TYP_CMOD ; Set type of vector to change mode dispatcher .LONG 0 ; Reserved .LONG KERNEL_ROUTINE_COUNT ; # of Kernel mode routines .LONG EXEC_ROUTINE_COUNT ; # of Executive mode routines .ADDRESS KERNEL_TABLE ; Kernel routine list .ADDRESS EXEC_TABLE ; Exec routine list .LONG 0 ; Kernel rundown handler .LONG 0 ; Exec rundown handler .LONG 0 ; RMS Dispatcher .LONG 0 ; Kernel routine flags .LONG 0 ; Exec routine flags .END * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful