Skip to navigation


Maths: shift4Left

Name: shift4Left [Show more] Type: Variable Category: Maths Summary: Lookup table for shifting a byte four places to the left, to extract the low nibble Deep dive: Times tables and nibble arithmetic
Context: See this variable in context in the source code References: This variable is used as follows: * DivideScaled uses shift4Left * Multiply4x16 uses shift4Left * Multiply8x8 uses shift4Left * ScaleUp uses shift4Left

In the table below, shift4Left,X contains the low byte of X * 16. So if X is %XXXXxxxx, shift4Left,X contains %xxxx0000.
.shift4Left FOR I%, 0, 255 EQUB LO(I% * 16) NEXT