Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Logical Bitwise Functions - AND, OR, XOR, NOT
#3
Glad you like them, LCD.

How they work? Well, since the Z80 processor has instructions to do bitwise AND/OR/NOT - they basically pull the numbers from ZX basic into a machine code form, get the processor to do that bitwise function it knows how to do on them, and then works them back into ZX basic for you.

The actual bitwise instruction is only one line in each case - the bit that does the actual job is AND/OR/CPL (for and,or, not).

When Boriel implements them fully, I guarantee his code isn't going to be a long way from what I have here. (In fact, if anyone can do an 8 bit NOT in LESS than one line of assembly, I'd be really impressed Smile )

Lion
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)