It is currently Fri May 29, 2020 4:46 am

 All times are UTC

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: how do I use the not commandPosted: Wed Mar 26, 2014 12:57 am

Joined: Sat Mar 15, 2014 2:56 pm
Posts: 4
I need to invert binary numbers say i had 0110 1100
I need to invert it to 1001 0011

I know about the ANDI.W and ORI.W commands and how the syntax goes but how do I use it for NOT logic

something like
Code:
NOT.B (A0),D1          ;so if the byte in A0 is \$11 meaning in binary 0001 0001 then what will be stored in D1 would be    \$EE  1110 1110

I did this in easy68k and I'm getting invalid syntax

Top

 Post subject: Re: how do I use the not commandPosted: Wed Mar 26, 2014 1:25 pm

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1122
The NOT instruction uses a single operand. That is, it inverts the bits in the destination.
Code:
MOVE.B (A0),D1
NOT.B  D1

_________________
Prof. Kelly

Top

 Post subject: Re: how do I use the not commandPosted: Sun Mar 30, 2014 2:32 am

Joined: Sat Mar 15, 2014 2:56 pm
Posts: 4
profkelly wrote:
The NOT instruction uses a single operand. That is, it inverts the bits in the destination.
Code:
MOVE.B (A0),D1
NOT.B  D1

can I NOT the byte directly in the address register example

NOT.B (A0)

or do I have to move it to the data register?

Top

 Post subject: Re: how do I use the not commandPosted: Sun Mar 30, 2014 3:31 pm

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1122
NOT (A0) is supported.

For detailed information on any 68000 instruction or EASy68K keyword, click on the word in the EASy68K editor and press F1.

NOT Instruction
--------------------------------------------------------------------------------

Returns the ones complement of an operand specified with an effective address. The ones complement is the same as changing all bits in the operand.

ADDRESS METHODS: Dn, (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l

DATA LENGTH: Byte, word, longword

FLAGS: X - U
N - S
Z - S
C - 0
V - 0

SYNTAX: NOT <ea>

EXAMPLE CODE:

NOT D0 if D0 contained 01010101, then after the not, it would contain 10101010

_________________
Prof. Kelly

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 4 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: No registered users and 14 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ EASy68K Forum    FAQ    Latest Features    EASy68K Questions    68000 Programming Questions    Wish List    Wishes Granted    Undocumented Features    Documented Features    General Discussion    EASy68K Projects