EASy68K  
It is currently Fri Apr 10, 2020 2:45 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed Mar 26, 2014 12:57 am 
Offline

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
 Profile  
 
PostPosted: Wed Mar 26, 2014 1:25 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1118
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
 Profile  
 
PostPosted: Sun Mar 30, 2014 2:32 am 
Offline

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
 Profile  
 
PostPosted: Sun Mar 30, 2014 3:31 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1118
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
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group