Frage

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
War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top