flat assembler
Message board for the users of flat assembler.
Index
> Main > variables and lebels |
Author |
|
Madis731 03 Dec 2004, 12:18
Did you mean:
Code: data: Variable_array dd 0,0,0,0,0,0,0,0,0,0 ;10 variables code: mov eax,[Variable_array] add ebx,[Variable_array+4] ;notice the DWORD offset xor ecx,[Variable_array+8] shld eax,ebx,cl mov [Variable_array+36],eax ;the last in line But it doesn't have any error checking so +40 already intrudes another var. Other examples are *local* variables. You can use them twice, but only in their scope: Code: Label1: .j: ;some code... .k: ;more code jmp .j ;This jumps to Label1.j Label2: .j: ;you can use it here again! ;some code... .k: ;... jne .k ;This jumps to Label2.k jmp Label1.k ;If you REALLY need to get out of this scope |
|||
03 Dec 2004, 12:18 |
|
Nikolay Petrov 03 Dec 2004, 18:32
Thanks Madis731 for quick replay.
But simples solve my problems in part (i know about simple 2). My job is to united part A, B, C... in one part, where first man write part A, second - part B, ..... But one man wrote: proc ....,arg1,arg2,.. i dd ? j dd ? ... enter ... Second: proc ....,arg1,arg2,.. i dd ? n dd ? enter .... And i lost a time to edit working procs... I told - man "A" to write i1,j1 for him variable, and man "B" to write i2, n2.... But it help me almost but not quite and confuse work my colleagues. |
|||
03 Dec 2004, 18:32 |
|
Madis731 03 Dec 2004, 21:52
You might want to check out "virtual". I don't know if it solves you problem, but if it doesn't I hope someone else on the board can help.
|
|||
03 Dec 2004, 21:52 |
|
pelaillo 04 Dec 2004, 13:51
Use local variables as Madis advice and your men won't have any problems.They could decide freely the names for the variables regardless the other's procedures, even in different files and different computers (everyone can build the project accross the network).
Code: proc ....,arg1,arg2,.. .i dd ? ; variable is local to the proc scope .j dd ? ... enter ... ;Second: proc ....,arg1,arg2,.. .i dd ? .n dd ? enter ;... |
|||
04 Dec 2004, 13:51 |
|
Nikolay Petrov 04 Dec 2004, 23:07
Problem has decide
Thanks |
|||
04 Dec 2004, 23:07 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.