Maybe I am misinterpreting the question. But the Parallax assembler has the DS (Define Space) directive which has an argument that allows you to specify the number of locations needed. I use it like this: ;************************ ; RAM ;************************ ORG RAM FLAGS DS 1 ; 1 location, 8-bit value TMRCTL DS 1 MSG_TIMER DS 2 ; 2 locations, 16-bit value MSG_BUFF DS 8 ; 8 locations The assembler then assigns addresses starting at RAM and allocates the requested number of locations for each variable in succession. Not sure if that's what you were asking, but thought I'd throw it out there... Steve -----Original Message----- From: Shane Nelson To: PICLIST@MITVMA.MIT.EDU Date: Wednesday, August 06, 1997 4:47 PM Subject: Reusing Subroutines -- >Hi, > >I'm trying to create a nice library of subroutines, >but when reusing them I find it a pain to have to >go through all the EQU's, to make sure I'm not already >using those locations in another part of my program. > >My question: is it possible to have the compiler >dynamically allocate memory in some way? > >ie) >Instead of having to do this: > >COUNT equ h'7' >ACCA equ h'8' >;16bit >ACCB equ h'9' >ACCD equ h'a' > >I want to be able to get away with something more like this: > >db = define byte >dw = define word > >db COUNT >dw ACCA >db ACCB >db ACCD > >----- > >Then, instead of hard coding variables it could just use the >next available space. > > >Thanks in advance. >-Shane. >