The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: Sandro.BR on May 08, 2005, 03:36:34 PM

Title: Declaration of variable in bits
Post by: Sandro.BR on May 08, 2005, 03:36:34 PM
Hey Mr. I am beginner in MASM, would like to some help,to use in Windows. As it is declared a variable with the size defined in bits, as well as is fact in the C (int var:3;) ? I ask one more gracefulness,  don't use abbreviations or jargons, because I am going to translate for my language (português.brasil). Thank you very much.
Title: Re: Declaration of variable in bits
Post by: ToutEnMasm on May 08, 2005, 04:51:00 PM
Hello,
use RECORD for 8,16 or 32 bits variables. EXAMPLE RECORD Quatro:4,uno:1,tres:3
4+1+3 = 8 = 1 byte
.data
mot EXAMPLE
.code
mov mot,al
and mot, MASK uno        ;   MASK uno =00001000b
                                        ToutEnMasm
   
Title: Re: Declaration of variable in bits
Post by: Sandro.BR on May 09, 2005, 12:36:54 PM
Thank you very much mr. ToutEnMasm. I will test all the possible forms. I hope, soon, be collaborating for this community.