diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2010-07-28 21:31:38 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2010-07-28 21:31:38 -0400 |
commit | cc9e1bf4336696340330010d59028e3b8fb9aa7d (patch) | |
tree | 108cd7725b49f689a52dfe27a9c692e408273ed4 /src/biosvar.h | |
parent | b4525a0ec176426788f293cce92160e6573e86b6 (diff) | |
download | seabios-cc9e1bf4336696340330010d59028e3b8fb9aa7d.tar.gz |
Add FUNC16() helper macro for converting a 16bit func to a segoff_s.
Diffstat (limited to 'src/biosvar.h')
-rw-r--r-- | src/biosvar.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/biosvar.h b/src/biosvar.h index df0df0eb..415f9581 100644 --- a/src/biosvar.h +++ b/src/biosvar.h @@ -25,6 +25,12 @@ struct rmode_IVT { #define SET_IVT(vector, segoff) \ SET_FARVAR(SEG_IVT, ((struct rmode_IVT *)0)->ivec[vector], segoff) +#define FUNC16(func) ({ \ + ASSERT32FLAT(); \ + extern void func (void); \ + SEGOFF(SEG_BIOS, (u32)func - BUILD_BIOS_ADDR); \ + }) + /**************************************************************** * Bios Data Area (BDA) |