Page 1 sur 1

Strange zero reading on Olivetti Prodest PC128

Publié : 11 juil. 2022 09:06
par spotlessmind1975
Good morning everyone. :D

I am having some trouble reading K7 files larger than 256 bytes and I hope someone can help me. Specifically, the routine I set up and which should read a file one block [256 bytes] at a time from the K7 at $9000 and, then, move it into memory as a contiguous "file" starting at $6000, introduces zero (0) at the start of the block thus replacing the legitimate value. I made sure, with a hex editor, that the values were there in the K7 (clearly they are not consecutive because between one block and another there is a header).

For the sake of clarity, I had never noticed the problem because, generally, these blocks contain bitmap graphics. So basically, I found that 2-4 pixels of the background were black so I didn't notice. Now, however, I am using blocks to store the result of a compression routine and that 0 is, semantically, very relevant. :shock:

Thanks everyone for any help! 8)

The code that loads the block can be found here:
https://github.com/spotlessmind1975/ugb ... p.asm#L106