Author Topic: can I use the same variable more than once without getting any problem?  (Read 5965 times)

Offline maplesirop

  • Jr. Member
  • *
  • Posts: 60
Like:

Code: [Select]
mov eax, 4
mov ebx, 1
mov ecx, message
mov edx, length
int 80h

mov eax, 4
mov ebx, 1
mov ecx, message2
mov edx, length2
int 80h

mov eax, 4
mov ebx, 1
mov ecx, message3
mov edx, length3
int 80h

and what about:

Code: [Select]
mov eax, 4
mov ebx, 1
mov ecx, message
mov edx, length
mov eax, 4
mov ebx, 1
mov ecx, message2
mov edx, length2
mov eax, 4
mov ebx, 1
mov ecx, message3
mov edx, length3
int 80h

Offline TightCoderEx

  • Full Member
  • **
  • Posts: 103
Re: can I use the same variable more than once without getting any problem?
« Reply #1 on: February 24, 2013, 06:42:17 AM »
The problem that arises or lack thereof is somewhat subjective, meaning;

1. User will see all three messages

2. Computer doesn't really care, as all your doing is overwriting contents of registers and then finally, only message3 will be displayed.  So it's not a problem for computer, but probably is for operator.

Offline maplesirop

  • Jr. Member
  • *
  • Posts: 60
Re: can I use the same variable more than once without getting any problem?
« Reply #2 on: February 24, 2013, 04:41:41 PM »
thanks