12.07.2015 Views

ATARI PASCAL LANGUAGE SYSTEM - Strotmann.de

ATARI PASCAL LANGUAGE SYSTEM - Strotmann.de

ATARI PASCAL LANGUAGE SYSTEM - Strotmann.de

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.

3 . 3 P r o g r am Segmen t a t i on — Ch a i n i n gTh er e a r e t i me s when pr o grams e x c ee d t he memorg a v a i l a b l e a n d . al s om any t i me s when s egmen ta'Ci on i f p r o g r ams f o r comp i l a t i o n a n dmai n t enanc e pui pose s i i d e s i r ed. <strong>ATARI</strong> Pas c al p r o v i d es a " c h a i n i n g "mecha n i s m i n wh i c h on e p r o gr am ma y t r a n s f e r c o n t r o l t o a n o t h erpr o gram.You must <strong>de</strong>c l ar e a n untapped f i l e ( FI LE> ) an d use' t he .ASSION and. RESETpr ocedur e s t o in i t i a l i x e t h e f i l e . Y ou m ay t h en e x e c u t e a c a l l t o C heCHAIN pr o c e du re s pas s i n g t h e n ame o f ' t h e f i l e v a r i a b l e ' ai a s i n g l eparameter, . T hi "'r un-- t i m e l i br ar y r ou t i n e wi l l Che n per'Worm 't heappr opr i a t e f un c t i on s t o l oa d i n t h e f i l e yo u opened. us i n g t h e RESETst a tement . Pr ogram' s i se does no t m a t t er . A s mal l p ro gra m mag c hai n t oa l a r ge on i ,a nd a l a r g e pr ogr am mi j c ha i n Co a sm al l one . I f y oud es i r e ' t o comiivn i c a t e bet ween t h e c ha i ne d pr ogr am you ma y choos e t ocommuni ca t e i n t wo wa ys : sha r e d g l oba l v a r i a b l e s an d ABSOLUTEvar ice 1 es.I f you us e Che -shar e d g l oba l v a r i a b l e me t hods yo u mus t guar a n t e e t ha tat l ea s t t h e f i r s t s e c t i on o f g l oba l v a r i a b l e s i s Che ' same i n t h e t wopl ograms wi s h i ng ' t o communi ca t e . Th e rema i n<strong>de</strong> r o f t h e gl oba l v a r i ab 1esn ee d no t b e t h e same an d t h e <strong>de</strong> c l a r a t i on o f e x t er na l v a r i a b l e s i n t h eg l oba l s e c Ci on wi l l no t a f f ec t t h i s ma ppi ng . I n a dd i t i on . t o ha v i ngm at ch i n g <strong>de</strong> c l a r a t i ons i yo u mus t us e t h e / 9 op t i on swi t c h a va 'i I a b l e i nth e l i n ke r ( se e se c t i on 2. 3. 2. 4 ) t o p l a c e t he va r i a b l e s a t Che s amel oc a t i on i n a ) 1 pr ograms wi s h i n g t o communi ca t e .T o use t he ABSOLUTE var i a bl e method you woul d typi cal l y <strong>de</strong> f i ne ar ec or d used a s a communi ca t i on a r ea an d t he A <strong>de</strong>f i n e t h i s r ec or d a t a na bs o l ut e l oca t i o n i n ea c h modul e . T h i s me t hod doe s no t r e qu i r e us i n gt h e / b sw i t c h i n t h e l i n ke r bu t doe s r equ i r e knowl edge o f t h e memor yuse d bg Che pr ogr am and sy s tem.Li s t e d be l ow a r e t w o e xampl e pr ograms t ha t communi ca t e wi t h ea c h ot heru si 'n g t h e ABSOLUTE v a r i a b l e me t hod. Th e f i r s t pr ogr am wi l l CHAI N t ot h e s econ d pr ograms wh i c h wi l l pr'i n t t h e r e s u l t s o f t h e f i r s tp r ogr am' s e xec ut i on :

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

Saved successfully!

Ooh no, something went wrong!