I honestly, don't know what I am doing wrong. After the first message is printed (i.e. "Enter the string to be printed: "), there is some sort of session time out. Hence, there is no opportunity to accept user input after the aforementioned prompt message. The compiler is saying that the program may have an endless loop. Here is the source code:
section .data
promptmsg db "Enter the string to be printed: ", 0h, 0xa
resultstringmsg db "You entered: ", 0h
section .bss
var: resb 225
section .text
global _start:
_start:
mov eax, promptmsg
call displaystring
call acceptinput
mov eax, resultstringmsg
call displaystring
mov eax, var
call display2
mov ebx, 0
mov eax, 1
int 0x80
displaystring:
PUSH eax
;PUSH ebx
;PUSH ecx
;PUSH edx
call calclengthofstr
mov edx, eax
POP eax
mov ecx, eax
mov ebx, 1
mov eax, 4
int 80h
;POP ebx
;POP ecx
;POP edx
ret
calclengthofstr:
;PUSH ebx
mov ebx, eax
incrementbyte:
cmp byte[eax], 0
jz endofstring
inc eax
jmp incrementbyte
endofstring:
sub eax, ebx
;POP ebx
ret
display2:
POP edx
mov ecx, eax
mov ebx, 1
mov eax, 4
int 0x80
ret
acceptinput:
;PUSH edx
;PUSH ecx
;PUSH ebx
;PUSH eax
mov edx, 255
mov ecx, var
mov ebx, 0
mov eax, 3
int 0x80
PUSH eax
;POP eax
ret
Thanks in advance for your time and assistance. I am really anxious and hoping to learn what exactly that I was doing wrong.