The command reference for their flavor of basic is here:
https://www.parallax.com/Portals/0/Downloads/docs/prod/stamps/web-BSM-v2.2.pdf
Well, at a quick glance the code has some typical basic style elements such as FOR NEXT loops, GOSUB and 'sub-routine-name': RETURN sections, and just simple defining and changing variables. But I have no clue what those variables represent (like AN and DN where N is some number).
Also, the variable "Nib", short for "Nibble" is sort of funny. Not sure what a "Nibble" is (other than something smaller than a "byte" which is 8 bits, hence a play on words?), but the way they're using it is just a hexadecimal value.
In essence, the code defines a bunch of A and D "Nib" variables, a checksum byte, pauses for 5 seconds (waiting for something externally??), defines some more variables, then runs through the "Nibbles" one by one and displays the hexadecimal results of an equation (using the DEBUG command). The "Get32" subroutine they've defined determines if they're syncing low or syncing high. I have no idea what syncing low or high means? Is this about syncing to a gear above or below?
In other words, the code you linked is pretty easy to read, but it's out of context since I have no idea what the variables mean, let alone each hex value. I have a feeling that learning the hexadecimal values are the key to completely understanding this.