mirror of
https://github.com/VARCem/Vasm.git
synced 2026-04-23 13:49:44 +00:00
Update modifiers to allow for forced-casting? #5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @waltje on GitHub (Apr 25, 2023).
We do have the [b], [d] and [w] modifiers for 'lossless' casting of values to another type.
However, sometimes we want to force this casting (without an AND operator..), so maybe we should add "forced" versions, like "[!b]" and "[!w]", which AND the value as needed ?
In actual code, this would look like:
00055 043E F0 12 45: sum: .word .sum(data, . - data)00056 0440 0F ED 46: .word ~.sum(data, sum - data)00057 0442 0F 47: .byte [!b]~.sum(data, sum - data)where the difference can be clearly seen.