24.12.2013 Views

TOPS-10 Monitor Calls Manual Volume 2 AA-K039D ... - Trailing-Edge

TOPS-10 Monitor Calls Manual Volume 2 AA-K039D ... - Trailing-Edge

TOPS-10 Monitor Calls Manual Volume 2 AA-K039D ... - Trailing-Edge

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CORE [CALLI 11]<br />

Before expanding core, you should compare the highest required address<br />

with the highest legal address (stored in .JBREL). The example below<br />

shows how to expand core only if necessary.<br />

You can specify the beginning of your program's high segment by using<br />

the REMAP monitor call, the /NEWPAGE or /SET switches to LINK, or the<br />

TWOSEG pseudo-op to MACRO.<br />

SKIP RETURN<br />

The ac contains the current virtual memory limit in lK blocks.<br />

However, if the CORE monitor call is issued from a non-zero section,<br />

the virtual memory limit is not returned in the ac.<br />

ERROR RE TURN<br />

The error return occurs if any of the following conditiqns occurs:<br />

a You give hiseg a value less than 400001 (or the ~iseg<br />

origin), but you do not have write-access privileges.<br />

a You give both hiseg and lowseg as zero. In this case, the<br />

number of free 1K blocks is returned in the ac.<br />

a The sum of the requested new low segment and the previously<br />

existing high segment exceeds your allowed program size.<br />

Core assignment is not changed; the maximum allowed program<br />

size (in IK blocks) is returned in the ac.<br />

a The sum of the requested new low and high segments exceeds<br />

your allowed program size. Core assignment is not changed;<br />

the maximum allowed program size (in 1K blocks) is returned<br />

in the ac.<br />

a You give a lowseg argument that would extend the low segment<br />

into the high segment.<br />

a<br />

One or both segments are locked.<br />

EXAMPLE<br />

MOVE<br />

PUSHJ<br />

JRST<br />

TI,NEWSIZ ;Set up for call<br />

P,CHKCOR ;Call for core<br />

CONTIN<br />

;Subroutine to get core only if needed<br />

CHKCOR:<br />

RELATED<br />

a<br />

a<br />

CAMG<br />

POPJ<br />

CORE<br />

JRST<br />

POPJ<br />

CALLS<br />

PAGE.<br />

SEGOP.<br />

TI, .JBREL## ;Core size OK?<br />

P, ;Yes<br />

TI, ;Get more core<br />

ERROR ;To error routine<br />

P, ;Core increase OK<br />

22-36

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!