1e3a293fa728a884c96bca749c12da9dbb315278
[seabios.git] / src / asm-offsets.c
1 // Generate assembler offsets.
2
3 #include "gen-defs.h" // OFFSET
4 #include "bregs.h" // struct bregs
5 #include "biosvar.h" // struct bios_data_area_s
6
7 /* workaround for a warning with -Wmissing-prototypes */
8 void foo(void) VISIBLE16;
9
10 void foo(void)
11 {
12     COMMENT("BREGS");
13     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);
19     OFFSET(BREGS_esi, bregs, esi);
20     OFFSET(BREGS_edi, bregs, edi);
21     OFFSET(BREGS_flags, bregs, flags);
22     OFFSET(BREGS_ip, bregs, ip);
23
24     COMMENT("BDA");
25     OFFSET(BDA_ebda_seg, bios_data_area_s, ebda_seg);
26
27     COMMENT("EBDA");
28     OFFSET(EBDA_resume_stack_top, extended_bios_data_area_s
29            , resume_stack[FIELD_SIZEOF(struct extended_bios_data_area_s
30                                        , resume_stack)]);
31 }