I was wondering if it's possible to redifine the size of an array or simply, create a new one through the Code Segment. Here's what I have so far:
.DATA
prompt1 db "Please enter a number which will ressemble the N of the array",13,10,'$'
value db ?
.CODE
DisplayIO proc
lea DX, prompt1
mov AH, 09h
int 21h
mov AH, 08h
int 21h
ret
DisplayIO endP
call DisplayIO
sub AL, 30h
mov value, AH
What I'm trying to do, is basically create an array with the size of value
In DOS you can use a system call (int 21h, ah = 0x48) to reserve a segment of your selected size (all segments are multiples of 16 bytes). Also remember to free the block with int 21h, ah=0x49.
Or you can statically allocate the maximum length buffer from code/data and build your own malloc.