Debian Codegraph @

asm-tests/i386-pc.S

raw
1 /* on x86 old clang doesn't support .code16
2 newer clang supports it but creates 6-byte jumps instead of 3-byte ones
3 which makes us go over boot sector size.
4 Starting with 3.9 clang emits 3-byte jumps but still creates 8-bytes movl
5 instead of 5-bytes, so code overflows into data. */
6
7 .code16
8 jmp far
9 .org 4
10 jmp nearer
11 .org 6
12 movl nearer, %ebx
13 .org 11
14 .space 100
15 nearer:
16 .space 200
17 far:
18 .byte 0