Searching \ for 'What does the "~" mean in assembly?' in subject line. ()
Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=what+does+mean+assembly
Search entire site for: 'What does the "~" mean in assembly?'.

Truncated match.
'What does the "~" mean in assembly?'
1998\11\05@110124 by

Hello everyone,

What does the "~" mean when used in the following way?

ANDLW   ~SWITCHLINES    ; keep unused outputlines from PortB

I can't find a reference that details all the special commands like \$...etc.

Thanks

Jon

We use it as meaning an inversion, same as '!' used elsewhere

{Quote hidden}

It probably means the complement of SWITCHLINES (which is a constant) ie,
all bits are inverted. But I believe that syntax isn't portable among
assemblers.

AndrŽ Malafaya Baptista

-----Original Message-----
From: Jon Petty [PHXSYSAOL.COM]
Sent: Quinta-feira, 5 de Novembro de 1998 16:00
To: PICLISTMITVMA.MIT.EDU
Subject: What does the "~" mean in assembly?

Hello everyone,

What does the "~" mean when used in the following way?

ANDLW   ~SWITCHLINES    ; keep unused outputlines from PortB

I can't find a reference that details all the special commands like \$...etc.

Thanks

Jon

> What does the "~" mean when used in the following way?
>
>  ANDLW   ~SWITCHLINES    ; keep unused outputlines from PortB
>
generally, the "~" (tilde) means the bitwise negation
of its operand. contrast to "!" which generally
means logical negation. (I am assuming they mean the
same as in ANSI-C).

bitwise negation, of course, means negate all the bits.
so you make all 1's into 0's, and all 0's into 1's.
a.k.a. the 1's complement.

-Phil

On Thu, 5 Nov 1998, Jon Petty wrote:

> Hello everyone,
>
>
> What does the "~" mean when used in the following way?
>
>  ANDLW   ~SWITCHLINES    ; keep unused outputlines from PortB

~ is a binary inverse operator usually, i.e., above:

TEMP SET SWITCHLINES ^ 0xFF     ; '^' == XOR operator
ANDLW TEMP

Peter

>What does the "~" mean when used in the following way?
>
> ANDLW   ~SWITCHLINES    ; keep unused outputlines from PortB
>
>I can't find a reference that details all the special commands like \$...etc.

There is a reference - it is the MPASM manual.

~ means to compliment.  In this case, 'SWITCHLINES' is a constant (literal)
which is being complimented (inverted) by the assembler.

dwayne

Dwayne Reid   <dwaynerplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(403) 489-3199 voice     (403) 487-6397 fax

>What does the "~" mean when used in the following way?
>
> ANDLW   ~SWITCHLINES    ; keep unused outputlines from PortB
>
>I can't find a reference that details all the special commands like \$...etc.

There is a reference - it is the MPASM manual.

~ means to compliment.  In this case, 'SWITCHLINES' is a constant (literal)
which is being complimented (inverted) by the assembler.

dwayne

Dwayne Reid   <dwaynerplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(403) 489-3199 voice     (403) 487-6397 fax

On Thu, 5 Nov 1998, Jon Petty wrote:

> Hello everyone,
>
>
> What does the "~" mean when used in the following way?
>
>  ANDLW   ~SWITCHLINES    ; keep unused outputlines from PortB

~ is a binary inverse operator usually, i.e., above:

TEMP SET SWITCHLINES ^ 0xFF     ; '^' == XOR operator
ANDLW TEMP

Peter

> What does the "~" mean when used in the following way?
>
>  ANDLW   ~SWITCHLINES    ; keep unused outputlines from PortB
>
generally, the "~" (tilde) means the bitwise negation
of its operand. contrast to "!" which generally
means logical negation. (I am assuming they mean the
same as in ANSI-C).

bitwise negation, of course, means negate all the bits.
so you make all 1's into 0's, and all 0's into 1's.
a.k.a. the 1's complement.

-Phil

Hello everyone,

What does the "~" mean when used in the following way?

ANDLW   ~SWITCHLINES    ; keep unused outputlines from PortB

I can't find a reference that details all the special commands like \$...etc.

Thanks

Jon

We use it as meaning an inversion, same as '!' used elsewhere

{Quote hidden}

It probably means the complement of SWITCHLINES (which is a constant) ie,
all bits are inverted. But I believe that syntax isn't portable among
assemblers.

AndrŽ Malafaya Baptista

-----Original Message-----
From: Jon Petty [PHXSYSAOL.COM]
Sent: Quinta-feira, 5 de Novembro de 1998 16:00
To: PICLISTMITVMA.MIT.EDU
Subject: What does the "~" mean in assembly?

Hello everyone,

What does the "~" mean when used in the following way?

ANDLW   ~SWITCHLINES    ; keep unused outputlines from PortB

I can't find a reference that details all the special commands like \$...etc.

Thanks

Jon

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...