SAVE Parameters


The &FF byte hasn't been saved because, as we saw earlier, the end address itself isn't saved, the byte before that address is the last byte in the file. It's a common error when saving a fixed block of memory, such as a screen, or a ROM image which has been moved to main memory, to specify the last byte as the end address instead of the one after. If a 16K ROM image has been copied into main memory starting at &3000 for example, although the last byte is stored at &6FFF, if we use 6FFF as the end address we we will have a ROM image file of 16,383 bytes, or &3FFF by mistake, so we always need to specify the end address as last byte+1, or in this ROM image example, &7000.

When saving a block of memory of fixed length, it's probably better to use the length alternative in the *SAVE command, ie. +4000 for an exact 16K file, or +5000 for a 20K screen, etc.



Click here to return to SAVE Parameters