blob: ea49296d96d5b70fdefd29331b7da528d3e49373 [file] [log] [blame]
Kevin O'Connor952974e2008-11-16 18:14:33 -05001// Generate assembler offsets.
2
Kevin O'Connor18e38b22008-12-10 20:40:13 -05003#include "gen-defs.h" // OFFSET
4#include "bregs.h" // struct bregs
5#include "biosvar.h" // struct bios_data_area_s
Kevin O'Connor952974e2008-11-16 18:14:33 -05006
7/* workaround for a warning with -Wmissing-prototypes */
8void foo(void) VISIBLE16;
9
10void foo(void)
11{
Kevin O'Connor18e38b22008-12-10 20:40:13 -050012 COMMENT("BREGS");
Kevin O'Connor952974e2008-11-16 18:14:33 -050013 OFFSET(BREGS_es, bregs, es);
14 OFFSET(BREGS_ds, bregs, ds);
15 OFFSET(BREGS_eax, bregs, eax);
16 OFFSET(BREGS_ebx, bregs, ebx);
17 OFFSET(BREGS_ecx, bregs, ecx);
18 OFFSET(BREGS_edx, bregs, edx);
Kevin O'Connor7da210c2009-05-16 23:57:08 -040019 OFFSET(BREGS_ebp, bregs, ebp);
Kevin O'Connor952974e2008-11-16 18:14:33 -050020 OFFSET(BREGS_esi, bregs, esi);
21 OFFSET(BREGS_edi, bregs, edi);
22 OFFSET(BREGS_flags, bregs, flags);
23 OFFSET(BREGS_ip, bregs, ip);
Kevin O'Connor18e38b22008-12-10 20:40:13 -050024
25 COMMENT("BDA");
26 OFFSET(BDA_ebda_seg, bios_data_area_s, ebda_seg);
27
28 COMMENT("EBDA");
Kevin O'Connor7f343092009-01-01 18:31:11 -050029 DEFINE(EBDA_OFFSET_TOP_STACK, EBDA_OFFSET_TOP_STACK);
Kevin O'Connor952974e2008-11-16 18:14:33 -050030}