Apple assembly doesn't handle symbol arithmetic well. So define an

offset symbol in boot.S and use it.
This commit is contained in:
Vladimir Serbinenko committed 2013-11-24 07:12:12 +01:00
1 parent 78f961efe9
commit 5c066a81c2
2 files changed
+12 -3

No files matched your search

+5
View File
@@ -1,3 +1,8 @@
2013-11-24 Vladimir Serbinenko <phcoder@gmail.com>
Apple assembly doesn't handle symbol arithmetic well. So define an
offset symbol in boot.S and use it.
2013-11-24 Vladimir Serbinenko <phcoder@gmail.com> 2013-11-24 Vladimir Serbinenko <phcoder@gmail.com>
Apple assembly doesn't handle symbol arithmetic well. So instead Apple assembly doesn't handle symbol arithmetic well. So instead
+7 -3
View File
@@ -31,7 +31,7 @@
.macro floppy .macro floppy
part_start: part_start:
probe_values: LOCAL(probe_values):
.byte 36, 18, 15, 9, 0 .byte 36, 18, 15, 9, 0
LOCAL(floppy_probe): LOCAL(floppy_probe):
@@ -39,8 +39,12 @@ LOCAL(floppy_probe):
/* /*
* Perform floppy probe. * Perform floppy probe.
*/ */
#ifdef __APPLE__
movw MACRO_DOLLAR(probe_values) - 1, %si LOCAL(probe_values_minus_one) = LOCAL(probe_values) - 1
movw MACRO_DOLLAR(LOCAL(probe_values_minus_one)), %si
#else
movw MACRO_DOLLAR(LOCAL(probe_values)) - 1, %si
#endif
LOCAL(probe_loop): LOCAL(probe_loop):
/* reset floppy controller INT 13h AH=0 */ /* reset floppy controller INT 13h AH=0 */