mirror of
https://gitlab.com/80486DX2-66/gists
synced 2024-11-12 22:45:54 +05:30
12 lines
312 B
C
12 lines
312 B
C
/*
|
|
* be_to_le_ptr.h
|
|
*
|
|
* Useful for showing big-endian hexadecimal dumps on little-endian machines
|
|
*
|
|
* Author: Intel A80486DX2-66
|
|
* License: Unlicense
|
|
*/
|
|
|
|
#define BE_TO_LE_PTR(base, size, i) \
|
|
(base) + ((size) * ((i) / (size)) + ((size) - 1) - ((i) % (size)))
|