Create  Edit  Diff  FrontPage  Index  Search  Changes  Login

はじめてのひき - FizzBuzzAsm_m68hc11 Diff

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

! Version

% m68hc11-gcc -v
Reading specs from /usr/lib/gcc-lib/m68hc11/3.3.6-m68hc1x-20060122/specs
Configured with: ../src/configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --with-gnu-as --with-gnu-ld --enable-nls --without-included-gettext --disable-checking --enable-languages=c --build=i486-linux-gnu --host=i486-linux-gnu --target=m68hc11 --without-headers
Thread model: single
gcc version 3.3.6-m68hc1x-20060122

! Optimized


fizzbuzz.o:     file format elf32-m68hc11

Disassembly of section .text:

00000000 <main>:
    0: de 00       ldx *0 <main>
1: R_M68HC11_8 _.frame
    2: 3c           pshx
    3: 9f 00       sts *0 <main>
4: R_M68HC11_8 _.frame
    5: de 00       ldx *0 <main>
6: R_M68HC11_8 _.d1
    7: 3c           pshx
    8: de 00       ldx *0 <main>
9: R_M68HC11_8 _.d2
    a: 3c           pshx

0000000b <.LM2>:
    b: cc 00 01     ldd #1 <main+0x1>
    e: dd 00       std *0 <main>
f: R_M68HC11_8 _.d2
   10: 4f           clra
   11: 5f           clrb
   12: dd 00       std *0 <main>
13: R_M68HC11_8 _.d1

00000014 <.L18>:
   14: 18 ce 00 0f ldy #f <.LM2+0x4>
   18: 18 3c       pshy
   1a: 18 ce 00 00 ldy #0 <main>
   1e: 18 3c       pshy
   20: dc 00       ldd *0 <main>
21: R_M68HC11_8 _.d2
   22: de 00       ldx *0 <main>
23: R_M68HC11_8 _.d1
   24: bd 00 00     jsr 0 <main>
24: R_M68HC11_RL_JUMP *ABS*
25: R_M68HC11_16 __modsi3
   27: 18 38       puly
   29: 18 38       puly
   2b: 8c 00 00     cpx #0 <main>
   2e: 26 09       bne 39 <.LM5>
2e: R_M68HC11_RL_JUMP *ABS*
   30: dd 00       std *0 <main>
31: R_M68HC11_8 _.tmp
   32: 26 05       bne 39 <.LM5>
32: R_M68HC11_RL_JUMP *ABS*

00000034 <.LM4>:
   34: cc 00 00     ldd #0 <main>
35: R_M68HC11_16 .LC0
   37: 20 40       bra 79 <.LM8+0x3>
37: R_M68HC11_RL_JUMP *ABS*

00000039 <.LM5>:
   39: ce 00 05     ldx #5 <main+0x5>
   3c: 3c           pshx
   3d: ce 00 00     ldx #0 <main>
   40: 3c           pshx
   41: dc 00       ldd *0 <main>
42: R_M68HC11_8 _.d2
   43: de 00       ldx *0 <main>
44: R_M68HC11_8 _.d1
   45: bd 00 00     jsr 0 <main>
45: R_M68HC11_RL_JUMP *ABS*
46: R_M68HC11_16 __modsi3
   48: 18 38       puly
   4a: 18 38       puly
   4c: 8c 00 00     cpx #0 <main>
   4f: 26 09       bne 5a <.LM7>
4f: R_M68HC11_RL_JUMP *ABS*
   51: dd 00       std *0 <main>
52: R_M68HC11_8 _.tmp
   53: 26 05       bne 5a <.LM7>
53: R_M68HC11_RL_JUMP *ABS*

00000055 <.LM6>:
   55: cc 00 00     ldd #0 <main>
56: R_M68HC11_16 .LC1
   58: 20 1f       bra 79 <.LM8+0x3>
58: R_M68HC11_RL_JUMP *ABS*

0000005a <.LM7>:
   5a: ce 00 03     ldx #3 <main+0x3>
   5d: 3c           pshx
   5e: ce 00 00     ldx #0 <main>
   61: 3c           pshx
   62: dc 00       ldd *0 <main>
63: R_M68HC11_8 _.d2
   64: de 00       ldx *0 <main>
