Previous: New Compilation Flags
Up: PtInit updates for Monoprogram form
Previous Page: New Compilation Flags
Next Page: Extensions to Extra Services Control
To permit the monoprogram to cause Ports to simulate internally the conditions of first execution, Ports now exports the routine:
PROCEDURE ptDiscardPorts( FullRefresh:BOOLEAN);
"ptDispose"s of every port on the in use list.
If FullRefresh is TRUE, disposes of all port, including txpSysMsg,
and sets ptInUseHead to NIL; assumes next call to ptInit will assume
from this that full initialisation is needed;
If FullRefresh is FALSE, txpSysMsg is left on the in use list,
but all other ports are discarded.
Note actual manner of disposal (to free list, back to system, other)
is decided by ptDispose.
By calling ptDiscardPorts( TRUE); the Attract program can cause the next call to ptInit to perform a full initialisation.
ptDiscardPorts should clearly not be called by the ordinary dialogue module.
Ports has 2 compilation flags for recalling non-volatile variables, for saving them either to disc or to memory. The monoprogram format takes advantage of the one in memory.
When compiled for monoprogram format, ptInit reads from DlgGlbls's
exported variable dgParamSaveBuffer a series of parameters in
the form <tag-char>
TxpTicToc is taken from UserDefWriteSpeed if it is not
zero, from TchrDefWriteSpeed otherwise.
UseETCCharSet is equivalent to CharSetFlag > 0.
This set of variables and the logic applied to them is a union of the
sets that were previously being handled respectively in saving on disc
and saving to memory.
tag Ports variable Default value if tag is missing
d DeadTime DefDeadTime
r DefaultRead DefReadTime
s DefaultStroke DefStrokeTime
t TchrDefWriteSpeed DefTicToc
u UserDefWriteSpeed 0
c CharSetFlag 1 (=TRUE)