-- If you don't know what a byte is, don't bother reading. --

My program reads/writes the bytes of a program. I specify the bytes to be written [e.g. 0x01 0x02 0x03 0x04] and it writes them to the address.

The problem I'm having is: They must be formatted as char when calling my write function, they can't be BYTEs. My bytes get corrupted, even if I initially declare them char.

I'll have a byte, 0x8E. The char will make it 0xFFFFFFFFFFFFFF8E.

I've tried to Variable = Variable%256; it, but it doesn't change the outcome. 0xFFFFFFFFFFFFFF8E is -24 as an integer, which isn't a valid char. This makes my function fail.

I need a way to either preserve the byte, or rid the char of the additional Fs.