Searching \ for 'What does the "~" mean in assembly?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! 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.
PICList Thread
'What does the "~" mean in assembly?'
1998\11\05@110124 by Jon Petty

picon face
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

1998\11\05@110530 by Harrison Cooper

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

{Quote hidden}

1998\11\05@110533 by aya Baptista

flavicon
face
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 [PHXSYSspamKILLspamAOL.COM]
Sent: Quinta-feira, 5 de Novembro de 1998 16:00
To: .....PICLISTKILLspamspam.....MITVMA.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

1998\11\05@115527 by Eisermann, Phil

flavicon
face
> 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

1998\11\05@120805 by Peter L. Peres

picon face
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

1998\11\05@133330 by Dwayne Reid

flavicon
face
>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   <EraseMEdwaynerspam_OUTspamTakeThisOuTplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(403) 489-3199 voice     (403) 487-6397 fax

1998\11\20@072535 by Dwayne Reid

flavicon
face
>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   <dwaynerspamspam_OUTplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(403) 489-3199 voice     (403) 487-6397 fax

1998\11\20@074111 by Peter L. Peres

picon face
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

1998\11\20@075529 by Eisermann, Phil

flavicon
face
> 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

1998\11\20@080929 by Jon Petty

picon face
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

1998\11\20@080941 by Harrison Cooper

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

{Quote hidden}

1998\11\20@080943 by aya Baptista

flavicon
face
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 [RemoveMEPHXSYSTakeThisOuTspamAOL.COM]
Sent: Quinta-feira, 5 de Novembro de 1998 16:00
To: spamBeGonePICLISTspamBeGonespamMITVMA.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...