Next Previous Up Top Contents Index

7 The MLWorks Foreign Interface Library

7.9 The Diagnostic structure

The Diagnostic structure contains a general collection of tools to assist with the provision of diagnostics involving general elements of the FI, such as stores. It is not envisaged that these would be used to provide functionality within applications, but, of course, this is not prohibited either.

Note: These tools may be changed or removed altogether in future versions of the FI.

viewStore

Function

Signature:

val viewStore : store -> string

Description:

Outputs a string containing information about stores.
dispStore

Function

Signature:

val dispStore : store -> store

Description:

Outputs the string produced by viewStore() on the standard output stream and returns the store.
storeInfo

Function

Signature:

val storeInfo : store ->
{ kind : string,
origin : address,
status : string,
alloc : string,
overflow : string,
size : int,
top : int,
free : int }

Description:

Provides a structured, diagnostic 'view' of the internals of a store. It can be used to monitor what is happening within a store. It also provides a basis for constructing your own diagnostic tools.
storeData

Function

Signature:

val storeData : { store : store, start : int, length : int } -> int list

Description:

Provides a region of the store workspace as a list of integers (actually positive numbers from 0 to 255 inclusive).
storeDataHex

Function

Signature:

val storeDataHex : { store : store, start : int, length : int } -> string

Description:

Provides a region of the store workspace as a hex string.
storeDataAscii

Function

Signature:

storeDataAscii : { store : store, start : int, length : int } -> string

Description:

Provides a region of the store workspace as an ASCII string.
diffAddr

Function

Signature:

val diffAddr : address -> address -> int

Description:

Yields the difference of two addresses. Useful for relative address computations.
incrAddr

Function

Signature:

val incrAddr : address * int -> address

Description:

Offsets a given address by an integer. Note that the offset may be positive or negative.

MLWorks Reference Manual version 2.0 - 29 Jul 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker