News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Declaration of variable in bits

Started by Sandro.BR, May 08, 2005, 03:36:34 PM

Previous topic - Next topic

Sandro.BR

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.

ToutEnMasm

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
   

Sandro.BR

Thank you very much mr. ToutEnMasm. I will test all the possible forms. I hope, soon, be collaborating for this community.