Skip to content

Instantly share code, notes, and snippets.

@mikecat
Created February 23, 2014 14:43
Show Gist options
  • Save mikecat/9172263 to your computer and use it in GitHub Desktop.
Save mikecat/9172263 to your computer and use it in GitHub Desktop.
.code16gccの有無で66の位置が変わる (gcc 4.8.1)
YUKI.N>cat cbw.s
.code16gcc
_start:
cbw
cwde
YUKI.N>gcc -c -o cbw.o cbw.s
YUKI.N>objdump -Mi8086 -D cbw.o
cbw.o: file format pe-i386
Disassembly of section .text:
00000000 <_start>:
0: 98 cbtw
1: 66 98 cwtl
3: 90 nop
YUKI.N>cat cbw2.s
_start:
cbw
cwde
YUKI.N>gcc -c -o cbw2.o cbw2.s
YUKI.N>objdump -D cbw2.o
cbw2.o: file format pe-i386
Disassembly of section .text:
00000000 <_start>:
0: 66 98 cbtw
2: 98 cwtl
3: 90 nop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment