Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5097 → Rev 5098

/programs/emulator/e80/trunk/Tupfile.lua
0,0 → 1,18
if tup.getconfig("NO_FASM") ~= "" or tup.getconfig("NO_GCC") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_gcc.lua")
LDFLAGS = LDFLAGS .. " -T kolibri.ld"
if tup.getconfig("LANG") == "ru"
then C_LANG = "LANG_RUS"
else C_LANG = "LANG_ENG" -- this includes default case without config
end
 
if tup.getconfig("TUP_PLATFORM") == "win32"
-- on win32 '#' is not a special character, but backslash and quotes would be printed as is
then tup.rule('echo #define ' .. C_LANG .. ' 1 > %o', {"lang.h"})
-- on unix '#' should be escaped
else tup.rule('echo "#define" ' .. C_LANG .. ' 1 > %o', {"lang.h"})
end
tup.append_table(OBJS, tup.rule("asm_code.asm", "fasm %f %o", "asm_code.obj"))
compile_gcc{"z80/z80.c", "system/kolibri.c", "system/stdlib.c", "system/string.c", "e80.c", extra_inputs = {"lang.h"}}
link_gcc("e80")
/programs/emulator/e80/trunk/kolibri.ld
17,4 → 17,8
*(.bss)
}
Memory = . ;
/DISCARD/ : {
*(.comment)
*(.drectve)
}
}
/programs/emulator/e80/trunk/system/kolibri.h
12,39 → 12,40
#define E_NOMEM 30
#define E_PARAM 33
 
 
#pragma pack(push, 1)
typedef struct
{
unsigned p00 __attribute__((packed));
unsigned p04 __attribute__((packed));
unsigned p08 __attribute__((packed));
unsigned p12 __attribute__((packed));
unsigned p16 __attribute__((packed));
char p20 __attribute__((packed));
char *p21 __attribute__((packed));
} kol_struct70 __attribute__((packed));
unsigned p00;
unsigned p04;
unsigned p08;
unsigned p12;
unsigned p16;
char p20;
char *p21;
} kol_struct70;
 
 
typedef struct
{
unsigned p00 __attribute__((packed));
char p04 __attribute__((packed));
char p05[3] __attribute__((packed));
unsigned p08 __attribute__((packed));
unsigned p12 __attribute__((packed));
unsigned p16 __attribute__((packed));
unsigned p20 __attribute__((packed));
unsigned p24 __attribute__((packed));
unsigned p28 __attribute__((packed));
unsigned p32[2] __attribute__((packed));
unsigned p40 __attribute__((packed));
} kol_struct_BDVK __attribute__((packed));
unsigned p00;
char p04;
char p05[3];
unsigned p08;
unsigned p12;
unsigned p16;
unsigned p20;
unsigned p24;
unsigned p28;
unsigned p32[2];
unsigned p40;
} kol_struct_BDVK;
 
typedef struct
{
char *name __attribute__((packed));
void *data __attribute__((packed));
} kol_struct_import __attribute__((packed));
char *name;
void *data;
} kol_struct_import;
#pragma pack(pop)
 
 
void kol_exit();
/programs/emulator/e80/trunk/utils/keyZXtst/Tupfile.lua
0,0 → 1,2
if tup.getconfig("NO_FASM") ~= "" then return end
tup.rule("keyZXtst.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "keyZXtst")