65: R_M68HC11_8 _.d1
   66: bd 00 00     jsr 0 <main>
66: R_M68HC11_RL_JUMP *ABS*
67: R_M68HC11_16 __modsi3
   69: 18 38       puly
   6b: 18 38       puly
   6d: 8c 00 00     cpx #0 <main>
   70: 26 0c       bne 7e <.LM9>
70: R_M68HC11_RL_JUMP *ABS*
   72: dd 00       std *0 <main>
73: R_M68HC11_8 _.tmp
   74: 26 08       bne 7e <.LM9>
74: R_M68HC11_RL_JUMP *ABS*

00000076 <.LM8>:
   76: cc 00 00     ldd #0 <main>
77: R_M68HC11_16 .LC2
   79: bd 00 00     jsr 0 <main>
79: R_M68HC11_RL_JUMP *ABS*
7a: R_M68HC11_16 puts
   7c: 20 10       bra 8e <.LM10>
7c: R_M68HC11_RL_JUMP *ABS*

0000007e <.LM9>:
   7e: de 00       ldx *0 <main>
7f: R_M68HC11_8 _.d2
   80: 3c           pshx
   81: de 00       ldx *0 <main>
82: R_M68HC11_8 _.d1
   83: 3c           pshx
   84: cc 00 00     ldd #0 <main>
85: R_M68HC11_16 .LC3
   87: bd 00 00     jsr 0 <main>
87: R_M68HC11_RL_JUMP *ABS*
88: R_M68HC11_16 printf
   8a: 18 38       puly
   8c: 18 38       puly

0000008e <.LM10>:
   8e: dc 00       ldd *0 <main>
8f: R_M68HC11_8 _.d2
   90: de 00       ldx *0 <main>
91: R_M68HC11_8 _.d1
   92: c3 00 01     addd #1 <main+0x1>
   95: 24 01       bcc 98 <.LM10+0xa>
95: R_M68HC11_RL_JUMP *ABS*
   97: 08           inx
   98: dd 00       std *0 <main>
99: R_M68HC11_8 _.d2
   9a: df 00       stx *0 <main>
9b: R_M68HC11_8 _.d1
   9c: 2a 03       bpl a1 <.LM10+0x13>
9c: R_M68HC11_RL_JUMP *ABS*
   9e: 7e 00 00     jmp 0 <main>
9f: R_M68HC11_16 .L18
   a1: dc 00       ldd *0 <main>
a2: R_M68HC11_8 _.d1
   a3: 2e 0a       bgt af <.LM11>
a3: R_M68HC11_RL_JUMP *ABS*
   a5: de 00       ldx *0 <main>
a6: R_M68HC11_8 _.d2
   a7: 8c 00 64     cpx #64 <.LM7+0xa>
   aa: 22 03       bhi af <.LM11>
aa: R_M68HC11_RL_JUMP *ABS*
   ac: 7e 00 00     jmp 0 <main>
ad: R_M68HC11_16 .L18

000000af <.LM11>:
   af: 18 38       puly
   b1: 18 df 00     sty *0 <main>
b3: R_M68HC11_8 _.d2
   b4: 18 38       puly
   b6: 18 df 00     sty *0 <main>
b8: R_M68HC11_8 _.d1
   b9: 18 38       puly
   bb: 18 df 00     sty *0 <main>
bd: R_M68HC11_8 _.frame
   be: 39           rts

! Normal


fizzbuzz.o:     file format elf32-m68hc11

Disassembly of section .text:

00000000 <main>:
    0: de 00       ldx *0 <main>
1: R_M68HC11_8 _.frame
    2: 3c           pshx
    3: 30           tsx
    4: 8f           xgdx
    5: c3 ff f0     addd #fff0 <.LFE3+0xfea8>
    8: 8f           xgdx
    9: 35           txs
    a: 9f 00       sts *0 <main>
b: R_M68HC11_8 _.frame

0000000c <.LM2>:
    c: 18 de 00     ldy *0 <main>
e: R_M68HC11_8 _.frame
    f: cc 00 01     ldd #1 <main+0x1>
   12: 18 ed 03     std 3,y
   15: 4f           clra
   16: 5f           clrb
   17: 18 ed 01     std 1,y

