PIC Assembler Multiplikation

Gast #674855
Lesenswert?

Hallo!

Ich hab mal eine Frage! Eine Multiplikation mit 2 sieht beim PIC ja so 
aus:
Mal2
  bcf  STATUS,C
  rlf  BIN4, f
  rlf  BIN4+1, f
  rlf  BIN4+2, f
  rlf  BIN4+3, f
  return

ich würd das ganze aber gerne mit 120 multiplizieren, kann mir jemand 
weiterhelfen wie das dann geht?

Danke!

Tobi
Gast #7239499
Lesenswert?

Hallo,

im Anhang ist unter anderem eine 16-Bit-Multiplikation. FACTOR1_0 u.s.w. 
musst du noch definieren:

FACTOR1_0    equ 0x40  ; Faktor1, L-Teil
FACTOR1_1    equ 0x41  ; Faktor1, H-Teil
FACTOR2_0    equ 0x42  ; Faktor2, L-Teil
FACTOR2_1    equ 0x43  ; Faktor2, H-Teil
PRODUCT_0    equ 0x44  ; Produkt für 16-Bit-Multipl. - L-Teil
PRODUCT_1    equ 0x45
PRODUCT_2    equ 0x46
PRODUCT_3    equ 0x47  ; Produkt für 16-Bit-Multipl. - H-Teil
FACTOR1_2    equ 0x48  ; Funktionsintern für Schiebeoperationen
FACTOR1_3    equ 0x49  ; Funktionsintern für Schiebeoperationen

Bernd
Angehängte Dateien:

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren