flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > [solved]Declare equ as structure Goto page 1, 2 Next |
Author |
|
Overclick 27 Jul 2020, 21:25
Hi
Is it possible to redeclare 'equ' as structure somehow? Last edited by Overclick on 31 Jul 2020, 10:15; edited 1 time in total |
|||
27 Jul 2020, 21:25 |
|
Roman 28 Jul 2020, 07:43
maybe help virtual ?
Code: virtual at esi some_struct mov [esi.elem], 0 end virtual |
|||
28 Jul 2020, 07:43 |
|
Overclick 30 Jul 2020, 14:19
I mean:
Code: struc equ [data] { common . equ data .a dd 0 .b dd 0 .c dd 0 } |
|||
30 Jul 2020, 14:19 |
|
revolution 30 Jul 2020, 14:24
Did you try it?
There is no harm in trying. |
|||
30 Jul 2020, 14:24 |
|
Overclick 30 Jul 2020, 14:38
It's not working this way. Of course I did try it.
|
|||
30 Jul 2020, 14:38 |
|
revolution 30 Jul 2020, 14:40
Your code works for me.
Code: 1 passes, 0 bytes. |
|||
30 Jul 2020, 14:40 |
|
Roman 30 Jul 2020, 14:48
revolution
Quote:
How test ? Please show your code. Last edited by Roman on 30 Jul 2020, 14:56; edited 1 time in total |
|||
30 Jul 2020, 14:48 |
|
revolution 30 Jul 2020, 14:56
Roman wrote:
https://board.flatassembler.net/topic.php?p=215051#215051 |
|||
30 Jul 2020, 14:56 |
|
Overclick 30 Jul 2020, 15:00
revolution. did you tried to use it? I did. No success.
Compiled <> working |
|||
30 Jul 2020, 15:00 |
|
revolution 30 Jul 2020, 15:03
What usage do you expect? Show us what you tried. We don't know what you are doing.
|
|||
30 Jul 2020, 15:03 |
|
revolution 31 Jul 2020, 00:10
Maybe with fix:
Code: struc my_equ [somedata] { common . equ somedata .id dd 0 } equ fix my_equ test_3 equ 'something' mov [test_3.id],20202020h db test_3 |
|||
31 Jul 2020, 00:10 |
|
Overclick 31 Jul 2020, 00:25
processed: test_3.id dd 0
error: symbol already defined. |
|||
31 Jul 2020, 00:25 |
|
revolution 31 Jul 2020, 00:33
Please show the code you are assembling.
|
|||
31 Jul 2020, 00:33 |
|
Overclick 31 Jul 2020, 10:14
"fix" doesn't work with my multisection macro. It's ignore if..end if condition. That why it tries to declare structure twice.
Otherwise it works fine |
|||
31 Jul 2020, 10:14 |
|
revolution 31 Jul 2020, 10:16
I suggest not to use fix anyway. Just use the "my_equ" structure directly.
It is confusing to have EQU do something else IMO. |
|||
31 Jul 2020, 10:16 |
|
Overclick 31 Jul 2020, 10:36
I would like to use it at short period to declare 50+ imported dialogue items:
Code: IDC_CDelay0 equ 100 IDC_CDelay1 equ 101 IDC_CDelay2 equ 102 IDC_CDelay3 equ 103 IDC_CDelay4 equ 104 IDC_CDelay5 equ 105 IDC_CDelay6 equ 106 IDC_CDelay7 equ 107 How to restore "equ" after all? Code: restruc equ restore equ or use "fix" again? |
|||
31 Jul 2020, 10:36 |
|
revolution 31 Jul 2020, 10:42
Are you using your new "equ" or ordinary equ?
Usually dialog IDs use normal = Code: IDC_CDelay0 = 100 |
|||
31 Jul 2020, 10:42 |
|
Overclick 31 Jul 2020, 10:45
I don't choose it, its already like this
|
||||||||||
31 Jul 2020, 10:45 |
|
revolution 31 Jul 2020, 10:49
If you are asking how to undo fix then do this:
Code: A fix B ; now all A's are B's A fix A ; now all A's are A's |
|||
31 Jul 2020, 10:49 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.