Memory Management Memory Management DocDooM (Programmer) (OP) 2 Mar 99 16:30 Hi!!! I´m searching for some help on Mem in Asm... Could someone of you please post some code on how to save something in Mem (like an string in basic) Thanx Doc DooM RE: Memory Management zqzq (Programmer) 25 Mar 99 20:14 I'm not sure I understand what you mean. In ASM strings are just chunks of memory. You can declare a block of memory with a DS command (Declare Storage)or a DC (Declare Constant). I am assuming you are using x86 ASM. Different platforms use different commands. RE: Memory Management thorfour (Programmer) 24 Jun 99 11:53 First declare how much memory you want to set aside for a given field. Either a DC or a DS will do this. The difference is a DS merely reserves the memory but doesn't change the contents of the memory, while a DC reserves the memory and stores a constant in it. FIELD-1 DS CL80 Reserves 80 bytes FIELD-2 DC CL80'ABCE' Reserves 80 bytes, and puts ABCD in the leftmost 4 bytes, and fills the remaining 76 with blanks. The compiler automatically fills unused positions to the right with blanks,. for C (character) fields. Notice the DS has nothing in apostrophes after it. The DC has to have something in apostrohes, because that's the nature of the definition. To move something to the fields: MVC FIELD-1,=CL8'THORFOUR' MVC FIELD-2,FIELD-1 Assembler moves the b-field (=CL8'THORFOUR) to the a-field (FIELD-1). The b-field is another way to set up a constant, except it won't have a label. Assembler will then move FIELD-1(which now contains THORFOUR followed by 76 bytes containing anything, to FIELD-2, wiping out the ABCD that was there. Hope this helps.