Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > CSDb Discussions > Help
2002-04-23 09:06
btuck
Account closed

Registered: Apr 2002
Posts: 5
Help

Heh, still haven't found a board for c64 programing or 6502 so I guess I'll ask my question here. ;)

-------------------------------------------------------
Some 6502 instructions make use of bitwise logic.
This includes AND, OR, and EOR (Exclusive-OR). The tables below illustrate the effects

of these operations:

AND 1 1 -> 1 "both"
1 0 -> 0
0 1 -> 0
0 0 -> 0

OR 1 1 -> 1 "either one or both"
1 0 -> 1
0 1 -> 1
0 0 -> 0

EOR 1 1 -> 0 "one or the other but not both"
1 0 -> 1
0 1 -> 1
0 0 -> 0
-------------------------------------------------------

It doesn't support (0 1 -> 1) and (1 0 -> 0) like this:

0 0 -> 0
1 0 -> 1
0 1 -> 0
1 1 -> 0
and the other way around
0 0 -> 0
1 0 -> 0
0 1 -> 1
1 1 -> 0

Is there an easy way to do this kinda bitwise logic? and if how? eh.. :)
Thanks
2002-04-23 10:46
btuck
Account closed

Registered: Apr 2002
Posts: 5
nah.. heh.. nevermind.. I found me a way.. kinda slow perhaps.. but it works.. :)
2002-05-02 15:44
Viktor
Account closed

Registered: Apr 2002
Posts: 78
I think, yes.

You can code the first with this way:
row1 and (row2 eor 1)

(leave the row 1 negate the row2 and make between these an and)

The second one is near the same way.

(row1 eor 1) and row2

(negate the row 1 and with row2)

Viktor

2002-05-02 15:45
Viktor
Account closed

Registered: Apr 2002
Posts: 78
And why that you need this?

Viktor
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
MWR/Visdom
Guests online: 294
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Uncensored  (9.5)
9 Wonderland XIV  (9.5)
10 No Bounds  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Diskmag Editors
1 Magic  (10)
2 Jazzcat  (9.5)
3 hedning  (9.2)
4 Elwix  (9.1)
5 Peter  (9.0)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.04 sec.