TempleOSCDV4.09.ISO
This commit is contained in:
1 parent
2d56cda5f3
commit
353eac0dbe
88 files changed
+2286
-1880
No files matched your search
Binary file not shown.
@@ -323,7 +323,7 @@ U0 FMDelete(CDoc *doc)
|
||||
}
|
||||
}
|
||||
|
||||
U0 FMMount(CDoc *doc)
|
||||
U0 FMChgDsk(CDoc *doc)
|
||||
{
|
||||
CDocEntry *doc_ce=doc->cur_entry;
|
||||
CDirEntry *tempde;
|
||||
@@ -340,6 +340,32 @@ U0 FMMount(CDoc *doc)
|
||||
}
|
||||
}
|
||||
|
||||
U0 FMMountISO(CDoc *doc)
|
||||
{
|
||||
CDocEntry *doc_ce=doc->cur_entry;
|
||||
CDirEntry *tempde;
|
||||
if (doc_ce->type_u8==DOCT_MENU_VAL && (tempde=doc_ce->user_data))
|
||||
MountFile(tempde->full_name);
|
||||
}
|
||||
|
||||
U0 FMUnmount(CDoc *doc)
|
||||
{
|
||||
CDocEntry *doc_ce=doc->cur_entry;
|
||||
CDirEntry *tempde;
|
||||
I64 drv_let;
|
||||
if (doc_ce->type_u8==DOCT_TREE || doc_ce->type_u8==DOCT_MENU_VAL)
|
||||
tempde=doc_ce->user_data;
|
||||
else
|
||||
tempde=NULL;
|
||||
if (tempde) {
|
||||
while (tempde->parent)
|
||||
tempde=tempde->parent;
|
||||
drv_let=*tempde->full_name;
|
||||
if (Let2BlkDev(drv_let)!=Let2BlkDev(':'))
|
||||
Unmount(drv_let);
|
||||
}
|
||||
}
|
||||
|
||||
U0 FMFmtDrv(CDoc *doc)
|
||||
{
|
||||
CDocEntry *doc_ce=doc->cur_entry;
|
||||
@@ -460,9 +486,11 @@ U0 FMCopy(CDoc *doc)
|
||||
#define FMR_PASTE 6
|
||||
#define FMR_CHG_DSK 7
|
||||
#define FMR_FORMAT 8
|
||||
#define FMR_MAKE_ISO 9
|
||||
#define FMR_BURN_ISO 10
|
||||
#define FMR_HELP 11
|
||||
#define FMR_MOUNT_ISO 9
|
||||
#define FMR_UNMOUNT 10
|
||||
#define FMR_MAKE_ISO 11
|
||||
#define FMR_BURN_ISO 12
|
||||
#define FMR_HELP 13
|
||||
|
||||
I64 PopUpFMRight(U8 *header=NULL,U8 *footer=NULL)
|
||||
{
|
||||
@@ -478,6 +506,8 @@ I64 PopUpFMRight(U8 *header=NULL,U8 *footer=NULL)
|
||||
"$$CM+LX,1,3 $$$$BT,\"PASTE CLIPBOARD FILES \",LE=FMR_PASTE$$"
|
||||
"$$CM+LX,27,0$$$$BT,\"CHANGE DISK(MOUNT IT) \",LE=FMR_CHG_DSK$$"
|
||||
"$$CM+LX,1,3 $$$$BT,\"FORMAT \",LE=FMR_FORMAT$$"
|
||||
"$$CM+LX,1,3 $$$$BT,\"MOUNT ISO.C FILE \",LE=FMR_MOUNT_ISO$$"
|
||||
"$$CM+LX,27,0$$$$BT,\"UNMOUNT \",LE=FMR_UNMOUNT$$"
|
||||
"$$CM+LX,1,3 $$$$BT,\"MAKE ISO (CD/DVD) FILE\",LE=FMR_MAKE_ISO$$"
|
||||
"$$CM+LX,27,0$$$$BT,\"BURN ISO (CD/DVD) FILE\",LE=FMR_BURN_ISO$$"
|
||||
"$$CM+LX,1,3 $$$$BT,\"HELP \",LE=FMR_HELP$$"
|
||||
@@ -518,6 +548,12 @@ U0 FMRightClick()
|
||||
case FMR_FORMAT:
|
||||
Msg(MSG_KEY_DOWN,'f',0);
|
||||
break;
|
||||
case FMR_MOUNT_ISO:
|
||||
Msg(MSG_KEY_DOWN,'i',0);
|
||||
break;
|
||||
case FMR_UNMOUNT:
|
||||
Msg(MSG_KEY_DOWN,'u',0);
|
||||
break;
|
||||
case FMR_MAKE_ISO:
|
||||
Msg(MSG_KEY_DOWN,'M',0);
|
||||
break;
|
||||
@@ -667,7 +703,13 @@ public U8 *FileMgr(I64 mode=FM_NORMAL,CTask *mem_task=NULL)
|
||||
FMDelete(doc);
|
||||
break;
|
||||
case 'm':
|
||||
FMMount(doc);
|
||||
FMChgDsk(doc);
|
||||
break;
|
||||
case 'i':
|
||||
FMMountISO(doc);
|
||||
break;
|
||||
case 'u':
|
||||
FMUnmount(doc);
|
||||
break;
|
||||
case 'M':
|
||||
FMMakeISO(doc);
|
||||
|
||||
+36
-5
@@ -2,7 +2,8 @@
|
||||
I64 Mount2(U8 boot_drv_let,CDoc *_doc,Bool repartition)
|
||||
{//If _doc, called by $LK,"::/Kernel/KCfg.CPP"$ else called by $LK,"Mount",A="MN:Mount"$().
|
||||
I64 cnt,res=0,num_hints,drv_let,type,unit;
|
||||
U8 blks_buf[STR_LEN],addr_buf[STR_LEN],base0_buf[STR_LEN],base1_buf[STR_LEN];
|
||||
U8 blks_buf[STR_LEN],addr_buf[STR_LEN],base0_buf[STR_LEN],base1_buf[STR_LEN],
|
||||
*filename=NULL,*filename2=NULL;
|
||||
CATARep *root=NULL,*tempha;
|
||||
Bool one_drv,make_free;
|
||||
CDoc *doc;
|
||||
@@ -14,7 +15,8 @@ I64 Mount2(U8 boot_drv_let,CDoc *_doc,Bool repartition)
|
||||
"\n****** Mount Drives ******\n"
|
||||
"$$GREEN$$A$$FG$$-$$GREEN$$B$$FG$$ are RAM drives.\n"
|
||||
"$$GREEN$$C$$FG$$-$$GREEN$$L$$FG$$ are ATA hard drives.\n"
|
||||
"$$GREEN$$M$$FG$$-$$GREEN$$S$$FG$$ are file drives.\n"
|
||||
"$$GREEN$$M$$FG$$-$$GREEN$$P$$FG$$ are file read drives.\n"
|
||||
"$$GREEN$$Q$$FG$$-$$GREEN$$S$$FG$$ are file write drives.\n"
|
||||
"$$GREEN$$T$$FG$$-$$GREEN$$Z$$FG$$ are ATAPI CD/DVD drives.\n"
|
||||
"\nDrive Letter ($$PURPLE$$<ENTER>$$FG$$ to exit):";
|
||||
drv_let=ToUpper(GetChar);
|
||||
@@ -34,10 +36,13 @@ I64 Mount2(U8 boot_drv_let,CDoc *_doc,Bool repartition)
|
||||
case BDT_RAM:
|
||||
"Addr of RAM disk ($$PURPLE$$<ENTER>$$FG$$ to MAlloc):";
|
||||
GetS(addr_buf,STR_LEN);
|
||||
case BDT_FILE:
|
||||
case BDT_FILE_WRITE:
|
||||
"Blks of 512 bytes:";
|
||||
GetS(blks_buf,STR_LEN);
|
||||
break;
|
||||
case BDT_FILE_READ:
|
||||
filename=GetStr("File Name:");
|
||||
break;
|
||||
case BDT_ATA:
|
||||
case BDT_ATAPI:
|
||||
num_hints=ATARep(,,&root);
|
||||
@@ -73,16 +78,22 @@ I64 Mount2(U8 boot_drv_let,CDoc *_doc,Bool repartition)
|
||||
LinkedLstDel(root);
|
||||
break;
|
||||
}
|
||||
DocPrint(doc,"bd=BlkDevNextFree(\'%C\',%d);bd->unit=%d;\n",
|
||||
DocPrint(doc,"bd=BlkDevNextFreeSlot(\'%C\',%d);bd->unit=%d;\n",
|
||||
drv_let,type,unit);
|
||||
switch (type) {
|
||||
case BDT_RAM:
|
||||
if (!*addr_buf) StrCpy(addr_buf,"0");
|
||||
DocPrint(doc,"bd->RAM_dsk=%s;\n",addr_buf);
|
||||
case BDT_FILE:
|
||||
case BDT_FILE_WRITE:
|
||||
if (!*blks_buf) StrCpy(blks_buf,"0");
|
||||
DocPrint(doc,"bd->max_blk=(%s)-1;\n",blks_buf);
|
||||
break;
|
||||
case BDT_FILE_READ:
|
||||
filename2=FileNameAbs(filename);
|
||||
DocPrint(doc,"bd->file_dsk_name=AStrNew(\"%s\");\n",filename2);
|
||||
DocPrint(doc,"bd->drv_offset=19<<2+"
|
||||
"(DVD_BLK_SIZE*2+DVD_BOOT_LOADER_SIZE)/BLK_SIZE;\n");
|
||||
break;
|
||||
case BDT_ATA:
|
||||
case BDT_ATAPI:
|
||||
if (type==BDT_ATAPI && !*base0_buf) {
|
||||
@@ -108,6 +119,8 @@ I64 Mount2(U8 boot_drv_let,CDoc *_doc,Bool repartition)
|
||||
}
|
||||
res+=cnt;
|
||||
} while (cnt || !res && _doc); //At least 1 if Called by $LK,"::/Kernel/KCfg.CPP"$
|
||||
Free(filename);
|
||||
Free(filename2);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -115,3 +128,21 @@ public I64 Mount(Bool repartition=FALSE)
|
||||
{//Mount drives.
|
||||
return Mount2(0,NULL,repartition);
|
||||
}
|
||||
|
||||
public U0 Unmount(U8 drv_let=0)
|
||||
{//Unmount drive(s).
|
||||
BlkDevDel(Let2BlkDev(drv_let));
|
||||
}
|
||||
|
||||
public U8 MountFile(U8 *filename)
|
||||
{//Mount ISO.C file.
|
||||
U8 *filename2=DftExt(filename,"ISO.C"),*filename3=FileNameAbs(filename2);
|
||||
CDrv *dv=DrvMakeFreeSlot(DrvNextFreeLet('M')); //First $LK,"BDT_FILE_READ",A="MN:BDT_FILE_READ"$
|
||||
CBlkDev *bd=BlkDevNextFreeSlot(dv->drv_let,BDT_FILE_READ);
|
||||
bd->drv_offset=19<<2+(DVD_BLK_SIZE*2+DVD_BOOT_LOADER_SIZE)/BLK_SIZE;
|
||||
bd->file_dsk_name=AStrNew(filename3);
|
||||
BlkDevAdd(bd,TRUE,TRUE);
|
||||
Free(filename3);
|
||||
Free(filename2);
|
||||
return dv->drv_let;
|
||||
}
|
||||
@@ -32,7 +32,7 @@ public I64 PrtDsk(U8 drv_let=0)
|
||||
"make your hard drive impossible\n"
|
||||
"to repartition with other operating\n"
|
||||
"until you set block zero to zero\n"
|
||||
"with $$LK,\"MasterBootZero\",\"MN:MasterBootZero\"$$()\n\n\n"
|
||||
"with $$LK,\"BootMHDZero\",\"MN:BootMHDZero\"$$()\n\n\n"
|
||||
"Continue";
|
||||
if (!YorN) return 0;
|
||||
if (drv_let && !Let2BlkDev(drv_let,FALSE))
|
||||
|
||||
+2
-2
@@ -11,8 +11,8 @@ U0 LoadDocDefines()
|
||||
//This is cut and replaced when I generate a distro.
|
||||
//See $LK,"DD_TEMPLEOS_LOC",A="FF:::/Demo/AcctExample/TOSDistro.CPP,DD_TEMPLEOS_LOC"$.
|
||||
$TR-C,"LineRep"$
|
||||
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","120,845");
|
||||
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","80,741");
|
||||
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","121,194");
|
||||
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","81,057");
|
||||
$ID,-4$
|
||||
DefinePrint("DD_KERNEL","%08X",bfh);
|
||||
bfh(I64)+=bfh->file_size-1;
|
||||
|
||||
@@ -265,9 +265,9 @@ public F64 PopUpRangeF64Log(F64 lo,F64 hi,I64 steps,
|
||||
return PopUpRangeF64Exp(lo,hi,Exp(Ln(hi/lo)/(steps-1)),fmt,header,footer);
|
||||
}
|
||||
|
||||
#help_index "Task/Srv/Exe"
|
||||
#help_index "Task/Srv/Exe;Compiler"
|
||||
public I64 AdamFile(U8 *filename,Bool warn_ext=TRUE)
|
||||
{//Tell adam task to compile and run a file.
|
||||
{//Make adam_task execute file.
|
||||
Bool okay=TRUE;
|
||||
U8 *name=FileNameAbs(filename),
|
||||
*name2=DftExt(name,"CPP.Z");
|
||||
@@ -285,7 +285,7 @@ public I64 AdamFile(U8 *filename,Bool warn_ext=TRUE)
|
||||
|
||||
public I64 PopUpFile(U8 *filename,Bool warn_ext=TRUE,
|
||||
CTask *parent=NULL,CTask **_pu_task=NULL)
|
||||
{//Run code file in PopUp win task.
|
||||
{//$LK,"ExeFile2",A="MN:ExeFile2"$() in $LK,"PopUp",A="MN:PopUp"$ task. Cont as User.
|
||||
Bool okay=TRUE;
|
||||
U8 *st,*name=FileNameAbs(filename),
|
||||
*name2=DftExt(name,"CPP.Z");
|
||||
@@ -306,3 +306,18 @@ public I64 PopUpFile(U8 *filename,Bool warn_ext=TRUE,
|
||||
Free(name);
|
||||
return res;
|
||||
}
|
||||
|
||||
public I64 PopUpRunFile(U8 *filename,I64 ccf_flags=0,...)
|
||||
{//$LK,"ExeFile",A="MN:ExeFile"$() with args using $LK,"LastFun",A="MN:LastFun"$() in $LK,"PopUp",A="MN:PopUp"$ task.
|
||||
U8 *st,*name=FileNameAbs(filename),
|
||||
*name2=DftExt(name,"CPP.Z");
|
||||
I64 res=0;
|
||||
st=MStrPrint(
|
||||
"\"$$$$WW+H,1$$$$\";ExeFile2(\"%s\",0x%X);LastFun(0x%X,0x%X);",
|
||||
name2,ccf_flags,argc,argv);
|
||||
res=PopUp(st,Fs);
|
||||
Free(st);
|
||||
Free(name2);
|
||||
Free(name);
|
||||
return res;
|
||||
}
|
||||
+19
-5
@@ -59,8 +59,9 @@ public U0 DocTermNew()
|
||||
#define RIGHT_DELETE 4
|
||||
#define RIGHT_TYPE 5
|
||||
#define RIGHT_ED 6
|
||||
#define RIGHT_PLAIN 7
|
||||
#define RIGHT_AUTOFILE 8
|
||||
#define RIGHT_MOUNT 7
|
||||
#define RIGHT_PLAIN 8
|
||||
#define RIGHT_AUTOFILE 9
|
||||
|
||||
I64 PopUpTermRight(U8 *header)
|
||||
{
|
||||
@@ -76,9 +77,10 @@ I64 PopUpTermRight(U8 *header)
|
||||
"$$CM+LX,1,3 $$$$BT,\"DELETE \",LE=RIGHT_DELETE$$"
|
||||
"$$CM+LX,26,0$$$$BT,\"TYPE TXT;GRA\",LE=RIGHT_TYPE$$"
|
||||
"$$CM+LX,1,3 $$$$BT,\"ED TXT\",LE=RIGHT_ED$$"
|
||||
"$$CM+LX,26,0$$$$BT,\"PLAIN ED TXT\",LE=RIGHT_PLAIN$$"
|
||||
"$$CM+LX,1,3 $$$$BT,\"CANCEL \",LE=DOCM_CANCEL$$"
|
||||
"$$CM+LX,26,0$$$$BT,\"AUTOFILE AUT\",LE=RIGHT_AUTOFILE$$\n",
|
||||
"$$CM+LX,26,0$$$$BT,\"MOUNT ISO.C\",LE=RIGHT_MOUNT$$"
|
||||
"$$CM+LX,1,3 $$$$BT,\"PLAIN ED TXT\",LE=RIGHT_PLAIN$$"
|
||||
"$$CM+LX,26,0$$$$BT,\"AUTOFILE AUT\",LE=RIGHT_AUTOFILE$$\n"
|
||||
"$$CM+LX,1,3 $$$$BT,\"CANCEL \",LE=DOCM_CANCEL$$",
|
||||
FILEMASK_TXT,FILEMASK_JIT,FILEMASK_GRA);
|
||||
i=PopUpMenu(doc);
|
||||
DocDel(doc);
|
||||
@@ -160,6 +162,18 @@ I64 TermRightClickLink(CDoc *doc,CDocEntry *doc_e)
|
||||
"Ed(\"%s\");\n$$PT$$$$FG$$$$BG$$",st;
|
||||
res=Ed(st);
|
||||
break;
|
||||
case RIGHT_MOUNT:
|
||||
if (FileExtDot(st) && !FilesFindMatch(st,"*.ISO.C")) {
|
||||
if (!PopUpCancelOk(ST_WARN_ST "Not .ISO.C File\n\n")) {
|
||||
send_new_line=TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
"MountFile(\"%s\");\n$$PT$$$$FG$$$$BG$$",st;
|
||||
WinZBufUpdate;
|
||||
MountFile(st);
|
||||
res=TRUE;
|
||||
break;
|
||||
case RIGHT_PLAIN:
|
||||
"Plain(\"%s\");\n$$PT$$$$FG$$$$BG$$",st;
|
||||
res=Plain(st);
|
||||
|
||||
@@ -119,9 +119,9 @@ public I64 ExeDoc(CDoc *doc,I64 ccf_flags=0)
|
||||
I64 res;
|
||||
Bool okay=TRUE,unlock_doc=DocLock(doc);
|
||||
CCmpCtrl *cc=CmpCtrlNew(,ccf_flags|CCF_DONT_FREE_BUF);
|
||||
if (Fs->last_lex!=&Fs->next_lex)
|
||||
cc->opts=Fs->last_lex->opts;
|
||||
QueIns(cc,Fs->last_lex);
|
||||
if (Fs->last_cc!=&Fs->next_cc)
|
||||
cc->opts=Fs->last_cc->opts;
|
||||
QueIns(cc,Fs->last_cc);
|
||||
LexAttachDoc(cc,,doc);
|
||||
try {
|
||||
Lex(cc);
|
||||
|
||||
+264
-152
@@ -1396,8 +1396,11 @@ gr_done:
|
||||
|
||||
public I64 GrFillTri0(CDC *dc=gr.dc,CD3I32 *p1,CD3I32 *p2,CD3I32 *p4)
|
||||
{//3D. Returns cnt of pixs changed
|
||||
I64 x1,x2,y,z1,z2,dx1,dy1,dz1,dx2,dy2,dz2,res=0,i,y_min,y_max;
|
||||
I64 x1,x2,y1,y2,z1,z2,dx1,dy1,dz1,dx2,dy2,dz2,res=0,i,min,max;
|
||||
CTask *win_task;
|
||||
|
||||
if (AbsI64(p1->y-p2->y)+AbsI64(p1->y-p4->y)<=
|
||||
AbsI64(p1->x-p2->x)+AbsI64(p1->x-p4->x)) {
|
||||
//p1 is min x
|
||||
if (p4->x<p2->x)
|
||||
SwapI64(&p4,&p2);
|
||||
@@ -1408,77 +1411,43 @@ public I64 GrFillTri0(CDC *dc=gr.dc,CD3I32 *p1,CD3I32 *p2,CD3I32 *p4)
|
||||
if (p4->y<p2->y)
|
||||
SwapI64(&p4,&p2);
|
||||
|
||||
y_min=0;
|
||||
y_max=dc->height;
|
||||
min=0;
|
||||
max=dc->height;
|
||||
if (dc->flags & DCF_SCREEN_BITMAP) {
|
||||
win_task=dc->win_task;
|
||||
y_min-=win_task->scroll_y+win_task->pix_top;
|
||||
y_max-=win_task->scroll_y+win_task->pix_top;
|
||||
if (y_max>win_task->pix_bottom-(win_task->scroll_y+win_task->pix_top))
|
||||
y_max=win_task->pix_bottom-(win_task->scroll_y+win_task->pix_top);
|
||||
min-=win_task->scroll_y+win_task->pix_top;
|
||||
max-=win_task->scroll_y+win_task->pix_top;
|
||||
if (max>win_task->pix_bottom-(win_task->scroll_y+win_task->pix_top))
|
||||
max=win_task->pix_bottom-(win_task->scroll_y+win_task->pix_top);
|
||||
}
|
||||
|
||||
if ((dy2=p4->y-p1->y)<0) {
|
||||
/*
|
||||
p1x<= {p2x,p4x}
|
||||
|
||||
p2y<=
|
||||
p4y<
|
||||
p1y
|
||||
|
||||
6
|
||||
1
|
||||
|
||||
6
|
||||
1
|
||||
|
||||
24
|
||||
1
|
||||
|
||||
42
|
||||
1
|
||||
|
||||
2
|
||||
4
|
||||
1
|
||||
|
||||
24
|
||||
1
|
||||
|
||||
42
|
||||
1
|
||||
|
||||
2
|
||||
4
|
||||
1
|
||||
|
||||
*/
|
||||
dy1=p2->y-p1->y;
|
||||
dx1=(p1->x-p2->x)<<32/dy1;
|
||||
dz1=(p1->z-p2->z)<<32/dy1;
|
||||
|
||||
dx2=(p1->x-p4->x)<<32/dy2;
|
||||
dz2=(p1->z-p4->z)<<32/dy2;
|
||||
x1=x2=p1->x<<32; y=p1->y; z1=z2=p1->z<<32;
|
||||
if (y+dy2<y_min) {
|
||||
i=y_min-(y+dy2);
|
||||
x1=x2=p1->x<<32; y1=p1->y; z1=z2=p1->z<<32;
|
||||
if (y1+dy2<min) {
|
||||
i=min-(y1+dy2);
|
||||
if (i>-dy2) goto ft_done;
|
||||
dy2+=i;
|
||||
}
|
||||
if (y>=y_max) {
|
||||
i=y-y_max+1;
|
||||
if (y1>=max) {
|
||||
i=y1-max+1;
|
||||
if (i>-dy2)
|
||||
i=-dy2;
|
||||
dy2+=i;
|
||||
y-=i;
|
||||
y1-=i;
|
||||
x1+=dx1*i;
|
||||
x2+=dx2*i;
|
||||
z1+=dz1*i;
|
||||
z2+=dz2*i;
|
||||
}
|
||||
while (dy2++) {
|
||||
res+=GrHLine(dc,x1.i32[1],x2.i32[1],y,z1.i32[1],z2.i32[1]);
|
||||
y--;
|
||||
res+=GrHLine(dc,x1.i32[1],x2.i32[1],y1,z1.i32[1],z2.i32[1]);
|
||||
y1--;
|
||||
x1+=dx1;
|
||||
x2+=dx2;
|
||||
z1+=dz1;
|
||||
@@ -1487,16 +1456,16 @@ p1y
|
||||
if (dy2=p2->y-p4->y) {
|
||||
dx2=(p4->x-p2->x)<<32/dy2;
|
||||
dz2=(p4->z-p2->z)<<32/dy2;
|
||||
if (y+dy2<y_min) {
|
||||
i=y_min-(y+dy2);
|
||||
if (y1+dy2<min) {
|
||||
i=min-(y1+dy2);
|
||||
if (i>-dy2) goto ft_done;
|
||||
dy2+=i;
|
||||
}
|
||||
if (y>=y_max) {
|
||||
i=y-y_max+1;
|
||||
if (y1>=max) {
|
||||
i=y1-max+1;
|
||||
if (i>-dy2) goto ft_done;
|
||||
dy2+=i;
|
||||
y-=i;
|
||||
y1-=i;
|
||||
x1+=dx1*i;
|
||||
x2+=dx2*i;
|
||||
z1+=dz1*i;
|
||||
@@ -1504,66 +1473,40 @@ p1y
|
||||
}
|
||||
}
|
||||
while (dy2++<=0) {
|
||||
res+=GrHLine(dc,x1.i32[1],x2.i32[1],y,z1.i32[1],z2.i32[1]);
|
||||
y--;
|
||||
res+=GrHLine(dc,x1.i32[1],x2.i32[1],y1,z1.i32[1],z2.i32[1]);
|
||||
y1--;
|
||||
x1+=dx1;
|
||||
x2+=dx2;
|
||||
z1+=dz1;
|
||||
z2+=dz2;
|
||||
}
|
||||
} else if ((dy2=p2->y-p1->y)>0) {
|
||||
/*
|
||||
p1x<= {p2x,p4x}
|
||||
|
||||
p1y<
|
||||
p2y<=
|
||||
p4y
|
||||
|
||||
1
|
||||
6
|
||||
|
||||
1
|
||||
6
|
||||
|
||||
1
|
||||
2
|
||||
4
|
||||
|
||||
1
|
||||
2
|
||||
4
|
||||
|
||||
1
|
||||
2
|
||||
4
|
||||
|
||||
*/
|
||||
dy1=p4->y-p1->y;
|
||||
dx1=(p4->x-p1->x)<<32/dy1;
|
||||
dz1=(p4->z-p1->z)<<32/dy1;
|
||||
|
||||
dx2=(p2->x-p1->x)<<32/dy2;
|
||||
dz2=(p2->z-p1->z)<<32/dy2;
|
||||
x1=x2=p1->x<<32; y=p1->y; z1=z2=p1->z<<32;
|
||||
if (y+dy2>=y_max) {
|
||||
i=y+dy2-y_max+1;
|
||||
x1=x2=p1->x<<32; y1=p1->y; z1=z2=p1->z<<32;
|
||||
if (y1+dy2>=max) {
|
||||
i=y1+dy2-max+1;
|
||||
if (i>dy2) goto ft_done;
|
||||
dy2-=i;
|
||||
}
|
||||
if (y<y_min) {
|
||||
i=y_min-y;
|
||||
if (y1<min) {
|
||||
i=min-y1;
|
||||
if (i>dy2)
|
||||
i=dy2;
|
||||
dy2-=i;
|
||||
y+=i;
|
||||
y1+=i;
|
||||
x1+=dx1*i;
|
||||
x2+=dx2*i;
|
||||
z1+=dz1*i;
|
||||
z2+=dz2*i;
|
||||
}
|
||||
while (dy2--) {
|
||||
res+=GrHLine(dc,x1.i32[1],x2.i32[1],y,z1.i32[1],z2.i32[1]);
|
||||
y++;
|
||||
res+=GrHLine(dc,x1.i32[1],x2.i32[1],y1,z1.i32[1],z2.i32[1]);
|
||||
y1++;
|
||||
x1+=dx1;
|
||||
x2+=dx2;
|
||||
z1+=dz1;
|
||||
@@ -1572,16 +1515,16 @@ p4y
|
||||
if (dy2=p4->y-p2->y) {
|
||||
dx2=(p4->x-p2->x)<<32/dy2;
|
||||
dz2=(p4->z-p2->z)<<32/dy2;
|
||||
if (y+dy2>=y_max) {
|
||||
i=y+dy2-y_max+1;
|
||||
if (y1+dy2>=max) {
|
||||
i=y1+dy2-max+1;
|
||||
if (i>dy2) goto ft_done;
|
||||
dy2-=i;
|
||||
}
|
||||
if (y<y_min) {
|
||||
i=y_min-y;
|
||||
if (y1<min) {
|
||||
i=min-y1;
|
||||
if (i>dy2) goto ft_done;
|
||||
dy2-=i;
|
||||
y+=i;
|
||||
y1+=i;
|
||||
x1+=dx1*i;
|
||||
x2+=dx2*i;
|
||||
z1+=dz1*i;
|
||||
@@ -1589,54 +1532,14 @@ p4y
|
||||
}
|
||||
}
|
||||
while (dy2-->=0) {
|
||||
res+=GrHLine(dc,x1.i32[1],x2.i32[1],y,z1.i32[1],z2.i32[1]);
|
||||
y++;
|
||||
res+=GrHLine(dc,x1.i32[1],x2.i32[1],y1,z1.i32[1],z2.i32[1]);
|
||||
y1++;
|
||||
x1+=dx1;
|
||||
x2+=dx2;
|
||||
z1+=dz1;
|
||||
z2+=dz2;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
p1x<= {p2x,p4x}
|
||||
|
||||
p2y<=
|
||||
p1y<=
|
||||
p4y
|
||||
|
||||
7
|
||||
|
||||
16
|
||||
|
||||
124
|
||||
|
||||
3
|
||||
4
|
||||
|
||||
2
|
||||
5
|
||||
|
||||
3
|
||||
4
|
||||
|
||||
2
|
||||
1
|
||||
4
|
||||
|
||||
2
|
||||
1
|
||||
4
|
||||
|
||||
2
|
||||
1
|
||||
4
|
||||
|
||||
|
||||
2
|
||||
1
|
||||
4
|
||||
|
||||
*/
|
||||
if (dy1=p2->y-p1->y) {
|
||||
dx1=(p2->x-p1->x)<<32/dy1;
|
||||
dz1=(p2->z-p1->z)<<32/dy1;
|
||||
@@ -1647,22 +1550,22 @@ p4y
|
||||
dx2=0;
|
||||
dz2=0;
|
||||
}
|
||||
x1=x2=p2->x<<32; y=p2->y; z1=z2=p2->z<<32;
|
||||
if (y<y_min) {
|
||||
i=y_min-y;
|
||||
x1=x2=p2->x<<32; y1=p2->y; z1=z2=p2->z<<32;
|
||||
if (y1<min) {
|
||||
i=min-y1;
|
||||
if (i>-dy1)
|
||||
i=-dy1;
|
||||
dy1+=i;
|
||||
y+=i;
|
||||
y1+=i;
|
||||
x1+=dx1*i;
|
||||
x2+=dx2*i;
|
||||
z1+=dz1*i;
|
||||
z2+=dz2*i;
|
||||
}
|
||||
while (dy1++<=0) {
|
||||
if (y<y_max)
|
||||
res+=GrHLine(dc,x1.i32[1],x2.i32[1],y,z1.i32[1],z2.i32[1]);
|
||||
y++;
|
||||
if (y1<max)
|
||||
res+=GrHLine(dc,x1.i32[1],x2.i32[1],y1,z1.i32[1],z2.i32[1]);
|
||||
y1++;
|
||||
x1+=dx1;
|
||||
x2+=dx2;
|
||||
z1+=dz1;
|
||||
@@ -1679,25 +1582,25 @@ p4y
|
||||
dx2=0;
|
||||
dz2=0;
|
||||
}
|
||||
x1=x2=p4->x<<32; y=p4->y; z1=z2=p4->z<<32;
|
||||
if (y-dy1<y_min) {
|
||||
i=y_min-(y-dy1);
|
||||
x1=x2=p4->x<<32; y1=p4->y; z1=z2=p4->z<<32;
|
||||
if (y1-dy1<min) {
|
||||
i=min-(y1-dy1);
|
||||
if (i>dy1) goto ft_done;
|
||||
dy1-=i;
|
||||
}
|
||||
if (y>=y_max) {
|
||||
i=y-y_max+1;
|
||||
if (y1>=max) {
|
||||
i=y1-max+1;
|
||||
if (i>dy1) goto ft_done;
|
||||
dy1-=i;
|
||||
y-=i;
|
||||
y1-=i;
|
||||
x1+=dx1*i;
|
||||
x2+=dx2*i;
|
||||
z1+=dz1*i;
|
||||
z2+=dz2*i;
|
||||
}
|
||||
while (dy1-->=0) {
|
||||
res+=GrHLine(dc,x1.i32[1],x2.i32[1],y,z1.i32[1],z2.i32[1]);
|
||||
y--;
|
||||
res+=GrHLine(dc,x1.i32[1],x2.i32[1],y1,z1.i32[1],z2.i32[1]);
|
||||
y1--;
|
||||
x1+=dx1;
|
||||
x2+=dx2;
|
||||
z1+=dz1;
|
||||
@@ -1705,6 +1608,215 @@ p4y
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//p1 is min y
|
||||
if (p4->y<p2->y)
|
||||
SwapI64(&p4,&p2);
|
||||
if (p2->y<p1->y)
|
||||
SwapI64(&p2,&p1);
|
||||
|
||||
//p2x<=p4x
|
||||
if (p4->x<p2->x)
|
||||
SwapI64(&p4,&p2);
|
||||
|
||||
min=0;
|
||||
max=dc->width;
|
||||
if (dc->flags & DCF_SCREEN_BITMAP) {
|
||||
win_task=dc->win_task;
|
||||
min-=win_task->scroll_x+win_task->pix_left;
|
||||
max-=win_task->scroll_x+win_task->pix_left;
|
||||
if (max>win_task->pix_right-(win_task->scroll_x+win_task->pix_left))
|
||||
max=win_task->pix_right-(win_task->scroll_x+win_task->pix_left);
|
||||
}
|
||||
|
||||
if ((dx2=p4->x-p1->x)<0) {
|
||||
dx1=p2->x-p1->x;
|
||||
dy1=(p1->y-p2->y)<<32/dx1;
|
||||
dz1=(p1->z-p2->z)<<32/dx1;
|
||||
|
||||
dy2=(p1->y-p4->y)<<32/dx2;
|
||||
dz2=(p1->z-p4->z)<<32/dx2;
|
||||
y1=y2=p1->y<<32; x1=p1->x; z1=z2=p1->z<<32;
|
||||
if (x1+dx2<min) {
|
||||
i=min-(x1+dx2);
|
||||
if (i>-dx2) goto ft_done;
|
||||
dx2+=i;
|
||||
}
|
||||
if (x1>=max) {
|
||||
i=x1-max+1;
|
||||
if (i>-dx2)
|
||||
i=-dx2;
|
||||
dx2+=i;
|
||||
x1-=i;
|
||||
y1+=dy1*i;
|
||||
y2+=dy2*i;
|
||||
z1+=dz1*i;
|
||||
z2+=dz2*i;
|
||||
}
|
||||
while (dx2++) {
|
||||
res+=GrVLine(dc,x1,y1.i32[1],y2.i32[1],z1.i32[1],z2.i32[1]);
|
||||
x1--;
|
||||
y1+=dy1;
|
||||
y2+=dy2;
|
||||
z1+=dz1;
|
||||
z2+=dz2;
|
||||
}
|
||||
if (dx2=p2->x-p4->x) {
|
||||
dy2=(p4->y-p2->y)<<32/dx2;
|
||||
dz2=(p4->z-p2->z)<<32/dx2;
|
||||
if (x1+dx2<min) {
|
||||
i=min-(x1+dx2);
|
||||
if (i>-dx2) goto ft_done;
|
||||
dx2+=i;
|
||||
}
|
||||
if (x1>=max) {
|
||||
i=x1-max+1;
|
||||
if (i>-dx2) goto ft_done;
|
||||
dx2+=i;
|
||||
x1-=i;
|
||||
y1+=dy1*i;
|
||||
y2+=dy2*i;
|
||||
z1+=dz1*i;
|
||||
z2+=dz2*i;
|
||||
}
|
||||
}
|
||||
while (dx2++<=0) {
|
||||
res+=GrVLine(dc,x1,y1.i32[1],y2.i32[1],z1.i32[1],z2.i32[1]);
|
||||
x1--;
|
||||
y1+=dy1;
|
||||
y2+=dy2;
|
||||
z1+=dz1;
|
||||
z2+=dz2;
|
||||
}
|
||||
} else if ((dx2=p2->x-p1->x)>0) {
|
||||
dx1=p4->x-p1->x;
|
||||
dy1=(p4->y-p1->y)<<32/dx1;
|
||||
dz1=(p4->z-p1->z)<<32/dx1;
|
||||
|
||||
dy2=(p2->y-p1->y)<<32/dx2;
|
||||
dz2=(p2->z-p1->z)<<32/dx2;
|
||||
y1=y2=p1->y<<32; x1=p1->x; z1=z2=p1->z<<32;
|
||||
if (x1+dx2>=max) {
|
||||
i=x1+dx2-max+1;
|
||||
if (i>dx2) goto ft_done;
|
||||
dx2-=i;
|
||||
}
|
||||
if (x1<min) {
|
||||
i=min-x1;
|
||||
if (i>dx2)
|
||||
i=dx2;
|
||||
dx2-=i;
|
||||
x1+=i;
|
||||
y1+=dy1*i;
|
||||
y2+=dy2*i;
|
||||
z1+=dz1*i;
|
||||
z2+=dz2*i;
|
||||
}
|
||||
while (dx2--) {
|
||||
res+=GrVLine(dc,x1,y1.i32[1],y2.i32[1],z1.i32[1],z2.i32[1]);
|
||||
x1++;
|
||||
y1+=dy1;
|
||||
y2+=dy2;
|
||||
z1+=dz1;
|
||||
z2+=dz2;
|
||||
}
|
||||
if (dx2=p4->x-p2->x) {
|
||||
dy2=(p4->y-p2->y)<<32/dx2;
|
||||
dz2=(p4->z-p2->z)<<32/dx2;
|
||||
if (x1+dx2>=max) {
|
||||
i=x1+dx2-max+1;
|
||||
if (i>dx2) goto ft_done;
|
||||
dx2-=i;
|
||||
}
|
||||
if (x1<min) {
|
||||
i=min-x1;
|
||||
if (i>dx2) goto ft_done;
|
||||
dx2-=i;
|
||||
x1+=i;
|
||||
y1+=dy1*i;
|
||||
y2+=dy2*i;
|
||||
z1+=dz1*i;
|
||||
z2+=dz2*i;
|
||||
}
|
||||
}
|
||||
while (dx2-->=0) {
|
||||
res+=GrVLine(dc,x1,y1.i32[1],y2.i32[1],z1.i32[1],z2.i32[1]);
|
||||
x1++;
|
||||
y1+=dy1;
|
||||
y2+=dy2;
|
||||
z1+=dz1;
|
||||
z2+=dz2;
|
||||
}
|
||||
} else {
|
||||
if (dx1=p2->x-p1->x) {
|
||||
dy1=(p2->y-p1->y)<<32/dx1;
|
||||
dz1=(p2->z-p1->z)<<32/dx1;
|
||||
if (dx2=p2->x-p4->x) {
|
||||
dy2=(p2->y-p4->y)<<32/dx2;
|
||||
dz2=(p2->z-p4->z)<<32/dx2;
|
||||
} else {
|
||||
dy2=0;
|
||||
dz2=0;
|
||||
}
|
||||
y1=y2=p2->y<<32; x1=p2->x; z1=z2=p2->z<<32;
|
||||
if (x1<min) {
|
||||
i=min-x1;
|
||||
if (i>-dx1)
|
||||
i=-dx1;
|
||||
dx1+=i;
|
||||
x1+=i;
|
||||
y1+=dy1*i;
|
||||
y2+=dy2*i;
|
||||
z1+=dz1*i;
|
||||
z2+=dz2*i;
|
||||
}
|
||||
while (dx1++<=0) {
|
||||
if (x1<max)
|
||||
res+=GrVLine(dc,x1,y1.i32[1],y2.i32[1],z1.i32[1],z2.i32[1]);
|
||||
x1++;
|
||||
y1+=dy1;
|
||||
y2+=dy2;
|
||||
z1+=dz1;
|
||||
z2+=dz2;
|
||||
}
|
||||
}
|
||||
if (dx1=p4->x-p1->x) {
|
||||
dy1=(p1->y-p4->y)<<32/dx1;
|
||||
dz1=(p1->z-p4->z)<<32/dx1;
|
||||
if (dx2=p4->x-p2->x) {
|
||||
dy2=(p2->y-p4->y)<<32/dx2;
|
||||
dz2=(p2->z-p4->z)<<32/dx2;
|
||||
} else {
|
||||
dy2=0;
|
||||
dz2=0;
|
||||
}
|
||||
y1=y2=p4->y<<32; x1=p4->x; z1=z2=p4->z<<32;
|
||||
if (x1-dx1<min) {
|
||||
i=min-(x1-dx1);
|
||||
if (i>dx1) goto ft_done;
|
||||
dx1-=i;
|
||||
}
|
||||
if (x1>=max) {
|
||||
i=x1-max+1;
|
||||
if (i>dx1) goto ft_done;
|
||||
dx1-=i;
|
||||
x1-=i;
|
||||
y1+=dy1*i;
|
||||
y2+=dy2*i;
|
||||
z1+=dz1*i;
|
||||
z2+=dz2*i;
|
||||
}
|
||||
while (dx1-->=0) {
|
||||
res+=GrVLine(dc,x1,y1.i32[1],y2.i32[1],z1.i32[1],z2.i32[1]);
|
||||
x1--;
|
||||
y1+=dy1;
|
||||
y2+=dy2;
|
||||
z1+=dz1;
|
||||
z2+=dz2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ft_done:
|
||||
return res;
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
#define DVD_BOOT_LOADER_SIZE DVD_BLK_SIZE*1 //Max DVD_BLK_SIZE*4, I think
|
||||
#define BOOT_HIGH_LOC_DVD ((BOOT_RAM_LIMIT-\
|
||||
(BOOT_STK_SIZE+DVD_BOOT_LOADER_SIZE))>>4)
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
//See $LK,"Install Documentation",A="FI:::/Doc/Install.TXT"$ or $LK,"Upgrading Documentation",A="FI:::/Doc/Upgrade.TXT"$.
|
||||
//Study my account examples: $LK,"Cfg Strs",A="FL:::/Demo/AcctExample/TOSCfg.CPP,1"$, $LK,"Update Funs",A="FL:::/Demo/AcctExample/TOSDistro.CPP,1"$
|
||||
|
||||
#include "BootDVD"
|
||||
#include "DskISORedSea"
|
||||
#include "DskISO9660"
|
||||
|
||||
#help_index "Install"
|
||||
|
||||
#define KERNEL_BIN_C "Kernel.BIN.C"
|
||||
#define BOOT_DIR "/0000Boot"
|
||||
#define BOOT_DIR_KERNEL_BIN_C BOOT_DIR "/0000" KERNEL_BIN_C
|
||||
|
||||
U0 MakeAll()
|
||||
{
|
||||
if (Cmp("/Compiler/Compiler","Compiler",,':'))
|
||||
throw;
|
||||
if (Cmp("/Kernel/Kernel","Kernel",,':'))
|
||||
throw;
|
||||
}
|
||||
|
||||
public U0 BootDVDIns(U8 drv_let=0)
|
||||
{//See $LK,"::/Misc/DoDistro.CPP"$.
|
||||
try {
|
||||
if (!Drv(drv_let))
|
||||
throw;
|
||||
MakeAll;
|
||||
Move("/Kernel/Kernel.BIN.Z",BOOT_DIR_KERNEL_BIN_C);
|
||||
} catch {
|
||||
PutExcept;
|
||||
Beep;
|
||||
}
|
||||
}
|
||||
@@ -48,12 +48,12 @@ BHD_GET_IP:
|
||||
|
||||
BHD_BIOS_DRV_NUM: DU8 0;
|
||||
|
||||
//Gets patched by $LK,"MakeOSDrvBootInstall",A="MN:MakeOSDrvBootInstall"$().
|
||||
//Gets patched by $LK,"BootHDIns",A="MN:BootHDIns"$().
|
||||
BHD_BLK_CNT:: DU16 0;
|
||||
|
||||
BHD_DAP: DU8 16,0,1,0; //One blk at a time
|
||||
BHD_DAP_BUF: DU16 0,0;
|
||||
//Gets patched by $LK,"MakeOSDrvBootInstall",A="MN:MakeOSDrvBootInstall"$().
|
||||
//Gets patched by $LK,"BootHDIns",A="MN:BootHDIns"$().
|
||||
BHD_DAP_BLK:: //64-bit
|
||||
BHD_DAP_BLK_LO: DU32 0;
|
||||
BHD_DAP_BLK_HI: DU32 0;
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
//See $LK,"Install Documentation",A="FI:::/Doc/Install.TXT"$ or $LK,"Upgrading Documentation",A="FI:::/Doc/Upgrade.TXT"$.
|
||||
//Study my account examples: $LK,"Cfg Strs",A="FL:::/Demo/AcctExample/TOSCfg.CPP,1"$, $LK,"Update Funs",A="FL:::/Demo/AcctExample/TOSDistro.CPP,1"$
|
||||
|
||||
#include "BootHD"
|
||||
|
||||
#help_index "Install"
|
||||
|
||||
#define KERNEL_BIN_C "Kernel.BIN.C"
|
||||
|
||||
U0 MakeAll()
|
||||
{
|
||||
if (Cmp("/Compiler/Compiler","Compiler",,':'))
|
||||
throw;
|
||||
if (Cmp("/Kernel/Kernel","Kernel",,':'))
|
||||
throw;
|
||||
}
|
||||
|
||||
public U0 BootHDIns(U8 drv_let=0)
|
||||
{//$LK,"MakeAll",A="MN:MakeAll"$ and install new boot-loader.
|
||||
CDrv *dv;
|
||||
CFAT32Boot br;
|
||||
CDirEntry de;
|
||||
I64 i;
|
||||
try {
|
||||
if (!Drv(drv_let))
|
||||
throw;
|
||||
dv=Fs->cur_dv;
|
||||
MakeAll;
|
||||
switch (Let2BlkDevType(dv->drv_let)) {
|
||||
case BDT_RAM:
|
||||
case BDT_ATA:
|
||||
Move("/Kernel/Kernel.BIN.Z","/" KERNEL_BIN_C);
|
||||
if (!FileFind("/" KERNEL_BIN_C,&de,FUF_JUST_FILES))
|
||||
"No Kernel.BIN.C\n";
|
||||
else {
|
||||
Free(de.full_name);
|
||||
"Modifying partition boot record.\n";
|
||||
RBlks(dv,&br,dv->drv_offset,1);
|
||||
br.jump_and_nop[0]=OC_JMP_REL8;
|
||||
br.jump_and_nop[1]=offset(CFAT32Boot.code)-2;
|
||||
#assert offset(CFAT32Boot.code)>=offset(CRedSeaBoot.code)
|
||||
br.jump_and_nop[2]=OC_NOP;
|
||||
*BHD_BLK_CNT(U16 *)=(de.size+BLK_SIZE-1)>>BLK_SIZE_BITS;
|
||||
*BHD_DAP_BLK(I64 *)=Cluster2Blk(dv,de.cluster);
|
||||
for (i=0;i<BHD_END-BHD_CODE;i++)
|
||||
br.code[i]=BHD_CODE(U8 *)[i];
|
||||
#assert sizeof(CFAT32Boot.code)>=BHD_END-BHD_CODE
|
||||
for (;i<sizeof(CFAT32Boot.code);i++)
|
||||
br.code[i]=0;
|
||||
WBlks(dv,&br,dv->drv_offset,1);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw;
|
||||
}
|
||||
} catch {
|
||||
PutExcept;
|
||||
Beep;
|
||||
}
|
||||
}
|
||||
@@ -61,12 +61,12 @@ BMHD_GET_IP:
|
||||
|
||||
BMHD_BIOS_DRV_NUM: DU8 0;
|
||||
BMHD_OLD_CS_IP: DU16 0,0;
|
||||
//Gets patched by $LK,"MakeOSDrvBootInstall",A="MN:MakeOSDrvBootInstall"$().
|
||||
//Gets patched by $LK,"BootHDIns",A="MN:BootHDIns"$().
|
||||
BMHD_BLK_CNT:: DU16 0;
|
||||
|
||||
BMHD_DAP: DU8 16,0,1,0; //One blk at a time
|
||||
BMHD_DAP_BUF: DU16 0,0;
|
||||
//Gets patched by $LK,"MakeOSDrvBootInstall",A="MN:MakeOSDrvBootInstall"$().
|
||||
//Gets patched by $LK,"BootHDIns",A="MN:BootHDIns"$().
|
||||
BMHD_DAP_BLK:: //64-bit
|
||||
BMHD_DAP_BLK_LO: DU32 0;
|
||||
BMHD_DAP_BLK_HI: DU32 0;
|
||||
|
||||
@@ -1,98 +1,18 @@
|
||||
//See $LK,"Install Documentation",A="FI:::/Doc/Install.TXT"$ or $LK,"Upgrading Documentation",A="FI:::/Doc/Upgrade.TXT"$.
|
||||
//Study my account examples: $LK,"Cfg Strs",A="FL:::/Demo/AcctExample/TOSCfg.CPP,1"$, $LK,"Update Funs",A="FL:::/Demo/AcctExample/TOSDistro.CPP,1"$
|
||||
|
||||
#include "BootMHD"
|
||||
#include "BootMHD2"
|
||||
|
||||
#help_index "Install"
|
||||
|
||||
#define KERNEL_BIN_C "Kernel.BIN.C"
|
||||
#define BOOT_DIR "/0000Boot"
|
||||
#define BOOT_DIR_KERNEL_BIN_C BOOT_DIR "/0000" KERNEL_BIN_C
|
||||
//Stage 2 of master boot loader
|
||||
#define BOOT_DIR_BOOTMHD2_BIN_C BOOT_DIR "/BootMHD2.BIN.C"
|
||||
//Old master boot record
|
||||
#define BOOT_DIR_OLDMBR_BIN_C BOOT_DIR "/OldMBR.BIN.C"
|
||||
|
||||
public U0 MakeAll()
|
||||
{//Use $LK,"MakeOSDrvBootInstall",A="MN:MakeOSDrvBootInstall"$. Loader must be patched.
|
||||
//These 2 modules (and bootloaders at top) are the only AOT
|
||||
//compiled code in TempleOS. Everything else is JIT.
|
||||
//You are doing it wrong if you make AOT compiled code.
|
||||
if (Cmp("/Compiler/Compiler","Compiler",,':'))
|
||||
throw;
|
||||
if (Cmp("/Kernel/Kernel","Kernel",,':'))
|
||||
throw;
|
||||
}
|
||||
|
||||
public Bool MakeOSDrvBootInstall(U8 src_drv=0,U8 dst_drv=0)
|
||||
{// Does $LK,"MakeAll",A="MN:MakeAll"$and installs new boot-loader.
|
||||
|
||||
//Normally, you just supply a src_drv. It will compile
|
||||
//the code on that drive and update the boot sect.
|
||||
|
||||
//If you are making a bootable CD/DVD, you supply a dst_drv.
|
||||
//See $LK,"::/Misc/DoDistro.CPP"$
|
||||
|
||||
//See $LK,"Install Documentation",A="FI:::/Doc/Install.TXT"$
|
||||
|
||||
//Study my account examples my technique: $LK,"Cfg Strs",A="FL:::/Demo/AcctExample/TOSCfg.CPP,1"$, $LK,"Update Funs",A="FL:::/Demo/AcctExample/TOSDistro.CPP,1"$
|
||||
|
||||
CBlkDev *bd;
|
||||
CDrv *dv;
|
||||
CFAT32Boot br;
|
||||
CDirEntry de;
|
||||
Bool res=FALSE;
|
||||
I64 i,type;
|
||||
try {
|
||||
if (!src_drv) src_drv=Drv2Let(Fs->cur_dv);
|
||||
src_drv=ToUpper(src_drv);
|
||||
if (!dst_drv) dst_drv=src_drv;
|
||||
dst_drv=ToUpper(dst_drv);
|
||||
if (!Drv(src_drv))
|
||||
throw;
|
||||
MakeAll;
|
||||
if ((dv=Let2Drv(dst_drv,FALSE)) && (bd=dv->bd))
|
||||
type=bd->type;
|
||||
else {
|
||||
type=BDT_ATAPI;
|
||||
PrintWarn("Defaulting to CD/DVD dst.\n");
|
||||
}
|
||||
switch (type) {
|
||||
case BDT_ATAPI:
|
||||
case BDT_FILE:
|
||||
Move("/Kernel/Kernel.BIN.Z",BOOT_DIR_KERNEL_BIN_C);
|
||||
res=TRUE;
|
||||
break;
|
||||
case BDT_RAM:
|
||||
case BDT_ATA:
|
||||
Move("/Kernel/Kernel.BIN.Z","/" KERNEL_BIN_C);
|
||||
if (!FileFind("/" KERNEL_BIN_C,&de,FUF_JUST_FILES))
|
||||
"No Kernel.BIN.C\n";
|
||||
else {
|
||||
Free(de.full_name);
|
||||
"Modifying partition boot record.\n";
|
||||
RBlks(dv,&br,dv->drv_offset,1);
|
||||
br.jump_and_nop[0]=OC_JMP_REL8;
|
||||
br.jump_and_nop[1]=offset(CFAT32Boot.code)-2;
|
||||
#assert offset(CFAT32Boot.code)>=offset(CRedSeaBoot.code)
|
||||
br.jump_and_nop[2]=OC_NOP;
|
||||
*BHD_BLK_CNT(U16 *)=(de.size+BLK_SIZE-1)>>BLK_SIZE_BITS;
|
||||
*BHD_DAP_BLK(I64 *)=Cluster2Blk(dv,de.cluster);
|
||||
for (i=0;i<BHD_END-BHD_CODE;i++)
|
||||
br.code[i]=BHD_CODE(U8 *)[i];
|
||||
#assert sizeof(CFAT32Boot.code)>=BHD_END-BHD_CODE
|
||||
for (;i<sizeof(CFAT32Boot.code);i++)
|
||||
br.code[i]=0;
|
||||
WBlks(dv,&br,dv->drv_offset,1);
|
||||
res=TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} catch {
|
||||
PutExcept;
|
||||
Beep;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public U0 MasterBootOldRead(U8 src_drv,U8 dst_drv)
|
||||
public U0 BootMHDOldRead(U8 src_drv,U8 dst_drv)
|
||||
{//Reads MBR from disk drive containing src partition.
|
||||
//Writes a single blk file to dst BOOT_DIR.
|
||||
CBlkDev *bd=Let2BlkDev(src_drv);
|
||||
@@ -114,7 +34,7 @@ public U0 MasterBootOldRead(U8 src_drv,U8 dst_drv)
|
||||
}
|
||||
}
|
||||
|
||||
public U0 MasterBootOldWrite(U8 src_drv,U8 dst_drv)
|
||||
public U0 BootMHDOldWrite(U8 src_drv,U8 dst_drv)
|
||||
{//Reads OldMBR from src drive BOOT_DIR.
|
||||
//writes it to the MBR of the drive with dst partition.
|
||||
CBlkDev *bd=Let2BlkDev(dst_drv);
|
||||
@@ -129,7 +49,7 @@ public U0 MasterBootOldWrite(U8 src_drv,U8 dst_drv)
|
||||
Free(mbr);
|
||||
}
|
||||
|
||||
public U0 MasterBootZero(U8 dst_drv)
|
||||
public U0 BootMHDZero(U8 dst_drv)
|
||||
{//Set MBR of disk with dst partition to zero.
|
||||
|
||||
//This is dangerous!!
|
||||
@@ -146,7 +66,7 @@ public U0 MasterBootZero(U8 dst_drv)
|
||||
BlkDevUnlock(bd);
|
||||
}
|
||||
|
||||
public Bool MasterBootInstall(U8 drv_let,U8 *drv_lst=NULL)
|
||||
public Bool BootMHDIns(U8 drv_let,U8 *drv_lst=NULL)
|
||||
{//Create new MBR on the disk that has drv_let as a partition.
|
||||
//Puts stage 2 in BOOT_DIR of drv_let.
|
||||
CBlkDev *bd,*bd1;
|
||||
@@ -167,7 +87,6 @@ public Bool MasterBootInstall(U8 drv_let,U8 *drv_lst=NULL)
|
||||
buf[j++]=i;
|
||||
buf[j++]=0;
|
||||
}
|
||||
|
||||
Drv(drv_let);
|
||||
dv=Fs->cur_dv;
|
||||
if (dv->fs_type!=FSt_REDSEA && dv->fs_type!=FSt_FAT32)
|
||||
@@ -175,7 +94,7 @@ public Bool MasterBootInstall(U8 drv_let,U8 *drv_lst=NULL)
|
||||
else {
|
||||
bd=dv->bd;
|
||||
if (!FileFind(BOOT_DIR_OLDMBR_BIN_C,,FUF_JUST_FILES))
|
||||
MasterBootOldRead(drv_let,drv_let);
|
||||
BootMHDOldRead(drv_let,drv_let);
|
||||
|
||||
_q=BMHD2_BLK_ARRAY;
|
||||
MemSet(_q,0,sizeof(I64)*8);
|
||||
@@ -30,7 +30,7 @@ _extern _HI_CALL I64 HiCall(U8 *machine_code);
|
||||
_extern _HI_MEMCPY U8 *HiMemCpy(U8 *dst,U8 *src,I64 cnt);
|
||||
|
||||
#help_index "Boot"
|
||||
public U0 RAMReboot(U8 *filename)
|
||||
public U0 BootRAM(U8 *filename)
|
||||
{//Softboot Kernel Bin file. No hardware reset.
|
||||
I64 size;
|
||||
CKernel *hi_image,*lo_image=sys_boot_base-sizeof(CBinFile),
|
||||
@@ -67,7 +67,7 @@ U0 RedSeaISO9660(U8 *iso_filename,U8 drv_let,I64 stage2_blk=0,I64 stage2_size=0)
|
||||
iso_term->type=ISO1T_TERMINATOR;
|
||||
StrCpy(iso_term->id,"CD001");
|
||||
iso_term->version=1;
|
||||
if (stage2_blk) {
|
||||
|
||||
d=iso_boot(U8 *)+0x47;
|
||||
*d=20<<2>>2;
|
||||
FWBlks(out_file,iso_boot,17<<2,4);
|
||||
@@ -97,10 +97,6 @@ U0 RedSeaISO9660(U8 *iso_filename,U8 drv_let,I64 stage2_blk=0,I64 stage2_size=0)
|
||||
*(BDVD_BLK_CNT -BDVD_START+stage1_buf)(U16 *)+=1;
|
||||
FWBlks(out_file,stage1_buf,
|
||||
20<<2+1<<2,DVD_BOOT_LOADER_SIZE/BLK_SIZE);
|
||||
} else {
|
||||
FWBlks(out_file,iso_sup,17<<2,4);
|
||||
FWBlks(out_file,iso_term,18<<2,4);
|
||||
}
|
||||
FClose(out_file);
|
||||
}
|
||||
Free(zero_buf);
|
||||
@@ -135,8 +131,8 @@ public I64 RedSeaISO(U8 *_iso_filename=NULL,U8 *_src_dir,
|
||||
I64 i,res,root_cnt,root_dir_blks,bitmap_blks,bitmap_blks1;
|
||||
CDirEntry *tempde,de;
|
||||
U8 buf[STR_LEN],*iso_filename,*src_dir,*stage2_filename;
|
||||
CDrv *dv=DrvNextFree('M'); //First $LK,"BDT_FILE",A="MN:BDT_FILE"$
|
||||
CBlkDev *bd=BlkDevNextFree(dv->drv_let,BDT_FILE);
|
||||
CDrv *dv=DrvMakeFreeSlot(DrvNextFreeLet('Q')); //First $LK,"BDT_FILE_WRITE",A="MN:BDT_FILE_WRITE"$
|
||||
CBlkDev *bd=BlkDevNextFreeSlot(dv->drv_let,BDT_FILE_WRITE);
|
||||
|
||||
if (!_iso_filename)
|
||||
_iso_filename=blkdev.dft_iso_filename;
|
||||
@@ -155,10 +151,7 @@ public I64 RedSeaISO(U8 *_iso_filename=NULL,U8 *_src_dir,
|
||||
root_cnt=LinkedLstCnt(tempde)+3;
|
||||
root_dir_blks=CeilU64(root_cnt<<6,BLK_SIZE)>>BLK_SIZE_BITS;
|
||||
if (res=RedSeaISOPass1(tempde)>>BLK_SIZE_BITS) {
|
||||
bd->drv_offset=19<<2;
|
||||
if (stage2_filename) //preboot and bootloader
|
||||
bd->drv_offset+=(DVD_BLK_SIZE*2+DVD_BOOT_LOADER_SIZE)/BLK_SIZE;
|
||||
|
||||
bd->drv_offset=19<<2+(DVD_BLK_SIZE*2+DVD_BOOT_LOADER_SIZE)/BLK_SIZE;
|
||||
bitmap_blks=1;
|
||||
do {
|
||||
bitmap_blks1=bitmap_blks;
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
Cd(__DIR__);;
|
||||
#include "BootDVD"
|
||||
#include "BootHD"
|
||||
#include "BootMHD"
|
||||
#include "BootMHD2"
|
||||
#include "DskISORedSea"
|
||||
#include "DskISO9660"
|
||||
#include "BootIns"
|
||||
#include "Reboot"
|
||||
#include "BootDVDIns"
|
||||
#include "BootHDIns"
|
||||
#include "BootMHDIns"
|
||||
#include "BootRAM"
|
||||
Cd("..");;
|
||||
+21
-21
@@ -63,15 +63,15 @@ I64 TaskQueSize(CTask *task)
|
||||
|
||||
I64 BlkDevsSize()
|
||||
{
|
||||
I64 i,res=MSize2(blkdev.blkdevs);
|
||||
I64 i,j,res=MSize2(blkdev.blkdevs);
|
||||
CBlkDev *bd;
|
||||
for (i=0;i<NUM_BLKDEVS;i++) {
|
||||
bd=&blkdev.blkdevs[i];
|
||||
if (bd->bd_signature==BD_SIGNATURE_VAL) {
|
||||
j=(bd->max_blk+1)<<BLK_SIZE_BITS;
|
||||
if (bd->type==BDT_RAM)
|
||||
"RAMDsk %C\t:%010X Unused:%010X\n",
|
||||
bd->first_drv_let,(bd->max_blk+1)<<BLK_SIZE_BITS,
|
||||
UnusedDrvSpace(bd->first_drv_let);
|
||||
"RAMDsk %C\t:%010X/%010X\n",
|
||||
bd->first_drv_let,j-UnusedDrvSpace(bd->first_drv_let),j;
|
||||
res+=MSize2(bd->dev_id_record);
|
||||
}
|
||||
}
|
||||
@@ -101,18 +101,19 @@ Bool MemRepTask(CTask *task,Bool override_validate=FALSE)
|
||||
if (task==Fs)
|
||||
task->rsp=GetRSP;
|
||||
st=MStrUtil(task->task_title,SUF_REM_CTRL_CHARS|SUF_SAFE_DOLLAR);
|
||||
"$$GREEN$$Task:%010X$$CYAN$$ %-30ts$$FG$$\n$$ID,2$$",task,st;
|
||||
"$$BLACK$$%-25ts %010X$$FG$$\n$$ID,2$$",st,task;
|
||||
Free(st);
|
||||
"$$PURPLE$$Alloced:%010X Used:%010X$$FG$$\n",
|
||||
TaskMemAlloced(task,override_validate),
|
||||
TaskMemUsed(task,override_validate);
|
||||
"HashTable\t:%010X\n",HashTableSize2(task->hash_table);
|
||||
"Heap\t:%010X/%010X\n",TaskMemUsed(task,override_validate),
|
||||
TaskMemAlloced(task,override_validate);
|
||||
|
||||
i=UnusedStk(task);
|
||||
j=TaskStkSize(task);
|
||||
if (0<=i<=task->stk->stk_size)
|
||||
"Stk Size\t:%010X Unused:%010X\n",TaskStkSize(task),i;
|
||||
"Stk\t\t:%010X/%010X\n",j-i,j;
|
||||
else
|
||||
"Stk Size\t:%010X $$RED$$$$BK,1$$Overflow$$BK,0$$$$FG$$\n",TaskStkSize(task);
|
||||
"Stk\t\t:$$RED$$$$BK,1$$Overflow$$BK,0$$$$FG$$/%010X\n",j;
|
||||
|
||||
"HashTable\t:%010X\n",HashTableSize2(task->hash_table);
|
||||
|
||||
if (pdoc=DocPut(task))
|
||||
"PutDoc\t:%010X\n",DocSize(pdoc);
|
||||
@@ -121,8 +122,8 @@ Bool MemRepTask(CTask *task,Bool override_validate=FALSE)
|
||||
if (bdoc=DocBorder(task))
|
||||
"BorderDoc\t:%010X\n",DocSize(bdoc);
|
||||
|
||||
cc=task->next_lex;
|
||||
while (cc!=&task->next_lex) {
|
||||
cc=task->next_cc;
|
||||
while (cc!=&task->next_cc) {
|
||||
"Lex\t\t:%010X\n",CmpCtrlSize(cc);
|
||||
cc=cc->next;
|
||||
}
|
||||
@@ -207,17 +208,17 @@ public U0 MemRep()
|
||||
"$$ID,-2$$";
|
||||
|
||||
if (sys_data_bp) {
|
||||
"$$BLACK$$Code Heap:%010X Used:%010X$$FG$$\n",
|
||||
sys_code_bp->alloced_u8s,sys_code_bp->used_u8s;
|
||||
"$$BLACK$$Data Heap:%010X Used:%010X$$FG$$\n",
|
||||
sys_data_bp->alloced_u8s,sys_data_bp->used_u8s;
|
||||
"$$BLACK$$Code Heap\t:%010X/%010X$$FG$$\n",
|
||||
sys_code_bp->used_u8s,sys_code_bp->alloced_u8s;
|
||||
"$$BLACK$$Data Heap\t:%010X/%010X$$FG$$\n",
|
||||
sys_data_bp->used_u8s,sys_data_bp->alloced_u8s;
|
||||
} else
|
||||
"$$BLACK$$Code/Data Heap:%010X Used:%010X$$FG$$\n",
|
||||
sys_code_bp->alloced_u8s,sys_code_bp->used_u8s;
|
||||
"$$BLACK$$Code/Data Heap\t:%010X/%010X$$FG$$\n",
|
||||
sys_code_bp->used_u8s,sys_code_bp->alloced_u8s;
|
||||
|
||||
for (i=0;i<mp_cnt;i++) {
|
||||
c=&cpu_structs[i];
|
||||
"$$GREEN$$CPU%d$$FG$$\n$$ID,2$$",i;
|
||||
"$$PURPLE$$CPU%d$$FG$$\n$$ID,2$$",i;
|
||||
task=c->seth_task;
|
||||
do {
|
||||
if (!MemRepTask(task))
|
||||
@@ -227,5 +228,4 @@ public U0 MemRep()
|
||||
MemRepTask(c->idle_task,TRUE);
|
||||
"$$ID,-2$$";
|
||||
}
|
||||
"$$ID,-2$$\n";
|
||||
}
|
||||
+4
-4
@@ -4,9 +4,9 @@ U0 TaskRepTask(CTask *task,I64 indent)
|
||||
CTask *task1;
|
||||
U8 *st,*desc=MStrUtil(task->task_title,SUF_SAFE_DOLLAR);
|
||||
st=MStrPrint("$$MA,T=\"%08X\",LM=\"Kill(0x%X);\n\",$$",task,task,task);
|
||||
"%h*c%s $$TX,\"%Q...\",SCX=16$$ Mem:%08X\n",indent,CH_SPACE,
|
||||
st,desc,TaskMemAlloced(task);
|
||||
"%h*cFlags:%04X:%04X:%08X\n",indent+2,CH_SPACE,
|
||||
"%h*c%s $$TX,\"%Q...\",SCX=16$$\n",indent,CH_SPACE,
|
||||
st,desc;
|
||||
"%h*c%08X %04X:%04X:%08X\n",indent+2,CH_SPACE,TaskMemAlloced(task),
|
||||
task->task_flags,task->display_flags,task->win_inhibit;
|
||||
Free(st);
|
||||
Free(desc);
|
||||
@@ -26,7 +26,7 @@ public U0 TaskRep()
|
||||
CLI
|
||||
for (i=0;i<mp_cnt;i++) {
|
||||
c=&cpu_structs[i];
|
||||
"$$RED$$CPU:%d$$FG$$\n",i;
|
||||
"$$PURPLE$$CPU:%d$$FG$$\n",i;
|
||||
TaskRepTask(c->seth_task,2);
|
||||
}
|
||||
POPFD
|
||||
|
||||
Binary file not shown.
@@ -98,7 +98,7 @@ U0 AOTGlblsResolve(CCmpCtrl *cc,CAOT *tempaot)
|
||||
!(tempex->type & HTF_IMPORT) &&
|
||||
(tempf=HashFind(tempex->str,cc->htc.hash_table_lst,HTT_FUN)) &&
|
||||
!Bt(&tempf->flags,Cf_EXTERN)) {
|
||||
tempex->val=tempf->executable_addr;
|
||||
tempex->val=tempf->exe_addr;
|
||||
tempex->type&=~HTF_UNRESOLVED;
|
||||
label=tempauh->hash->str;
|
||||
} else {
|
||||
@@ -157,7 +157,7 @@ U0 AOTGlblsResolve(CCmpCtrl *cc,CAOT *tempaot)
|
||||
tempeu=tempf->ext_lst;
|
||||
while (tempeu) {
|
||||
tempeu8=tempeu->next;
|
||||
j=tempf->executable_addr-(tempeu->ip+4);
|
||||
j=tempf->exe_addr-(tempeu->ip+4);
|
||||
AOTStoreCodeU8At(cc,tempeu->ip,j.u8[0],j.u8[1],j.u8[2],j.u8[3]);
|
||||
Free(tempeu);
|
||||
tempeu=tempeu8;
|
||||
@@ -167,7 +167,7 @@ U0 AOTGlblsResolve(CCmpCtrl *cc,CAOT *tempaot)
|
||||
tempie=CAlloc(sizeof(CAOTImportExport));
|
||||
tempie->type=IET_REL32_EXPORT;
|
||||
if (tempex->type & HTT_FUN)
|
||||
tempie->ip=tempf->executable_addr;
|
||||
tempie->ip=tempf->exe_addr;
|
||||
else if (tempex->type & HTT_GLBL_VAR)
|
||||
tempie->ip=tempex(CHashGlblVar *)->data_addr_ip;
|
||||
else
|
||||
|
||||
+22
-10
@@ -161,7 +161,7 @@ CAOT *CmpBuf(U8 *buf,U8 *map_name=NULL,
|
||||
CAOT *res=NULL;
|
||||
cc=CmpCtrlNew(buf,CCF_DONT_FREE_BUF);
|
||||
cc->flags|=CCF_AOT_COMPILE;
|
||||
QueIns(cc,Fs->last_lex);
|
||||
QueIns(cc,Fs->last_cc);
|
||||
res=CmpJoin(cc,CMPF_LEX_FIRST,map_name,mapfile_drv_let);
|
||||
if (error_cnt) *error_cnt=cc->error_cnt;
|
||||
if (warning_cnt) *warning_cnt=cc->warning_cnt;
|
||||
@@ -239,7 +239,7 @@ U0 CmpFixUpJITAsm(CCmpCtrl *cc,CAOT *tempaot)
|
||||
"Unresolved Reference:%s\n",str;
|
||||
else {
|
||||
if (tempex->type & HTT_FUN)
|
||||
i=tempex(CHashFun *)->executable_addr;
|
||||
i=tempex(CHashFun *)->exe_addr;
|
||||
else if (tempex->type & HTT_GLBL_VAR)
|
||||
i=tempex(CHashGlblVar *)->data_addr;
|
||||
else
|
||||
@@ -577,15 +577,15 @@ I64 ExePutS(U8 *buf,U8 *filename=NULL,
|
||||
if (!filename)
|
||||
filename=blkdev.temp_filename;
|
||||
cc=CmpCtrlNew(buf,ccf_flags|CCF_DONT_FREE_BUF,filename);
|
||||
if (Fs->last_lex!=&Fs->next_lex) {
|
||||
cc->opts=Fs->last_lex->opts;
|
||||
if (Fs->last_cc!=&Fs->next_cc) {
|
||||
cc->opts=Fs->last_cc->opts;
|
||||
if (htc) {
|
||||
cc->flags=cc->flags &~CCF_ASM_EXPRESSIONS |
|
||||
htc->old_flags&CCF_ASM_EXPRESSIONS;
|
||||
MemCpy(&cc->htc,htc,sizeof(CLexHashTableContext));
|
||||
}
|
||||
}
|
||||
QueIns(cc,Fs->last_lex);
|
||||
QueIns(cc,Fs->last_cc);
|
||||
try {
|
||||
Lex(cc);
|
||||
res=ExeCmdLine(cc);
|
||||
@@ -622,6 +622,12 @@ I64 ExeFile(U8 *name,I64 ccf_flags=0)
|
||||
return res;
|
||||
}
|
||||
|
||||
I64 RunFile(U8 *name,I64 ccf_flags=0,...)
|
||||
{//$LK,"ExeFile",A="MN:ExeFile"$() with args using $LK,"LastFun",A="MN:LastFun"$().
|
||||
ExeFile(name,ccf_flags);
|
||||
return LastFun(argc,argv);
|
||||
}
|
||||
|
||||
I64 ExePutS2(U8 *buf,U8 *filename=NULL,I64 ccf_flags=0)
|
||||
{//throws exceptions
|
||||
I64 res;
|
||||
@@ -629,9 +635,9 @@ I64 ExePutS2(U8 *buf,U8 *filename=NULL,I64 ccf_flags=0)
|
||||
if (!filename)
|
||||
filename=blkdev.temp_filename;
|
||||
cc=CmpCtrlNew(buf,ccf_flags|CCF_DONT_FREE_BUF,filename);
|
||||
if (Fs->last_lex!=&Fs->next_lex)
|
||||
cc->opts=Fs->last_lex->opts;
|
||||
QueIns(cc,Fs->last_lex);
|
||||
if (Fs->last_cc!=&Fs->next_cc)
|
||||
cc->opts=Fs->last_cc->opts;
|
||||
QueIns(cc,Fs->last_cc);
|
||||
Lex(cc);
|
||||
res=ExeCmdLine(cc);
|
||||
QueRem(cc);
|
||||
@@ -658,13 +664,19 @@ I64 ExeFile2(U8 *name,I64 ccf_flags=0)
|
||||
return res;
|
||||
}
|
||||
|
||||
I64 RunFile2(U8 *name,I64 ccf_flags=0,...)
|
||||
{//$LK,"ExeFile2",A="MN:ExeFile2"$() with args using $LK,"LastFun",A="MN:LastFun"$(). throws exceptions.
|
||||
ExeFile2(name,ccf_flags);
|
||||
return LastFun(argc,argv);
|
||||
}
|
||||
|
||||
I64 StreamExePrint(U8 *fmt,...)
|
||||
{//Causes value from stream to be used in an #exe{} block.
|
||||
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
|
||||
I64 res=0;
|
||||
CLexHashTableContext *htc;
|
||||
CCmpCtrl *cc=Fs->last_lex;
|
||||
if (cc==&Fs->next_lex)
|
||||
CCmpCtrl *cc=Fs->last_cc;
|
||||
if (cc==&Fs->next_cc)
|
||||
PrintErr("Not Compiling\n");
|
||||
else {
|
||||
if (!(cc->flags&CCF_EXE_BLK))
|
||||
|
||||
+46
-7
@@ -1,18 +1,57 @@
|
||||
Bool Option(I64 num,Bool val)
|
||||
{//Set compiler $LK,"Option",A="FI:::/Doc/Options.TXT"$ to val.
|
||||
return BEqu(&Fs->last_lex->opts,num,val);
|
||||
return BEqu(&Fs->last_cc->opts,num,val);
|
||||
}
|
||||
|
||||
Bool GetOption(I64 num)
|
||||
{//Get state of compiler $LK,"option",A="MN:OPTf_ECHO"$.
|
||||
return Bt(&Fs->last_lex->opts,num);
|
||||
return Bt(&Fs->last_cc->opts,num);
|
||||
}
|
||||
|
||||
asm {
|
||||
_LAST_FUN:: //See $LK,"_CALL_IND",A="MN:_CALL_IND"$
|
||||
PUSH RBP
|
||||
MOV RBP,RSP
|
||||
PUSH RSI
|
||||
PUSH RDI
|
||||
|
||||
XOR RAX,RAX
|
||||
MOV RAX,FS:CTask.last_fun[RAX]
|
||||
TEST RAX,RAX
|
||||
JZ @@10
|
||||
MOV RDX,U64 CHashFun.exe_addr[RAX]
|
||||
|
||||
MOV RCX,U64 SF_ARG1[RBP] //argc
|
||||
MOV RSI,U64 SF_ARG2[RBP] //argv
|
||||
SHL RCX,3
|
||||
SUB RSP,RCX
|
||||
MOV RDI,RSP
|
||||
REP_MOVSB
|
||||
TEST RDX,RDX
|
||||
JZ @@05
|
||||
|
||||
CALL RDX
|
||||
POP RDI
|
||||
POP RSI
|
||||
POP RBP
|
||||
RET1 16
|
||||
|
||||
@@05: MOV RCX,U64 SF_ARG1[RBP] //argc
|
||||
SHL RCX,3
|
||||
ADD RSP,RCX
|
||||
XOR RAX,RAX
|
||||
@@10: POP RDI
|
||||
POP RSI
|
||||
POP RBP
|
||||
RET1 16
|
||||
}
|
||||
_extern _LAST_FUN I64 LastFun(I64 argc,I64 *argv); //Execute last fun with args.
|
||||
|
||||
I64 PassTrace(I64 i=0b10001111101)
|
||||
{//Ctrls which optimizer passes are displayed.
|
||||
I64 old=Fs->last_lex->pass_trace;
|
||||
if (i) Fs->last_lex->saved_pass_trace=i;
|
||||
Fs->last_lex->pass_trace=i;
|
||||
I64 old=Fs->last_cc->pass_trace;
|
||||
if (i) Fs->last_cc->saved_pass_trace=i;
|
||||
Fs->last_cc->pass_trace=i;
|
||||
return old;
|
||||
}
|
||||
|
||||
@@ -29,7 +68,7 @@ Bool Echo(Bool val)
|
||||
U0 StreamPrint(U8 *fmt,...)
|
||||
{//Injects text into the compile stream. Used in #exe{} blocks.
|
||||
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv),*st;
|
||||
CCmpCtrl *cc=Fs->last_lex;
|
||||
CCmpCtrl *cc=Fs->last_cc;
|
||||
CStreamBlk *tempe=cc->last_stream_blk;
|
||||
if (tempe!=&cc->next_stream_blk) {
|
||||
st=MStrPrint("%s%s",tempe->body,buf);
|
||||
@@ -43,7 +82,7 @@ U0 StreamPrint(U8 *fmt,...)
|
||||
U0 StreamDir()
|
||||
{
|
||||
U8 *dirname;
|
||||
if (dirname=DirFile(Fs->last_lex->lex_include_stk->full_name)) {
|
||||
if (dirname=DirFile(Fs->last_cc->lex_include_stk->full_name)) {
|
||||
StreamPrint("\"%s\"",dirname);
|
||||
Free(dirname);
|
||||
}
|
||||
|
||||
Binary file not shown.
+214
-208
@@ -8,7 +8,7 @@ $LK,"OptFixupBinaryOp1",A="FL:::/Compiler/OptLib.CPP.Z,96",BI=7$
|
||||
$LK,"OptFixupBinaryOp2",A="FL:::/Compiler/OptLib.CPP.Z,182",BI=8$
|
||||
$LK,"COCInit",A="FL:::/Compiler/PrsLib.CPP.Z,99",BI=9$
|
||||
$LK,"IsLexExpression2Bin",A="FL:::/Compiler/PrsExp.CPP.Z,1128",BI=10$
|
||||
$LK,"CSubSwitch",A="FL:::/Compiler/PrsStmt.CPP.Z,562"$
|
||||
$LK,"CSubSwitch",A="FL:::/Compiler/PrsStmt.CPP.Z,566"$
|
||||
$LK,"LexFilePop",A="FL:::/Compiler/Lex.CPP.Z,11",BI=11$
|
||||
$LK,"ExePutS",A="FL:::/Compiler/CMain.CPP.Z,571",BI=12$
|
||||
$LK,"PrsStaticInit",A="FL:::/Compiler/PrsVar.CPP.Z,215",BI=13$
|
||||
@@ -26,10 +26,11 @@ $LK,"ICAndBranch",A="FL:::/Compiler/BackC.CPP.Z,1",BI=23$
|
||||
$LK,"U",A="FL:::/Compiler/UAsm.CPP.Z,645",BI=24$
|
||||
$LK,"ICQueRem",A="FL:::/Compiler/BackC.CPP.Z,399",BI=25$
|
||||
$LK,"CN_R",A="FL:::/Compiler/BackFA.CPP.Z,4"$
|
||||
$LK,"LastFun",A="FL:::/Compiler/CMisc.CPP.Z,48"$
|
||||
$LK,"OptLead1",A="FL:::/Compiler/OptLib.CPP.Z,73",BI=26$
|
||||
$LK,"CmpNoteFloatOp",A="FL:::/Compiler/BackFA.CPP.Z,6",BI=27$
|
||||
$LK,"AOTGlblsResolve",A="FL:::/Compiler/AsmResolve.CPP.Z,76",BI=28$
|
||||
$LK,"ExePutS2",A="FL:::/Compiler/CMain.CPP.Z,625",BI=29$
|
||||
$LK,"ExePutS2",A="FL:::/Compiler/CMain.CPP.Z,631",BI=29$
|
||||
$LK,"HashEntrySize",A="FL:::/Compiler/CHash.CPP.Z,1",BI=30$
|
||||
$LK,"COCPush",A="FL:::/Compiler/PrsLib.CPP.Z,107",BI=31$
|
||||
$LK,"SLASH_OP_DEC",A="FL:::/Compiler/BackLib.CPP.Z,245"$
|
||||
@@ -86,7 +87,7 @@ $LK,"OptPass4",A="FL:::/Compiler/OptPass4.CPP.Z,132",BI=64$
|
||||
$LK,"OptPass5",A="FL:::/Compiler/OptPass5.CPP.Z,1",BI=65$
|
||||
$LK,"OptPass6",A="FL:::/Compiler/OptPass6.CPP.Z,96",BI=66$
|
||||
$LK,"MODR_REG",A="FL:::/Compiler/BackLib.CPP.Z,126"$
|
||||
$LK,"Echo",A="FL:::/Compiler/CMisc.CPP.Z,24",BI=67$
|
||||
$LK,"Echo",A="FL:::/Compiler/CMisc.CPP.Z,63",BI=67$
|
||||
$LK,"PrsGlblVarLst",A="FL:::/Compiler/PrsStmt.CPP.Z,201",BI=68$
|
||||
$LK,"ICQueInit",A="FL:::/Compiler/BackC.CPP.Z,337",BI=69$
|
||||
$LK,"ICCmp",A="FL:::/Compiler/BackB.CPP.Z,102",BI=70$
|
||||
@@ -141,10 +142,10 @@ $LK,"UAsmHashLoad",A="FL:::/Compiler/UAsm.CPP.Z,188",BI=111$
|
||||
$LK,"UnusedExternWarning",A="FL:::/Compiler/CExcept.CPP.Z,104",BI=112$
|
||||
$LK,"SLASH_OP_FILD",A="FL:::/Compiler/BackLib.CPP.Z,263"$
|
||||
$LK,"ICXorXor",A="FL:::/Compiler/BackB.CPP.Z,75",BI=113$
|
||||
$LK,"PrsTryBlk",A="FL:::/Compiler/PrsStmt.CPP.Z,838",BI=114$
|
||||
$LK,"CInit",A="FL:::/Compiler/CMain.CPP.Z,679",BI=115$
|
||||
$LK,"PrsTryBlk",A="FL:::/Compiler/PrsStmt.CPP.Z,842",BI=114$
|
||||
$LK,"CInit",A="FL:::/Compiler/CMain.CPP.Z,691",BI=115$
|
||||
$LK,"MemberMetaFind",A="FL:::/Compiler/LexLib.CPP.Z,56",BI=116$
|
||||
$LK,"ExePrint2",A="FL:::/Compiler/CMain.CPP.Z,642",BI=117$
|
||||
$LK,"ExePrint2",A="FL:::/Compiler/CMain.CPP.Z,648",BI=117$
|
||||
$LK,"FBO1_INT",A="FL:::/Compiler/OptLib.CPP.Z,93"$
|
||||
$LK,"PE_DO_UNARY_OP",A="FL:::/Compiler/PrsExp.CPP.Z,8"$
|
||||
$LK,"PrsVarInit",A="FL:::/Compiler/PrsVar.CPP.Z,1",BI=118$
|
||||
@@ -164,29 +165,30 @@ $LK,"COCDel",A="FL:::/Compiler/PrsLib.CPP.Z,186",BI=127$
|
||||
$LK,"PE_UNARY_TERM1",A="FL:::/Compiler/PrsExp.CPP.Z,1"$
|
||||
$LK,"ICFAdd",A="FL:::/Compiler/BackFB.CPP.Z,504",BI=128$
|
||||
$LK,"PE_UNARY_TERM2",A="FL:::/Compiler/PrsExp.CPP.Z,2"$
|
||||
$LK,"CmdLinePmt",A="FL:::/Compiler/CMisc.CPP.Z,88",BI=129$
|
||||
$LK,"CmdLinePmt",A="FL:::/Compiler/CMisc.CPP.Z,127",BI=129$
|
||||
$LK,"AsmMakeArgMask",A="FL:::/Compiler/Asm.CPP.Z,177",BI=130$
|
||||
$LK,"COCHeaderPut",A="FL:::/Compiler/PrsLib.CPP.Z,229",BI=131$
|
||||
$LK,"PrsGlblInit",A="FL:::/Compiler/PrsVar.CPP.Z,206",BI=132$
|
||||
$LK,"ICAndEqu",A="FL:::/Compiler/BackC.CPP.Z,536",BI=133$
|
||||
$LK,"LexD2I32",A="FL:::/Compiler/CMisc.CPP.Z,52",BI=134$
|
||||
$LK,"LexD2I32",A="FL:::/Compiler/CMisc.CPP.Z,91",BI=134$
|
||||
$LK,"MemberLstNew",A="FL:::/Compiler/LexLib.CPP.Z,150",BI=135$
|
||||
$LK,"LexD3I32",A="FL:::/Compiler/CMisc.CPP.Z,68",BI=136$
|
||||
$LK,"LexD3I32",A="FL:::/Compiler/CMisc.CPP.Z,107",BI=136$
|
||||
$LK,"OptClassFwd",A="FL:::/Compiler/OptLib.CPP.Z,9",BI=137$
|
||||
$LK,"ICFCmp",A="FL:::/Compiler/BackFA.CPP.Z,515",BI=138$
|
||||
$LK,"PrsSwitch",A="FL:::/Compiler/PrsStmt.CPP.Z,574",BI=139$
|
||||
$LK,"PrsSwitch",A="FL:::/Compiler/PrsStmt.CPP.Z,578",BI=139$
|
||||
$LK,"ICFDiv",A="FL:::/Compiler/BackFB.CPP.Z,493",BI=140$
|
||||
$LK,"AOTStoreCodeU8At",A="FL:::/Compiler/AsmLib.CPP.Z,106",BI=141$
|
||||
$LK,"PE_PUSH_LOWER",A="FL:::/Compiler/PrsExp.CPP.Z,11"$
|
||||
$LK,"OptPass6Lag",A="FL:::/Compiler/OptPass6.CPP.Z,28",BI=142$
|
||||
$LK,"OptLag1",A="FL:::/Compiler/OptLib.CPP.Z,51",BI=143$
|
||||
$LK,"OptLag2",A="FL:::/Compiler/OptLib.CPP.Z,62",BI=144$
|
||||
$LK,"StreamPrint",A="FL:::/Compiler/CMisc.CPP.Z,29",BI=145$
|
||||
$LK,"StreamPrint",A="FL:::/Compiler/CMisc.CPP.Z,68",BI=145$
|
||||
$LK,"_LAST_FUN",A="FL:::/Compiler/CMisc.CPP.Z,12"$
|
||||
$LK,"ICFCvt",A="FL:::/Compiler/BackFA.CPP.Z,123",BI=146$
|
||||
$LK,"StreamDir",A="FL:::/Compiler/CMisc.CPP.Z,43",BI=147$
|
||||
$LK,"StreamDir",A="FL:::/Compiler/CMisc.CPP.Z,82",BI=147$
|
||||
$LK,"PrsOffsetOf",A="FL:::/Compiler/PrsExp.CPP.Z,348",BI=148$
|
||||
$LK,"GetOption",A="FL:::/Compiler/CMisc.CPP.Z,6",BI=149$
|
||||
$LK,"PrsDoWhile",A="FL:::/Compiler/PrsStmt.CPP.Z,502",BI=150$
|
||||
$LK,"PrsDoWhile",A="FL:::/Compiler/PrsStmt.CPP.Z,506",BI=150$
|
||||
$LK,"ICShift",A="FL:::/Compiler/BackA.CPP.Z,609",BI=151$
|
||||
$LK,"ICFMod",A="FL:::/Compiler/BackFA.CPP.Z,242",BI=152$
|
||||
$LK,"COCPop",A="FL:::/Compiler/PrsLib.CPP.Z,121",BI=153$
|
||||
@@ -211,230 +213,234 @@ $LK,"AsmUnresolvedAdd",A="FL:::/Compiler/AsmResolve.CPP.Z,188",BI=167$
|
||||
$LK,"AOTStoreCodeU8",A="FL:::/Compiler/AsmLib.CPP.Z,1",BI=168$
|
||||
$LK,"ICBitOps",A="FL:::/Compiler/BackB.CPP.Z,202",BI=169$
|
||||
$LK,"lex_zeros",A="FL:::/Compiler/Lex.CPP.Z,91"$
|
||||
$LK,"CSwitchCase",A="FL:::/Compiler/PrsStmt.CPP.Z,567"$
|
||||
$LK,"CSwitchCase",A="FL:::/Compiler/PrsStmt.CPP.Z,571"$
|
||||
$LK,"AsmResolve",A="FL:::/Compiler/AsmResolve.CPP.Z,1",BI=170$
|
||||
$LK,"PrsAsmInst",A="FL:::/Compiler/Asm.CPP.Z,395",BI=171$
|
||||
$LK,"COCCompile",A="FL:::/Compiler/PrsLib.CPP.Z,249",BI=172$
|
||||
$LK,"Cmp",A="FL:::/Compiler/CMain.CPP.Z,419",BI=173$
|
||||
$LK,"PrsPush2",A="FL:::/Compiler/PrsLib.CPP.Z,11",BI=174$
|
||||
$LK,"ICArgPut",A="FL:::/Compiler/CExcept.CPP.Z,141",BI=175$
|
||||
$LK,"UndefinedExtern",A="FL:::/Compiler/CExcept.CPP.Z,98",BI=176$
|
||||
$LK,"OptIC4",A="FL:::/Compiler/OptPass4.CPP.Z,1",BI=177$
|
||||
$LK,"OptIC6",A="FL:::/Compiler/OptPass6.CPP.Z,1",BI=178$
|
||||
$LK,"ICCmpAndBranch",A="FL:::/Compiler/BackB.CPP.Z,468",BI=179$
|
||||
$LK,"ICDivEqu",A="FL:::/Compiler/BackA.CPP.Z,408",BI=180$
|
||||
$LK,"PrsWhile",A="FL:::/Compiler/PrsStmt.CPP.Z,482",BI=181$
|
||||
$LK,"ICFCmpAndBranch",A="FL:::/Compiler/BackFB.CPP.Z,219",BI=182$
|
||||
$LK,"Lex",A="FL:::/Compiler/Lex.CPP.Z,443",BI=183$
|
||||
$LK,"ICTestAndBranch",A="FL:::/Compiler/BackB.CPP.Z,634",BI=184$
|
||||
$LK,"RunFile2",A="FL:::/Compiler/CMain.CPP.Z,667",BI=173$
|
||||
$LK,"Cmp",A="FL:::/Compiler/CMain.CPP.Z,419",BI=174$
|
||||
$LK,"PrsPush2",A="FL:::/Compiler/PrsLib.CPP.Z,11",BI=175$
|
||||
$LK,"ICArgPut",A="FL:::/Compiler/CExcept.CPP.Z,141",BI=176$
|
||||
$LK,"UndefinedExtern",A="FL:::/Compiler/CExcept.CPP.Z,98",BI=177$
|
||||
$LK,"OptIC4",A="FL:::/Compiler/OptPass4.CPP.Z,1",BI=178$
|
||||
$LK,"OptIC6",A="FL:::/Compiler/OptPass6.CPP.Z,1",BI=179$
|
||||
$LK,"ICCmpAndBranch",A="FL:::/Compiler/BackB.CPP.Z,468",BI=180$
|
||||
$LK,"ICDivEqu",A="FL:::/Compiler/BackA.CPP.Z,408",BI=181$
|
||||
$LK,"PrsWhile",A="FL:::/Compiler/PrsStmt.CPP.Z,486",BI=182$
|
||||
$LK,"ICFCmpAndBranch",A="FL:::/Compiler/BackFB.CPP.Z,219",BI=183$
|
||||
$LK,"Lex",A="FL:::/Compiler/Lex.CPP.Z,443",BI=184$
|
||||
$LK,"ICTestAndBranch",A="FL:::/Compiler/BackB.CPP.Z,634",BI=185$
|
||||
$LK,"uasm",A="FL:::/Compiler/Compiler.PRJ.Z,21"$
|
||||
$LK,"MODR_INDIRECT_REG",A="FL:::/Compiler/BackLib.CPP.Z,127"$
|
||||
$LK,"PE_MAYBE_MODIFIERS",A="FL:::/Compiler/PrsExp.CPP.Z,3"$
|
||||
$LK,"PE_UNARY_MODIFIERS",A="FL:::/Compiler/PrsExp.CPP.Z,4"$
|
||||
$LK,"AOTLocalsResolve",A="FL:::/Compiler/AsmResolve.CPP.Z,42",BI=185$
|
||||
$LK,"AOTLocalsResolve",A="FL:::/Compiler/AsmResolve.CPP.Z,42",BI=186$
|
||||
$LK,"PE_DO_BINARY_OP",A="FL:::/Compiler/PrsExp.CPP.Z,9"$
|
||||
$LK,"CmpFixUpAOTAsm",A="FL:::/Compiler/CMain.CPP.Z,302",BI=186$
|
||||
$LK,"OptLabelFwd",A="FL:::/Compiler/OptLib.CPP.Z,1",BI=187$
|
||||
$LK,"ICOrOr",A="FL:::/Compiler/BackB.CPP.Z,51",BI=188$
|
||||
$LK,"LexExcept",A="FL:::/Compiler/CExcept.CPP.Z,81",BI=189$
|
||||
$LK,"CmpFixUpAOTAsm",A="FL:::/Compiler/CMain.CPP.Z,302",BI=187$
|
||||
$LK,"OptLabelFwd",A="FL:::/Compiler/OptLib.CPP.Z,1",BI=188$
|
||||
$LK,"ICOrOr",A="FL:::/Compiler/BackB.CPP.Z,51",BI=189$
|
||||
$LK,"LexExcept",A="FL:::/Compiler/CExcept.CPP.Z,81",BI=190$
|
||||
$LK,"cmp_templates",A="FL:::/Compiler/CExts.CPP.Z,42"$
|
||||
$LK,"CmpF2PushPop",A="FL:::/Compiler/OptLib.CPP.Z,542",BI=190$
|
||||
$LK,"CmpJoin",A="FL:::/Compiler/CMain.CPP.Z,35",BI=191$
|
||||
$LK,"PrsPop2",A="FL:::/Compiler/PrsLib.CPP.Z,16",BI=192$
|
||||
$LK,"CmpF2PushPop",A="FL:::/Compiler/OptLib.CPP.Z,542",BI=191$
|
||||
$LK,"CmpJoin",A="FL:::/Compiler/CMain.CPP.Z,35",BI=192$
|
||||
$LK,"PrsPop2",A="FL:::/Compiler/PrsLib.CPP.Z,16",BI=193$
|
||||
$LK,"CMP_TEMPLATES",A="FL:::/Compiler/Templates.CPP.Z,4"$
|
||||
$LK,"MODR_D8_INDIRECT_REG",A="FL:::/Compiler/BackLib.CPP.Z,128"$
|
||||
$LK,"PrsAsmBlk",A="FL:::/Compiler/Asm.CPP.Z,904",BI=193$
|
||||
$LK,"PrsAsmArg",A="FL:::/Compiler/Asm.CPP.Z,35",BI=194$
|
||||
$LK,"LexFirstRem",A="FL:::/Compiler/Lex.CPP.Z,277",BI=195$
|
||||
$LK,"MemberClassBaseFind",A="FL:::/Compiler/LexLib.CPP.Z,87",BI=196$
|
||||
$LK,"MemberFind",A="FL:::/Compiler/LexLib.CPP.Z,67",BI=197$
|
||||
$LK,"PrsAsmBlk",A="FL:::/Compiler/Asm.CPP.Z,904",BI=194$
|
||||
$LK,"PrsAsmArg",A="FL:::/Compiler/Asm.CPP.Z,35",BI=195$
|
||||
$LK,"LexFirstRem",A="FL:::/Compiler/Lex.CPP.Z,277",BI=196$
|
||||
$LK,"MemberClassBaseFind",A="FL:::/Compiler/LexLib.CPP.Z,87",BI=197$
|
||||
$LK,"MemberFind",A="FL:::/Compiler/LexLib.CPP.Z,67",BI=198$
|
||||
$LK,"cmp",A="FL:::/Compiler/Compiler.PRJ.Z,16"$
|
||||
$LK,"OptLag",A="FL:::/Compiler/OptLib.CPP.Z,40",BI=198$
|
||||
$LK,"ICPostIncDec",A="FL:::/Compiler/BackB.CPP.Z,345",BI=199$
|
||||
$LK,"ICFPostIncDec",A="FL:::/Compiler/BackFB.CPP.Z,582",BI=200$
|
||||
$LK,"ICTest",A="FL:::/Compiler/BackLib.CPP.Z,394",BI=201$
|
||||
$LK,"ICModU64",A="FL:::/Compiler/BackC.CPP.Z,460",BI=202$
|
||||
$LK,"PrsAsmImm",A="FL:::/Compiler/Asm.CPP.Z,1",BI=203$
|
||||
$LK,"LexExtStr",A="FL:::/Compiler/LexLib.CPP.Z,218",BI=204$
|
||||
$LK,"ICAddSubEctEqu",A="FL:::/Compiler/BackA.CPP.Z,478",BI=205$
|
||||
$LK,"ICAddSubEctImm",A="FL:::/Compiler/BackA.CPP.Z,56",BI=206$
|
||||
$LK,"ICPush",A="FL:::/Compiler/BackLib.CPP.Z,293",BI=207$
|
||||
$LK,"ICSwap",A="FL:::/Compiler/BackC.CPP.Z,487",BI=208$
|
||||
$LK,"OptLag",A="FL:::/Compiler/OptLib.CPP.Z,40",BI=199$
|
||||
$LK,"ICPostIncDec",A="FL:::/Compiler/BackB.CPP.Z,345",BI=200$
|
||||
$LK,"ICFPostIncDec",A="FL:::/Compiler/BackFB.CPP.Z,582",BI=201$
|
||||
$LK,"ICTest",A="FL:::/Compiler/BackLib.CPP.Z,394",BI=202$
|
||||
$LK,"ICModU64",A="FL:::/Compiler/BackC.CPP.Z,460",BI=203$
|
||||
$LK,"PrsAsmImm",A="FL:::/Compiler/Asm.CPP.Z,1",BI=204$
|
||||
$LK,"LexExtStr",A="FL:::/Compiler/LexLib.CPP.Z,218",BI=205$
|
||||
$LK,"ICAddSubEctEqu",A="FL:::/Compiler/BackA.CPP.Z,478",BI=206$
|
||||
$LK,"ICAddSubEctImm",A="FL:::/Compiler/BackA.CPP.Z,56",BI=207$
|
||||
$LK,"ICPush",A="FL:::/Compiler/BackLib.CPP.Z,293",BI=208$
|
||||
$LK,"ICSwap",A="FL:::/Compiler/BackC.CPP.Z,487",BI=209$
|
||||
$LK,"CMP_TEMPLATES_DONT_PUSH",A="FL:::/Compiler/Templates.CPP.Z,267"$
|
||||
$LK,"intermediate_code_table",A="FL:::/Compiler/CInit.CPP.Z,16"$
|
||||
$LK,"ICZero",A="FL:::/Compiler/BackLib.CPP.Z,385",BI=209$
|
||||
$LK,"CmpCtrlDel",A="FL:::/Compiler/Lex.CPP.Z,58",BI=210$
|
||||
$LK,"ICClassPut",A="FL:::/Compiler/CExcept.CPP.Z,117",BI=211$
|
||||
$LK,"ICAssign",A="FL:::/Compiler/BackC.CPP.Z,159",BI=212$
|
||||
$LK,"ICFTemplateFun",A="FL:::/Compiler/BackFB.CPP.Z,606",BI=213$
|
||||
$LK,"MemberAdd",A="FL:::/Compiler/LexLib.CPP.Z,103",BI=214$
|
||||
$LK,"PrsPush",A="FL:::/Compiler/PrsLib.CPP.Z,1",BI=215$
|
||||
$LK,"ICZero",A="FL:::/Compiler/BackLib.CPP.Z,385",BI=210$
|
||||
$LK,"CmpCtrlDel",A="FL:::/Compiler/Lex.CPP.Z,58",BI=211$
|
||||
$LK,"ICClassPut",A="FL:::/Compiler/CExcept.CPP.Z,117",BI=212$
|
||||
$LK,"ICAssign",A="FL:::/Compiler/BackC.CPP.Z,159",BI=213$
|
||||
$LK,"ICFTemplateFun",A="FL:::/Compiler/BackFB.CPP.Z,606",BI=214$
|
||||
$LK,"RunFile",A="FL:::/Compiler/CMain.CPP.Z,625",BI=215$
|
||||
$LK,"MemberAdd",A="FL:::/Compiler/LexLib.CPP.Z,103",BI=216$
|
||||
$LK,"PrsPush",A="FL:::/Compiler/PrsLib.CPP.Z,1",BI=217$
|
||||
$LK,"SLASH_OP_FDIVR",A="FL:::/Compiler/BackLib.CPP.Z,259"$
|
||||
$LK,"SLASH_OP_FISTTP",A="FL:::/Compiler/BackLib.CPP.Z,262"$
|
||||
$LK,"CmpCtrlSize",A="FL:::/Compiler/Lex.CPP.Z,70",BI=216$
|
||||
$LK,"ICLocalVarInit",A="FL:::/Compiler/BackC.CPP.Z,758",BI=217$
|
||||
$LK,"PrsFor",A="FL:::/Compiler/PrsStmt.CPP.Z,525",BI=218$
|
||||
$LK,"PassTrace",A="FL:::/Compiler/CMisc.CPP.Z,11",BI=219$
|
||||
$LK,"PrsPopDeref",A="FL:::/Compiler/PrsLib.CPP.Z,21",BI=220$
|
||||
$LK,"ICCopyTemplate",A="FL:::/Compiler/BackFA.CPP.Z,77",BI=221$
|
||||
$LK,"PrsStmt",A="FL:::/Compiler/PrsStmt.CPP.Z,900",BI=222$
|
||||
$LK,"PrsFun",A="FL:::/Compiler/PrsStmt.CPP.Z,132",BI=223$
|
||||
$LK,"LexIncludeStr",A="FL:::/Compiler/Lex.CPP.Z,299",BI=224$
|
||||
$LK,"PrsType",A="FL:::/Compiler/PrsVar.CPP.Z,287",BI=225$
|
||||
$LK,"CmpCtrlNew",A="FL:::/Compiler/Lex.CPP.Z,28",BI=226$
|
||||
$LK,"CmpCtrlSize",A="FL:::/Compiler/Lex.CPP.Z,70",BI=218$
|
||||
$LK,"ICLocalVarInit",A="FL:::/Compiler/BackC.CPP.Z,758",BI=219$
|
||||
$LK,"PrsFor",A="FL:::/Compiler/PrsStmt.CPP.Z,529",BI=220$
|
||||
$LK,"PassTrace",A="FL:::/Compiler/CMisc.CPP.Z,50",BI=221$
|
||||
$LK,"PrsPopDeref",A="FL:::/Compiler/PrsLib.CPP.Z,21",BI=222$
|
||||
$LK,"ICCopyTemplate",A="FL:::/Compiler/BackFA.CPP.Z,77",BI=223$
|
||||
$LK,"PrsStmt",A="FL:::/Compiler/PrsStmt.CPP.Z,904",BI=224$
|
||||
$LK,"PrsFun",A="FL:::/Compiler/PrsStmt.CPP.Z,132",BI=225$
|
||||
$LK,"LexIncludeStr",A="FL:::/Compiler/Lex.CPP.Z,299",BI=226$
|
||||
$LK,"PrsType",A="FL:::/Compiler/PrsVar.CPP.Z,287",BI=227$
|
||||
$LK,"CmpCtrlNew",A="FL:::/Compiler/Lex.CPP.Z,28",BI=228$
|
||||
$LK,"MODR_SIB_D8_INDIRECT_REG",A="FL:::/Compiler/BackLib.CPP.Z,131"$
|
||||
$LK,"cmp_type_flags_src_code",A="FL:::/Compiler/Lex.CPP.Z,328"$
|
||||
$LK,"PrsVarInit2",A="FL:::/Compiler/PrsVar.CPP.Z,123",BI=227$
|
||||
$LK,"PrsPop",A="FL:::/Compiler/PrsLib.CPP.Z,6",BI=228$
|
||||
$LK,"PrsVarInit2",A="FL:::/Compiler/PrsVar.CPP.Z,123",BI=229$
|
||||
$LK,"PrsPop",A="FL:::/Compiler/PrsLib.CPP.Z,6",BI=230$
|
||||
$LK,"asm_seg_prefixes",A="FL:::/Compiler/Asm.CPP.Z,393"$
|
||||
$LK,"ICMinMax",A="FL:::/Compiler/BackC.CPP.Z,415",BI=229$
|
||||
$LK,"CmpLoadDefines",A="FL:::/Compiler/CInit.CPP.Z,205",BI=230$
|
||||
$LK,"PrsIf",A="FL:::/Compiler/PrsStmt.CPP.Z,455",BI=231$
|
||||
$LK,"ICBuiltInFloatConst",A="FL:::/Compiler/BackLib.CPP.Z,404",BI=232$
|
||||
$LK,"ICFUnaryMinus",A="FL:::/Compiler/BackFA.CPP.Z,194",BI=233$
|
||||
$LK,"LexDocRead",A="FL:::/Compiler/Lex.CPP.Z,311",BI=234$
|
||||
$LK,"CmpFixUpJITAsm",A="FL:::/Compiler/CMain.CPP.Z,174",BI=235$
|
||||
$LK,"COCPopNoFree",A="FL:::/Compiler/PrsLib.CPP.Z,114",BI=236$
|
||||
$LK,"ParenWarning",A="FL:::/Compiler/CExcept.CPP.Z,110",BI=237$
|
||||
$LK,"PrsFunCall",A="FL:::/Compiler/PrsExp.CPP.Z,378",BI=238$
|
||||
$LK,"ICDerefPostIncDec",A="FL:::/Compiler/BackB.CPP.Z,384",BI=239$
|
||||
$LK,"Option",A="FL:::/Compiler/CMisc.CPP.Z,1",BI=240$
|
||||
$LK,"ExeFile2",A="FL:::/Compiler/CMain.CPP.Z,651",BI=241$
|
||||
$LK,"ICMinMax",A="FL:::/Compiler/BackC.CPP.Z,415",BI=231$
|
||||
$LK,"CmpLoadDefines",A="FL:::/Compiler/CInit.CPP.Z,205",BI=232$
|
||||
$LK,"PrsIf",A="FL:::/Compiler/PrsStmt.CPP.Z,459",BI=233$
|
||||
$LK,"ICBuiltInFloatConst",A="FL:::/Compiler/BackLib.CPP.Z,404",BI=234$
|
||||
$LK,"ICFUnaryMinus",A="FL:::/Compiler/BackFA.CPP.Z,194",BI=235$
|
||||
$LK,"LexDocRead",A="FL:::/Compiler/Lex.CPP.Z,311",BI=236$
|
||||
$LK,"CmpFixUpJITAsm",A="FL:::/Compiler/CMain.CPP.Z,174",BI=237$
|
||||
$LK,"COCPopNoFree",A="FL:::/Compiler/PrsLib.CPP.Z,114",BI=238$
|
||||
$LK,"ParenWarning",A="FL:::/Compiler/CExcept.CPP.Z,110",BI=239$
|
||||
$LK,"PrsFunCall",A="FL:::/Compiler/PrsExp.CPP.Z,378",BI=240$
|
||||
$LK,"ICDerefPostIncDec",A="FL:::/Compiler/BackB.CPP.Z,384",BI=241$
|
||||
$LK,"Option",A="FL:::/Compiler/CMisc.CPP.Z,1",BI=242$
|
||||
$LK,"ExeFile2",A="FL:::/Compiler/CMain.CPP.Z,657",BI=243$
|
||||
$LK,"COptMemberVar",A="FL:::/Compiler/OptLib.CPP.Z,556"$
|
||||
$LK,"PE_CHECK_BINARY_OPS1",A="FL:::/Compiler/PrsExp.CPP.Z,6"$
|
||||
$LK,"PE_CHECK_BINARY_OPS2",A="FL:::/Compiler/PrsExp.CPP.Z,7"$
|
||||
$LK,"LexBackupLastChar",A="FL:::/Compiler/LexLib.CPP.Z,1",BI=242$
|
||||
$LK,"Trace",A="FL:::/Compiler/CMisc.CPP.Z,19",BI=243$
|
||||
$LK,"ICBrBitOps",A="FL:::/Compiler/BackC.CPP.Z,206",BI=244$
|
||||
$LK,"LexBackupLastChar",A="FL:::/Compiler/LexLib.CPP.Z,1",BI=244$
|
||||
$LK,"Trace",A="FL:::/Compiler/CMisc.CPP.Z,58",BI=245$
|
||||
$LK,"ICBrBitOps",A="FL:::/Compiler/BackC.CPP.Z,206",BI=246$
|
||||
$LK,"MODR_D32_INDIRECT_REG",A="FL:::/Compiler/BackLib.CPP.Z,129"$
|
||||
$LK,"LexGetChar",A="FL:::/Compiler/Lex.CPP.Z,107",BI=245$
|
||||
$LK,"LexSkipEol",A="FL:::/Compiler/Lex.CPP.Z,270",BI=246$
|
||||
$LK,"ICFlagBranch",A="FL:::/Compiler/BackB.CPP.Z,682",BI=247$
|
||||
$LK,"LexGetChar",A="FL:::/Compiler/Lex.CPP.Z,107",BI=247$
|
||||
$LK,"LexSkipEol",A="FL:::/Compiler/Lex.CPP.Z,270",BI=248$
|
||||
$LK,"ICFlagBranch",A="FL:::/Compiler/BackB.CPP.Z,682",BI=249$
|
||||
$LK,"SLASH_OP_FSUBR",A="FL:::/Compiler/BackLib.CPP.Z,256"$
|
||||
$LK,"ICFPreIncDec",A="FL:::/Compiler/BackFB.CPP.Z,562",BI=248$
|
||||
$LK,"ICFPreIncDec",A="FL:::/Compiler/BackFB.CPP.Z,562",BI=250$
|
||||
$LK,"MODR_SIB_INDIRECT_REG",A="FL:::/Compiler/BackLib.CPP.Z,130"$
|
||||
$LK,"ExeFile",A="FL:::/Compiler/CMain.CPP.Z,614",BI=249$
|
||||
$LK,"COCMiscNew",A="FL:::/Compiler/PrsLib.CPP.Z,143",BI=250$
|
||||
$LK,"ExeFile",A="FL:::/Compiler/CMain.CPP.Z,614",BI=251$
|
||||
$LK,"COCMiscNew",A="FL:::/Compiler/PrsLib.CPP.Z,143",BI=252$
|
||||
$LK,"cmp_templates_dont_pop",A="FL:::/Compiler/CExts.CPP.Z,43"$
|
||||
$LK,"CmpOffset2Reg",A="FL:::/Compiler/OptLib.CPP.Z,83",BI=251$
|
||||
$LK,"PrsFunNew",A="FL:::/Compiler/PrsLib.CPP.Z,62",BI=252$
|
||||
$LK,"StreamExePrint",A="FL:::/Compiler/CMain.CPP.Z,661",BI=253$
|
||||
$LK,"COCGoToLabelFind",A="FL:::/Compiler/PrsLib.CPP.Z,152",BI=254$
|
||||
$LK,"OptMVCompare",A="FL:::/Compiler/OptLib.CPP.Z,562",BI=255$
|
||||
$LK,"ICToBool",A="FL:::/Compiler/BackB.CPP.Z,289",BI=256$
|
||||
$LK,"PrsFunJoin",A="FL:::/Compiler/PrsStmt.CPP.Z,68",BI=257$
|
||||
$LK,"OptFixSizeOf",A="FL:::/Compiler/OptLib.CPP.Z,484",BI=258$
|
||||
$LK,"CmpOffset2Reg",A="FL:::/Compiler/OptLib.CPP.Z,83",BI=253$
|
||||
$LK,"PrsFunNew",A="FL:::/Compiler/PrsLib.CPP.Z,62",BI=254$
|
||||
$LK,"StreamExePrint",A="FL:::/Compiler/CMain.CPP.Z,673",BI=255$
|
||||
$LK,"COCGoToLabelFind",A="FL:::/Compiler/PrsLib.CPP.Z,152",BI=256$
|
||||
$LK,"OptMVCompare",A="FL:::/Compiler/OptLib.CPP.Z,562",BI=257$
|
||||
$LK,"ICToBool",A="FL:::/Compiler/BackB.CPP.Z,289",BI=258$
|
||||
$LK,"PrsFunJoin",A="FL:::/Compiler/PrsStmt.CPP.Z,68",BI=259$
|
||||
$LK,"OptFixSizeOf",A="FL:::/Compiler/OptLib.CPP.Z,484",BI=260$
|
||||
$LK,"cmp_templates_dont_push",A="FL:::/Compiler/CExts.CPP.Z,45"$
|
||||
$LK,"cmp_templates_dont_push_pop",A="FL:::/Compiler/CExts.CPP.Z,46"$
|
||||
$LK,"LexAttachDoc",A="FL:::/Compiler/Lex.CPP.Z,331",BI=259$
|
||||
$LK,"PrsStreamBlk",A="FL:::/Compiler/PrsStmt.CPP.Z,801",BI=260$
|
||||
$LK,"LexAttachDoc",A="FL:::/Compiler/Lex.CPP.Z,331",BI=261$
|
||||
$LK,"PrsStreamBlk",A="FL:::/Compiler/PrsStmt.CPP.Z,805",BI=262$
|
||||
$LK,"cmp_templates_dont_push2",A="FL:::/Compiler/CExts.CPP.Z,44"$
|
||||
$LK,"InstEntryFind",A="FL:::/Compiler/UAsm.CPP.Z,66",BI=261$
|
||||
$LK,"PrsDotDotDot",A="FL:::/Compiler/PrsVar.CPP.Z,381",BI=262$
|
||||
$LK,"ICMulEqu",A="FL:::/Compiler/BackA.CPP.Z,322",BI=263$
|
||||
$LK,"AsmPrsInsFlags",A="FL:::/Compiler/AsmInit.CPP.Z,1",BI=264$
|
||||
$LK,"PrsNoWarn",A="FL:::/Compiler/PrsStmt.CPP.Z,787",BI=265$
|
||||
| ||||