flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
viki 16 Jul 2006, 08:04
there is no loop for filling array
Code: xor bx,bx loop: mov [array+bx],bx inc bx cmp bx,5 jne loop |
|||
![]() |
|
JohnnyReb 16 Jul 2006, 10:43
I'm kinda new myself, but try:
mov [wp+eax*4],edi to index into a DWORD array. _________________ JohnnyReb Win if you can, Lose if you must, but always cheat! |
|||
![]() |
|
viki 16 Jul 2006, 17:05
and what about this
Code: mov esi,src mov edi,dst mov cx,len rep stosd |
|||
![]() |
|
derPENGUIN 17 Jul 2006, 08:13
Thank you for reply.
viki: A loop is not needed, because I use it as a function. Its for a library and I dont know the count of calls. And yuor second example, the same, I dont have len. Johnny: yes, tha was it. eax*4 works. Now I will try to access the content of this saved addresses. If you have any idea, please tell me. Much thanks, Frank |
|||
![]() |
|
JohnnyReb 17 Jul 2006, 10:46
Access a DWORD array the same way:
printf("point:%d\n",[wp+eax*4]); or (if it requires pushing on the stack) mov esi,[wp+eax*4) printf("point:%d\n",esi); _________________ JohnnyReb Win if you can, Lose if you must, but always cheat! |
|||
![]() |
|
derPENGUIN 17 Jul 2006, 21:10
thx, I solved it in this way:
mov edi,[wp+eax*4] printf("point:%d\n",[edi]) BTW, printf is not an asm keyword, is it? I am really better in C as in asm, but actually I´m coding for Menuet, the output there is with int 40, but I think, that is not related to my problem, therefor I used the C syntax. Much thanks again and cu with further problems, I´m sure ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.