You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
expand & syntax to allow constants in hex..end #261
When using constants it means you want to distance yourself from manually typing in bytes and keep actual values somewhere else. Assuming minimal size creates problem of unexpected hex data layout change when modifying constant with value, for example from 300 to 200 (two bytes becomes one).
Simple solution would be writing all numbers as 4 bytes, but someone might not like this behavior.
Better way might be to allow defining desired size like for example &foo(4) where 4 bytes are stored. This would also give nice way to manage arrays of strings stored in hex blocks, where texts shorter than requested would be just padded with zero bytes.
Activity
x87 commentedon Sep 12, 2023
also allow float values with & prefix
MiranDMC commentedon Apr 24, 2024
What about size of
When using constants it means you want to distance yourself from manually typing in bytes and keep actual values somewhere else. Assuming minimal size creates problem of unexpected hex data layout change when modifying constant with value, for example from 300 to 200 (two bytes becomes one).
Simple solution would be writing all numbers as 4 bytes, but someone might not like this behavior.
Better way might be to allow defining desired size like for example
&foo(4)where 4 bytes are stored. This would also give nice way to manage arrays of strings stored in hex blocks, where texts shorter than requested would be just padded with zero bytes.