blob: c3c3bc60ce19de4955576cd53429a8e34ef72b58 [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);
19 OFFSET(BREGS_esi, bregs, esi);
20 OFFSET(BREGS_edi, bregs, edi);
21 OFFSET(BREGS_flags, bregs, flags);
22 OFFSET(BREGS_ip, bregs, ip);
Kevin O'Connor18e38b22008-12-10 20:40:13 -050023
24 COMMENT("BDA");
25 OFFSET(BDA_ebda_seg, bios_data_area_s, ebda_seg);
26
27 COMMENT("EBDA");
Kevin O'Connor7f343092009-01-01 18:31:11 -050028 DEFINE(EBDA_OFFSET_TOP_STACK, EBDA_OFFSET_TOP_STACK);
Kevin O'Connor952974e2008-11-16 18:14:33 -050029}