flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Auto size value. |
Author |
|
Dima1205 13 Jul 2023, 12:38
Hello, I write this struc macro on this question.
https://board.flatassembler.net/topic.php?t=22823 |
|||
13 Jul 2023, 12:38 |
|
Roman 14 Jul 2023, 09:28
Code: macro mvalz a,[p] { common ii = 0 forward mov [a+ii*4],p ii = ii+1 define a#.sz ii } mov eax,valff mvalz valff,1,2,3,4,5,6,7 ;after this valff.sz = 7 ;problem jmp @f jump incorrect addres if valff.sz >1 ! jmp @f+valff.sz*4-4 if ~definite valff.sz | @f valff.sz = 1 end if valff dd valff.sz dup (0) @@: ;in this place asm code corrupted if valff.sz >1 ! align valff.sz*4+4 ;not help mov eax,1 ;corrupted mov edx,2 ;corrupted mov ecx,3 ;corrupted mov esi,5 ;corrupted |
|||
14 Jul 2023, 09:28 |
|
Roman 14 Jul 2023, 18:49
variant using malloc and put ptr to valff dd 0
|
|||
14 Jul 2023, 18:49 |
|
Dima1205 14 Jul 2023, 21:33
https://board.flatassembler.net/topic.php?t=22832 -
ru= Попробуй посмотреть, там malloc тянется для Win32 из CRTDLL.DLL (есть даже в Win32s пакете и Windows NT 3.1). Для Windows 64 тянется сразу msvcrt.dll в секцию импорта. en= Try to see if malloc is pulled for Win32 from CRTDLL.DLL (there is even in the Win32s package and Windows NT 3.1). For Windows 64, msvcrt.dll immediately drags into the import section. |
|||
14 Jul 2023, 21:33 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.