flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > "if" macros

Author
Thread Post new topic Reply to topic
CandyMan



Joined: 04 Sep 2009
Posts: 408
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan 10 Jan 2024, 18:49
Code:
include "if.inc"

        .if ([.dwCaps] & 400h)  ;needed test [.dwCaps],400h
                nop
        .endif

.dwCaps dd ?    

_________________
smaller is better
Post 10 Jan 2024, 18:49
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1586
Location: Toronto, Canada
AsmGuru62 10 Jan 2024, 19:01
What about "and" in place of "&"?
Code:
.if ([.dwcaps] and 400h) = 400h
.endif
    
Post 10 Jan 2024, 19:01
View user's profile Send private message Send e-mail Reply with quote
CandyMan



Joined: 04 Sep 2009
Posts: 408
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan 11 Jan 2024, 08:47
Only this code works the way I want:
Code:
test [.dwCaps],400h
.if ~ZERO?
    nop
.endif    

_________________
smaller is better
Post 11 Jan 2024, 08:47
View user's profile Send private message Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 658
Location: Ukraine
Overclick 11 Jan 2024, 11:01
Maybe this macro what you looking for
https://board.flatassembler.net/topic.php?t=22423
Post 11 Jan 2024, 11:01
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.