1 ; Simple memory management module.
3 ; Copyright (C) 2010 Leo C.
5 ; This file is part of avrcpm.
7 ; avrcpm is free software: you can redistribute it and/or modify it
8 ; under the terms of the GNU General Public License as published by
9 ; the Free Software Foundation, either version 3 of the License, or
10 ; (at your option) any later version.
12 ; avrcpm is distributed in the hope that it will be useful,
13 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ; GNU General Public License for more details.
17 ; You should have received a copy of the GNU General Public License
18 ; along with avrcpm. If not, see <http://www.gnu.org/licenses/>.
35 printstring ", bytes free: "
55 ; temp:temp2 = first free memory location (heap start)
60 printstring "Heap init: Start: "
66 printstring "Heap release: Start: "
77 ; Get memory block from heap.
78 ; temp2:temp = size of block
79 ; return temp2:temp = pointer to allocated block
80 ; return 0 if not enough space
89 printstring "Heap get: "
102 ; zero flag clear here
110 clr temp2 ;(sets zero flag)
114 printstring "Error: "
117 mov temp3,temp ;restore zero flag
125 ; vim:set ts=8 noet nowrap