ee446e6plw - Hseyin Cihan Yaar - 1293273 1 2 3 4 5 6 7 8 9...

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

View Full Document Right Arrow Icon
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 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 ADD JSR SRADD JMP END SUB JSR SRSUB JMP END MUL JSR SRMUL JMP END DIV JSR SRDIV JMP END FMUL JSR SRFMUL END JSR $FF7C SRADD LDAA $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 SADD LDAA $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
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.

This note was uploaded on 04/09/2010 for the course EE ee446 taught by Professor Guran during the Spring '10 term at Middle East Technical University.

Page1 / 3

ee446e6plw - Hseyin Cihan Yaar - 1293273 1 2 3 4 5 6 7 8 9...

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