Which data segment? The segment referenced by ds or the .data segment in your exe?

Dynamic allocation is OS-dependent. In Windows, you must call one of LocalAlloc, GlobalAlloc, HeapAlloc or VirtualAlloc (with the first two being deprecated). In Linux there's some system call too. In DOS, you need to implement a memory manager (I think).

And of course you can't dynamically allocate space within your exe.