From 5f3e49b03f0ab8f91d6569dc87a391f9d31694ea Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Sat, 19 Oct 2002 17:29:25 +0000 Subject: [PATCH] Support for the updated list of lists class, now supporting a fake dos file table. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@364 --- src/dos/dos_tables.cpp | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/dos/dos_tables.cpp b/src/dos/dos_tables.cpp index 2318655d..dc94f920 100644 --- a/src/dos/dos_tables.cpp +++ b/src/dos/dos_tables.cpp @@ -20,25 +20,18 @@ #include "mem.h" #include "dos_inc.h" -#if defined (_MSC_VER) #pragma pack(1) -#endif struct DOS_TableCase { Bit16u size; Bit8u chars[256]; } -#if defined (_MSC_VER) -; -#pragma pack() -#else -__attribute__ ((packed)); -#endif - +GCC_ATTRIBUTE (packed); +#pragma pack () RealPt DOS_TableUpCase; RealPt DOS_TableLowCase; -static Bit16u dos_memseg=0xd000; +static Bit16u dos_memseg; Bit16u DOS_GetMemory(Bit16u pages) { if (pages+dos_memseg>=0xe000) { E_Exit("DOS:Not enough memory for internal tables"); @@ -50,9 +43,21 @@ Bit16u DOS_GetMemory(Bit16u pages) { void DOS_SetupTables(void) { + dos_memseg=0xd000; + Bit16u seg;Bitu i; dos.tables.indosflag=RealMake(DOS_GetMemory(1),0); + dos.tables.mediaid=RealMake(DOS_GetMemory(2),0); + dos.tables.tempdta=RealMake(DOS_GetMemory(4),0); + for (i=0;i