2015-02-21 19:18:18 +00:00
|
|
|
/* on x86 old clang doesn't support .code16
|
|
|
|
newer clang supports it but creates 6-byte jumps instead of 3-byte ones
|
2016-09-28 17:31:04 +00:00
|
|
|
which makes us go over boot sector size.
|
|
|
|
Starting with 3.9 clang emits 3-byte jumps but still creates 8-bytes movl
|
|
|
|
instead of 5-bytes, so code overflows into data. */
|
2015-02-21 19:18:18 +00:00
|
|
|
|
|
|
|
.code16
|
|
|
|
jmp far
|
|
|
|
.org 4
|
2015-11-11 17:58:57 +00:00
|
|
|
jmp nearer
|
|
|
|
.org 6
|
2016-09-28 17:31:04 +00:00
|
|
|
movl nearer, %ebx
|
|
|
|
.org 11
|
2015-11-11 17:58:57 +00:00
|
|
|
.space 100
|
|
|
|
nearer:
|
|
|
|
.space 200
|
2015-02-21 19:18:18 +00:00
|
|
|
far:
|
|
|
|
.byte 0
|