Gast
#371874
Hallo ich hab einen Code für PIC16F88 gesucht um zwei 8-Bit Register mit einander zu Multiplizieren. Hab diesen auch gefunden und sehr erfolgreich getestet, nur verstehe ich nicht wie dieser Funktioniert. Kann mir da vl wer helfen ? ;******** Define a macro for adding & right shifting ** mult MACRO bit ;Begin macro BTFSC mulplr,bit ADDWF H_byte,Same RRF H_byte,Same RRF L_byte,Same ENDM ;End of macro ;******** Multiplier Routine ********************** multiply CLRF H_byte CLRF L_byte MOVF mulcnd,W ;move the multiplicand to W reg. BCF STATUS,C ;clear the Carry bit in the STATUS Reg. mult 0 mult 1 mult 2 mult 3 mult 4 mult 5 mult 6 mult 7 RETLW 0 ******************************** ...... ..... MOVLW XXX MOVWF mulplr MOVLW XXX MOVWF mulcnd CALL multiply und dann is das ergebnis in H_byte und L_byte nur wie ?