[ Foro de Pascal ]

nibble en dump hexa

23-Apr-2020 07:24
Invitado (antonio blanco)
1 Respuestas

Cheers!!! I hope you can help me.
working on a hexadecimal dump, declaring a variable and with the following command the exact byte is obtained in the precise address that is manifested. example
Code: = inttohex (GetByteHexEdit ($ 00), 2);
means that the code variable will be the value of the byte located at address 00.

placing an example
0000 AB FF FD CD 01 14 25 63 75 FE DE CD CA CB DC FF
0010 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

what I require is that the variable called "x1" take the value of the first nibble of address 00 and the variable "x2" take the value of the second nibble of address 00
that X3 take the value of the second nibble from position 02, and that X4 take the value of the first nibble from position 02.

in which case I would like:
X1: = A
x2: = B
X3: = D
X4: = F

logically they are variables.
And I could be able to locate them in a specific address, for example,
x1 will go to 18 in the first space
x2 will go to 19 in the second box
x3 goes to 18 in the second space
x4 goes to 19 in the first space

Then it would look like this

0000 AB FF FD CD 01 14 25 63 75 FE DE CD CA CB DC FF
0010 FF FF FF FF FF FF FF AD FB FF FF FF FF FF FF FF

I will greatly appreciate your help.


23-Apr-2020 11:11
Nacho Cabanes (+64)

Sabes que este foro es en español, verdad?






(No se puede continuar esta discusión porque tiene más de dos meses de antigüedad. Si tienes dudas parecidas, abre un nuevo hilo.)