A trick you might need one day

bbc micro/electron/atom/risc os coding queries and routines
Post Reply
julie_m
Posts: 227
Joined: Wed Jul 24, 2019 9:53 pm
Location: Derby, UK
Contact:

A trick you might need one day

Post by julie_m » Sun Sep 29, 2019 6:34 pm

What do you call a daft mare who quickly patched the Source Code (to replace an LDA ZP with LDY ZP), saved the Binary -- which is still the same size, so all the entry points are still correct -- and forgot to save the patched Source Code, so now the next version after she adds some more code generates a broken Binary? :oops:

If you *DUMP both the last known working binary (you do keep your old versions, don't you? Maybe you have a saved state which just happens to have a copy of the binary in RAM .....) and the current broken one on the target system, then you can diff the hex dump files on the host system, and the error will be easy to spot; you will also have the offsets into the file as a clue to where you need to look.

So, yeah. Don't go overwriting the only copy of anything that works. Disk space is practically free nowadays; Beeb floppy images are a few hundred kbytes, that's nothing. Increase your version number when you begin changing stuff. Save machine states when you get things working. Remember there is a rich set of tools on the host system. And you, too, might save your own backside one day .....

User avatar
roland
Posts: 4002
Joined: Thu Aug 29, 2013 9:29 pm
Location: Born (NL)
Contact:

Re: A trick you might need one day

Post by roland » Sun Sep 29, 2019 10:03 pm

Another advantage of using a cross-assembler like Beebasm is that you can use a revision control system like GIT. You can make branches when modifying a routine. That way you can always go back to a previous state. Even if you're not using branches you can compare revisions and see what has changed and might have caused an error.
FPGAtom: 512 KB RAM, Real Time Clock and 64 colours
MAN WOMAN :shock:

julie_m
Posts: 227
Joined: Wed Jul 24, 2019 9:53 pm
Location: Derby, UK
Contact:

Re: A trick you might need one day

Post by julie_m » Sun Sep 29, 2019 11:54 pm

If I ever take on a project this complex again, I will be giving BeebASM a serious look.

Back in the day, when I was at uni', we used VAX/VMS; which had a very nice built-in version control system. Filenames were like WIBBLE.TXT;2 which was version 2; when you next saved something as WIBBLE.TXT, it would become WIBBLE.TXT;3 . You could specify how many versions to keep, purge old versions, and call up old versions using constructs such as WIBBLE.TXT;-1 for the last-but-one version.

Never seen anything like it since .....

User avatar
Elminster
Posts: 4246
Joined: Wed Jun 20, 2012 9:09 am
Location: Essex, UK
Contact:

Re: A trick you might need one day

Post by Elminster » Mon Sep 30, 2019 12:08 am

From memory where I used to work we used to have to limit versioning on users directories and run regular purge jobs or you run out of disk space. And things like databases it had to be turned off completely. Used VMS on vax and alpha for about 5 years but was eventually replaced by windows and Unix.

It was also good for privileges, had loads, at a time when windows and Unix were basically admin or not admin.

Post Reply

Return to “programming”