TI 83 Plus Assembly/Advanced

xor a
A common shortcut to set the accumulator (A) to zero is by xor'ing it against itself: This is incredibly widespread and won't affect the readability of your code. In fact, it is so common that it might even be more readable than using "ld a,0". But be warned that "xor a" modifies the flags (it sets the z flag and resets the carry, for example) whereas "ld a,0" doesn't modify any flags.

ld (addr),reg16
When writing to two consecutive bytes in memory, it can often be faster and smaller to use a 16-bit register rather than two loads with a. This loads e into (penCol), and d into (penCol+1). penCol+1 is penRow. Keep in mind, however, that using hl to read/write from addresses in memory is (4 t-states) faster and one byte smaller than using de/bc.

X <= A <= Y
If you want to know if the value of the accumulator is between two other values, eg. 10 and 25, you might be tempted to do something like this: However, rather than doing two comparisons and jumps, you can change the first cp into a subtraction. This turns any number less than 10 into a negative number. For example: This method lets you avoid the first jr.