0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-07-24 10:25:42 -04:00
nasm/travis/test/ifid.asm
H. Peter Anvin (Intel) 2b4886afdd BR 3392715: fix %ifid with $ and $$
%ifid $ and %ifid $$ has traditionally been false, revert to that
behavior.

Reported-by: Mike Hommey <mh+anfz@glandium.org>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-08-27 11:43:08 -07:00

20 lines
400 B
NASM

; BR 3392715: Test proper operation of %ifid with $ and $$
; This produces a human-readable file when compiled with -f bin
%define LF 10
%macro ifid 2
%ifid %1
%define %%is 'true'
%else
%define %%is 'false'
%endif
%defstr %%what %1
%defstr %%should %2
db '%ifid ', %%what, ' = ', %%is, ' (expect ', %%should, ')', LF
%endmacro
ifid hello, true
ifid $, false
ifid $$, false