bird-sanctuary / bluejay

:bird: Digital ESC firmware for controlling brushless motors in multirotors
GNU General Public License v3.0
312 stars 36 forks source link

Macro: division by 2 #112

Closed stylesuxx closed 1 year ago

stylesuxx commented 1 year ago

16 bit inplace division by 2 could use its own macro

clr  C
rrca Temp2
rrca Temp1

to

Divide_By_2_Inplace MACRO hi, lo
    clr  C
    rrca hi
    rrca lo
ENDM

call

Divide_By_2_Inplace Temp2, Temp1