Timeline for Shifting bits in assembly (nasm)
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 13, 2019 at 14:12 | comment | added | Ped7g |
and about actually doing the calculation with instructions, which instructions you are willing to accept? The example seems to be x86_64, so you would accept also shrx and similar? (didn't really try, but I would guess it may be favourable for certain intermediate steps, not affecting flags and specifying both source + destination registers saving a copy instruction).
|
|
Dec 13, 2019 at 14:07 | comment | added | Ped7g |
as long as only 8 bit values are involved, you can also use look-up-table (LUT) with size 256B, then the conversion is basically single mov from memory, but I guess you are for some reason trying to avoid this (kinda "cheat", but often used in 8b/16b CPU emulators, etc.. to make the processing speed predictable across different types of calculations and also the LUTs are often 10..20 bits to account not only for the source 8b value, but also the "flag" register and calculating in single mov results of both together).
|
|
Nov 22, 2019 at 7:36 | answer | added | user555045 | timeline score: 3 | |
Nov 22, 2019 at 5:00 | history | edited | the_endian | CC BY-SA 4.0 |
added 18 characters in body
|
Nov 22, 2019 at 4:55 | history | asked | the_endian | CC BY-SA 4.0 |