2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>

Absolute addressing through constant with Apple's cc

	* kern/i386/pc/startup.S: Define necessary constants
	and address through it when using ABS with Apple's CC
	* boot/i386/pc/diskboot.S: likewise
	* boot/i386/pc/boot.S: likewise
	* boot/i386/pc/lnxboot.S: likewise
	* boot/i386/pc/cdboot.S: likewise
	* mmap/i386/pc/mmap_helper.S: likewise
	* commands/i386/pc/drivemap_int13h.S: likewise
This commit is contained in:
phcoder 2009-06-04 20:01:19 +00:00
parent 2b167a7218
commit 3e32590112
8 changed files with 214 additions and 1 deletions

View file

@ -67,8 +67,15 @@ bi_reserved:
movw %ax, %ds
movw %ax, %es
#ifdef APPLE_CC
err_noboot_msg_abs = 0x7C00 + err_noboot_msg - start
movw $err_noboot_msg_abs, %si
bi_length_dif = bi_length - next
movl %cs:bi_length_dif(%bx), %ecx
#else
movw $(0x7C00 + err_noboot_msg - start), %si
movl %cs: bi_length - next(%bx), %ecx
#endif
orl %ecx, %ecx
jz fail
@ -152,7 +159,12 @@ read_cdrom:
ret
cdrom_fail:
#ifdef APPLE_CC
err_cdfail_msg_abs = 0x7C00 + err_cdfail_msg - start
movw $(err_cdfail_msg_abs), %si
#else
movw $(0x7C00 + err_cdfail_msg - start), %si
#endif
fail:
movb $0x0e, %ah