Atari ST series Technical Reference Manual page 291

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

Mshrink()
W h e n a p r o g r a m is r u n , it is a l l o c a t e d a ll t h e s y s t e m 's f r e e m e m o r y . T h is
f u n c t i o n is u s e d t o r e t u r n a n y e x c e s s m e m o r y b a c k t o t h e s y s t e m .
C macro format
in t s t a t u s ;
l o n g a d d r e s s , s i z e ;
s t a t u s =
M s h r i n k ( 0 , a d d r e s s , s i z e );
Machine language format
m o v e .l
s i z e , - ( s p )
m o v e . l
a d d r e s s , - ( s p )
m o v e . w
# $ 4 A , - (s p )
t r a p
# 1
a d d .l
# 1 0 , s p
Inputs
s iz e
l o n g
a d d r e s s
l o n g
N o t e t h a t a z e r o w o r d m u s t a l s o b e p a s s e d , a s a p l a c e h o l d e r .
Results
DO
s t a t u s
w o r d
See also
M a l l o c ( )
Mshrink
Shrink Memory Block
T h e n u m b e r o f b y t e s t o r e t a i n .
T h e s t a r t i n g a d d r e s s o f t h e m e m o r y b lo c k
t o r e t a i n .
A 0 s i g n a l s s u c c e s s , f a ilu r e r e s u l t s in a n e g a t i v e
G E M D O S e r r o r n u m b e r .
Opcode = 74 ($4A)
283

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents