--- qemu/roms/seabios/src/biosvar.h 2018/04/24 18:27:17 1.1.1.3 +++ qemu/roms/seabios/src/biosvar.h 2018/04/24 18:36:34 1.1.1.4 @@ -1,6 +1,6 @@ // Variable layouts of bios. // -// Copyright (C) 2008,2009 Kevin O'Connor +// Copyright (C) 2008-2010 Kevin O'Connor // // This file may be distributed under the terms of the GNU LGPLv3 license. #ifndef __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)