In file op-0.11.0/progP16.c line 5555 (and probably also in opgui)
dim+=dim%8 // grow to 8 word multiple
does not round up. This should be
if(dim&0x07U) dim+=8-(dim%8);
Once that is fixed, you will notice that the line just above
for(;dim>0&&memCODE_W[dim]>=0x3fff;dim--); //skip empty space at end
has a one off error. It should be memCODE_W[dim-1]
The combination of errors only presents itself when the code you are trying
to program is an even 8 bytes long. In that case it trims one byte that does
not get programmed.
- Don
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In file op-0.11.0/progP16.c line 5555 (and probably also in opgui)
dim+=dim%8 // grow to 8 word multiple
does not round up. This should be
if(dim&0x07U) dim+=8-(dim%8);
Once that is fixed, you will notice that the line just above
for(;dim>0&&memCODE_W[dim]>=0x3fff;dim--); //skip empty space at end
has a one off error. It should be memCODE_W[dim-1]
The combination of errors only presents itself when the code you are trying
to program is an even 8 bytes long. In that case it trims one byte that does
not get programmed.