0000001a <.L2>:
   1a: de 00       ldx *0 <main>
1b: R_M68HC11_8 _.frame
   1c: ee 01       ldx 1,x
   1e: 8c 00 00     cpx #0 <main>
   21: 2d 1b       blt 3e <.LM3>
21: R_M68HC11_RL_JUMP *ABS*
   23: 18 de 00     ldy *0 <main>
25: R_M68HC11_8 _.frame
   26: 18 ec 01     ldd 1,y
   29: 1a 83 00 00 cpd #0 <main>
   2d: 2f 03       ble 32 <.L2+0x18>
2d: R_M68HC11_RL_JUMP *ABS*
   2f: 7e 00 00     jmp 0 <main>
30: R_M68HC11_16 .L3
   32: de 00       ldx *0 <main>
33: R_M68HC11_8 _.frame
   34: ee 03       ldx 3,x
   36: 8c 00 64     cpx #64 <.LM3+0x26>
   39: 23 03       bls 3e <.LM3>
39: R_M68HC11_RL_JUMP *ABS*
   3b: 7e 00 00     jmp 0 <main>
3b: R_M68HC11_RL_JUMP *ABS*
3c: R_M68HC11_16 .L3

0000003e <.LM3>:
   3e: 18 de 00     ldy *0 <main>
40: R_M68HC11_8 _.frame
   41: 18 ec 03     ldd 3,y
   44: cd ee 01     ldx 1,y
   47: 18 ce 00 0f ldy #f <.LM2+0x3>
   4b: 18 3c       pshy
   4d: 18 ce 00 00 ldy #0 <main>
   51: 18 3c       pshy
   53: bd 00 00     jsr 0 <main>
53: R_M68HC11_RL_JUMP *ABS*
54: R_M68HC11_16 __modsi3
   56: 18 38       puly
   58: 18 38       puly
   5a: 18 de 00     ldy *0 <main>
5c: R_M68HC11_8 _.frame
   5d: 18 ed 07     std 7,y
   60: cd ef 05     stx 5,y
   63: de 00       ldx *0 <main>
64: R_M68HC11_8 _.frame
   65: ee 05       ldx 5,x
   67: 8c 00 00     cpx #0 <main>
   6a: 26 15       bne 81 <.LM5>
6a: R_M68HC11_RL_JUMP *ABS*
   6c: 18 de 00     ldy *0 <main>
6e: R_M68HC11_8 _.frame
   6f: 18 ec 07     ldd 7,y
   72: 1a 83 00 00 cpd #0 <main>
   76: 26 09       bne 81 <.LM5>
76: R_M68HC11_RL_JUMP *ABS*

00000078 <.LM4>:
   78: cc 00 00     ldd #0 <main>
79: R_M68HC11_16 .LC0
   7b: bd 00 00     jsr 0 <main>
7b: R_M68HC11_RL_JUMP *ABS*
7c: R_M68HC11_16 puts
   7e: 7e 00 00     jmp 0 <main>
7e: R_M68HC11_RL_JUMP *ABS*
7f: R_M68HC11_16 .L4

00000081 <.LM5>:
   81: 18 de 00     ldy *0 <main>
83: R_M68HC11_8 _.frame
   84: 18 ec 03     ldd 3,y
   87: cd ee 01     ldx 1,y
   8a: 18 ce 00 05 ldy #5 <main+0x5>
   8e: 18 3c       pshy
   90: 18 ce 00 00 ldy #0 <main>
   94: 18 3c       pshy
   96: bd 00 00     jsr 0 <main>
96: R_M68HC11_RL_JUMP *ABS*
97: R_M68HC11_16 __modsi3
   99: 18 38       puly
   9b: 18 38       puly
   9d: 18 de 00     ldy *0 <main>
9f: R_M68HC11_8 _.frame
   a0: 18 ed 0b     std 11,y
   a3: cd ef 09     stx 9,y
   a6: de 00       ldx *0 <main>
a7: R_M68HC11_8 _.frame
   a8: ee 09       ldx 9,x
   aa: 8c 00 00     cpx #0 <main>
   ad: 26 14       bne c3 <.LM7>
ad: R_M68HC11_RL_JUMP *ABS*
   af: 18 de 00     ldy *0 <main>
