This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 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 EORA $9002 ANDA #$01 CMPA #$00 KOYULMAYABÝLÝR ??? SRADD e de bak BNE SADD SSUBCLR $9007 LDAA $9004 Alow in RegA LDAB $9006 Blow in RegB COMB 1's complement of Blow Sheet1...
View Full Document
- Spring '10
- Addition, LDAA