Changes to madartl.tlib

Conversion from TICKS to DURATION'SMALL

The default conversion factor is 1.6384/2
which is
	DATA	068DB,08B01,0AC71
in 1750 long floating point data format (see 1750 doc ...)

48-bit format
0 sign bit (0 for positive, 1 for negative)
1-23,32-47 mantissa (m)
24-31 exponent (e)

So the number is .m * 2^e

The 1750 and Tartan Compiler are expecting a tclock of 100 kHz. XMM-OM and XMM-RGS have a tclock of 62.5 kHz (=16/2^8 MHz). So the conversion factor must be multiplied by 100/62.5=1.6 to get 2.62144

Calculation

.68DB8BAC71h * 1.6d / 2 (must divide by 2 and add 1 to the exponent)
= .53E2D6238E * 2^2

so the conversion factor in hex is:
53E2 D602 238E
so the DATA line in USERDEFS.asm should be

	DATA 053E2, 0D602, 0238E

Until 23.03.1998 XMMOM had

	DATA	053a7,01102,05161
which was 2.7832% too low. The XMM-RGS prom code still uses this factor.

TICKS in one and two days

Ticks in one and two days should be measured in real hardware ticks not expected ticks.
The default value for ARTONEDAY in USEDEFS.asm is
	DATA	0337F,09800 
where 16#337f9800# = 10#864 000 000#
using a tclock of 100kHz (timer B 10kHz)

This must be divided by 1.6 if our tclock is a factor of 1.6 too slow to give 16#337f9800#/1.6 = 540 000 000d = 202FBF00h so the DATA line in USERDEFS.asm should be

	DATA 0202F, 0BF00

The default value for ticks in two days is

	DATA 066FF, 03000
This must be divided by 1.6 if our tclock is a factor of 1.6 too slow to give 16#66FF3000#/1.6 = 1 080 000 000d = 405f7e00h so the DATA line in USERDEFS.asm should be
	DATA 0405f, 07e00

RGS

For RGS, using their slightly inaccurate conversion factor which was 2.7832% too low, the ticks in one and two days DATA lines should be:
	DATA 02046, 0BE34
	DATA 0408D, 07C68