Technically, this is just scaling, as quantization means a completely different process.
That's simply a multiplication, done with an algorithm which exploits the range of used numbers and avoids the limitations of the HD6303 MCU to calculate result quickly with one MUL instruction and avoiding use of temporary RAM variables for intermediate results.
To scale range of 0..99 to 0..65535, you would need to multiply 99 by approximately 662.
The HD6303 can only multiply two 8-bit values together, from registers A and B, and the 16-bit output result will be in 8-bit registers A and B, collecively called the 16-bit register D.
So as 662 does not fit into 8-bit register, the operation must be split up. Generally how this would be done is to do it in software and use the MUL opcode several times to be able to perform a 16x8 multiplication and use memory for storing intermediate results. Sort of same thing when you do multi-digit multiplication with pen and paper.
So while this could be done by implementing a general subroutine for multiplication of two larger numbers, it would be somewhat slower.
By exploiting the range of input numbers and sacrificing precision only slightly, it can be done extemely quickly with a single MUL operation and without using any memory for intermediate storage so the values are kept in registers.
The original multiplier is 662. It won't fit into 8 bits. Dividing it by 4 gives 165 which does fit into 8 bits.
The original input value is up to 99. It fits into 8 bits.
So the 99 could be multiplied with 165, and the result would fit to 16 bit register D. However it would still need multiplication by 4, which would equal to two rounds of shift/rotate.
Pre-multiplying the 99 by 2 by shifting left once also fits into 8 bits and can be multiplied. Therefore the result in D only needs to be multiplied by 2 by one round of shift/rotate to get the correct range.
So in pseudocode, it's just
but calculated as
D = (((A*2) * 165) *2)