home *** CD-ROM | disk | FTP | other *** search
- *-----------------------*
- * Reference : Functions * Sun Sep 1 14:45:06 1991
- *-----------------------*
-
-
- ============================== Introduction ==================================
-
- This reference file contains all functions. Commands are not in this file.
-
- ================================= isbreak ====================================
-
- <result> = ISBREAK( <address> )
-
-
- Test if there is a ¹breakpoint in the ³current debug task on <address>.
- If true this function returns the ²breakpoint number and the
- ²breakpoint type in one longword, else it returns 0.
-
- <result> has the following format :
-
- NNNNTTTT
-
- with NNNN a word containing the breakpoint number
- and TTTT containing the breakpoint type
-
- The following types are supported :
- 'T' ²temporary breakpoint
- 'N' ²normal breakpoint
- 'P' ²profile breakpoint
- 'C' ²conditional breakpoint
- 'A' ²after breakpoint (timeout(
- 's' breakpoint used to skip a BSR or JSR
-
-
- Related commands: debug break trace
-
- Related functions: getdebug toppc botpc
-
- Related lists: dbug
-
- Related tutor file: Debug
-
- ================================ geterror ====================================
-
- <error> = GETERROR( <expression string> )
-
-
- ³Evaluate an expression and ³return the error. If there was no error, 0
- is returned.
-
-
- Example :
-
- < disp geterror(7) <enter>
- > 00000000 , 0
-
- 0 since 7 is a valid expression.
-
- < disp geterror(7+) <enter>
- > Missing operand !
- > 00000010 , 16
-
- returns 16 since there is a missing operand.
-
- The following errors are defined (Note ! Some of these are obsolete and
- will never appear) (Note ! you can change the errorstrings since this file
- is located in ¹s:PowerVisor-errors) :
-
- -4 A stack overflow was getting close !
- -3 Quit (should never occur)
- -2 Break...
- -1 PowerVisor has crashed !
- 0 No error
- 1 Not enough memory !
- 2 Error while opening library !
- 3 Error while opening window or screen !
- 4 Syntax Error !
- 5 This is not a device created with OpenDev !
- 6 Bad screen position arguments !
- 7 Bad list element type !
- 8 Bad redirection arguments !
- 9 Variable is a constant !
- 10 This is not a crashed task !
- 11 Unknown operator !
- 12 Only <B>yte, <W>ord or <L>ong !
- 13 Odd address error !
- 14 Could not Lock!
- 15 Bracket '(' expected !
- 16 To many arguments for library function !
- 17 Missing operand !
- 18 Lock is not a subdirectory !
- 19 Integer argument expected !
- 20 Error while opening device !
- 21 String argument expected !
- 22 What is this ')' doing here ?
- 23 Bad window size !
- 24 Unknown list element !
- 25 Not implemented yet !
- 26 Unknown mode argument !
- 27 Unknown AddFunc argument !
- 28 This is not a process !
- 29 Node is not a task or process !
- 30 This task is not freezed !
- 31 This task is already freezed !
- 32 Node type is wrong !
- 33 Addressed element not found !
- 34 Window is not sizeable !
- 35 Can't find segments !
- 36 This is no supported library function !
- 37 No help available for this subject !
- 38 Error opening help file !
- 39 Error while opening file !
- 40 Error while opening redirection file !
- 41 Error while reading file !
- 42 Else without if !
- 43 EndIf without if !
- 44 Not a resident module !
- 45 Not a lock !
- 46 Bad History value (2..1000)
- 47 Error opening trackdisk device !
- 48 DoIO returned with a non zero value !
- 49 There is no task to debug !
- 50 Unknown argument for trace !
- 51 Unknown argument for debug !
- 52 Task is suspended !
- 53 Address is in ROM ! Can't set breakpoint !
- 54 Not a debug node !
- 55 Bad '@' argument
- 56 LoadSeg error !
- 57 Breakpoint not found !
- 58 Unknown argument for dbmode !
- 59 There is no current debug task !
- 60 Unknown argument for break !
- 61 Breakpoint does not exist !
- 62 There are no symbol hunks !
- 63 Symbol not found !
- 64 Variable not found !
- 65 You can only remove variables !
- 66 You can not assign to a function !
- 67 You must use brackets with functions !
- 68 Unknown argument for symbol !
- 69 There are no symbols !
- 70 You can only realloc blocks smaller than 64K !
- 71 Your brackets are really out of order !
- 72 The debug task is busy, please try again later !
- 73 The task is not tracing, how should I stop it !
- 74 File does not have the right format !
- 75 This is not a structure definition !
- 76 Bad argument value !
- 77 No colorchange allowed when PowerVisor is on a window !
- 78 Could not open font !
- 79 Can't execute script file in script file !
- 80 Refresh window is not open !
- 81 You can't size the debug logical window !
- 82 Unknown tag type !
- 83 Not in tag list !
- 84 No output allowed on debug logical window !
- 85 Error writing file !
- 86 Not a Tag file !
- 87 Bad tag list value (0 .. 15) !
- 88 Unknown or invalid register !
- 89 There is a more recent patch then this one installed !
- 90 There is no fd file loaded for this library !
- 91 Unknown logical window !
- 92 Resulting commandline too long after converting from alias string !
- 93 Missing left bracket '(' in fd file !
- 94 Missing right bracket ')' in fd file !
- 95 Bad '##bias' statement in fd file !
- 96 You can't close the 'Main' physical window !
- 97 You can't close the 'Main' logical window !
- 98 Bad argument for 'openlw' ! Arg must be one of 'r','l','d' or 'u' !
- 99 Brother logical window must be on same physical window !
- 100 Window is not movable !
- 101 There is no father for this box !
- 102 Unknown preferences argument !
- 103 Please close visitor windows first !
- 104 Divide by zero !
- 105 No group operators allowed for the debug task !
- 106 Error opening screen !
- 107 You can't remove the 'rc' and 'error' variables. These are private !
- 108 'LoadSeg' failed !
-
-
- Related commands: error
-
- Related tutor files: TheWizardCorner
-
- ================================= getcol =====================================
-
- <columns> = GETCOL( <logical window> )
-
-
- Get the current ³number of columns (or -1) for the ²logical window. Note that
- this is not always equal to the visible number of columns. If <columns>
- is not equal to -1 it is the total number of columns. If <columns> is equal
- to -1 it means that the logical window is ¹autoscalable in horizontal
- direction. To get the real number of columns (after scaling) you can use
- the 'cols' function.
-
- 'getcol' uses ¹autodefault to the 'lwin' list for the first argument.
-
-
- Related commands: colrow fit
-
- Related functions: getrow cols lines getlwin getx gety
-
- Related lists: lwin
-
- Related tutor files: Screen
-
- ================================= getrow =====================================
-
- <rows> = GETROW( <logical window> )
-
-
- Get the current ³number of rows (or -1) for the ²logical window. See the
- explanation for 'getcol' to see what the -1 really means.
-
- 'getrow' uses ¹autodefault to the 'lwin' list for the first argument.
-
-
- Related commands: colrow fit
-
- Related functions: getcol cols lines getlwin getx gety
-
- Related lists: lwin
-
- Related tutor files: Screen
-
- ================================== eval ======================================
-
- <result> = EVAL( <string> )
-
-
- Evaluate the string and return the result.
-
-
- Example :
-
- < disp eval('1+2') <enter>
- > 00000003 , 3
-
- < a={scan} <enter>
- ????< 4+4 <enter>
- < disp eval(#a) <enter>
- > 00000008 , 8
-
-
- Related commands: disp void
-
- Related functions: if
-
- Related tutor files: Expressions
-
- =================================== if =======================================
-
- <result> = IF( <condition>,<expression 1>,<expression 2> )
-
-
- If <condition> is true, evaluate <expression 1>, else evaluate
- <expression 2>.
-
-
- Example :
-
- < d if(1,2,3) <enter>
- > 00000002 , 2
-
- < d if(0,2,3) <enter>
- > 00000003 , 3
-
- < a=1 <enter>
- < b=2 <enter>
- < c=3 <enter>
- < d=4 <enter>
- < e=5 <enter>
- < d if(a,if(b,c,d),e) <enter>
- > 00000003 , 3
-
- < void if(a==1,{help functions},{help commands}) <enter>
- > ...
-
-
- Related commands: disp void
-
- Related functions: eval
-
- Related tutor files: Expressions
-
- ================================= taglist ====================================
-
- <taglist> = TAGLIST( )
-
-
- Return the ³current tag list. This is a number between 0 and 15.
- You can change the current tag list with the 'usetag' or 'tg' commands.
-
-
- Related commands: usetag tg
-
- Related tutor files: LookingAtThings
-
- ================================== peek ======================================
-
- <value> = PEEK( <structure pointer>,<struct def pointer>,<field name> )
-
-
- Returns the value of <structure>.<field name>. <struct def pointer>
- must be a pointer to a previously loaded ²structure definition. <structure
- pointer> is the pointer to the ¹structure itself. <field name> must be defined
- in the structure definition.
-
- 'peek' uses ¹autodefault to the 'stru' list for the second argument.
-
-
- Related commands: addstruct interprete
-
- Related functions: apeek stsize
-
- Related lists: stru
-
- Related tutor files: LookingAtThings
-
- ================================= stsize =====================================
-
- <size> = STSIZE( <struct def pointer> )
-
-
- Return the size of the ¹structure represented by <struct def pointer>.
- <struct def pointer> must be a ²structure definition loaded with 'addstruct'.
-
- 'stsize' uses ¹autodefault to the 'stru' list for the first argument.
-
-
- Related commands: addstruct interprete
-
- Related functions: peek apeek
-
- Related lists: stru
-
- Related tutor files: LookingAtThings
-
- ================================== apeek =====================================
-
- <address> = APEEK( <structure pointer>,<struct def pointer>,<field name> )
-
-
- Returns the address of <structure>.<field name>. <struct def pointer>
- must be a pointer to a previously loaded ²structure definition. <structure
- pointer> is the pointer to the ¹structure itself. <field name> must be defined
- in the structure definition.
-
- 'apeek' uses ¹autodefault to the 'stru' list for the second argument.
-
-
- Related commands: addstruct interprete
-
- Related functions: peek stsize
-
- Related lists: stru
-
- Related tutor files: LookingAtThings
-
- ================================== lines =====================================
-
- <lines> = LINES( <logwin> )
-
-
- This function returns the maximum ³number of lines available on the
- ²logical window.
-
- 'lines' uses ¹autodefault to the 'lwin' list for the first argument.
-
-
- Example :
-
- < disp lines(main) <enter>
- > 00000033 , 51
-
-
- Related commands: colrow fit
-
- Related functions: cols getcols getrows getlwin getx gety
-
- Related lists: lwin
-
- Related tutor files: Screen
-
- ================================== cols ======================================
-
- <cols> = COLS( <logwin> )
-
-
- This function returns the maximum ³number of columns available on the
- ²logical window.
-
- 'cols' uses ¹autodefault to the 'lwin' list for the first argument.
-
-
- Example :
-
- < disp cols(main) <enter>
- > 00000056 , 86
-
-
- Related commands: colrow fit
-
- Related functions: lines getcols getrows getlwin getx gety
-
- Related lists: lwin
-
- Related tutor files: Screen
-
- ================================= getlwin ====================================
-
- <logwin> = GETLWIN( )
-
-
- This function returns a pointer to the ³current logical window.
- The current logical window is not the same as the ³active logical window.
- The current logical window is the one that shows all output. The active
- logical window is the one where you can ¹scroll with the keyboard.
-
-
- Related commands: current on active
-
- Related functions: getactive
-
- Related lists: lwin
-
- Related tutor files: Screen
-
- ================================ getactive ===================================
-
- <logwin> = GETACTIVE( )
-
-
- This function returns a pointer to the ³active logical window. This
- is the logical window where you can ¹scroll with the keyboard.
- You can change the active logical window with this command or with
- the ²<tab> key.
-
-
- Related commands: active on current
-
- Related functions: getlwin
-
- Related lists: lwin
-
- Related tutor files: Screen
-
- ================================== getx ======================================
-
- <current x position> = GETX( )
-
-
- Get the current x ¹coordinate on the ³current logical window (in columns).
-
-
- Related commands: locate home cls current
-
- Related functions: gety getcols getrows cols lines getlwin getchar
-
- Related lists: lwin
-
- Related tutor files: Screen
-
- ================================== gety ======================================
-
- <current y position> = GETY( )
-
-
- Get the current y ¹coordinate on the ³current logical window (in lines).
-
-
- Related commands: locate home cls current
-
- Related functions: getx getcols getrows cols lines getlwin getchar
-
- Related lists: lwin
-
- Related tutor files: Screen
-
- ================================= getchar ====================================
-
- <char> = GETCHAR( )
-
-
- Get the ¹character at the ²current screenposition in the
- ³current logical window.
-
-
- Example :
-
- < {locate 10,10;a=getchar()} <enter>
-
-
- Related commands: locate home cls current
-
- Related functions: getx gety getcols getrows cols lines getlwin
-
- Related lists: lwin
-
- Related tutor files: Screen
-
- ================================= lastmem ====================================
-
- <memory> = LASTMEM( )
-
-
- This function returns the address that 'memory', 'view' and 'unasm' will use
- to ³continue their listing.
-
-
- Related commands: memory view unasm
-
- Related functions: lastfound
-
- Related tutor files: LookingAtThings
-
- ================================ lastfound ===================================
-
- <last found> = LASTFOUND( )
-
-
- This function returns the address of the second byte of the string found
- with 'search' or 'next'. This is the address where 'next' will continue
- with the search.
-
-
- Related commands: search next
-
- Related functions: lastmem
-
- ================================== alloc =====================================
-
- <memory> = ALLOC( ('n',<size>) | ('c',<size>) | ('s',<string>) )
-
-
- Use this function for easy ²memory allocation.
- Use the 'free' function to free this memory, use the 'getsize' function
- to get the size of this memory and use the 'realloc' function to ¹reallocate
- the memory.
-
- The memory allocated with this function is guaranteed to contain
- only 0 (except if the first argument is equal to 's').
-
- Note that memory allocated with this command is automatically freed
- when PowerVisor quits.
-
- When the blocksize is smaller than 65533 bytes the result from this function
- is a pointer after a word containing the size. This pointer is thus word
- alligned but not longword alligned.
- When the blocksize is bigger the result is a pointer after a longword
- containing the size. This pointer is longword alligned.
- Using word or longword allignment you can determine the size of a memory
- block. An easier way to do this is to use the 'getsize' function.
-
-
- Example :
-
-
- To allocate 1000 bytes :
-
- < a=alloc(n,1000) <enter>
-
-
- To allocate 11 bytes and copy the string 'PowerVisor' to this memory use :
-
- < a=alloc(s,'PowerVisor') <enter>
-
-
- To allocate 1000 bytes in chip ram use :
-
- < a=alloc(c,1000) <enter>
-
-
-
- Related commands: cleanup showalloc
-
- Related functions: free realloc getsize isalloc
-
- ================================= realloc ====================================
-
- <new pointer> = REALLOC( <memoryblock>,<new size> )
-
-
- Use this function to ¹reallocate a ¹memoryblock allocated with the
- 'alloc' function. Only memoryblocks smaller than 64K are supported.
-
-
- Related commands: cleanup showalloc
-
- Related functions: alloc free getsize isalloc
-
- ================================== free ======================================
-
- FREE( <pointer> )
-
-
- Free a block previously allocated with 'alloc'.
- Note that all memory allocated with 'alloc' is automatically freed when
- PowerVisor quits or when you use 'cleanup'.
-
-
- Related commands: cleanup showalloc
-
- Related functions: alloc realloc getsize isalloc
-
- ================================= getsize ====================================
-
- <size> = GETSIZE( <memoryblock> )
-
-
- This function determines the size of a ¹memoryblock allocated with the
- 'alloc' function or some other PowerVisor commands.
-
-
- Related commands: cleanup showalloc
-
- Related functions: alloc free isalloc realloc
-
- ================================= isalloc ====================================
-
- <pointer to pointer> = ISALLOC( <pointer> )
-
-
- This function checks if <pointer> points to a ¹memoryblock allocated
- with the 'alloc' function. If it is, 'isalloc' returns a pointer to
- the pointer, otherwise 0.
-
-
- Related commands: cleanup showalloc
-
- Related functions: alloc free realloc getsize
-
- ================================= rfrate =====================================
-
- <refresh rate> = RFRATE( )
-
-
- Return the current ²refresh rate installed with the 'refresh' command.
-
-
- Related commands: refresh rwin
-
- Related functions: rfcmd
-
- ================================== rfcmd =====================================
-
- <pointer to refresh command> = RFCMD( )
-
-
- Return a pointer to the current ²refresh command (or 0).
- This function returns a string if used from ¹ARexx.
-
-
- Related commands: refresh rwin
-
- Related functions: rfrate
-
- ================================= curlist ====================================
-
- <pointer to string> = CURLIST( )
-
-
- Return a pointer to the name of the ²current list.
- This function returns a string if used from ¹ARexx.
-
-
- Related tutor files: GettingStarted
-
- =================================== key ======================================
-
- <vanillakey> = KEY( )
-
-
- Wait for a key and return the ²ascii value.
- This is especially useful in ¹scripts.
-
-
- Related commands: scan
-
- Related functions: qual
-
- ================================== qual ======================================
-
- <qualifier> = QUAL( )
-
-
- Return the ¹qualifier for the ³last pressed key (with 'key').
-
-
- Example :
-
- < a=key() <enter>
- < disp qual() <enter>
-
-
- Related commands: scan
-
- Related functions: key
-
- ================================== toppc =====================================
-
- <programcounter> = TOPPC( )
-
-
- This function returns the ²program counter visible at the top of the
- ³'Debug' logical window.
- You can set this program counter using the 'dstart' or 'dscroll' commands.
-
-
- Related commands: debug dwin dscroll dstart
-
- Related functions: botpc isbreak getdebug
-
- Related lists: dbug
-
- Related tutor files: Debug
-
- ================================== botpc =====================================
-
- <programcounter> = BOTPC( )
-
-
- This function returns the ²program counter visible at the bottom of the
- ³'Debug' logical window.
- You can set this program counter using the 'dstart' or 'dscroll' commands.
-
-
- Related commands: debug dwin dscroll dstart
-
- Related functions: toppc isbreak getdebug
-
- Related lists: dbug
-
- Related tutor files: Debug
-
- ================================ getdebug ====================================
-
- <debug node> = GETDEBUG( )
-
-
- Return the ³current debug node. You can set the current debug node with
- 'duse' and 'with'.
-
-
- Related commands: duse with debug
-
- Related functions: isbreak toppc botpc
-
- Related lists: dbug
-
- Related tutor files: Debug
-
- ================================== base ======================================
-
- <pointer> = BASE( )
-
-
- This function returns the pointer to the ²first element in the ²current list.
-
-
- Example :
-
- Go to the task list :
- < task <enter>
-
- < list <enter>
- > Task node name : Node Pri StackPtr StackS Stat Command Acc
- > ---------------------------------------------------------------------------
- > RAM : 00C20C68 00 00C2117A 1200 Rdy PROC -
- > golem.device : 00C05C8A 05 00C064B6 2048 Wait TASK -
- > NEWCON : 00C2CAA8 05 00C2DAA2 4000 Wait PROC -
- > ARP Shell Process : 00C26180 00 00C270F2 4000 Wait (03) -
- > PowerVisor1.0.task : 00C31C28 00 00C76132 1024 Wait TASK -
- > File System : 00C16758 0A 00C16AF6 840 Wait PROC -
- > File System : 00C172E8 0A 00C17686 840 Wait PROC -
- > trackdisk.device : 00C068DE 05 00C09F2E 512 Wait TASK -
- > trackdisk.device : 00C17846 05 00C17A5E 512 Wait TASK -
- > DH0 : 00C0DF08 0A 00C0E356 1000 Wait PROC -
- > input.device : 00C03BFA 14 00C04C00 4096 Wait TASK -
- > ARP Background She : 00C66EB8 00 00C75CD2 4000 Run pv (01) -
-
- < d base() <enter>
- > 00C20C68 , 12717160
-
-
- Related commands: list
-