Question

Is it possible in nasm to accept input from user without using ebx & ecx registers ? if yes please suggest me possible ways.... I tried the method

mov eax,3
mov ebx,2
mov ecx,n
int 80h
Était-ce utile?

La solution

You could always wrap your code with some relevant push instructions.

push eax ; keep registers.
push ebx
push ecx

mov eax,3
mov ebx,2
mov ecx,n
int 80h

pop ecx ; restore registers.
pop ebx
pop eax

This way you don't change eax,ebx or ecx. Though I don't think you should really care about changing those registers. This is what they are for.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top