flat assembler
Message board for the users of flat assembler.
Index
> Main > emulating bitwise op in sw |
Author |
|
revolution 02 Feb 2023, 05:18
You can do everything you need with just one instruction.
https://en.wikipedia.org/wiki/One_instruction_set_computer?useskin=vector The only problem you have is choosing which instruction you like the most. There are many options. |
|||
02 Feb 2023, 05:18 |
|
macomics 02 Feb 2023, 07:24
Ali.Z wrote: how many bitwise operations can be emulated in software. Of course, reverse operations can also be performed using non-bit instructions. To begin with, try to express all 16 bit functions from two arguments through mathematical operations. |
|||
02 Feb 2023, 07:24 |
|
Furs 02 Feb 2023, 14:49
macomics wrote: Of course, reverse operations can also be performed using non-bit instructions. To begin with, try to express all 16 bit functions from two arguments through mathematical operations. |
|||
02 Feb 2023, 14:49 |
|
macomics 02 Feb 2023, 18:41
Furs wrote: Yeah, you don't even need to rely on gimmicks like fixed-width registers. Code: x y f(x,y) CONST(0) = mov edx, 0/mul edx 0 0 0 0 1 0 1 0 0 1 1 0 AND 0 0 0 0 1 0 1 0 0 1 1 1 0 0 0 0 1 0 1 0 1 1 1 0 0 0 0 0 1 0 1 0 1 1 1 1 0 0 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 1 1 0 0 1 1 1 XOR 0 0 0 0 1 1 1 0 1 1 1 0 OR 0 0 0 0 1 1 1 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1 1 0 0 0 1 0 1 0 1 0 0 1 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 1 0 1 1 1 0 0 1 1 0 0 0 1 0 1 1 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 0 CONST(1) = mov edx, 0/div eax/neg eax 0 0 1 0 1 1 1 0 1 1 1 1 |
|||
02 Feb 2023, 18:41 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.