RichTW wrote:
hmmm a quick Google does seem to suggest that the problem would go away if you just reinstalled MinGW. Perhaps this is the most painless way to go!
That said, if you have Visual Studio, I'm sure you could probably just drop the source files into a new solution, and it would just work!
Doing proper install from the Mingw distribution fixed it ! Seems that what the Mame/Mess team distribute is only a partial install.
Anway patched commands.cpp and changed the line :-
Code:
if ( end < 0 || end > 0xFFFF)
to
if ( end < 0 || end > 0x10000)
And that seems to fix the can't save the last byte bug

BTW I can't remember if the documentation says so, but I think "end" is a little mis-leading as it's the first byte beyond the last to be saved, whereas I interpreted it as the last to be saved.
As for padding code then your sugestion of using a small for loop worked, the reason I asked was that in other assemblers that I have used you can do something like :-
DB $FF DUP $80
And get $80 bytes of $FF, maybe you should implement a FILLTO keyword used as
FILLTO &Addr,&Value.
Cheers.
Phill.