Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3(A.) (15 points) Assume that memory beginning at location $C000 contains the contents of the first column of the table below. It is the machine

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

3(A.) (15 points) Assume that memory beginning at location $C000 contains the contents of the first column of the table below. It is the machine code of a program. In the space provided, disassemble this program (use Appendix A2 in the book), i.e., determine the complete instructions (including operands; e.g., LDAA $1234) to be executed (do not try to make sense of the program as it does not do anything useful). Don't forget to put # and $-signs in the appropriate places. Note: not all rows will require entries - only one entry per instruction 3(B.) (5 points) Fill in the address mode next to each source code instruction. Note: not all rows of this table require entries. Contents Instruction Address Mode SC6 $FF $A6 $01 $18 SCE $A0 $00 SCD $EE $01 $FF SAB SCD $09 A.2 REVERSE INSTRUCTION SET TABLE Addr. Mode INH INH INH INH INH INH INH TPA 13 TAB Op Addr. Operands Mnemonic Code Mode INH NOP INH IDIV INH FDIV INH LSAD INH ASLD LSLD INH TAP INH INH INX INH DEX INH CLV INH SEV INH CLC INH SEC INH CLI INH SEI INH SBA INH INH dd mm BRSET DIR dd mm IT BRCLR DIR dd mm BSET DIR dd mm BCLR DIR INH INH Page 2 Switch DAA INH Page 3 Switch ABA INH 10 mm BSET IND.X 1Df mm BCLR IND.X I mmm BRSET IND, X 1F # mm IT BRCLR IND X BRA REL BRN REL REL BLS REL BCC/BHS REL BCS/BLO REL BNE REL BEQ REL BVC REL BVS REL BPL REL BMI REL BGE REL BLT REL BGT REL BLE REL INH INS INH PULA INH PULB INH DES INH TXS PSHA PSHB INH 18 Operands Mnemonic PULX RTS ABX RTI PSHX MUL WAI SWI NEGA COMA LSRA RORA ASRA ASLALSLA ROLA DECA INCA TSTA CLRA NEGB COMB LSRB RORB ASRB ASLB/LSLB ROLB DECB INCB TSTB CLRB NEG COM LSR ROR ASR ASL LSL ROL DEC INC TST JMP CLR hull NEG hl COM LSR hh ROR hhil ASR hh ASULSL ROL hh ! DEC INC hh 11 TST JMP hh II CLR SUBA CMPA INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH IND, X IND, X IND.X IND.X IND.X IND X IND,X IND.X IND.X IND, X IND.X IND.X EXT EXT 1E EXT EXT TSX hh 7D 7E 7F hh INH 81 A.2 REVERSE INSTRUCTION SET TABLE 513 Addr. Code 82 Op Code Operands hh Mode IMM IMM IMM IMM IMM IMM IMM IMM IMM IMM REL IMM DIR DIR DIR 48 588 8888888888888888888888 IMM DIR DIR DIR DIR DIR DIR DIR DIR DIR DIR DIR DIR DIR Op Operands Mnemonic il SBCA 83 ikk SUBD ANDA LDAA EORA ADCA ORAA ADDA CPX BSR LDS XGDX 90 dd SUBA CMPA SBCA SUBD ANDA BITA LDAA STAA EORA ADCA ORAA ADDA CPX JSR LDS STS SUBA CMPA SBCA SUBD ANDA PITA LDAA STAA EORA ADCA ORAA ADDA CPX JSR LDS STS BO hh! SUBA hh CMPA hhi SBCA hhil SUBD B4 hull ANDA B5 hull BG hull LDAA B7 hull STAA Bahh EORA B9 ADCA B | nh| ORAA BB hh ADDA BChill CPX BD hull JSR BE I hhil LDS DIR DIR DIR DIR DIR IND.X IND.X IND, X IND, X IND,X IND, X IND, X IND,X INDEX IND.X IND,X INDEX IND.X INDEX IND.X INDEX EXT Mnemonic Addr. Mode STS EXT SUBB IMM CMPB IMM SBCB IMM ADDD IVM ANDB IMM BITB IMM LDAB IMM EORB IMM ADCB IMM ORAB IMM ADDB IMM LDD IMM Page 4 Switch LDX STOP INH SUBB DIR CMPB SBCB ADDD ANDB DIR BITB LDAB STAB DIR EORB DIR ADCB ORAB DIR ADDB DIR LDD DIR STD DIR LDX DIR STX DIR SUBE IND.X CMPB INDEX SBCB IND, X ADDD IND.X ANDB IND, X BITB IND, X LDAB IND, X STAB IND X EORB IND.X ADCB IND.X ORAB IND.X ADDB IND X LDD IND, X STD IND, X LDX IND X IND, X SUBB CMPB EXT SBCB ADDD EXT ANDB BITB LDAB STAB EORB ADCB ORAB ADDB EXT EXT SUR 2X27 STX EXT EXT EXT EXT EXT EXT EXT hh 11 F2 hh !! F3 hh hh hh F6 hhi hhil Thhil F9 hh ll FA hhil FB hhl EXT hh EXT EXT EXT THE 68HC11 INSTRUCTION SET APPEND APPENDIX A 514 Addr. Mode 18 DE dd INH Addr. Operands Mnemonic Mode Code FChh EXT FD II EXT FE hh !! LDX EXT FF hh STX EXT 18 08 INY INH 18 09 DEY INH 18 1C I mm BSET INDY 18 1D ff mm BCLR INDY 18 1Eff mm ir BRSET IND, Y 18 1F ff mm ir BRCLR INDY 18 30 TSY 18 35 TYS INH 18 38 PULY 18 3A ABY INH 18 3C PSHY INH 18 60ff NEG IND, Y 18 63 COM INDY 18 64 LSR INDY 18 66 ROR IND, Y 18 67 ASR IND,Y 18 68 ASL/LSL IND,Y 18 69 ROL IND,Y 18 6A DEC IND, Y 18 6C INC INDY 18 6D TST INDY 18 6E A IND,Y 18 6F CLR IND,Y 18 8C CPY IMM 18 8F XGDY INH 18 9C CPY DIR 18 AO SUBA IND, Y 18 A1 CMPA IND,Y 18 A2 SBCA IND, Y 18 A3 SUBD IND,Y 18 A4 ANDA INDY 18 A5 IND,Y 18 A6 IND,Y 18 A7 STAA IND,Y 18 AB EORA INDY 18 A9 ADCA IND,Y Oponerands Code Mnemonic 18 AA ORAA 18 AB ADDA 18 AC CPY 18 AD # JSR 18 AE | f LDS 18 AF STS 18 BChh II CPY 18 CE ji kk LDY LDY 18 DF STY 18 EO SUBB 18 E1 CMPB 18 E2 SBCB 18 E3 ADDD 18 E4 ANDB 18 E5 BITB 18 E6 LDAB 18 E7 STAB 18 E8 H EORB 18 E9ff ADCB 18 EA ORAB 18 EB ADDB 18 EC ff LDD 18 ED ff STD 18 EEff LDY 18 EF ff STY 18 FE LDY 18 FF hh STY 1A 83 CPD 1A 93 dd CPD 1A A3 11 CPD 1A AC # CPY 1A B3 hh !! CPD 1A EE LDY 1A EF # STY CD A3 H CPD CD AC ff CPX LDX CD EF ff STX IND,Y INDY INDY INDY IND,Y INDY EXT IMM DIR DIR INDY INDY INDY INDY INDY INDY INDY INDY INDY INDY INDY INDY IND,Y INDY INDY INDY EXT EXT IMM DIR INDEX IND, X EXT IND.X IND,X IND,Y INDY INDY IND,Y JMP hhil LDAA CD ctff 3(A.) (15 points) Assume that memory beginning at location $C000 contains the contents of the first column of the table below. It is the machine code of a program. In the space provided, disassemble this program (use Appendix A2 in the book), i.e., determine the complete instructions (including operands; e.g., LDAA $1234) to be executed (do not try to make sense of the program as it does not do anything useful). Don't forget to put # and $-signs in the appropriate places. Note: not all rows will require entries - only one entry per instruction 3(B.) (5 points) Fill in the address mode next to each source code instruction. Note: not all rows of this table require entries. Contents Instruction Address Mode SC6 $FF $A6 $01 $18 SCE $A0 $00 SCD $EE $01 $FF SAB SCD $09 A.2 REVERSE INSTRUCTION SET TABLE Addr. Mode INH INH INH INH INH INH INH TPA 13 TAB Op Addr. Operands Mnemonic Code Mode INH NOP INH IDIV INH FDIV INH LSAD INH ASLD LSLD INH TAP INH INH INX INH DEX INH CLV INH SEV INH CLC INH SEC INH CLI INH SEI INH SBA INH INH dd mm BRSET DIR dd mm IT BRCLR DIR dd mm BSET DIR dd mm BCLR DIR INH INH Page 2 Switch DAA INH Page 3 Switch ABA INH 10 mm BSET IND.X 1Df mm BCLR IND.X I mmm BRSET IND, X 1F # mm IT BRCLR IND X BRA REL BRN REL REL BLS REL BCC/BHS REL BCS/BLO REL BNE REL BEQ REL BVC REL BVS REL BPL REL BMI REL BGE REL BLT REL BGT REL BLE REL INH INS INH PULA INH PULB INH DES INH TXS PSHA PSHB INH 18 Operands Mnemonic PULX RTS ABX RTI PSHX MUL WAI SWI NEGA COMA LSRA RORA ASRA ASLALSLA ROLA DECA INCA TSTA CLRA NEGB COMB LSRB RORB ASRB ASLB/LSLB ROLB DECB INCB TSTB CLRB NEG COM LSR ROR ASR ASL LSL ROL DEC INC TST JMP CLR hull NEG hl COM LSR hh ROR hhil ASR hh ASULSL ROL hh ! DEC INC hh 11 TST JMP hh II CLR SUBA CMPA INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH INH IND, X IND, X IND.X IND.X IND.X IND X IND,X IND.X IND.X IND, X IND.X IND.X EXT EXT 1E EXT EXT TSX hh 7D 7E 7F hh INH 81 A.2 REVERSE INSTRUCTION SET TABLE 513 Addr. Code 82 Op Code Operands hh Mode IMM IMM IMM IMM IMM IMM IMM IMM IMM IMM REL IMM DIR DIR DIR 48 588 8888888888888888888888 IMM DIR DIR DIR DIR DIR DIR DIR DIR DIR DIR DIR DIR DIR Op Operands Mnemonic il SBCA 83 ikk SUBD ANDA LDAA EORA ADCA ORAA ADDA CPX BSR LDS XGDX 90 dd SUBA CMPA SBCA SUBD ANDA BITA LDAA STAA EORA ADCA ORAA ADDA CPX JSR LDS STS SUBA CMPA SBCA SUBD ANDA PITA LDAA STAA EORA ADCA ORAA ADDA CPX JSR LDS STS BO hh! SUBA hh CMPA hhi SBCA hhil SUBD B4 hull ANDA B5 hull BG hull LDAA B7 hull STAA Bahh EORA B9 ADCA B | nh| ORAA BB hh ADDA BChill CPX BD hull JSR BE I hhil LDS DIR DIR DIR DIR DIR IND.X IND.X IND, X IND, X IND,X IND, X IND, X IND,X INDEX IND.X IND,X INDEX IND.X INDEX IND.X INDEX EXT Mnemonic Addr. Mode STS EXT SUBB IMM CMPB IMM SBCB IMM ADDD IVM ANDB IMM BITB IMM LDAB IMM EORB IMM ADCB IMM ORAB IMM ADDB IMM LDD IMM Page 4 Switch LDX STOP INH SUBB DIR CMPB SBCB ADDD ANDB DIR BITB LDAB STAB DIR EORB DIR ADCB ORAB DIR ADDB DIR LDD DIR STD DIR LDX DIR STX DIR SUBE IND.X CMPB INDEX SBCB IND, X ADDD IND.X ANDB IND, X BITB IND, X LDAB IND, X STAB IND X EORB IND.X ADCB IND.X ORAB IND.X ADDB IND X LDD IND, X STD IND, X LDX IND X IND, X SUBB CMPB EXT SBCB ADDD EXT ANDB BITB LDAB STAB EORB ADCB ORAB ADDB EXT EXT SUR 2X27 STX EXT EXT EXT EXT EXT EXT EXT hh 11 F2 hh !! F3 hh hh hh F6 hhi hhil Thhil F9 hh ll FA hhil FB hhl EXT hh EXT EXT EXT THE 68HC11 INSTRUCTION SET APPEND APPENDIX A 514 Addr. Mode 18 DE dd INH Addr. Operands Mnemonic Mode Code FChh EXT FD II EXT FE hh !! LDX EXT FF hh STX EXT 18 08 INY INH 18 09 DEY INH 18 1C I mm BSET INDY 18 1D ff mm BCLR INDY 18 1Eff mm ir BRSET IND, Y 18 1F ff mm ir BRCLR INDY 18 30 TSY 18 35 TYS INH 18 38 PULY 18 3A ABY INH 18 3C PSHY INH 18 60ff NEG IND, Y 18 63 COM INDY 18 64 LSR INDY 18 66 ROR IND, Y 18 67 ASR IND,Y 18 68 ASL/LSL IND,Y 18 69 ROL IND,Y 18 6A DEC IND, Y 18 6C INC INDY 18 6D TST INDY 18 6E A IND,Y 18 6F CLR IND,Y 18 8C CPY IMM 18 8F XGDY INH 18 9C CPY DIR 18 AO SUBA IND, Y 18 A1 CMPA IND,Y 18 A2 SBCA IND, Y 18 A3 SUBD IND,Y 18 A4 ANDA INDY 18 A5 IND,Y 18 A6 IND,Y 18 A7 STAA IND,Y 18 AB EORA INDY 18 A9 ADCA IND,Y Oponerands Code Mnemonic 18 AA ORAA 18 AB ADDA 18 AC CPY 18 AD # JSR 18 AE | f LDS 18 AF STS 18 BChh II CPY 18 CE ji kk LDY LDY 18 DF STY 18 EO SUBB 18 E1 CMPB 18 E2 SBCB 18 E3 ADDD 18 E4 ANDB 18 E5 BITB 18 E6 LDAB 18 E7 STAB 18 E8 H EORB 18 E9ff ADCB 18 EA ORAB 18 EB ADDB 18 EC ff LDD 18 ED ff STD 18 EEff LDY 18 EF ff STY 18 FE LDY 18 FF hh STY 1A 83 CPD 1A 93 dd CPD 1A A3 11 CPD 1A AC # CPY 1A B3 hh !! CPD 1A EE LDY 1A EF # STY CD A3 H CPD CD AC ff CPX LDX CD EF ff STX IND,Y INDY INDY INDY IND,Y INDY EXT IMM DIR DIR INDY INDY INDY INDY INDY INDY INDY INDY INDY INDY INDY INDY IND,Y INDY INDY INDY EXT EXT IMM DIR INDEX IND, X EXT IND.X IND,X IND,Y INDY INDY IND,Y JMP hhil LDAA CD ctff

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

fscanf retums a special value EOF that stands for...

Answered: 1 week ago

Question

What does the start( ) method defined by Thread do?

Answered: 1 week ago