flat assembler
Message board for the users of flat assembler.
Index
> Main > several structs how do? |
Author |
|
Roman 22 Dec 2022, 09:10
My variant:
Code: ;data Hero a b c virtual at ecx s a e b d c end virtual mov ecx,Hero mov [s.life],1 mov [e.b1],1 mov [d.c1],1 |
|||
22 Dec 2022, 09:10 |
|
Tomasz Grysztar 22 Dec 2022, 09:26
Perhaps this would suffice?
Code: struct abc union struct a1 dd 0 ends struct b1 db 0 ends struct c1 db 0 ends ends ends Hero abc mov [Hero.b1],1 mov eax,[Hero.a1] Code: struct abc union a1 dd 0 b1 db 0 c1 db 0 ends ends Code: struc unionof names& { .: macro label def \{ \} local size size = 0 irp name, names \{ virtual at . . name if $-. > size size = $-. end if end virtual \} rb size purge label } struct a a1 dd 0 ends struct b b1 db 0 ends struct c c1 db 0 ends Hero unionof a, b Hero2 unionof c,b,a |
|||
22 Dec 2022, 09:26 |
|
Roman 22 Dec 2022, 09:39
Quote:
Yes. This is I want ! Thanks. For unionof not work times 5\repeat\rept 1000 { unionof c,b,a } Code: struc unionof num,names& { .: macro label def \{ \} local size size = 0 irp name, names \{ virtual at . . name if $-. > size size = $-. end if end virtual \} rb size*num purge label } Hero unionof 8,a, b |
|||
22 Dec 2022, 09:39 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.