mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 15:10:28 +00:00
Change .BIN format to .ZXE (Zeal Executable).
Remove .C suffix on non-executable binary files.
This commit is contained in:
parent
c01db2d14f
commit
dd21cff146
46 changed files with 186 additions and 190 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
*.BIN*
|
||||
*.BIN
|
||||
*.ZXE
|
||||
*.MAP
|
||||
src/Boot/
|
||||
docs/Boot/
|
||||
|
|
BIN
build/AUTO.ISO
BIN
build/AUTO.ISO
Binary file not shown.
|
@ -92,7 +92,7 @@ U8 *friendly_imgs[4] = {$IB,"<5>",BI=5$, $IB,"<4>",BI=4$, $IB,"<5>",BI=5$, $IB,"
|
|||
|
||||
|
||||
|
||||
U8 *CIA_neeger_imgs[4] = {$IB,"<8>",BI=8$, $IB,"<7>",BI=7$, $IB,"<8>",BI=8$, $IB,"<9>",BI=9$};
|
||||
U8 *CIA_agent_imgs[4] = {$IB,"<8>",BI=8$, $IB,"<7>",BI=7$, $IB,"<8>",BI=8$, $IB,"<9>",BI=9$};
|
||||
|
||||
|
||||
|
||||
|
@ -334,7 +334,7 @@ U0 MPMenDraw(CDC *dc2)
|
|||
if (tmpu->friendly)
|
||||
{
|
||||
if (tmpu->CIA && Blink)
|
||||
_tmps = CIA_neeger_imgs;
|
||||
_tmps = CIA_agent_imgs;
|
||||
else
|
||||
_tmps = friendly_imgs;
|
||||
}
|
||||
|
|
|
@ -1145,7 +1145,7 @@ U0 ParseAsmDefine(CCompCtrl *cc, I64 U8_count)
|
|||
Lex(cc);
|
||||
}
|
||||
|
||||
U0 ParseBinFile(CCompCtrl *cc)
|
||||
U0 ParseBinLoad(CCompCtrl *cc)
|
||||
{
|
||||
I64 i, size;
|
||||
U8 *buf, *st;
|
||||
|
@ -1259,8 +1259,8 @@ U0 ParseAsmBlk(CCompCtrl *cc, I64 comp_flags)
|
|||
ParseAsmDefine(cc, 8);
|
||||
break;
|
||||
|
||||
case AKW_BINFILE:
|
||||
ParseBinFile(cc);
|
||||
case AKW_BINLOAD:
|
||||
ParseBinLoad(cc);
|
||||
break;
|
||||
|
||||
case AKW_LIST:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
I64 HashEntrySize(CHashSrcSym *tmph)
|
||||
{//Logical size of a std system hash entry.
|
||||
CDebugInfo *debug_info;
|
||||
CBinFile *bfh;
|
||||
CZXE *zxe;
|
||||
|
||||
switch (HashTypeNum(tmph))
|
||||
{
|
||||
|
@ -27,8 +27,8 @@ I64 HashEntrySize(CHashSrcSym *tmph)
|
|||
return MSize(tmph(CHashGeneric *)->user_data0);
|
||||
else
|
||||
{
|
||||
bfh = mem_boot_base - sizeof(CBinFile);
|
||||
return bfh->file_size;
|
||||
zxe = mem_boot_base - sizeof(CZXE);
|
||||
return zxe->file_size;
|
||||
}
|
||||
|
||||
case HTt_WORD:
|
||||
|
@ -59,7 +59,7 @@ I64 HashEntrySize2(CHashSrcSym *tmph)
|
|||
{
|
||||
res += MemberListSize(tmph);
|
||||
if (debug_info = tmph->debug_info)
|
||||
//This should be $LK,"MSize",A="MN:MSize"$() but it would crash on AOT .BIN file functions.
|
||||
//This should be $LK,"MSize",A="MN:MSize"$() but it would crash on AOT .ZXE file functions.
|
||||
res += debug_info->body[debug_info->max_line + 1 - debug_info->min_line] - debug_info->body[0];
|
||||
}
|
||||
else if (tmph->type & HTT_DEFINE_STR)
|
||||
|
|
|
@ -492,11 +492,11 @@ U0 CompFixUpAOTAsm(CCompCtrl *cc, CAOT *tmpaot)
|
|||
}
|
||||
|
||||
I64 Comp(U8 *filename, U8 *map_name=NULL, U8 *out_name=NULL, U8 mapfile_drive_let=0)
|
||||
{//AOT Compile CC or PRJ file a and output BIN file. Returns err_count.
|
||||
{//AOT Compile ZC or PRJ file and output ZXE file. Returns err_count.
|
||||
U8 *ptr, *fbuf = NULL, *fbuf2 = NULL, *fbuf3 = NULL, *patch_table = MAlloc(0x20000);
|
||||
CAOT *tmpaot;
|
||||
I64 i, count, size = 0, error_count = 0, warning_count = 0, aot_U8s = 0;
|
||||
CBinFile *bfh;
|
||||
CZXE *zxe;
|
||||
CAOTImportExport *tmpie, *tmpie1;
|
||||
CAOTAbsAddr *tmpa, *tmpa1;
|
||||
CAOTHeapGlobalRef *tmphgr, *tmphgr1;
|
||||
|
@ -626,25 +626,25 @@ I64 Comp(U8 *filename, U8 *map_name=NULL, U8 *out_name=NULL, U8 mapfile_drive_le
|
|||
MemSet(ptr, 0, 16);
|
||||
i = ptr - patch_table;
|
||||
//Needs 16 ALIGN
|
||||
size = (sizeof(CBinFile) + aot_U8s + i + 15) & -16;
|
||||
bfh = MAlloc(size);
|
||||
bfh->jmp = 0xEB + 256 * (sizeof(CBinFile) - 2);
|
||||
#assert sizeof(CBinFile) - 2 <= I8_MAX
|
||||
bfh->reserved = 0;
|
||||
bfh->bin_signature = BIN_SIGNATURE_VAL;
|
||||
bfh->org = tmpaot->org;
|
||||
bfh->module_align_bits = tmpaot->max_align_bits;
|
||||
bfh->patch_table_offset = sizeof(CBinFile)+aot_U8s;
|
||||
bfh->file_size = size;
|
||||
MemCopy(bfh(U8 *) + sizeof(CBinFile), tmpaot->buf, aot_U8s);
|
||||
MemCopy(bfh(U8 *) + sizeof(CBinFile) + aot_U8s, patch_table, size - aot_U8s - sizeof(CBinFile));
|
||||
size = (sizeof(CZXE) + aot_U8s + i + 15) & -16;
|
||||
zxe = MAlloc(size);
|
||||
zxe->jmp = 0xEB + 256 * (sizeof(CZXE) - 2);
|
||||
#assert sizeof(CZXE) - 2 <= I8_MAX
|
||||
zxe->reserved = 0;
|
||||
zxe->signature = ZXE_SIGNATURE_VAL;
|
||||
zxe->org = tmpaot->org;
|
||||
zxe->module_align_bits = tmpaot->max_align_bits;
|
||||
zxe->patch_table_offset = sizeof(CZXE) + aot_U8s;
|
||||
zxe->file_size = size;
|
||||
MemCopy(zxe(U8 *) + sizeof(CZXE), tmpaot->buf, aot_U8s);
|
||||
MemCopy(zxe(U8 *) + sizeof(CZXE) + aot_U8s, patch_table, size - aot_U8s - sizeof(CZXE));
|
||||
Free(fbuf2);
|
||||
if (out_name)
|
||||
fbuf2 = ExtDefault(out_name, "BIN");
|
||||
fbuf2 = ExtDefault(out_name, "ZXE");
|
||||
else
|
||||
fbuf2 = ExtChange(fbuf, "BIN");
|
||||
FileWrite(fbuf2, bfh, size);
|
||||
Free(bfh);
|
||||
fbuf2 = ExtChange(fbuf, "ZXE");
|
||||
FileWrite(fbuf2, zxe, size);
|
||||
Free(zxe);
|
||||
Free(tmpaot->buf);
|
||||
QueueDel(tmpaot);
|
||||
Free(tmpaot);
|
||||
|
|
|
@ -310,7 +310,7 @@ class CIntermediateStruct
|
|||
#define AKW_IMPORT 85
|
||||
#define AKW_LIST 86
|
||||
#define AKW_NOLIST 87
|
||||
#define AKW_BINFILE 88
|
||||
#define AKW_BINLOAD 88
|
||||
#define KW_KWS_NUM 89
|
||||
|
||||
#define CMP_TEMPLATE_INC 0x00
|
||||
|
|
|
@ -218,7 +218,7 @@ ASM_KEYWORD USE64 84;
|
|||
ASM_KEYWORD IMPORT 85;
|
||||
ASM_KEYWORD LIST 86;
|
||||
ASM_KEYWORD NOLIST 87;
|
||||
ASM_KEYWORD BINFILE 88;
|
||||
ASM_KEYWORD BINLOAD 88;
|
||||
|
||||
OPCODE PUSH
|
||||
0x0E, CS
|
||||
|
|
Binary file not shown.
|
@ -1,7 +1,5 @@
|
|||
$WW,1$$FG,5$$TX+CX,"TODO"$$FG$
|
||||
|
||||
* Get rid of niggerlicious name "binary".
|
||||
|
||||
* Change mouse Z to wheel.
|
||||
|
||||
* 10/28/17 Editor froze when filter search 3, in bible, "hour".
|
||||
|
@ -463,26 +461,3 @@ $TX,"Peter Gadwa",HTML="http://www.wired.com/magazine/2010/11/mf_ticketmaster/al
|
|||
$TX,"Ticketmaster",HTML="http://www.nytimes.com/1994/11/06/business/ticketmaster-s-mr-tough-guy.html?pagewanted=a"$
|
||||
$TX,"Tom Foley",HTML="http://web.gccaz.edu/~tfoley/perspage.html"$
|
||||
$TX,"Graphic Technologies",HTML="https://web.archive.org/web/20020811060541/http://www.graphic-technologies.com/"$
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$SP,"<1>",BI=1$
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|