PRACTICE Script Language Reference Guide

PRACTICE Script Language Reference Guide

PRACTICE Script Language Reference Guide TRACE32 Online Help TRACE32 Directory TRACE32 Index TRACE32 Documents ...................................................................................................................... PRACTICE Script Language ......................................................................................................... PRACTICE Script Language Reference Guide ........................................................................ 1 History ...................................................................................................................................... 4 Related Documents ................................................................................................................. 5 A ... D ........................................................................................................................................ 6 APPEND Append to file 6 BEEP Acoustic signal 6 CLOSE Close file 7 CONTinue Continue PRACTICE script 7 DECRYPT Decrypts a text or binary file 8 DO Start PRACTICE script 9 DODECRYPT Execute encrypted PRACTICE script (*.cmm) 10 E ... F ......................................................................................................................................... 11 ECHO Write text and data to an AREA window (with format decoration) 11 ELSE Conditional script execution 13 ENCRYPT Encrypt a text or binary file 14 ENCRYPTDO Encrypt a PRACTICE script (*.cmm) 15 ENCRYPTPER Encrypt a PER file (*.per) 16 END Terminate PRACTICE scripts, etc. 17 ENDDO Return from a PRACTICE script 18 ENTER Window-based input 19 ENTRY Parameter passing 21 G ... H ........................................................................................................................................ 22 GLOBAL Create global PRACTICE macro 22 GLOBALON Global event-controlled PRACTICE script execution 23 GOSUB Subroutine call 29 GOTO Local script jump 30 I ... L .......................................................................................................................................... 31 IF Conditional script execution 31 INKEY Character input 32 JUMPTO Global script jump 32 LOCAL Create local PRACTICE macro 33 ©1989-2021 Lauterbach GmbH PRACTICE Script Language Reference Guide 1 M ... O ........................................................................................................................................ 35 ON Event-controlled PRACTICE script execution 35 OPEN Open data file 40 P ... ............................................................................................................................................ 41 PARAMETERS Parameter fetching 41 PBREAK Breakpoints in PRACTICE script files (*.cmm) 42 PBREAK.at Deprecated command - for backward compatibility reasons 42 PBREAK.Delete Delete breakpoint 43 PBREAK.DISable Disable breakpoint 43 PBREAK.ENable Enable breakpoint 44 PBREAK.List Display breakpoint list 45 PBREAK.OFF TRACE32 disables breakpoint handling 46 PBREAK.ON TRACE32 re-enables breakpoint handling 47 PBREAK.RESet Clear all breakpoints 47 PBREAK.Set Add breakpoint 48 PEDIT Edit PRACTICE script 51 PLIST List PRACTICE script 54 PMACRO PRACTICE macros 55 PMACRO.EXPLICIT Enforce explicit PRACTICE macro declaration 55 PMACRO.IMPLICIT Implicit PRACTICE macro declaration 57 PMACRO.list Display PRACTICE macros 58 PMACRO.LOCK Lock PRACTICE macros 58 PMACRO.RESet Clear current PRACTICE macros 59 PMACRO.UNLOCK Unlock PRACTICE macros 59 PRINT Write text and data to an AREA window (without format decoration) 60 PRINTF Write formatted data to an AREA window 64 PRIVATE Create private PRACTICE macro 72 PSKIP Skip command or block in PRACTICE script 74 PSTEP Execute single line 75 PSTEPOUT Back to caller 76 PSTEPOVER Step over callee and stop at the next script line 77 Q ... R ........................................................................................................................................ 78 READ Read from data file 78 RePeaT Loop with check at end of loop 79 RETURN Return from subroutine 81 RETURNVALUES Take return values 82 RUN Start PRACTICE script 83 S ... T ......................................................................................................................................... 84 SCREEN Screen updating 84 SCREEN.ALways Refresh always 84 SCREEN.display Refresh screen 85 SCREEN.OFF No refresh 85 ©1989-2021 Lauterbach GmbH PRACTICE Script Language Reference Guide 2 SCREEN.ON Refresh when printing 85 SCREEN.WAIT Update screen while waiting 86 SPRINTF Write formatted data to a PRACTICE macro 88 STOP Interrupt PRACTICE script 89 W ... Z ........................................................................................................................................ 90 WAIT Wait until a condition is true or a period has elapsed 90 WHILE Loop with check at start of loop 92 WRITE Write to data file 93 WRITEB Write binary data to file 94 ©1989-2021 Lauterbach GmbH PRACTICE Script Language Reference Guide 3 PRACTICE Script Language Reference Guide Version 30-Apr-2021 History 31-Jan-19 Revised the PEDIT command. ©1989-2021 Lauterbach GmbH PRACTICE Script Language Reference Guide 4 Related Documents For information about how to pass parameters, PRACTICE macros, etc., refer to: • “PRACTICE Script Language User’s Guide” (practice_user.pdf) For information about literals, operators, and operator precedence, refer to: • “PowerView User’s Guide” (ide_user.pdf). Alternatively, choose Help menu > Index, and then enter the search item. For information about functions, refer to: • “PowerView Function Reference” (ide_func.pdf) • “General Function Reference” (general_func.pdf) For information about the purpose of functions in TRACE32, how to use functions, and the difference between functions and commands, refer to: • “General Function Reference” (general_func.pdf) ;To retrieve the same information via the TRACE32 command line: HELP.Index "scripting" HELP.Index "literals" HELP.Index "operators" HELP.Index "operator precedence" HELP.Index "functions" ©1989-2021 Lauterbach GmbH PRACTICE Script Language Reference Guide 5 A...D APPEND Append to file Format: APPEND <file> <parameter_list> Appends data to a file. The file is created if it does not exist. The syntax of the command is similar to the PRINT command. Example: APPEND datafile.dat "Test" See also ■ CLOSE ■ MKTEMP ■ OPEN ■ WRITE ▲ ’Release Information’ in ’Release History’ BEEP Acoustic signal Format: BEEP [<sound_code>] Generates an acoustic signal on the host computer. The type of the sound depends on the host. To get more complex sounds on workstation hosts it is possible to execute operation system commands. Example: BEEP 5. See also ■ SETUP.SOUND ©1989-2021 Lauterbach GmbH PRACTICE Script Language Reference Guide 6 CLOSE Close file Format: CLOSE #<buffer_number> Closes an input or output file. Example: OPEN #1 ~~~/test.dat /Write ; open file for writing WRITE #1 "Test data" ; write data to file CLOSE #1 ; close file TYPE ~~~/test.dat ; optional: open file in TYPE window The path prefix ~~~ expands to the temporary directory of TRACE32. See also ■ APPEND ■ OPEN ■ READ ■ WRITE ■ WRITEB ■ Data.WRITESTRING ■ Var.WRITE CONTinue Continue PRACTICE script Format: CONTinue [[<line>] [<file>]] A PRACTICE script which has been stopped will be restarted at the current PRACTICE command. PRACTICE scripts will be stopped by the STOP command or by a breakpoint within the script. The CONTinue command can also be used to resume a script that has been halted due to an error condition. The wrong command may be replaced by an interactive command. <line> Line number. Go till <line> in the active PRACTICE script (*.cmm). , <file> Line number is omitted. Path and file name of PRACTICE script. Go till first executable line in the PRACTICE script <file>. <line> <file> Go till <line> in the PRACTICE script <file>. ©1989-2021 Lauterbach GmbH PRACTICE Script Language Reference Guide 7 Example 1: DO test.cmm ; start script … … … ; script stopped at breakpoint CONTinue ; continue Example 2: … STOP ; stop script by STOP command … … CONTinue ; continue See also ■ END ■ PBREAK ■ STOP DECRYPT Decrypts a text or binary file Format: DECRYPT <keystring> <encrypted_file> [<decrypted_file>] Uses the original key string to decrypt a text or binary file previously encrypted with the ENCRYPT command. The resulting file can get a new name or replace the old file. See also ■ ENCRYPT ▲ ’Encrypt/Execute Encrypted Files’ in ’PowerView User’s Guide’ ©1989-2021 Lauterbach GmbH PRACTICE Script Language Reference Guide 8 DO Start PRACTICE script Format: DO <file> [<parameter_list>] Starts a PRACTICE script (*.cmm). The DO command can be used on the command level to start a PRACTICE script or within a script to run another file like a subroutine. PRACTICE files started by a DO command should be terminated by the ENDDO command. Additional parameters may be defined which are passed to the subroutine. The subroutine reads the parameter list using the ENTRY command. Using the DO command even those settings saved by the STOre command can be retrieved. <file> The default extension for <file> is *.cmm. The default extension can be changed with the command SETUP.EXTension PRACTICE. Examples: ; store window setting to the PRACTICE file 'test.cmm' STOre test.cmm Win ; set up window setting by executing the script 'test.cmm' DO test.cmm ; Endless loop with subroutine call &count=1 WHILE TRUE() ( DO mem_test PRINT "MEMTEST " &count &count=&count+1 ) ENDDO ChDir.DO c:\sample\x.cmm ; change to c:\sample

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    94 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us