CALL MALLOC
This page was last modified 10:25, 18 May 2020 by Mars2000you. Based on work by Rderooy and Gdx.

Contents

Effect

Makes it possible to use a Memory Mapper.

Syntax

CALL MALLOC (<PageNumber>,<Variable>)

At least one parameter needs to be specified. Parameters can not end with a comma alone.

Parameters

<PageNumber> is the number of pages you want to allocate. If you set 0 the allocated pages comes free again. If pages number is omitted, the current number of pages allocated will be returned in <variable>.

<Variable> is a numeric variable in which the number of pages allocated will be returned.

Use

Each time you allocate pages with this instruction, the allocated pages comes empty and the pages are allocated again. In some circumstances, it seems that the previous contents remain, but you should make your program taking that into account.

When you quit DM-System2, allocated pages will released.

Compatibility

DM-System2 BASIC