b1: R_M68HC11_8 _.frame
   b2: 18 ec 0b     ldd 11,y
   b5: 1a 83 00 00 cpd #0 <main>
   b9: 26 08       bne c3 <.LM7>
b9: R_M68HC11_RL_JUMP *ABS*

000000bb <.LM6>:
   bb: cc 00 00     ldd #0 <main>
bc: R_M68HC11_16 .LC1
   be: bd 00 00     jsr 0 <main>
be: R_M68HC11_RL_JUMP *ABS*
bf: R_M68HC11_16 puts
   c1: 20 59       bra 11c <.L4>
c1: R_M68HC11_RL_JUMP *ABS*

000000c3 <.LM7>:
   c3: 18 de 00     ldy *0 <main>
c5: R_M68HC11_8 _.frame
   c6: 18 ec 03     ldd 3,y
   c9: cd ee 01     ldx 1,y
   cc: 18 ce 00 03 ldy #3 <main+0x3>
   d0: 18 3c       pshy
   d2: 18 ce 00 00 ldy #0 <main>
   d6: 18 3c       pshy
   d8: bd 00 00     jsr 0 <main>
d8: R_M68HC11_RL_JUMP *ABS*
d9: R_M68HC11_16 __modsi3
   db: 18 38       puly
   dd: 18 38       puly
   df: 18 de 00     ldy *0 <main>
e1: R_M68HC11_8 _.frame
   e2: 18 ed 0f     std 15,y
   e5: cd ef 0d     stx 13,y
   e8: de 00       ldx *0 <main>
e9: R_M68HC11_8 _.frame
   ea: ee 0d       ldx 13,x
   ec: 8c 00 00     cpx #0 <main>
   ef: 26 14       bne 105 <.LM9>
ef: R_M68HC11_RL_JUMP *ABS*
   f1: 18 de 00     ldy *0 <main>
f3: R_M68HC11_8 _.frame
   f4: 18 ec 0f     ldd 15,y
   f7: 1a 83 00 00 cpd #0 <main>
   fb: 26 08       bne 105 <.LM9>
fb: R_M68HC11_RL_JUMP *ABS*

000000fd <.LM8>:
   fd: cc 00 00     ldd #0 <main>
fe: R_M68HC11_16 .LC2
  100: bd 00 00     jsr 0 <main>
100: R_M68HC11_RL_JUMP *ABS*
101: R_M68HC11_16 puts
  103: 20 17       bra 11c <.L4>
103: R_M68HC11_RL_JUMP *ABS*

00000105 <.LM9>:
  105: 18 de 00     ldy *0 <main>
107: R_M68HC11_8 _.frame
  108: 18 ec 03     ldd 3,y
  10b: 37           pshb
  10c: 36           psha
  10d: 18 ec 01     ldd 1,y
  110: 37           pshb
  111: 36           psha
  112: cc 00 00     ldd #0 <main>
113: R_M68HC11_16 .LC3
  115: bd 00 00     jsr 0 <main>
115: R_M68HC11_RL_JUMP *ABS*
116: R_M68HC11_16 printf
  118: 18 38       puly
  11a: 18 38       puly

0000011c <.L4>:
  11c: 18 de 00     ldy *0 <main>
11e: R_M68HC11_8 _.frame
  11f: 18 ec 03     ldd 3,y
  122: cd ee 01     ldx 1,y
  125: c3 00 01     addd #1 <main+0x1>
  128: 24 01       bcc 12b <.L4+0xf>
128: R_M68HC11_RL_JUMP *ABS*
  12a: 08           inx
  12b: 18 de 00     ldy *0 <main>
12d: R_M68HC11_8 _.frame
  12e: 18 ed 03     std 3,y
  131: cd ef 01     stx 1,y
  134: 7e 00 00     jmp 0 <main>
134: R_M68HC11_RL_JUMP *ABS*
135: R_M68HC11_16 .L2

00000137 <.L3>:
  137: 18 30       tsy
  139: 18 8f       xgdy
  13b: c3 00 10     addd #10 <.LM2+0x4>
  13e: 18 8f       xgdy
  140: 18 35       tys
  142: 18 38       puly
  144: 18 df 00     sty *0 <main>
146: R_M68HC11_8 _.frame
  147: 39           rts