Hi Paeryn
That was very helpful. Thanks a bunch for taking time to look over that. I am a self trained hobby programmer as you can probably tell. My bit shift operations knowledge is poor. Can you help me understand if I got the following code right?
If it is top_half, then we bitwise and with all 1's and if it is lower half then we bitshift it by 8 to right. I am understanding it as, lower half code gets pushed to the lower 8 bits of the 16 by right shifting. However, what is the purpose of bitwise and for top half - shouldn't it go there in any case?
for m in curfont[n]:
if top_half;
data_buf.append(m & 0xff)
else:
data_buf.append(m >> 8)
Thanks again for your help
That was very helpful. Thanks a bunch for taking time to look over that. I am a self trained hobby programmer as you can probably tell. My bit shift operations knowledge is poor. Can you help me understand if I got the following code right?
If it is top_half, then we bitwise and with all 1's and if it is lower half then we bitshift it by 8 to right. I am understanding it as, lower half code gets pushed to the lower 8 bits of the 16 by right shifting. However, what is the purpose of bitwise and for top half - shouldn't it go there in any case?
for m in curfont[n]:
if top_half;
data_buf.append(m & 0xff)
else:
data_buf.append(m >> 8)
Thanks again for your help
Statistics: Posted by tarch — Tue Dec 31, 2024 10:27 pm