#comment This file is part of Z80 Scheme Interpreter Z80 Scheme Interpreter is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Copyright 2007, Spencer Putt #endcomment ; input ; hl - length of vector ; de - value to fill ; output ; hl - vector vector_create: push de call alloc_block ; allocate the vector pop de ; input ; hl - vector ; de - value to fill ; output ; hl - vector vector_fill: ld b,d ld c,e vector_fill_bc: push hl call block_size ex de,hl pop hl vector_fill_loop: push de dec de call block_write pop de dec de ld a,d or e jp nz,vector_fill_loop ret ; input ; hl - vector ; de - offset ; bc - value ; output ; unspecified vector_set!: jp block_write ; input ; hl - vector ; de - offset ; output ; hl - value vector_ref: jp block_read