Integer Math Only (No Decimals)

This program demonstrates how MDrive software handles math functions. Only integers are allowed and if the result of an operation produces a remainder, that remainder is ignored and no rounding is done.

'Integer Math Only (No Decimals)

'CODE               DESCRIPTION

VA V1=10  'declare variables
VA V2=3
VA V3
PG 1         'enter program mode at address 1
LB aa        'label aa
V3=V1+V2     'add V1+V2,put in V3
PR "V3= " V3 'print V3 to term
H 1000       'hold execution for 1000 mSec
V3=V1*V2     'multiply V1*V2,put in V3
PR "V3= " V3 'print V3 to term
H 1000       'hold execution for 1000 mSec
V3=V1/V2     'divide V1/V2,put in V3
PR "V3= " V3 'print V3 to term
E            'end program
PG           'exit program mode

'*****************************************************
'type  to run program
'program action
  'V3=V1+V2 produces an answer of 13
  'V3=V1*V2 produces an answer of 30
  'V3=V1/V2 produces an answer of 3
  'try typing different values of V1 and V2 and "ex aa"
  'V1=35
  'V2=4
  'EX aa
  'results
  'V3=V1+V2=39
  'V3=V1*V2=140
  'V3=V1/V2=8

IMS Logo Wide

370 N. Main St., P.O. Box 457
Marlborough, CT 06447 U.S.A.
Phone: 860 / 295-6102
Fax: 860 / 295-6107
Email: info@imshome.com

Contact

TECHNICAL SUPPORT (U.S.A.)
Phone: 860 / 295-6102
Fax: 860 / 295-6107
E-mail: etech@imshome.com

IMS ASIA PACIFIC OFFICE
30 Raffles Pl., 23-00 Chevron House
Singapore 048622
Phone: +65 / 6233 / 6846
Fax: +65 / 6233 / 5044
E-mail: wllee@imshome.com

IMS EUROPEAN SALES MGT.
4 Quai Des Etroits
69005 Lyon, France
Phone: +33 / 4 7256 5113
Fax: +33 / 4 7838 1537
E-mail: bmartinez@imshome.com

IMS UK Ltd
.
25 Barnes Wallis Road
Segensworth East
Fareham, Hampshire, UK  PO15 5TT
Phone: +44 / 0 1489-889825
Fax:: +44 / 0 1489-889857
E-mail: mcheckley@imshome.com

U.S.A. SALES OFFICES
Eastern Region 

Phone: 973 / 661-1270
Fax: 973 / 661-1275
E-mail: jroake@imshome.com

Central Region
Phone: 260 / 402-6016
Fax: 419 / 858-0375
E-mail: dwaksman@imshome.com

Western Region
Phone: 602 / 578-7201
E-mail: dweisenberger@imshome.com