38 lines
1.0 KiB
Plaintext
38 lines
1.0 KiB
Plaintext
; --------------------------------------------------------------------------------
|
|
; @Title: Example PRACTICE Library implementation - Test script
|
|
; @Description:
|
|
; This script shows how to call functions located in a PRACTICE library script.
|
|
;
|
|
; @Keywords: PRACTICE
|
|
; @Author: rweiss
|
|
; @Copyright: (C) 1989-2019 Lauterbach GmbH, licensed for use with TRACE32(R) only
|
|
; --------------------------------------------------------------------------------
|
|
; $Id: libtest.cmm 21188 2023-07-27 09:54:52Z rweiss $
|
|
|
|
;Define a command to call the library functions
|
|
ON COMMAND MYLIB DO "~~~~/mylib.cmm"
|
|
|
|
;Library subroutines are now accessible with this syntax:
|
|
;MYLIB <subroutine name> [<parameters>]
|
|
|
|
PRIVATE &value1 &value2 &result
|
|
|
|
AREA.view
|
|
AREA.CLEAR
|
|
|
|
PRINT "PRACTICE Library Test"
|
|
PRINT "Test Function INC"
|
|
&value1=5
|
|
MYLIB INC &value1
|
|
ENTRY &result
|
|
PRINTF "INC %i = %i" &value1 &result
|
|
|
|
PRINT "Test Function ADD"
|
|
&value1=5
|
|
&value2=6
|
|
MYLIB ADD &value1 &value2
|
|
ENTRY &result
|
|
PRINTF "ADD %i + %i = %i" &value1 &value2 &result
|
|
|
|
ENDDO
|