ee446pre6 - ORG $8000 LDAA $9000 CMPA #$00 ; #0 means...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 ORG $8000 LDAA $9000 CMPA #$00 #0 means Addition BEQ ADD CMPA #$01 #1 means Subtraction BEQ SUB CMPA #$02 #2 means Multiplication BEQ MUL CMPA #$03 #3 means Division BEQ DIV CMPA #$04 #4 means Floating Point Multiplication BEQ FMUL JMP END ADDJSR SRADD JMP END SUBJSR SRSUB JMP END MULJSR SRMUL JMP END DIVJSR SRDIV JMP END FMULJSR SRFMUL ENDJSR $FF7C SRADDLDAA $9001 As in Reg A EORA $9002 Check for the sign to select related operation ANDA #$01 Masking dont care bits CMPA #$00 comparing if result of the exor operation is zero or not BNE SSUB if signs are different goto subtraction operation SADDLDAA $9004 Alow in RegA ADDA $9006 Add Alow Blow STAA $9004 low result in Alow LDAA $9003 Ahigh in A ADCA $9005 Add Ahigh Bhigh and carry from addition of Alow and Blow STAA $9003 high result in Ahigh ROL $9007 carry is transfered to right most bit of AVF RTS SRSUBLDAA $9001 Subtraction initilization EORA $9002 ANDA #$01 CMPA #$00 BNE SADD SSUBCLR $9007 subtraction of same signs LDAB $9006 addition of different signs LDAA $9005 COMB
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

ee446pre6 - ORG $8000 LDAA $9000 CMPA #$00 ; #0 means...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online