1 / 11

Tutorial 3

Tutorial 3. assembly language program. assemble. machine code program. using the MC68000 Reference Card to assemble an instruction. STEP 1 Obtain bit pattern for instruction from Opcode Bit Pattern column of Alphabetic List.

tadhg
Télécharger la présentation

Tutorial 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tutorial 3

  2. assembly language program assemble machine code program

  3. using the MC68000 Reference Card to assemble an instruction STEP 1 Obtain bit pattern for instruction from Opcode Bit Pattern column of Alphabetic List STEP 2 Obtain codes from Opcode Bit PatternCodes table at bottom of alphabetic list STEP 3 Look up addressing mode category in Effective Addressing Mode Categories table at bottom of back page

  4. absolute short data register direct org $400 MOVE.B $1000,D2 MOVE.B #$30,D3 AND.B D2,D3 MOVE.B D3,$100A immediate

  5. MOVE.B $1000,D2 00XX RRRM MMee eeee XX size: byte 01 RRR destination register 010 MMM destination EA mode: data register direct 000 eeeeee source EA: absolute short 111000 next word 0001 0000 0000 0000 0001 0100 0011 1000 0001 0000 0000 0000 $14381000

  6. MOVE.B #$30,D3 00XX RRRM MMee eeee XX size: byte 01 RRR destination register 011 MMM destination EA mode: data register direct 000 eeeeee source EA: immediate 111100 next word 0000 0000 0011 0000 0001 0110 0011 1100 0000 0000 0011 0000 $163C0030

  7. AND.B D2,D3 1100 DDD0 SSee eeee DDD destination data register number 011 SS size: byte 00 eeeeee source EA: data register direct 000010 1100 0110 0000 0010 $C602

  8. MOVE.B D3,$100A 00XX RRRM MMee eeee XX size: byte 01 RRR destination register 000 MMM destination EA mode: absolute short 111 eeeeee source EA: data register direct 000011 next word 0001 0000 0000 1010 0001 0001 1100 0011 0001 0000 0000 1010 $11C3100A

  9. MC68000 memory data registers $400 program $401 D0 D1 D2 D3 $402 $403 $404 $405 D4 D5 D6 D7 $1000 data $1001 $1002 $1003 $1004

  10. org $400 MOVE.B $1000,D2 MOVE.B #$30,D3 AND.B D2,D3 MOVE.B D3,$100A • 400 14 38 10 00 • 404 16 3C 00 30 • 408 C6 02 • 40A 11 C3 10 0A

  11. org $400 program MOVE.B #5,D0 TRAP #15 MOVE.B #9,D0 TRAP #15 end program

More Related