TempleOSCDV4.09.ISO
This commit is contained in:
1 parent
2d56cda5f3
commit
353eac0dbe
88 files changed
+2449
-2043
No files matched your search
@@ -241,7 +241,7 @@ CBlkDev *ATAMount(U8 first_drv_let,I64 type,I64 base0,I64 base1,I64 unit)
|
||||
CBlkDev *res;
|
||||
if (0<=first_drv_let-'A'<NUM_DRVS && (type==BDT_ATA || type==BDT_ATAPI) &&
|
||||
0<=unit<=1) {
|
||||
res=BlkDevNextFree(first_drv_let,type);
|
||||
res=BlkDevNextFreeSlot(first_drv_let,type);
|
||||
res->unit=unit;
|
||||
res->base0=base0;
|
||||
res->base1=base1;
|
||||
|
||||
@@ -5,7 +5,8 @@ U0 BlkDevLockFwdingSet(CBlkDev *bd)
|
||||
switch (bd->type) {
|
||||
case BDT_RAM:
|
||||
break;
|
||||
case BDT_FILE:
|
||||
case BDT_FILE_READ:
|
||||
case BDT_FILE_WRITE:
|
||||
bd->lock_fwding=Let2BlkDev(*bd->file_dsk_name);
|
||||
break;
|
||||
case BDT_ATA:
|
||||
@@ -32,15 +33,16 @@ I64 BlkDevAdd(CBlkDev *bd,Bool one_drv,Bool make_free)
|
||||
|
||||
bd->bd_signature=BD_SIGNATURE_VAL;
|
||||
if (make_free)
|
||||
dv=DrvMakeFree(bd->first_drv_let+res);
|
||||
dv=DrvMakeFreeSlot(bd->first_drv_let+res);
|
||||
else
|
||||
dv=DrvNextFree(bd->first_drv_let+res);
|
||||
dv=DrvMakeFreeSlot(DrvNextFreeLet(bd->first_drv_let+res));
|
||||
dv->bd=bd;
|
||||
dv->drv_offset=bd->drv_offset;
|
||||
dv->size=bd->max_blk+1-bd->drv_offset;
|
||||
switch (bd->type) {
|
||||
case BDT_RAM:
|
||||
case BDT_FILE:
|
||||
case BDT_FILE_READ:
|
||||
case BDT_FILE_WRITE:
|
||||
dv->dv_signature=DRV_SIGNATURE_VAL;
|
||||
dv->fs_type=FSt_REDSEA;
|
||||
//This is to force creation of a RAM
|
||||
@@ -81,9 +83,9 @@ I64 BlkDevAdd(CBlkDev *bd,Bool one_drv,Bool make_free)
|
||||
for (i=0;i<4;i++) {
|
||||
if (mbr.p[i].type) {
|
||||
if (make_free)
|
||||
dv=DrvMakeFree(bd->first_drv_let+res);
|
||||
dv=DrvMakeFreeSlot(bd->first_drv_let+res);
|
||||
else
|
||||
dv=DrvNextFree(bd->first_drv_let+res);
|
||||
dv=DrvMakeFreeSlot(DrvNextFreeLet(bd->first_drv_let+res));
|
||||
dv->bd=bd;
|
||||
dv->drv_offset=mbr.p[i].offset+offset;
|
||||
dv->size =mbr.p[i].size;
|
||||
@@ -151,7 +153,7 @@ I64 BlkDevAdd(CBlkDev *bd,Bool one_drv,Bool make_free)
|
||||
if (res)
|
||||
BlkDevLockFwdingSet(bd);
|
||||
else
|
||||
MemSet(bd,0,sizeof(CBlkDev));
|
||||
BlkDevDel(bd);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,8 @@ Bool RBlks(CDrv *dv,U8 *buf, I64 blk, I64 cnt)
|
||||
case BDT_RAM:
|
||||
MemCpy(buf,bd->RAM_dsk+blk<<BLK_SIZE_BITS,cnt<<BLK_SIZE_BITS);
|
||||
break;
|
||||
case BDT_FILE:
|
||||
case BDT_FILE_READ:
|
||||
case BDT_FILE_WRITE:
|
||||
FRBlks(bd->file_dsk,buf,blk,cnt);
|
||||
break;
|
||||
case BDT_ATA:
|
||||
@@ -86,7 +87,8 @@ Bool WBlks(CDrv *dv,U8 *buf, I64 blk, I64 cnt)
|
||||
case BDT_RAM:
|
||||
MemCpy(bd->RAM_dsk+blk<<BLK_SIZE_BITS,buf,cnt<<BLK_SIZE_BITS);
|
||||
break;
|
||||
case BDT_FILE:
|
||||
case BDT_FILE_READ:
|
||||
case BDT_FILE_WRITE:
|
||||
FWBlks(bd->file_dsk,buf,blk,cnt);
|
||||
break;
|
||||
case BDT_ATA:
|
||||
|
||||
+53
-39
@@ -33,41 +33,53 @@ Bool BlkDevInit(CBlkDev *bd)
|
||||
CDirEntry de;
|
||||
U8 buf[STR_LEN];
|
||||
CDrv *dv=Let2Drv(bd->first_drv_let);
|
||||
Bool res=FALSE,invalid=FALSE;
|
||||
Bool res=FALSE;
|
||||
if (!LBts(&bd->flags,BDf_INITIALIZED)) {
|
||||
bd->flags|=BDF_INIT_IN_PROGRESS;
|
||||
switch (bd->type) {
|
||||
start:
|
||||
case BDT_RAM:
|
||||
if (!bd->RAM_dsk) {
|
||||
bd->RAM_dsk=AMAlloc((bd->max_blk+1)<<BLK_SIZE_BITS);
|
||||
bd->max_blk=MSize(bd->RAM_dsk)>>BLK_SIZE_BITS-1;
|
||||
}
|
||||
break;
|
||||
case BDT_FILE:
|
||||
if (!bd->file_dsk_name) {
|
||||
StrPrint(buf,"%C:/Drv%C.DRV.C",
|
||||
blkdev.boot_drv_let,bd->first_drv_let);
|
||||
bd->file_dsk_name=AStrNew(buf);
|
||||
}
|
||||
if (FileFind(bd->file_dsk_name,&de,FUF_JUST_FILES))
|
||||
bd->max_blk=de.size>>BLK_SIZE_BITS-1;
|
||||
else {
|
||||
invalid=TRUE;
|
||||
if (bd->max_blk<7)
|
||||
bd->max_blk=7;
|
||||
}
|
||||
bd->file_dsk=FOpen(bd->file_dsk_name,"wc+",bd->max_blk+1);
|
||||
break;
|
||||
end:
|
||||
case BDT_RAM:
|
||||
if (!bd->RAM_dsk) {
|
||||
bd->RAM_dsk=AMAlloc((bd->max_blk+1)<<BLK_SIZE_BITS);
|
||||
bd->max_blk=MSize(bd->RAM_dsk)>>BLK_SIZE_BITS-1;
|
||||
}
|
||||
dv->fs_type=FSt_REDSEA;
|
||||
dv->size=bd->max_blk+1-bd->drv_offset;
|
||||
if (!invalid && RedSeaDrvValidate(bd->first_drv_let))
|
||||
if (RedSeaDrvValidate(bd->first_drv_let))
|
||||
RedSeaDrvInit(dv);
|
||||
else
|
||||
RedSeaFmt(bd->first_drv_let);
|
||||
res=TRUE;
|
||||
break;
|
||||
case BDT_FILE_READ:
|
||||
if (FileFind(bd->file_dsk_name,&de,FUF_JUST_FILES)) {
|
||||
bd->max_blk=de.size>>BLK_SIZE_BITS-1;
|
||||
try bd->file_dsk=FOpen(bd->file_dsk_name,"rc",bd->max_blk+1);
|
||||
catch
|
||||
Fs->catch_except=TRUE;
|
||||
if (bd->file_dsk) {
|
||||
dv->fs_type=FSt_REDSEA;
|
||||
dv->size=bd->max_blk+1-bd->drv_offset;
|
||||
if (RedSeaDrvValidate(bd->first_drv_let)) {
|
||||
RedSeaDrvInit(dv);
|
||||
res=TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case BDT_FILE_WRITE:
|
||||
if (!bd->file_dsk_name) {
|
||||
StrPrint(buf,"%C:/Drv%C.DRV.C",
|
||||
blkdev.boot_drv_let,bd->first_drv_let);
|
||||
bd->file_dsk_name=AStrNew(buf);
|
||||
}
|
||||
if (bd->max_blk<7)
|
||||
bd->max_blk=7;
|
||||
bd->file_dsk=FOpen(bd->file_dsk_name,"wc",bd->max_blk+1);
|
||||
dv->fs_type=FSt_REDSEA;
|
||||
dv->size=bd->max_blk+1-bd->drv_offset;
|
||||
RedSeaFmt(bd->first_drv_let);
|
||||
res=TRUE;
|
||||
break;
|
||||
case BDT_ATA:
|
||||
bd->max_reads=128;
|
||||
bd->max_writes=1;
|
||||
@@ -105,7 +117,7 @@ U0 BlkDevsRelease()
|
||||
}
|
||||
}
|
||||
|
||||
CBlkDev *BlkDevNextFree(U8 first_drv_let,I64 type)
|
||||
CBlkDev *BlkDevNextFreeSlot(U8 first_drv_let,I64 type)
|
||||
{//Locate free slot for new BlkDev, like during $LK,"Mount",A="MN:Mount"$().
|
||||
I64 i=0;
|
||||
CBlkDev *res;
|
||||
@@ -117,20 +129,21 @@ CBlkDev *BlkDevNextFree(U8 first_drv_let,I64 type)
|
||||
MemSet(res,0,sizeof(CBlkDev));
|
||||
res->first_drv_let=first_drv_let;
|
||||
res->type=type;
|
||||
if (type==BDT_ATAPI)
|
||||
res->flags=BDF_REMOVABLE;
|
||||
else
|
||||
res->flags=0;
|
||||
if (type!=BDT_RAM)
|
||||
res->flags|=BDF_READ_CACHE;
|
||||
|
||||
if (type==BDT_ATAPI) {
|
||||
res->blk_size=DVD_BLK_SIZE;
|
||||
res->flags|=BDF_READ_ONLY;
|
||||
} else
|
||||
res->blk_size=BLK_SIZE;
|
||||
|
||||
res->flags=BDF_READ_CACHE;
|
||||
res->blk_size=BLK_SIZE;
|
||||
res->max_blk=0xEFFFFFFF;
|
||||
switch (type) {
|
||||
case BDT_RAM:
|
||||
res->flags&=~BDF_READ_CACHE;
|
||||
break;
|
||||
case BDT_FILE_READ:
|
||||
res->flags|=BDF_READ_ONLY;
|
||||
break;
|
||||
case BDT_ATAPI:
|
||||
res->flags|=BDF_REMOVABLE|BDF_READ_ONLY;
|
||||
res->blk_size=DVD_BLK_SIZE;
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
} while (++i<NUM_BLKDEVS);
|
||||
@@ -140,6 +153,7 @@ CBlkDev *BlkDevNextFree(U8 first_drv_let,I64 type)
|
||||
|
||||
U0 BlkDevDel(CBlkDev *bd)
|
||||
{//Delete BlkDev
|
||||
DrvBlkDevDel(bd);
|
||||
FClose(bd->file_dsk);
|
||||
Free(bd->file_dsk_name);
|
||||
Free(bd->dev_id_record);
|
||||
|
||||
+31
-11
@@ -35,7 +35,7 @@ U0 DrvsRelease()
|
||||
}
|
||||
}
|
||||
|
||||
CDrv *DrvMakeFree(U8 drv_let)
|
||||
CDrv *DrvMakeFreeSlot(U8 drv_let)
|
||||
{//Make a slot free for a new drv, like during $LK,"Mount",A="MN:Mount"$().
|
||||
//!!! drv_let is not a $LK,"remapped",A="MN:DrvMap"$ drv.
|
||||
I64 i=ToUpper(drv_let)-'A';
|
||||
@@ -48,18 +48,22 @@ CDrv *DrvMakeFree(U8 drv_let)
|
||||
return res;
|
||||
}
|
||||
|
||||
CDrv *DrvNextFree(U8 first_drv_let='C')
|
||||
U8 DrvNextFreeLet(U8 first_drv_let='C')
|
||||
{//Locate free slot for new drv, like during $LK,"Mount",A="MN:Mount"$().
|
||||
//!!! first_drv_let is not a $LK,"remapped",A="MN:DrvMap"$ drv.
|
||||
I64 i=ToUpper(first_drv_let)-'A';
|
||||
I64 i=ToUpper(first_drv_let)-'A',type=Let2BlkDevType(first_drv_let);
|
||||
if (!(0<=i<NUM_DRVS))
|
||||
throw('Drv');
|
||||
do
|
||||
if (blkdev.drvs[i].dv_signature!=DRV_SIGNATURE_VAL)
|
||||
return DrvMakeFree(i+'A');
|
||||
if (blkdev.drvs[i].dv_signature!=DRV_SIGNATURE_VAL) {
|
||||
if (Let2BlkDevType(i+'A')!=type)
|
||||
throw('Drv');
|
||||
else
|
||||
return i+'A';
|
||||
}
|
||||
while (++i<NUM_DRVS);
|
||||
throw('Drv');
|
||||
return NULL; //never gets here
|
||||
return 0; //Never gets here.
|
||||
}
|
||||
|
||||
U0 DrvDel(CDrv *dv)
|
||||
@@ -71,6 +75,17 @@ U0 DrvDel(CDrv *dv)
|
||||
MemSet(dv,0,sizeof(CDrv));
|
||||
}
|
||||
|
||||
U0 DrvBlkDevDel(CBlkDev *bd)
|
||||
{//Delete drv's of BlkDev
|
||||
I64 i;
|
||||
CDrv *dv;
|
||||
for (i=0;i<NUM_DRVS;i++) {
|
||||
dv=&blkdev.drvs[i];
|
||||
if (dv->bd==bd)
|
||||
DrvDel(dv);
|
||||
}
|
||||
}
|
||||
|
||||
U0 DrvFATBlkAlloc(CDrv *dv)
|
||||
{
|
||||
DrvChk(dv);
|
||||
@@ -150,8 +165,10 @@ I64 Let2BlkDevType(U8 drv_let)
|
||||
return BDT_RAM;
|
||||
if ('C'<=drv_let<='L')
|
||||
return BDT_ATA;
|
||||
if ('M'<=drv_let<='S')
|
||||
return BDT_FILE;
|
||||
if ('M'<=drv_let<='P')
|
||||
return BDT_FILE_READ;
|
||||
if ('Q'<=drv_let<='S')
|
||||
return BDT_FILE_WRITE;
|
||||
if ('T'<=drv_let<='Z')
|
||||
return BDT_ATAPI;
|
||||
return BDT_NULL;
|
||||
@@ -241,7 +258,8 @@ Bool Drv(U8 drv_let)
|
||||
if (dv!=Fs->cur_dv) {
|
||||
if (bd->flags & BDF_REMOVABLE && !(bd->flags & BDF_INITIALIZED))
|
||||
ChgDsk(Drv2Let(dv));
|
||||
if (bd->type==BDT_RAM || bd->type=BDT_FILE)
|
||||
if (bd->type==BDT_RAM ||
|
||||
bd->type==BDT_FILE_READ || bd->type==BDT_FILE_WRITE)
|
||||
BlkDevInit(bd);
|
||||
}
|
||||
Fs->cur_dv=dv;
|
||||
@@ -288,7 +306,7 @@ U8 *DrvModelNum(U8 drv_let=0)
|
||||
return res;
|
||||
}
|
||||
|
||||
U8 blkdev_text_attr[BDT_NUM_TYPES]={BLACK,LTCYAN,WHITE,LTGREEN,LTBLUE};
|
||||
U8 blkdev_text_attr[BDT_NUM_TYPES]={BLACK,LTCYAN,WHITE,LTGREEN,LTRED,LTBLUE};
|
||||
U8 drv_text_attr[3]={BLACK,BLUE,RED};
|
||||
|
||||
U8 DrvTextAttrGet(U8 drv_let=0)
|
||||
@@ -325,7 +343,7 @@ U0 DrvRep()
|
||||
else
|
||||
ch='+';
|
||||
attr=DrvTextAttrGet(drv_let);
|
||||
"$$FG,%d$$$$BG,%d$$%C %-8Z %-9Z %04X %04X %02X\n",
|
||||
"$$FG,%d$$$$BG,%d$$%C %-8Z %-10Z %04X %04X %02X\n",
|
||||
attr&15,attr>>4,drv_let,dv->fs_type&FSG_TYPE_MASK,"ST_DRV_TYPES",
|
||||
bd->type,"ST_BLKDEV_TYPES",bd->base0,bd->base1,bd->unit;
|
||||
if (st=DrvModelNum(drv_let)) {
|
||||
@@ -336,6 +354,8 @@ U0 DrvRep()
|
||||
" Serial#:%s\n",st;
|
||||
Free(st);
|
||||
}
|
||||
if (bd->type==BDT_FILE_READ || bd->type==BDT_FILE_WRITE)
|
||||
" File=\"%s\"\n",bd->file_dsk_name;
|
||||
" %016X-%016X\n$$FG$$$$BG$$",dv->drv_offset,dv->drv_offset+dv->size-1;
|
||||
}
|
||||
}
|
||||
|
||||
+17
-9
@@ -21,7 +21,7 @@ U0 HashFunSegFind(CHashTable *h,U8 *addr,
|
||||
if (tempex->type&HTT_FUN) {
|
||||
if (!Bt(&tempex(CHashFun *)->flags,Cf_EXTERN) &&
|
||||
!Bt(&tempex(CHashFun *)->flags,Ff_INTERNAL))
|
||||
j=tempex(CHashFun *)->executable_addr;
|
||||
j=tempex(CHashFun *)->exe_addr;
|
||||
} else if (tempex->type&HTT_EXPORT_SYS_SYM)
|
||||
j=tempex->val;
|
||||
if (j) {
|
||||
@@ -131,12 +131,14 @@ U8 *FunSegCacheFind(U8 *addr,I64 *_offset)
|
||||
}
|
||||
}
|
||||
|
||||
U0 StrPrintFunSeg(U8 *buf,I64 addr,I64 field_len)
|
||||
U0 StrPrintFunSeg(U8 *buf,I64 addr,I64 field_len,I64 flags)
|
||||
{
|
||||
I64 offset;
|
||||
CHashExport *tempex;
|
||||
U8 *str,*str2;
|
||||
Bool is_fun=FALSE;
|
||||
if (!(flags&SPF_TRUNCATE))
|
||||
field_len=0;
|
||||
if (addr) {
|
||||
if (str=FunSegCacheFind(addr,&offset)) {
|
||||
if (addr!=SYS_IDLE_PT)
|
||||
@@ -153,21 +155,27 @@ U0 StrPrintFunSeg(U8 *buf,I64 addr,I64 field_len)
|
||||
if (offset>0xFFFF) offset=0xFFFF;
|
||||
if (is_fun) {
|
||||
str2=MStrPrint("&%s",str);
|
||||
if (field_len>7)
|
||||
StrPrint(buf,"%*ts+0x%04X",field_len-7,str2,offset);
|
||||
else
|
||||
if (field_len>7) {
|
||||
if (flags&SPF_LEFT_JUSTIFY && StrLen(str2)<field_len-7)
|
||||
StrPrint(buf,"%s+0x%04X",str2,offset);
|
||||
else
|
||||
StrPrint(buf,"%*ts+0x%04X",field_len-7,str2,offset);
|
||||
} else
|
||||
StrPrint(buf,"%s+0x%04X",str2,offset);
|
||||
Free(str2);
|
||||
} else {
|
||||
if (field_len>7)
|
||||
StrPrint(buf,"%*ts+0x%04X",field_len-7,str,offset);
|
||||
else
|
||||
if (field_len>7) {
|
||||
if (flags&SPF_LEFT_JUSTIFY && StrLen(str)<field_len-7)
|
||||
StrPrint(buf,"%s+0x%04X",str,offset);
|
||||
else
|
||||
StrPrint(buf,"%*ts+0x%04X",field_len-7,str,offset);
|
||||
} else
|
||||
StrPrint(buf,"%s+0x%04X",str,offset);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (field_len)
|
||||
if (flags&SPF_TRUNCATE)
|
||||
StrPrint(buf,"%*tX",field_len,addr);
|
||||
else
|
||||
StrPrint(buf,"%X",addr);
|
||||
|
||||
+4
-4
@@ -457,9 +457,9 @@ U0 G(U8 *ip=INVALID_PTR,CTask *task=NULL)
|
||||
LBtr(&task->rflags,RFLAGf_TRAP);//No single step
|
||||
Suspend(task,FALSE);
|
||||
if (task==Fs) {
|
||||
if (IsDbg && task->next_lex!=&task->next_lex) {
|
||||
if (IsDbg && task->next_cc!=&task->next_cc) {
|
||||
"Exit Dbg\n";
|
||||
Btr(&task->last_lex->flags,CCf_PMT);
|
||||
Btr(&task->last_cc->flags,CCf_PMT);
|
||||
}
|
||||
} else
|
||||
Exit;
|
||||
@@ -487,8 +487,8 @@ public U0 S(U8 *ip=INVALID_PTR,CTask *task=NULL) //Single-step.
|
||||
Suspend(task,FALSE);
|
||||
if (task==Fs) {
|
||||
if (IsDbg) {
|
||||
if (task->next_lex!=&task->next_lex)
|
||||
Btr(&task->last_lex->flags,CCf_PMT);
|
||||
if (task->next_cc!=&task->next_cc)
|
||||
Btr(&task->last_cc->flags,CCf_PMT);
|
||||
}
|
||||
} else
|
||||
Exit;
|
||||
|
||||
+2
-1
@@ -108,7 +108,8 @@ U0 SysDefinesLoad()
|
||||
DefineLstLoad("ST_FILE_ATTRS","R\0H\0S\0V\0D\0A\0 \0 \0X\0T\0Z\0C\0F\0");
|
||||
DefineLstLoad("ST_FILE_UTIL_FLAGS","r\0d\0i\0a\0c\0R\0p\0m\0x\0s\0"
|
||||
"D\0F\0T\0S\0A\0J\0G\0Z\0O\0P\0f\0l\0lb\0la\0");
|
||||
DefineLstLoad("ST_BLKDEV_TYPES","NULL\0RAM\0ATA\0FILE\0ATAPI\0");
|
||||
DefineLstLoad("ST_BLKDEV_TYPES",
|
||||
"NULL\0RAM\0ATA\0FILE_READ\0FILE_WRITE\0ATAPI\0");
|
||||
DefineLstLoad("ST_DRV_TYPES",
|
||||
"NULL\0REDSEA\0FAT32\0ISO9660\0ISO13490\0ISO13346\0NTFS\0UNKNOWN\0");
|
||||
DefineLstLoad("ST_COLORS","BLACK\0BLUE\0GREEN\0CYAN\0"
|
||||
|
||||
+3
-2
@@ -13,7 +13,7 @@ extern I64 BIOSTotalMem();
|
||||
extern I64 BlkDevAdd(CBlkDev *bd,Bool one_drv,Bool make_free);
|
||||
extern CBlkDev *BlkDevChk(CBlkDev *bd,Bool except=TRUE);
|
||||
extern Bool BlkDevLock(CBlkDev *bd);
|
||||
extern CBlkDev *BlkDevNextFree(U8 first_drv_let,I64 type);
|
||||
extern CBlkDev *BlkDevNextFreeSlot(U8 first_drv_let,I64 type);
|
||||
extern Bool BlkDevUnlock(CBlkDev *bd,Bool rst=FALSE);
|
||||
extern U0 BlkDevsRelease();
|
||||
extern U8 *Caller(I64 num=1);
|
||||
@@ -29,6 +29,7 @@ extern I64 Del(U8 *files_find_mask,Bool make_mask=FALSE,
|
||||
extern U8 *DftExt(U8 *name,U8 *extension);
|
||||
extern Bool Drv(U8 drv_let);
|
||||
extern U8 Drv2Let(CDrv *dv=NULL);
|
||||
extern U0 DrvBlkDevDel(CBlkDev *bd);
|
||||
extern CDrv *DrvChk(CDrv *dv,Bool except=TRUE);
|
||||
extern U8 DrvTextAttrGet(U8 drv_let=0);
|
||||
extern Bool DrvTypeSet(U8 drv_let,I64 type=FSt_REDSEA);
|
||||
@@ -92,7 +93,7 @@ extern U0 SrvCmdQueDel(CSrvCmd *root);
|
||||
extern I64 SrvCmdsHandler(I64 run_flags,CTask *task=NULL);
|
||||
extern U0 SrvCtrlInit(CSrvCtrl *ctrl);
|
||||
extern U8 *StrPrint(U8 *dst,U8 *fmt,...);
|
||||
extern U0 StrPrintFunSeg(U8 *buf,I64 addr,I64 field_len);
|
||||
extern U0 StrPrintFunSeg(U8 *buf,I64 addr,I64 field_len,I64 flags);
|
||||
extern Bool Suspend(CTask *task=NULL,Bool state=TRUE);
|
||||
extern CSrvCmd *TaskMsg(CTask *_srv,CTask *master,
|
||||
I64 code,I64 a1,I64 a2,I64 flags);
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@ I64 HashVal(CHash *temph)
|
||||
if (Bt(&temph(CHashFun *)->flags,Cf_EXTERN))
|
||||
return temph;
|
||||
else
|
||||
return temph(CHashFun *)->executable_addr;
|
||||
return temph(CHashFun *)->exe_addr;
|
||||
case HTt_REG:
|
||||
return temph(CHashReg *)->reg_num|temph(CHashReg *)->reg_type<<8;
|
||||
case HTt_KEYWORD:
|
||||
@@ -176,7 +176,7 @@ CHashGeneric *HashPublic(U8 *st,I64 mask,Bool val=TRUE)
|
||||
else
|
||||
res->type&=~HTF_PUBLIC;
|
||||
if (res->type&HTG_SRC_SYM)
|
||||
HashSrcFileSet(Fs->last_lex,res);
|
||||
HashSrcFileSet(Fs->last_cc,res);
|
||||
return res;
|
||||
} else
|
||||
return NULL;
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ U0 LoadOneImport(U8 **_src,U8 *module_base,I64 ld_flags)
|
||||
if (tempex) {
|
||||
ptr2=module_base+i;
|
||||
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
|
||||
|
||||
+5
-5
@@ -55,12 +55,12 @@ GDT_TR_RING3: DU8 MP_MAX_PROCESSORS*16 DUP(0);
|
||||
|
||||
//************************************
|
||||
CORE0_16BIT_INIT::
|
||||
//EAX is $LK,"SYS_BOOT_SRC",A="FF:::/Kernel/KStart.CPP,[SYS_BOOT_SRC]"$. (Val passed from boot blk, $LK,"BootHD",A="FF:::/Adam/Opt/Boot/BootHD.CPP,BOOT_SRC_HARDDRV"$, $LK,"BootDVD",A="FF:::/Adam/Opt/Boot/BootDVD.CPP,BOOT_SRC_DVD"$, & $LK,"BootRAM",A="FF:::/Adam/Opt/Boot/Reboot.CPP,BOOT_SRC_RAM"$.)
|
||||
//EAX is $LK,"SYS_BOOT_SRC",A="FF:::/Kernel/KStart.CPP,[SYS_BOOT_SRC]"$. (Val passed from boot blk, $LK,"BootHD",A="FF:::/Adam/Opt/Boot/BootHD.CPP,BOOT_SRC_HARDDRV"$, $LK,"BootDVD",A="FF:::/Adam/Opt/Boot/BootDVD.CPP,BOOT_SRC_DVD"$, & $LK,"BootRAM",A="FF:::/Adam/Opt/Boot/BootRAM.CPP,BOOT_SRC_RAM"$.)
|
||||
MOV ECX,EAX
|
||||
MOV AX,(BOOT_RAM_LIMIT-BOOT_STK_SIZE)/16
|
||||
MOV SS,AX
|
||||
MOV SP,BOOT_STK_SIZE
|
||||
PUSH ECX //Will be $LK,"SYS_BOOT_SRC",A="FF:::/Kernel/KStart.CPP,[SYS_BOOT_SRC]"$. See $LK,"BootHD",A="FF:::/Adam/Opt/Boot/BootHD.CPP,BOOT_SRC_HARDDRV"$, $LK,"BootDVD",A="FF:::/Adam/Opt/Boot/BootDVD.CPP,BOOT_SRC_DVD"$ & $LK,"BootRAM",A="FF:::/Adam/Opt/Boot/Reboot.CPP,BOOT_SRC_RAM"$.
|
||||
PUSH ECX //Will be $LK,"SYS_BOOT_SRC",A="FF:::/Kernel/KStart.CPP,[SYS_BOOT_SRC]"$. See $LK,"BootHD",A="FF:::/Adam/Opt/Boot/BootHD.CPP,BOOT_SRC_HARDDRV"$, $LK,"BootDVD",A="FF:::/Adam/Opt/Boot/BootDVD.CPP,BOOT_SRC_DVD"$ & $LK,"BootRAM",A="FF:::/Adam/Opt/Boot/BootRAM.CPP,BOOT_SRC_RAM"$.
|
||||
PUSH EBX
|
||||
MOV AX,VGAM_TEXT/16
|
||||
MOV ES,AX
|
||||
@@ -139,7 +139,7 @@ GET_IP: POP BX
|
||||
OUT 0x92,AL
|
||||
|
||||
POP U32 [SYS_BOOT_BLK]
|
||||
POP U32 [SYS_BOOT_SRC] //See $LK,"BootHD",A="FF:::/Adam/Opt/Boot/BootHD.CPP,BOOT_SRC_HARDDRV"$, $LK,"BootDVD",A="FF:::/Adam/Opt/Boot/BootDVD.CPP,BOOT_SRC_DVD"$, & $LK,"BootRAM",A="FF:::/Adam/Opt/Boot/Reboot.CPP,BOOT_SRC_RAM"$.
|
||||
POP U32 [SYS_BOOT_SRC] //See $LK,"BootHD",A="FF:::/Adam/Opt/Boot/BootHD.CPP,BOOT_SRC_HARDDRV"$, $LK,"BootDVD",A="FF:::/Adam/Opt/Boot/BootDVD.CPP,BOOT_SRC_DVD"$, & $LK,"BootRAM",A="FF:::/Adam/Opt/Boot/BootRAM.CPP,BOOT_SRC_RAM"$.
|
||||
|
||||
CLD
|
||||
XOR EAX,EAX
|
||||
@@ -236,7 +236,7 @@ SYS_CACHE_LINE_WIDTH:: DU64 DFT_CACHE_LINE_WIDTH;
|
||||
SYS_SEMAS:: DU8 NUM_SYS_SEMAS*SEMA_STRUCT_SIZE DUP(0);
|
||||
//************************************
|
||||
ALIGN 16,OC_NOP
|
||||
CORE0_32BIT_INIT:: //Entry point for $LK,"RAMReboot",A="MN:RAMReboot"$.
|
||||
CORE0_32BIT_INIT:: //Entry point for $LK,"BootRAM",A="MN:BootRAM"$.
|
||||
PUSH U32 RFLAGG_START
|
||||
POPFD
|
||||
MOV EAX,SYS_START_CR0
|
||||
@@ -350,7 +350,7 @@ USE64
|
||||
RET
|
||||
|
||||
//************************************
|
||||
SYS_RAM_REBOOT:: //This gets copied high. $LK,"SYS_RAM_REBOOT",A="FF:::/Adam/Opt/Boot/Reboot.CPP,SYS_RAM_REBOOT:2"$
|
||||
SYS_RAM_REBOOT:: //This gets copied high. $LK,"SYS_RAM_REBOOT",A="FF:::/Adam/Opt/Boot/BootRAM.CPP,SYS_RAM_REBOOT:2"$
|
||||
PUSH U32 CGDT.ds //stk seg
|
||||
PUSH U32 BOOT_RAM_LIMIT //stk
|
||||
PUSH U32 0 //flags
|
||||
|
||||
+2
-2
@@ -171,7 +171,7 @@ I64 TaskInit(CTask *task,I64 stk_size)
|
||||
(&task->next_child_task)(U8 *)-offset(CTask.next_sibling_task);
|
||||
|
||||
SrvCtrlInit(&task->srv_ctrl);
|
||||
QueInit(&task->next_lex);
|
||||
QueInit(&task->next_cc);
|
||||
QueInit(&task->next_except);
|
||||
QueInit(&task->next_ctrl);
|
||||
QueInit(&task->next_ode);
|
||||
@@ -356,7 +356,7 @@ U0 UserTaskCont()
|
||||
Bool cont=TRUE;
|
||||
do {
|
||||
cc=CmpCtrlNew(,CCF_CMD_LINE|CCF_PMT|CCF_QUESTION_HELP);
|
||||
QueIns(cc,Fs->last_lex);
|
||||
QueIns(cc,Fs->last_cc);
|
||||
try {
|
||||
Lex(cc);
|
||||
ExeCmdLine(cc);
|
||||
|
||||
+5
-6
@@ -329,7 +329,7 @@ _CPUID::
|
||||
POP RSI
|
||||
POP RBP
|
||||
RET1 16
|
||||
_CALLIND::
|
||||
_CALL_IND:: //See $LK,"_LAST_FUN",A="MN:_LAST_FUN"$
|
||||
PUSH RBP
|
||||
MOV RBP,RSP
|
||||
PUSH RSI
|
||||
@@ -350,10 +350,10 @@ _CALLIND::
|
||||
POP RBP
|
||||
RET
|
||||
|
||||
@@05: XOR RAX,RAX
|
||||
MOV RCX,U64 SF_ARG2[RBP] //argc
|
||||
@@05: MOV RCX,U64 SF_ARG2[RBP] //argc
|
||||
SHL RCX,3
|
||||
ADD RSP,RCX
|
||||
XOR RAX,RAX
|
||||
POP RDI
|
||||
POP RSI
|
||||
POP RBP
|
||||
@@ -381,8 +381,7 @@ _CALLEXTNUM::
|
||||
POP RBP
|
||||
RET
|
||||
|
||||
@@05: XOR RAX,RAX
|
||||
MOV RCX,U64 SF_ARG2[RBP] //argc
|
||||
@@05: MOV RCX,U64 SF_ARG2[RBP] //argc
|
||||
SHL RCX,3
|
||||
ADD RSP,RCX
|
||||
POP RDI
|
||||
@@ -411,7 +410,7 @@ _CALLEXTSTR::
|
||||
|
||||
TEST U32 CHash.type[RAX],HTT_FUN
|
||||
JZ @@05
|
||||
MOV RAX,U64 CHashFun.executable_addr[RAX]
|
||||
MOV RAX,U64 CHashFun.exe_addr[RAX]
|
||||
JMP @@10
|
||||
@@05: MOV RAX,U64 CHashExport.val[RAX]
|
||||
@@10: TEST RAX,RAX
|
||||
|
||||
+1063
-1047
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -1,5 +1,5 @@
|
||||
//Compile this by calling $LK,"MakeOSDrvBootInstall",A="MN:MakeOSDrvBootInstall"$().
|
||||
//Don't do it directly. See $LK,"Cmp(\"/Kernel/Kernel\")",A="FF:::/Adam/Opt/Boot/BootIns.CPP,Cmp(\"/Kernel/Kernel\""$.
|
||||
//Compile this by calling $LK,"BootHDIns",A="MN:BootHDIns"$().
|
||||
//Don't do it directly. See $LK,"Cmp(\"/Kernel/Kernel\")",A="FF:::/Adam/Opt/Boot/BootHDIns.CPP,Cmp(\"/Kernel/Kernel\""$.
|
||||
|
||||
#exe {
|
||||
Cd(__DIR__);;
|
||||
|
||||
+27
-10
@@ -858,7 +858,7 @@ public class CHashFun:CHashClass
|
||||
CHashClass *return_class;
|
||||
U32 arg_cnt,pad,
|
||||
used_reg_mask,clobbered_reg_mask;
|
||||
U8 *executable_addr;
|
||||
U8 *exe_addr;
|
||||
CExternUsage *ext_lst;
|
||||
};
|
||||
|
||||
@@ -2025,11 +2025,11 @@ class CCodeCtrl
|
||||
#define __DATE__ #exe{StreamPrint("\"%D\"",Now);}
|
||||
#define __TIME__ #exe{StreamPrint("\"%T\"",Now);}
|
||||
#define __LINE__ #exe{StreamPrint("%d",\
|
||||
Fs->last_lex->lex_include_stk->line_num);}
|
||||
#define __CMD_LINE__ #exe{StreamPrint("%d",Fs->last_lex->flags&CCF_CMD_LINE &&\
|
||||
Fs->last_lex->lex_include_stk->depth<2);}
|
||||
Fs->last_cc->lex_include_stk->line_num);}
|
||||
#define __CMD_LINE__ #exe{StreamPrint("%d",Fs->last_cc->flags&CCF_CMD_LINE &&\
|
||||
Fs->last_cc->lex_include_stk->depth<2);}
|
||||
#define __FILE__ #exe{StreamPrint("\"%s\"",\
|
||||
Fs->last_lex->lex_include_stk->full_name);}
|
||||
Fs->last_cc->lex_include_stk->full_name);}
|
||||
#define __DIR__ #exe{StreamDir;}
|
||||
|
||||
#define LFSF_DOC 1
|
||||
@@ -2296,6 +2296,7 @@ public class CATARep
|
||||
#define BLK_SIZE_BITS 9
|
||||
#define BLK_SIZE (1<<BLK_SIZE_BITS)
|
||||
#define DVD_BLK_SIZE (4*BLK_SIZE)
|
||||
#define DVD_BOOT_LOADER_SIZE DVD_BLK_SIZE*1
|
||||
#define INVALID_CLUSTER (-1)
|
||||
|
||||
class CMBRPrt
|
||||
@@ -2628,9 +2629,10 @@ public class CDirEntry
|
||||
#define BDT_NULL 0
|
||||
#define BDT_RAM 1
|
||||
#define BDT_ATA 2
|
||||
#define BDT_FILE 3
|
||||
#define BDT_ATAPI 4
|
||||
#define BDT_NUM_TYPES 5
|
||||
#define BDT_FILE_READ 3
|
||||
#define BDT_FILE_WRITE 4
|
||||
#define BDT_ATAPI 5
|
||||
#define BDT_NUM_TYPES 6
|
||||
|
||||
#define BDF_REMOVABLE 0x001
|
||||
#define BDF_INITIALIZED 0x002
|
||||
@@ -3386,7 +3388,8 @@ U0 pad;#assert $$==offset(CTaskDying.wake_jiffy)
|
||||
CHashTable *hash_table;
|
||||
|
||||
CSrvCtrl srv_ctrl;
|
||||
CCmpCtrl *next_lex,*last_lex;
|
||||
CCmpCtrl *next_cc,*last_cc;
|
||||
CHashFun *last_fun;
|
||||
|
||||
I64 win_old_left,win_old_right,win_old_top,win_old_bottom;
|
||||
|
||||
@@ -3889,7 +3892,7 @@ public class CDbgGlbls
|
||||
#define BOOT_SRC_HARDDRV 3
|
||||
#define BOOT_SRC_DVD 4
|
||||
|
||||
// $LK,"Auto",A="MN:Auto"$("") StdIn for call to $LK,"MakeOSDrvBootInstall",A="MN:MakeOSDrvBootInstall"$().
|
||||
// $LK,"Auto",A="MN:Auto"$("") StdIn for call to $LK,"BootHDIns",A="MN:BootHDIns"$().
|
||||
#define STD_DISTRO_DVD_CFG "Tb\nScale2Mem(2048,0x40000)\nt \n\n\n\n"
|
||||
|
||||
#help_index "Misc/Registry"
|
||||
@@ -3911,4 +3914,18 @@ class CProgress
|
||||
U8 desc[PROGRESS_DESC_LEN];
|
||||
};
|
||||
|
||||
#help_index "Char/Operations"
|
||||
#define SPF_PAD_ZERO 0x001
|
||||
#define SPF_LEFT_JUSTIFY 0x002
|
||||
#define SPF_TRUNCATE 0x004
|
||||
#define SPF_COMMA 0x008
|
||||
#define SPF_DOLLAR 0x010
|
||||
#define SPF_SLASH 0x020
|
||||
#define SPF_QUESTION 0x040
|
||||
#define SPF_AUX_FMT_NUM 0x080
|
||||
#define SPF_DECIMAL 0x100
|
||||
#define SPF_NEG 0x200
|
||||
#define SPF_NEG_E 0x400
|
||||
#define SPF_NEG_AUX_FMT_NUM 0x800
|
||||
|
||||
#help_index ""
|
||||
+1
-1
@@ -45,7 +45,7 @@ public _extern _CALL I64 Call(U8 *machine_code); //Call addr with no args.
|
||||
public _extern _CALLEXTSTR I64 CallExtStr(
|
||||
/*argpop*/ U8 *name,...); //Search sym table for fun and pass it args.
|
||||
//Can have any fixed number of arguments.
|
||||
public _extern _CALLIND I64 CallInd(
|
||||
public _extern _CALL_IND I64 CallInd(
|
||||
/*argpop*/I64 (*fp_addr)(...),...); //Call with fixed number of args.
|
||||
|
||||
#help_index "Call/System Extern Num"
|
||||
|
||||
+9
-9
@@ -195,7 +195,6 @@ public extern U0 S(U8 *ip=INVALID_PTR,CTask *task=NULL);
|
||||
#help_index "Debugging/Debugger;DolDoc/Cmd Line (Typically);"\
|
||||
"Cmd Line (Typically);Help System"
|
||||
public extern Bool Man(U8 *st,I64 edf_dof_flags=0);
|
||||
|
||||
#help_index "Debugging/Dump"
|
||||
public extern U0 CallerRep(U8 **rbp=NULL,CTask *task=NULL);
|
||||
public extern U0 D(U8 *addr,I64 cnt=0x80,Bool show_offset=TRUE);
|
||||
@@ -327,7 +326,7 @@ extern I64 FileAttr(U8 *name,I64 old_attr=0);
|
||||
public extern CBlkDev *BlkDevChk(CBlkDev *bd,Bool except=TRUE);
|
||||
public extern U0 BlkDevDel(CBlkDev *bd);
|
||||
public extern Bool BlkDevLock(CBlkDev *bd);
|
||||
public extern CBlkDev *BlkDevNextFree(U8 first_drv_let,I64 type);
|
||||
public extern CBlkDev *BlkDevNextFreeSlot(U8 first_drv_let,I64 type);
|
||||
public extern Bool BlkDevUnlock(CBlkDev *bd,Bool rst=FALSE);
|
||||
public extern U0 BlkDevsRelease();
|
||||
public extern I64 Cluster2Blk(CDrv *dv,I64 c);
|
||||
@@ -339,9 +338,9 @@ public extern U8 Drv2Let(CDrv *dv=NULL);
|
||||
public extern CDrv *DrvChk(CDrv *dv,Bool except=TRUE);
|
||||
public extern U0 DrvDel(CDrv *dv);
|
||||
public extern Bool DrvLock(CDrv *dv);
|
||||
public extern CDrv *DrvMakeFree(U8 drv_let);
|
||||
public extern CDrv *DrvMakeFreeSlot(U8 drv_let);
|
||||
public extern U8 *DrvModelNum(U8 drv_let=0);
|
||||
public extern CDrv *DrvNextFree(U8 first_drv_let='C');
|
||||
public extern U8 DrvNextFreeLet(U8 first_drv_let='C');
|
||||
public extern U8 *DrvSerialNum(U8 drv_let=0);
|
||||
public extern U8 DrvTextAttrGet(U8 drv_let=0);
|
||||
public extern Bool DrvUnlock(CDrv *dv,Bool rst=FALSE);
|
||||
@@ -394,6 +393,7 @@ extern U0 (*fp_set_std_palette)();
|
||||
public extern U8 *Color2Str(U8 *buf,CColorROPU32 c);
|
||||
public extern CColorROPU16 Str2ColorU16(U8 *st);
|
||||
public extern CColorROPU32 Str2ColorU32(U8 *st);
|
||||
|
||||
#help_index "Hash"
|
||||
#help_file "::/Doc/Hash"
|
||||
public _extern _HASH_ADD U0 HashAdd(CHash *temph,CHashTable *table);
|
||||
@@ -668,21 +668,21 @@ public extern U0 WinDerivedValsUpdate(CTask *task=NULL);
|
||||
#help_file "::/Doc/TaskSrv"
|
||||
|
||||
#help_index "Task/Srv/Exe"
|
||||
public extern I64 Adam(U8 *fmt,...);
|
||||
public extern U0 AdamErr(U8 *fmt,...);
|
||||
public extern U0 AdamLog(U8 *fmt,...);
|
||||
public extern I64 PopUp(U8 *buf,CTask *parent=NULL,CTask **_pu_task=NULL);
|
||||
public extern I64 PopUpPrint(U8 *fmt,...);
|
||||
public extern I64 ExeCmdLine(CCmpCtrl *cc);
|
||||
public extern U0 SrvCmdDel(CSrvCmd *tempc);
|
||||
extern U0 SrvCmdLine();
|
||||
public extern I64 SrvCmdsHandler(I64 run_flags,CTask *task=NULL);
|
||||
public extern U0 SrvTaskCont();
|
||||
public extern CSrvCmd *TaskExe(CTask *srv,CTask *master,U8 *data,I64 flags);
|
||||
public extern U0 TaskRstAwaitingMsg(CTask *task=NULL);
|
||||
public extern U0 UserTaskCont();
|
||||
|
||||
#help_index "Task/Srv/Exe;Compiler"
|
||||
public extern I64 ExeCmdLine(CCmpCtrl *cc);
|
||||
public extern U0 UserTaskCont();
|
||||
public extern I64 Adam(U8 *fmt,...);
|
||||
public extern I64 PopUp(U8 *buf,CTask *parent=NULL,CTask **_pu_task=NULL);
|
||||
public extern I64 PopUpPrint(U8 *fmt,...);
|
||||
|
||||
#help_index "Task/Srv/Exe;MultiCore"
|
||||
public extern I64 JobResGet(CSrvCmd *rqst=NULL);
|
||||
|
||||
@@ -181,7 +181,7 @@ I64 BIOSTotalMem()
|
||||
|
||||
I64 Scale2Mem(I64 min,I64 max,I64 limit=2*1024*1024*1024)
|
||||
{//Helps pick DiskCache and RAMDisk sizes.
|
||||
//Can be used in $LK,"MakeOSDrvBootInstall",A="MN:MakeOSDrvBootInstall"$() config scripts.
|
||||
//Can be used in $LK,"BootHDIns",A="MN:BootHDIns"$() config scripts.
|
||||
I64 i;
|
||||
if (sys_data_bp)
|
||||
i=sys_data_bp->alloced_u8s;
|
||||
|
||||
+5
-5
@@ -375,7 +375,7 @@ sch_done:
|
||||
}
|
||||
|
||||
I64 PopUp(U8 *buf,CTask *parent=NULL,CTask **_pu_task=NULL)
|
||||
{//Execute code text in PopUp win task.
|
||||
{//Execute code in $LK,"PopUp",A="MN:PopUp"$ task.
|
||||
I64 res;
|
||||
CSrvCmd *tempc;
|
||||
CTask *task=Spawn(&SrvCmdLine,NULL,"Servant",,parent);
|
||||
@@ -396,7 +396,7 @@ I64 PopUp(U8 *buf,CTask *parent=NULL,CTask **_pu_task=NULL)
|
||||
}
|
||||
|
||||
I64 PopUpPrint(U8 *fmt,...)
|
||||
{//Execute code text in PopUp win task.
|
||||
{//Execute code in $LK,"PopUp",A="MN:PopUp"$ task.
|
||||
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
|
||||
I64 res;
|
||||
res=PopUp(buf,Fs);
|
||||
@@ -405,7 +405,7 @@ I64 PopUpPrint(U8 *fmt,...)
|
||||
}
|
||||
|
||||
I64 Adam(U8 *fmt,...)
|
||||
{//Sends text to the adam task which gets compiled and run.
|
||||
{//Make adam_task execute code.
|
||||
I64 res;
|
||||
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
|
||||
CSrvCmd *tempc;
|
||||
@@ -422,7 +422,7 @@ I64 Adam(U8 *fmt,...)
|
||||
}
|
||||
|
||||
U0 AdamLog(U8 *fmt,...)
|
||||
{//Sends text to the adam task which gets displayed.
|
||||
{//Display text in adam_task.
|
||||
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
|
||||
if (Fs==adam_task)
|
||||
"%s",buf;
|
||||
@@ -432,7 +432,7 @@ U0 AdamLog(U8 *fmt,...)
|
||||
}
|
||||
|
||||
U0 AdamErr(U8 *fmt,...)
|
||||
{//Sends text to the adam task which gets displayed as red and blinking.
|
||||
{//Display red blinking Err text in adam_task.
|
||||
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv),
|
||||
*st=MStrPrint(ST_ERR_ST "%s",buf);
|
||||
if (Fs==adam_task)
|
||||
|
||||
+2
-21
@@ -1,16 +1,3 @@
|
||||
#define SPF_PAD_ZERO 0x001
|
||||
#define SPF_LEFT_JUSTIFY 0x002
|
||||
#define SPF_TRUNCATE 0x004
|
||||
#define SPF_COMMA 0x008
|
||||
#define SPF_DOLLAR 0x010
|
||||
#define SPF_SLASH 0x020
|
||||
#define SPF_QUESTION 0x040
|
||||
#define SPF_AUX_FMT_NUM 0x080
|
||||
#define SPF_DECIMAL 0x100
|
||||
#define SPF_NEG 0x200
|
||||
#define SPF_NEG_E 0x400
|
||||
#define SPF_NEG_AUX_FMT_NUM 0x800
|
||||
|
||||
U0 SPutChar(U8 **_dst,U8 ch,U8 **_buf)
|
||||
{
|
||||
I64 i;
|
||||
@@ -425,19 +412,13 @@ to avoid this.
|
||||
case 'p':
|
||||
if (cur_arg>=argc)
|
||||
throw('StrPrint');
|
||||
if (flags&SPF_TRUNCATE)
|
||||
StrPrintFunSeg(temp_buf,argv[cur_arg++],len);
|
||||
else
|
||||
StrPrintFunSeg(temp_buf,argv[cur_arg++],0);
|
||||
StrPrintFunSeg(temp_buf,argv[cur_arg++],len,flags);
|
||||
OutStr(temp_buf,_buf,_dst,len,flags);
|
||||
break;
|
||||
case 'P':
|
||||
if (cur_arg>=argc)
|
||||
throw('StrPrint');
|
||||
if (flags&SPF_TRUNCATE)
|
||||
StrPrintFunSeg(temp_buf,argv[cur_arg],len);
|
||||
else
|
||||
StrPrintFunSeg(temp_buf,argv[cur_arg],0);
|
||||
StrPrintFunSeg(temp_buf,argv[cur_arg],len,flags);
|
||||
if (!IsRaw || !_buf) {
|
||||
StrPrint(temp_buf2,"$$LK,\"%s\",A=\"AD:0x%X\"$$",
|
||||
temp_buf,argv[cur_arg]);
|
||||
|
||||
Reference in new issue
Block a user