(high level assembly)Reading a string with more than 254 characters in hla

141 Views Asked by At

I wrote a program in hla (high level assembly), where a string is input by the user which is in hexadecimal form,and then stores its characters separately in a byte array,I would like the number of characters in the string input by the user to be large (several thousand).But when running the program, I can only enter a string with 254 characters, and the program does not accept additional characters.My goal of this program is calculations on large numbers, (for which there is no specific instruction.)A piece of code related to getting the string from the user is as follows:

str.alloc(2000);//Allocation of space to store the string(here 2000 byte)
mov(eax,numstring);//Linking the space to the desired string (register eax points to that space)
stdout.put("enter a number in hex format (maximum 2000 character)",nl);
stdin.readLn();
stdin.gets(numstring);//This command takes the input string from the user

According to this image, I can enter a string with only 254 characters. I list my questions: 1- Why is the string limited to 254 characters here? 2- How can I fix this problem? 3- Is there another way to get a very large number from the user (more than what the compiler has defined for that particular type) and store them in array? I will be very grateful to friends who can guide me.

I searched in this field and I think that the issue is related to the buffer, but I don't know how to fix it.

0

There are 0 best solutions below