Вопрос

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
Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top