All products manufactured by Keithley MetraByte are warranted against defective materials
and worksmanship for a period of one year from the date of delivery to the original
purchaser. Any product that is found to be defective within the warranty period will, at the
option of Keith@ MetraByte, be repaired or replaced. This warranty does not apply to
products damaged by improper use.
Warning
Keithley MetraByte assumes no liability for damages
consequent to the use of this product. This product is not
designed with components of a level of reliability suitable
for use in life support or critical applications.
Disclaimer
Information furnished by Keithley MetraByte is believed to be accurate and reliable.
However, the Keithley MetraByte Corporation assumes no responsibility for the use of such
information nor for any infringements of patents or other rights of third parties that may
result from its use. No license is granted by implication or otherwise under any patent
rights of Keithley MetraByte Corporation.
Notes
Keithley MetraByte/Asyst/DAC is also referred to here-in as Keith@ MetroByte.
BasicTM is a trademark of Dartmouth College.
IBM@ is a registered trademark of International Business Machines Corporation.
PC, XT, AT, PS/2, and Micro Channel Architecture@ (MCA) are trademarks of
International Business Machines Corporation.
Microsoft* is a registered trademark of Microsoft Corporation.
Turbo C@ is a registered trademark of Borland International.
- iv -
Contents
CHAPTER 1
1.1
1.2
CHAPTER 2
2.1
2.2
2.3
2.4
2.5
2.6
INTRODUCTION
Overview
Implementation
INTERFACE DRIVERS
Microsoft C & QuickC
Small Model .....................................
Medium Model ....................................
Large Model
Microsoft C Example. ...............................
Borland Turbo
Small Model
Medium Model ....................................
Large Model.,
Turbo C Example.
Microsoft PASCAL.
Medium Model
Microsoft PASCAL Example.
Borland Turbo PASCAL.
Compact Model..
Large Model
Turbo PASCAL Example.
Microsoft FORTRAN.
Large Model
Integer (Default) Function Or Subroutine.
Microsoft FORTRAN Example. ..........................
MetraByte’s PCF-M5 is for Pascal, C, and Fortran programmers writing data acquisition and control
routines for the MSTEP-5 Board.
languages;
l Microsoft C fV4.0 - 6.0)
l Microsoft QuickC (Vl .O - 2.0)
l Borland Turbo C (Vl .O - 2.0)
l Microsoft PASCAL W3.0 - 4.0)
l Borland Turbo PASCAL (V3.0 - 5.0)
l Microsoft FORTRAN (V4.0 - 4.1)
The PCF-MS supports all memory models for the following
1
The PCF-M5 consists of several assembly language drivers for the various supported languages along
with example programs for each language. This manual is structured to illustrate memory model
usage for each of the above languages and to include a brief example program at the end of each
language section. Full source listings are included on the supplied disk.
This manual is not an introduction or operating guide to the supported MSTEPS boards. You should
be familiar with the boards’ various operating MODES, PARAMETERS, and ERROR codes before
attempting PCF-MS implementation. Refer to the main sections of this manual supplied with your
MSTEP-5 MetraByte board for a complete discussion of hardware and related functionality.
PCF-M5 Distribution Software is furnished on a 5.25” floppy diskette. A 3.5” diskette version is
available as an option.
Al .2 IMPLEMENTATION
Before working with this interface package, you are urged to become familiar with MSTEP-5 board
functions and specifications. Example programs herein do not assume any knowledge of these boards
since the programs are general in nature and do not actually implement features of any specific board.
They are limited to the actual language interface for the various languages supported.
In the following chapter, each interface driver (implemented via a CALL statement) consists of three
position-dependent parameters. These are MODE, ARGUMENT (or PARAM), STPNUM, and FLAG,
as follows:
l-l
PCF-M5 USER GUIDE
MODE
PARAM
STl’NUM
FLAG
Type of function to be executed by the MSTEP-5.
Function-dependent arguments required for execution.
Step Number, which is a long integer that specifies the direction and
number of steps to travel, or it returns optical shaft encoder counts. The
sign indicates direction (+ = clockwise, - = counter-clockwise). Not all
MODES use StpNum data, but it must always be included in the CALL
parameter list.
Error number, if any, corresponding to selected MODE
* * * * *
1-2
INTERFACE
2.1 MICROSOFT C (V4.0 - 6.0) & QUICKC (Vi .O - 2.0)
Small Model
CHAPTER
2
DRIVERS
Model:
Passes:
Sequence:
Default Calling
Convention:
Example:
‘c’ Call:
‘c’ Declaration:
.ASM Subroutine:
The following assembly code shows how the driver handles user arguments:
-mscs-mstep proc near
push bp
mw~ W,sp
.
POP bp
ret ; return
-xnscs-mstep endp
Small (“/AS”) switch on command line
word size pointers (offset, no DS register)
Arguments Passed Right to Left
Arguments Passed by Value (Passing pointers to a subroutine is
considered pass-by-value convention)
;
; [bpt4] holds offset of Mode
; [bpt6] holds offset of Param
; [bpt8] holds offset of StpNum
; [bptlo] holds offset of Flag
Program execution here
;
I
;
*restore bp & sp prior to exit
I
Other:
This information is provided for those wishing to create their own drivers:
.
-mscs-mstep is declared “PUBLIC” in the .ASM file
l mscs-mstep is declared “extern” in the “C” file
2-1
PCF-MS USER GUIDE
l The .ASM file contains the “.model small” directive (MASM & TASM only)
l Add leading underscore “-‘I to all mscs-mstep occurrences in .ASM file
l mscs-mstep is a near call
l mscs-mstep must be in a segment fname-TEXT (where fname is the name of the file where
mscs-mstep resides) if .ASM file contains mixed model procedures.
Medium Model
Model:
Passes:
Sequence:
Medium (“/AM”) switch on command line
Word-size pointers (offset, no DS register)
Arguments Passed Right to Left
The following assembly code shows how the driver handles user arguments:
-mscm_mstep proc far
push bp
mew bptw
.
.
.
far CALL (dword return address)
;
save base pointer
;
save stack pointer
;
; [bp+C] holds offset of Mode
; [bpt8] holds offset of Param
; [bptlO] holds offset of StpNum
; [bpt12] holds offset of Flag
Program execution here
;
.
I
restore bp & sp prior to exit
POP bp
ret
;return
;
-mscm_mstep endp
Other:
This information is provided for those wishing to create their own drivers:
.
-mscm-mstep is declared “PUBLIC” in the .ASM file
l mscm-mstep is declared “extem” in the “c” file
l The .ASM file contains the “.model medium” directive (MASM & TASM only)
l Add leading underscore “-” to all mscm-mstep occurrences in .ASM file
l mscm-mstep is a far call
2-2
CHAPTER 2: INTERFACE DRIVERS
l mscm_mstep must be in a segment fname_TEXT (where fname is the name of the file where
mscm-mstep resides), else Linker returns an error.
Large Model
Model:
Passes:
Sequence:
Large (“/AL”) switch on command line
dword size pointers (offset and DS register)
Arguments Passed Right to Left
Default Calling
Convention:
Arguments Passed by Value
Example
‘c’ Call:
‘c’ Declaration:
mscl-mstep (&Mode, Param, &StpNum, &Flag);
extem void mscl-mstep(int*, unsigned long*, int?;
.ASM Subroutine:
The following assembly code shows how the driver handles user arguments:
-mscl-mstep proc far
push bp
mov bprsp
far CALL (dword return address)
;
save base pointer
;
save stack pointer
;
; [bpt6] holds offset of Mode
.
.
.
.
; [bptlO] holds offset of Param
; [bptll] holds offset of StpNum
; [bpt18] holds offset of Flag
Program execution here
;
;
.
POP bp
ret
;return
;
*restore bp & sp prior to exit
,
-mscl-mstep endp
Other:
This information is provided for those wishing to create their own drivers:
-mscl-mstep is declared “PUBLIC” in the .ASM file
mscl-mstep is declared “extern” in the “c” file
The .ASM file contains the “.model large” directive (MASM & TASM only)
Add leading underscore
“-” to all mscl-mstep occurrences in .ASM file
Both code and data use dword (segment/offset) pointers
mscl-mstep must be in a segment fname_TEXT (where fname is the name of the file where
mscl-mstep resides), else Linker returns an error.
2-3
PCF-M5 USER GUIDE
Microsoft ‘C’ Example
/*
/*
/*
/*
/*
/*
/*
#include <stdio.H>
#include <stdlib.H>
#&fine Beep printf("%s","\7")
#define TRYAGAIN
#define REV-VIDEO
#define DEF-VIDEO
#define READY
#define ON
#define OFF
The Following are the function Calls for different models:
mscs-mstep(&Mode,Param,&StpNum,&Flag) : Microsoft C mall Model. */
mscm-mstep(&Mode,Param,&StpNum, &Flag) :
mscl~mstep(&Mode,Param,&StpNum,&Flag) : Microsoft C large Model. */
This Program Uses the Small Model Function Call
mscs-mstep(int *,unsigned *,long *,int *);
Demonstration Program for WSTEP-5
Keithley Metrabyte Corporation
The following assembly code shows how the driver handles user arguments:
-tcs-mstep proc near
push bp
mov bp,sp
save base pointer
:
save stack pointer
:
; [bp+4] holds offset of Mode
.
.
.
.
.
POP bp
; [bp+6] holds offset of Param
; [bp+8] holds offset of StpNum
; [bp+lO] holds offset of Flag
Program execution here
;
;
;
*restore bp & sp prior to exit
I
ret ; return
_tcs-mstep endp
Other:
This information is provided for those wishing to create their own drivers:
.
-tcs-mstep is declared “PUBLIC” in the .ASM file
l tcs-mstep is declared “extern” in the “c” file
l The .ASM file contains the “.model small” directive (MASM & TASM only)
l Add leading underscore “-” to all tcs-mstep occurrences in .ASM file
l tcs-mstep is a near call
l tcs-mstep must he in a segment fname_TEXT (where fname is the name of the file where tcs-mstep
resides), else Linker returns an error.
2-6
Medium Model
CHAPTER 2: INTERFACE DRIVERS
Model:
Passes:
Sequence:
Medium (“-mm”) switch on command line
word size pointers (offset, no DS register)
Arguments Passed Right to Left
Default Calling
Convention:
Arguments Passed by Value
Example
‘c’ Call:
‘c’ Declaration:
tan-mstep (&Mode, Param, &StpNum, &Flag);
extern void tcm-mstepfint*,unsigned long*, int*);
.ASM Subroutine:
The following assembly code shows how the driver handles user arguments:
-tom-nstep proc far
push bp
mov bp,sp
dword pointer return address
;
save base pointer
:
save stack pointer
:
; [bp+C] holds off set of Mode
.
.
.
.
; [bp+8] holds offset of Param
; [bp+lO] holds offset of StpNum
; [bp+12] holds offset of Flag
Program execution here
;
;
;
-restore bp & sp prior to exit
POP bp
ret
; return
,
-toxn_mstep endp
Other:
This information is provided for those wishing to create their own drivers:
.
-tcm-mstep is declared “PUBLIC” in the .ASM file
l tcm-mstep is declared “extern” in the “C” file
l The .ASM file contains the “.model medium” directive (MASM & TASM only)
l Add leading underscore
l tcm-mstep must be in a segment fnameTEXT (where fname is the name of the file where
“-” to all tcm-mstep occurrences in .ASM file
tcm-mstep resides), else Linker returns an error.
Large Model
Model:
Passes:
Sequence:
Large (“-ml”) switch on command line
dword size pointers (offset and DS register)
Arguments Passed Right to Left
int modeO(void);
int mo&l(void);
int mode2 (void);
int mode3 (void);
int model(void);
int mode5jvoid);
int mode6(void);
int mode7(void);
int mode8(void);
int modeg(void);
int modelO(void);
int modell(void);
int model2(void); /* mode 12 */
int setchannel(void);
int ErrHandler(int);
int
int CetLongInp(int,int,char *,long *);
msp-mstep (Mode, Param,StpNum,Rlag)
type darray = array[O-91 of word;
msp-mstep(VAR Mode: integer; VAR param; darray; VAR StpNum:
integer4; VAR Flag: integer):extemal;
.ASM Subroutine:
The following assembly code shows how the driver handles user arguments:
msp_mstep proc far :
push bp
mov bP,sP
far call (dword return address)
save base pointer
;
save stack pointer
:
; [bp+G] holds offset of Flag
; [bp+8] holds offset of StpNum
.
.
.
.
.
mov ax,n
POP bp
ret 8 ;
return and pop bp & 3p values prior to exit
; [bp+lO] holds offset of Param
; [bp+12] holds offset of Mode
Program execution here
;
;
:
Return Value for Function In ax register
;
;
msp-nstep endp
Other:
This information is provided for those wishing to create their own drivers:
l mspmstep is declared “PUBLIC” in the .ASM file
l msp-mstep is declared external in the calling program
l msp-mstep resides in segment-TEXT (default of the .model command)
2-11
PCF-M5 USER GUIDE
Microsoft PASCAL Example
PROGRAM MSPDEMO(Input,Output);
(*************************************************************************)
(* Demonstration program for MSTEP-5
(* select channel A
(* start up rate, 49 pps
(* high speed run rate
(* acceleration/deceleration pulse count *)
(* 4 phase
(* full step
(* inverted Sl-5 outputs
(* internal clock
(* switching off at standstill
(* base address
:= 0;IntLev := 7;
*I
*I
"1
*I
*I
"1
"1
*I
*I
2.4 BORLAND TURBO PASCAL (VER 3.0 - 4.0)
Borland's Turbo PASCAL supports a compact and a large memory model. The compact model
supports one code segment and multiple data segments. In this model, the code segment is limited to
f54K with assembly routine calls being near calls. The data segment is unlimited. The large model
permits unlimited code and data segments with assembly calls and data access being far calls.
The program (TINST.EXE) shipped with TURBO PASCAL can change the calling convention so that
the user may not know which convention they are using. The default state is “OFF” or compact mode.
In order to ascertain which mode you are using, run the “TINST.EXE” program.
Compact Model
Model:
Passes:
Sequence:
Default Calling
Convention:
Example
PASCAL Call:
PASCAL Declaration:
PROCEDURE:
Compact (Forces far call “OFF” in TINST.EXE)
dword size pointers (offset and segment)
Arguments Passed Left to Right
Arguments Passed by Value
tp-mstep (Mode, Param, StpNum, Flag);
type darray = array[O-91 of word;
tp-mstep(VAR M
o d e: integer;VAR Param: darray;VAR StpNum:
integer4;VAR Flag: integer):external;
2-13
PCF-MS USER GUIDE
.ASM Subroutine:
(Either Model)
The following assembly code shows how the driver handles user arguments:
tp-mstep proc near
push bp
mov bp,sp
.
.
.
near call (single word return address)
;
save base pointer
;
save stack pointer
;
; [bp+4] holds offset of Flag
; [bp+8] holds offset of StpNuxn
; [bp+12] holds offset of Param
; [bp+16] holds offset of Mode
.
.
mov ax,n
Program execution here
:
i
return Value for Function In ax register
:
POP bp
ret 16
return 6 pop values prior to exit
;
tp-mstep endp
Other:
This information is provided for those wishing to create their own drivers:
. Use the $L ‘Metacommand’ to link the object file containing external function tp-mstep, i.e. {$l
turbopas} (Link to file turbopas.obj).
. The VAR declarative forces pass by reference (address of variable) in the function declaration.
Default is pass by value (pushing the actual integer value onto the stack).
l tp-mstep is declared external in the calling program . Remember that in PASCAL, functions return
a value whereas procedures never do.
l The .ASM file contains an explicit declaration of the code segment containing tp-mstep. Turbo
PASCAL handles segments in a primitive manner which is not compatible with the ‘.model’
statements available in MASM or TASM. The function tp-mstep must reside in a segment called
‘CODE’! Turbo PASCAL will not accept any other segment name. If tp-mstep is not in segment
“CODE”, the linker returns an “unresolved external” error. The Segment Declaration for “CODE” in
the .ASM file must appear as:
CODE SEGMENT WORD PUBLIC
ASSUME CS:CODE
.
.
; CODE GOES HERE
;~ODE ENDS
Large Model
Model:
Passes:
Sequence:
Large (Forces far call “ON” in TINST.EXE)
dword size pointers (offset and segment)
Arguments Passed Left to Right
2-14
Default Calling
Convention:
Example
CHAPTER 2: INTERFACE DRIVERS
Arguments Passed by Value
PASCAL Call:
PASCAL Declaration:
PROCEDURE:
tp-mstep (Mode, Param, StpNum, Flag);
type darray = array[O-91 of word;
(* select channel A
(* start up rate, 49 pps
(* high speed run rate
(* acceleration/deceleration pulse count *)
(* 4 phase
(* full step
(* inverted Sl-5 outputs
(* internal clock
(* switching off at standstill
(* base address
:= 0;IntLev := 7;
END.
2.5 MICROSOFT FORTRAN (V4.0 AND UP)
*I
*)
*I
"1
*)
"1
*I
*I
"1
Large Model
Model:
Passes:
Sequence:
Default Calling
Convention:
Example
FORTRAN Call:
FORTRAN Declaration:
.ASM Subroutines:
NOTE: FORTRAN integer functions (beginning with letters i, j, or k) return results in the ax
register whereas non-integer functions reserve 4 bytes on the calling stack for a far
pointer to the result. Non-integer functions pass their arguments starting at location
bp+18 after the “push bp” and “mov bp,sp” instructions have been executed. Keithley
MetraByte’s FORTRAN <--> Assembly routines predominantly use type integer to avoid
the non-integer problem.
pointers, floating point results, long integers, etc. The user should use the IMPLICIT
INTEGER (A-Z) declaration causing all Functions and Variables to be implicitly type
Large
dword size pointers (offset and DS register)
Arguments Passed Left to Right
Arguments Passed by Reference
call fmstep(Mode, Param( StpNum, Flag);
None necessary in FORTRAN source file (Fortran assumes that
undeclared subroutines or functions are external. It is left to the linking
process to provide the required .LIB or .OBJ files. However, the function
name should conform to ANSI FORTRAN rules for integer functions.
Using non-integer functions may be a problem when returning
2- 17
PCF-M5 USER GUIDE
integer unless declared otherwise. Also note that FORTRAN calls by Reference. This
method places the address of the passed parameters (rather than the parameters
themselves) onto the stack at the time of the call to any function or subroutine. As a
convenience, PCF-M5 provides functions UNBYT and OUTBYT) for directly addressing
the registers and (KEYHOT and KEYRD) for checking Hot Key and reading a key from
the keyboard.
Integer (Default) Function or Subroutine
The following assembly code shows how the driver handles user arguments:
frnstep proc far
push bp
mcv bprsp
.
.
.
dword pointer return address
;
save base pointer
;
save stack pointer
;
; [bp+6] holds offset of Flag
; [bp+lO] holds offset of StpNum
; [bp+14] holds offset of Param
; [bp+18] holds offset of Mode
.
mov ax,n
Program execution here
;
.
I
i
return Value for Function In ax register
;
POP bp
ret ;
fmstep endp
NOTES:
1.
VAR3 = Return Value of Function
2. Function fmstep must be declared as an integer * 2 fucntion.
Microsoft FORTRAN Example
C************************************************************~*****
c
This is a general purpose library file which provides control of the
MSTEP-5 boards. This file can be linked with programs written in C,
PASCAL, or FORTRAN to provide access to the MSTEP-5 operating
modes.
NOTE: This library cannot be used with TurboPASCAL. However, TurboPASCAL may be
used with Turbops.obj (see below).
The following is a brief description of the available call routines:
mscs-mstep(mode,param,stpnum,flag)
: Call from Microsoft C Small Model
mscm_mstep(mode,param,stpnum,flag1 . Call from Microsoft C Medium Model
mscl-mstep(mode,param,stpnum,flag)
tcs-mstep(mode,param,stpnum,fIag)
tcm-mstep(mode,param,stpnum,flag)
:
Call from Microsoft C Large Model
Call from Turbo C Small Model
Call from Turbo C Medium Model
tcl-mstep(mode,param,stpnum,flag) Call from Turbo C Large Model
msp-mstep(mode,param,stpnum,flag)
Call from Microsoft PASCAL
fmstep(mode,param,stpnum,flag) Call from Microsoft FORTRAN
Linking the Library “mstep.lib” to the user program is accomplished after program compilation by
including it in the link line as follows:
link userprog.obj,userprog,,user.lib_mstep.LIB;
userprog.obj is an object module produced by compilation of the user program.
userprog should be used for the resultant executable .EXE file.
user.lib is any other user library, if applicable.
To create the MSTE.LIB Library for PASCAL, C, or FORTRAN:
MASM /DBIN=O MSTEP.ASM
MASM /DBIN=O MSTEPPCF.ASM
LIB MSTEP+MSTEPtMSTEPPCF:
To create the MSTEP.QLB library for QuickBASIC 4.5:
MASM /DBIN=O MSTEP.ASM
MASM /DBIN=O MSTEPPCF.ASM
LINK /Q MSTEP.OBJ QBX.LIB,,,QBXQLB.LIB
To create the MSTE.BIN for BASIC:
MAIM /DBIN=~ MSTE.ASM
MASM /DBIN=~ MSTEPPCF.ASM
2-20
LINK MSTEPPCF t MSTE,MSTEP;
EXEPBIN MSTEP.EXE MSTEP.COM
MAKEBIN MSTEP.COM
For TurboPASCAL, the entry point is:
CHAPTER 2: INTERFACE DRIVERS
tp-rastep (mode,param,stpnum,flag)
:Call from TurboPASCAL program
The user program should have the directive
{$L turbopas}
at the beginning of the user program. This directive will ensure that the TPC compiler/linker will
include the proper interface object.
TURBOPAS.OBJ
(from the PCF-PIOINT disk)
2 - 21
PCF-M5 USER GUIDE
* * * * *
2-22
CHAPTER
BASIC INTERFACE DRIVERS
3.1 INTERPRETED BASIC (GW, COMPAQ, IBM, ETC.)
Medium Model (Only Model Available)
3
Model:
Passes:
Sequence:
Default Calling
Convention:
.ASM Subroutine:
The following assembly code shows how the driver handles user arguments:
Location 0 (Beginning of Code Segment)
mstep proc far
push bp
mcv bprsp
Medium (Far Calls, Single Data)
word size pointers (offset and no DS Register)
Arguments Passed Left to Right
Arguments Passed by Reference
far call (dword return address)
;
save base pointer
;
save stack pointer
;
; [bpt6] holds offset of Flag%
[bpt8] holds offset of STP#
;
[bptlO] holds offset of D%
;
; [bpt12] holds offset of MD%
Program execution here
;
restore bp 6 sp prior to exit
POP bp
ret
mstep endp
Example:
Refer to Section 4.15 of the MSTEP-5 User Guide.
NOTE BASIC requires that the .BIN file containing the callable subroutine “mstep(Mode%,
D%(O), STP#, Flag%)’ reside at location 0 in the .ASM segment or to “jmp” (unconditional
jump) to the .BIN file. A BASIC “jmp ” will always jump to location 0 in the .ASM code
segment.
:
3-1
PCF-M5 USER GUIDE
Creation of a .BIN file is accomplished as follows:
1. Create the .ASM Source Code File ‘EXAMPLE.ASM’
2. Assemble ‘EXAMPLE.ASM’ thus creating ‘EXAMPLE.OBJ
Link ‘EXAMPLE.OBJ’ to create ‘EXAMPLE.EXE
3.
4. Run EXE2BIN on ‘EXAMPLE.EXE’ (DOS Utility) to create ‘EXAMPLE.COM
5. Run MAKEBNEXE (Keithley MetraByte Utility) on ‘EXAMPLE.COM’ to create
‘EXAMPLE.BlN
3.2 QUICKBASIC
MASM EXAMPLE ;
LINK EXAMPLE ;
EXEZBIN EXAMPLE.EXE EXAMPLECOM
MAKEBIN EXAMPLE.COM
Medium Model (Only Model Available)
Model: Medium (far Calls, Single Data).
Passes: Word-size pointers (Offset and no DS Register).
Sequence: Arguments passed left-to-right.
Default Calling
Convention: Arguments passed by reference.
.ASM Subroutine:
The following assembly code shows how the driver handles user arguments:
QBPIOINT proc far
push bp
mmr bp,sp
.
.
.
far call (dword return address)
;
save base pointer
;
save stack pointer
;
; [bpt6] holds offset of Flag%
; [bp+8] holds offset of D%
[bp+lO] holds offset of STP#
;
; [bptlP] holds offset of MD%
Program execution here
;
POP bp
ret
QBPIOINT endp
3-2
restore bp & sp prior to exit
;
Example:
Refer to Section 4.16 of the MSTEP-5 User Guide.
CHAPTER 3: BASIC INTERFACE DRIVERS
NOTE
When creating a .QLB file, it is good practice to make a .LIB of the same version as a
backup file.
Creation of a .QLB file is accomplished as follows: