The MASM Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
MASM32 Downloads
Home
Help
Search
Login
Register
The MASM Forum
»
General
»
The Campus
»
.if .else .elseif .endif
« previous
next »
Print
Pages: [
1
]
Author
Topic: .if .else .elseif .endif (Read 13695 times)
bomz
Guest
.if .else .elseif .endif
«
on:
February 27, 2013, 03:52:09 PM »
Code:
[Select]
mov ax, KeyBoardBuffer.Flags
test ax, KEY_MAKE
.if ZERO?;(ax & KEY_MAKE);CARY?
what constructions possible else?
Logged
hutch--
Administrator
Member
Posts: 10294
Mnemonic Driven API Grinder
Re: .if .else .elseif .endif
«
Reply #1 on:
February 27, 2013, 04:01:33 PM »
.if
.elseif
.else ; only 1, and must be 2nd last
.endif
Logged
hutch at movsd dot com
http://www.masm32.com
bomz
Guest
Re: .if .else .elseif .endif
«
Reply #2 on:
February 27, 2013, 04:51:11 PM »
I mean like this ZERO?;(ax & KEY_MAKE);CARY?. I don't know about them only
.if TRUE
.if !eax
.if eax==ebx.....
Logged
jj2007
Member
Posts: 13648
Assembly is fun ;-)
Re: .if .else .elseif .endif
«
Reply #3 on:
February 27, 2013, 05:22:50 PM »
invoke GetKeyState, VK_SHIFT
.if ax & 7
; test ax, 0007, je @F
nop
.elseif Carry?
nop
.elseif Zero?
nop
.elseif !Zero?
nop
.elseif Sign?
nop
.elseif !(Sign? || Zero?)
; combis are better done "by hand"
nop
.endif
Logged
Masm32 Tips, Tricks and Traps
dedndave
Member
Posts: 8828
Still using Abacus 2.0
Re: .if .else .elseif .endif
«
Reply #4 on:
February 28, 2013, 12:37:36 AM »
ZERO?
CARRY?
OVERFLOW?
SIGN?
PARITY?
Logged
jj2007
Member
Posts: 13648
Assembly is fun ;-)
Re: .if .else .elseif .endif
«
Reply #5 on:
February 28, 2013, 01:06:06 AM »
The Masm developers forgot the Above? and Greater? flags, unfortunately...
Logged
Masm32 Tips, Tricks and Traps
dedndave
Member
Posts: 8828
Still using Abacus 2.0
Re: .if .else .elseif .endif
«
Reply #6 on:
February 28, 2013, 01:09:35 AM »
yes, those would have been nice
but, you can accomplish those using the "normal" conditional expressions
Logged
Magnum
Member
Posts: 2396
Re: .if .else .elseif .endif
«
Reply #7 on:
February 28, 2013, 01:10:45 AM »
Operator Meaning
== Equal
!= Not equal
> Greater than
>= Greater than or equal to
< Less than
<= Less than or equal to
& Bit test (format: expression & bitnumber)
! Logical NOT
&& Logical AND
|| Logical OR
CARRY? Carry bit set
OVERFLOW? Overflow bit set
PARITY? Parity bit set
SIGN? Sign bit set
ZERO? Zero bit set
Logged
Take care,
Andy
Ubuntu-mate-18.04-desktop-amd64
http://www.goodnewsnetwork.org
Print
Pages: [
1
]
« previous
next »
The MASM Forum
»
General
»
The Campus
»
.if .else .elseif .endif