Browse Source

TempleOSCD_160707.ISO

v6
Terry A. Davis 6 years ago committed by minexew
parent
commit
c5954d3371
  1. BIN
      0000Boot/0000Kernel.BIN.C
  2. 16
      Adam/ABlkDev/Mount.CPP
  3. 4
      Adam/ADefine.CPP
  4. 7
      Adam/Gr/GrDC.CPP
  5. 68
      Adam/Gr/GrSpritePlot.CPP
  6. 4
      Adam/Opt/Boot/DskISORedSea.CPP
  7. 2
      Adam/Opt/Utils/FileBMP.CPP
  8. BIN
      Apps/AfterEgypt/Battle.CPP
  9. BIN
      Apps/AfterEgypt/HorebA.CPP
  10. BIN
      Apps/AfterEgypt/Quail.CPP
  11. BIN
      Apps/AfterEgypt/WaterRock.CPP
  12. 2
      Apps/KeepAway/KeepAway.CPP
  13. 2
      Apps/Logic/Logic.CPP
  14. 2
      Apps/Psalmody/PsalmodyDraw.CPP
  15. 14
      Apps/TimeOut/TimeOut.CPP
  16. BIN
      Compiler/Compiler.BIN
  17. 8
      Demo/AcctExample/PersonalNotes.TXT
  18. 32
      Demo/AcctExample/Registry.CPP
  19. 2
      Demo/AcctExample/TOSCfg.CPP
  20. BIN
      Demo/Games/BattleLines.CPP
  21. BIN
      Demo/Games/BlackDiamond.CPP
  22. BIN
      Demo/Games/BomberGolf.CPP
  23. 2
      Demo/Games/CastleFrankenstein.CPP
  24. 465
      Demo/Games/EagleDive.CPP
  25. BIN
      Demo/Games/FlapBat.CPP
  26. 2
      Demo/Games/FlatTops.CPP
  27. 4
      Demo/Games/Varoom.CPP
  28. 7
      Demo/Games/Wenceslas.CPP
  29. BIN
      Demo/Graphics/Camp.CPP
  30. BIN
      Demo/Graphics/Elephant.CPP
  31. BIN
      Demo/Graphics/Mountain.CPP
  32. BIN
      Demo/Graphics/Pick3D.CPP
  33. BIN
      Demo/Graphics/WallPaperFish.CPP
  34. 6
      Demo/ToHtmlToTXTDemo/DemoInPage.TXT
  35. 12
      Doc/ChangeLog.TXT
  36. 6
      Doc/Charter.TXT
  37. 19
      Doc/Credits.TXT
  38. 6
      Doc/Demands.TXT
  39. 9
      Doc/FAQ.TXT
  40. 2
      Doc/GuideLines.TXT
  41. 6
      Doc/HolyC.TXT
  42. 4
      Doc/Install.TXT
  43. 2
      Doc/Quirks.TXT
  44. 6
      Doc/StdTempleOSPC.TXT
  45. 2
      Doc/TOSZ.TXT
  46. 2
      Doc/Tips.TXT
  47. 27
      Doc/Welcome.TXT
  48. 2
      Kernel/BlkDev/DskATA.CPP
  49. 8
      Kernel/BlkDev/DskAddDev.CPP
  50. 8
      Kernel/BlkDev/DskBlk.CPP
  51. 6
      Kernel/BlkDev/DskBlkDev.CPP
  52. 8
      Kernel/BlkDev/DskDrv.CPP
  53. 4
      Kernel/Kernel.MAP
  54. 4
      Kernel/KernelA.HPP
  55. 1
      Kernel/KernelC.HPP

BIN
0000Boot/0000Kernel.BIN.C

Binary file not shown.

16
Adam/ABlkDev/Mount.CPP

@ -15,8 +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$$P$$FG$$ are file read drives.\n"
"$$GREEN$$Q$$FG$$-$$GREEN$$S$$FG$$ are file write drives.\n"
"$$GREEN$$M$$FG$$-$$GREEN$$P$$FG$$ are ISO file read drives.\n"
"$$GREEN$$Q$$FG$$-$$GREEN$$S$$FG$$ are ISO 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);
@ -36,11 +36,11 @@ 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_WRITE:
case BDT_ISO_FILE_WRITE:
"Blks of 512 bytes:";
GetS(blks_buf,STR_LEN);
break;
case BDT_FILE_READ:
case BDT_ISO_FILE_READ:
filename=GetStr("File Name:");
break;
case BDT_ATA:
@ -84,11 +84,11 @@ I64 Mount2(U8 boot_drv_let,CDoc *_doc,Bool repartition)
case BDT_RAM:
if (!*addr_buf) StrCpy(addr_buf,"0");
DocPrint(doc,"bd->RAM_dsk=%s;\n",addr_buf);
case BDT_FILE_WRITE:
case BDT_ISO_FILE_WRITE:
if (!*blks_buf) StrCpy(blks_buf,"0");
DocPrint(doc,"bd->max_blk=(%s)-1;\n",blks_buf);
break;
case BDT_FILE_READ:
case BDT_ISO_FILE_READ:
filename2=FileNameAbs(filename);
DocPrint(doc,"bd->file_dsk_name=AStrNew(\"%s\");\n",filename2);
DocPrint(doc,"bd->drv_offset=19<<2+"
@ -137,8 +137,8 @@ public U0 Unmount(U8 drv_let=0)
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);
CDrv *dv=DrvMakeFreeSlot(DrvNextFreeLet('M')); //First $LK,"BDT_ISO_FILE_READ",A="MN:BDT_ISO_FILE_READ"$
CBlkDev *bd=BlkDevNextFreeSlot(dv->drv_let,BDT_ISO_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);

4
Adam/ADefine.CPP

@ -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","121,194");
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","81,057");
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","121,410");
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","81,046");
$ID,-4$
DefinePrint("DD_KERNEL","%08X",bfh);
bfh(I64)+=bfh->file_size-1;

7
Adam/Gr/GrDC.CPP

@ -226,17 +226,18 @@ public I64 DCSize(CDC *dc)
return 0;
}
public U0 DCDepthBufRst(CDC *dc)
public I32 *DCDepthBufRst(CDC *dc)
{//Reset device context depth buf to far away.
if (dc->depth_buf)
MemSetU32(dc->depth_buf,MAX_I32,dc->width_internal*dc->height);
return dc->depth_buf;
}
public U0 DCDepthBufAlloc(CDC *dc)
public I32 *DCDepthBufAlloc(CDC *dc)
{//Alloc a 32-bit depth buffer for device context.
Free(dc->depth_buf);
dc->depth_buf=MAlloc(dc->width_internal*dc->height*sizeof(I32),dc->mem_task);
DCDepthBufRst(dc);
return DCDepthBufRst(dc);
}
public CDC *DCCopy(CDC *dc,CTask *task=NULL)

68
Adam/Gr/GrSpritePlot.CPP

@ -26,7 +26,7 @@ public U0 Sprite3(CDC *dc=gr.dc,I64 x,I64 y,I64 z,U8 *elems,
I32 *ptr;
CColorROPU32 old_color=dc->color;
CDC *img;
CD3I32 *p;
CD3I32 *p,*p2;
CGrSym old_sym;
MemCpy(&old_sym,&dc->sym,sizeof(CGrSym));
if (dc->flags & DCF_LOCATE_NEAREST) {
@ -173,47 +173,39 @@ public U0 Sprite3(CDC *dc=gr.dc,I64 x,I64 y,I64 z,U8 *elems,
}
break;
start:
p=&tempg->nu.u;
for (i=0;i<tempg->nu.num;i++,p++) {
p->x+=x;
p->y+=y;
p->z+=z;
p2=p=MAlloc(tempg->nu.num*sizeof(CD3I32));
MemCpy(p,&tempg->nu.u,tempg->nu.num*sizeof(CD3I32));
for (i=0;i<tempg->nu.num;i++,p2++) {
p2->x+=x;
p2->y+=y;
p2->z+=z;
}
case SPT_BSPLINE2:
Gr2BSpline3(dc,&tempg->nu.u,tempg->nu.num,FALSE);
Gr2BSpline3(dc,p,tempg->nu.num,FALSE);
break;
case SPT_BSPLINE3:
Gr3BSpline3(dc,&tempg->nu.u,tempg->nu.num,FALSE);
Gr3BSpline3(dc,p,tempg->nu.num,FALSE);
break;
case SPT_BSPLINE2_CLOSED:
Gr2BSpline3(dc,&tempg->nu.u,tempg->nu.num,TRUE);
Gr2BSpline3(dc,p,tempg->nu.num,TRUE);
break;
case SPT_BSPLINE3_CLOSED:
Gr3BSpline3(dc,&tempg->nu.u,tempg->nu.num,TRUE);
Gr3BSpline3(dc,p,tempg->nu.num,TRUE);
break;
end:
p=&tempg->nu.u;
for (i=0;i<tempg->nu.num;i++,p++) {
p->x-=x;
p->y-=y;
p->z-=z;
}
Free(p);
break;
case SPT_MESH:
p=&tempg->mu.u;
for (i=0;i<tempg->mu.vertex_cnt;i++,p++) {
p->x+=x;
p->y+=y;
p->z+=z;
p2=p=MAlloc(tempg->mu.vertex_cnt*sizeof(CD3I32));
MemCpy(p,&tempg->mu.u,tempg->mu.vertex_cnt*sizeof(CD3I32));
for (i=0;i<tempg->mu.vertex_cnt;i++,p2++) {
p2->x+=x;
p2->y+=y;
p2->z+=z;
}
Gr3Mesh(dc,tempg->mu.vertex_cnt,&tempg->mu.u,tempg->mu.tri_cnt,
Gr3Mesh(dc,tempg->mu.vertex_cnt,p,tempg->mu.tri_cnt,
(&tempg->mu.u)(U8 *)+sizeof(CD3I32)*tempg->mu.vertex_cnt);
p=&tempg->mu.u;
for (i=0;i<tempg->mu.vertex_cnt;i++,p++) {
p->x-=x;
p->y-=y;
p->z-=z;
}
Free(p);
break;
case SPT_SHIFTABLE_MESH:
if (dc->flags&DCF_TRANSFORMATION) {
@ -228,20 +220,16 @@ public U0 Sprite3(CDC *dc=gr.dc,I64 x,I64 y,I64 z,U8 *elems,
y1=tempg->pmu.y+y;
z1=tempg->pmu.z+z;
}
p=&tempg->pmu.u;
for (i=0;i<tempg->pmu.vertex_cnt;i++,p++) {
p->x+=x1;
p->y+=y1;
p->z+=z1;
p2=p=MAlloc(tempg->pmu.vertex_cnt*sizeof(CD3I32));
MemCpy(p,&tempg->pmu.u,tempg->pmu.vertex_cnt*sizeof(CD3I32));
for (i=0;i<tempg->pmu.vertex_cnt;i++,p2++) {
p2->x+=x1;
p2->y+=y1;
p2->z+=z1;
}
Gr3Mesh(dc,tempg->pmu.vertex_cnt,&tempg->pmu.u,tempg->pmu.tri_cnt,
Gr3Mesh(dc,tempg->pmu.vertex_cnt,p,tempg->pmu.tri_cnt,
(&tempg->pmu.u)(U8 *)+sizeof(CD3I32)*tempg->pmu.vertex_cnt);
p=&tempg->pmu.u;
for (i=0;i<tempg->pmu.vertex_cnt;i++,p++) {
p->x-=x1;
p->y-=y1;
p->z-=z1;
}
Free(p);
if (dc->flags&DCF_TRANSFORMATION) {
dc->x-=tempg->pmu.x;
dc->y-=tempg->pmu.y;

4
Adam/Opt/Boot/DskISORedSea.CPP

@ -131,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=DrvMakeFreeSlot(DrvNextFreeLet('Q')); //First $LK,"BDT_FILE_WRITE",A="MN:BDT_FILE_WRITE"$
CBlkDev *bd=BlkDevNextFreeSlot(dv->drv_let,BDT_FILE_WRITE);
CDrv *dv=DrvMakeFreeSlot(DrvNextFreeLet('Q')); //First $LK,"BDT_ISO_FILE_WRITE",A="MN:BDT_ISO_FILE_WRITE"$
CBlkDev *bd=BlkDevNextFreeSlot(dv->drv_let,BDT_ISO_FILE_WRITE);
if (!_iso_filename)
_iso_filename=blkdev.dft_iso_filename;

2
Adam/Opt/Utils/FileBMP.CPP

@ -327,7 +327,7 @@ public U0 DocBMP(CDoc *doc=NULL,U8 *filename,Bool dither_probability=FALSE,
Bool use_ms_paint_palette=FALSE)
{//Put a BMP file into a document as a sprite.
CDC *dc=BMPRead(filename,dither_probability,use_ms_paint_palette);
CSprite *elems=DC2Sprite(dc);
U8 *elems=DC2Sprite(dc);
DocSprite(doc,elems);
Free(elems);
DCDel(dc);

BIN
Apps/AfterEgypt/Battle.CPP

Binary file not shown.

BIN
Apps/AfterEgypt/HorebA.CPP

Binary file not shown.

BIN
Apps/AfterEgypt/Quail.CPP

Binary file not shown.

BIN
Apps/AfterEgypt/WaterRock.CPP

Binary file not shown.

2
Apps/KeepAway/KeepAway.CPP

@ -159,7 +159,7 @@ $BG,14$
$BG$class Frame
{
CSprite *img[2];
U8 *img[2];
F64 dt;
};

2
Apps/Logic/Logic.CPP

@ -69,7 +69,7 @@ U8 *gate_type_lst="NULL\0OUTPUT\0INPUT\0"
#define MAX_SEL_GATES 128
CSprite *imgs[GT_NUM_ENTRIES]={NULL,NULL,NULL,
U8 *imgs[GT_NUM_ENTRIES]={NULL,NULL,NULL,
$IB,"<NOT>",BI=1$,$IB,"<AND>",BI=2$,$IB,"<OR>",BI=3$,$IB,"<NAND>",BI=4$,$IB,"<NOR>",BI=5$,$IB,"<XOR>",BI=6$,$IB,"<AND3>",BI=7$,$IB,"<OR3>",BI=8$,$IB,"<NAND3>",BI=9$,$IB,"<NOR3>",BI=10$};
I64 num_inputs_entered,num_outputs_entered;

2
Apps/Psalmody/PsalmodyDraw.CPP

@ -53,7 +53,7 @@ $ID,-8$
F64 psm_durations[PSM_NUM_DURATIONS+1]={
2*.25/3,.25,2*.5/3,.5,2.0/3.0,0.5*1.5,1.0,1.5,2.0,3.0,4.0,6.0,1000000.0};
U8 *psm_duration_lst="st\0s\0et\0e\0qt\0e.\0q\0q.\0h\0h.\0w\0w.\0";
CSprite *psm_duration_imgs[PSM_NUM_DURATIONS]={$IB,"<1>",BI=1$,$IB,"<1>",BI=1$,$IB,"<2>",BI=2$,
U8 *psm_duration_imgs[PSM_NUM_DURATIONS]={$IB,"<1>",BI=1$,$IB,"<1>",BI=1$,$IB,"<2>",BI=2$,
$IB,"<2>",BI=2$,$IB,"<3>",BI=3$,$IB,"<2>",BI=2$,$IB,"<3>",BI=3$,$IB,"<3>",BI=3$,
$IB,"<4>",BI=4$,$IB,"<4>",BI=4$,$IB,"<5>",BI=5$,$IB,"<5>",BI=5$};
Bool psm_triplet_durations[PSM_NUM_DURATIONS]={TRUE,FALSE,TRUE,

14
Apps/TimeOut/TimeOut.CPP

@ -55,7 +55,7 @@ $BG,14$
CSprite *friendly_imgs[4]={$IB,"<3>",BI=3$,$IB,"<2>",BI=2$,$IB,"<3>",BI=3$,$IB,"<4>",BI=4$};
U8 *friendly_imgs[4]={$IB,"<3>",BI=3$,$IB,"<2>",BI=2$,$IB,"<3>",BI=3$,$IB,"<4>",BI=4$};
@ -75,7 +75,7 @@ CSprite *friendly_imgs[4]={$IB,"<3>",BI=3$,$IB,"<2>",BI=2$,$IB,"<3>",BI=3$,$IB,"
CSprite *friendly_hacking_imgs[4]={$IB,"<6>",BI=6$,$IB,"<5>",BI=5$,$IB,"<6>",BI=6$,$IB,"<7>",BI=7$};
U8 *friendly_hacking_imgs[4]={$IB,"<6>",BI=6$,$IB,"<5>",BI=5$,$IB,"<6>",BI=6$,$IB,"<7>",BI=7$};
@ -92,7 +92,7 @@ CSprite *friendly_hacking_imgs[4]={$IB,"<6>",BI=6$,$IB,"<5>",BI=5$,$IB,"<6>",BI=
CSprite *enemy_imgs[4]={$IB,"<9>",BI=9$,$IB,"<8>",BI=8$,$IB,"<9>",BI=9$,$IB,"<10>",BI=10$};
U8 *enemy_imgs[4]={$IB,"<9>",BI=9$,$IB,"<8>",BI=8$,$IB,"<9>",BI=9$,$IB,"<10>",BI=10$};
@ -112,7 +112,7 @@ CSprite *enemy_imgs[4]={$IB,"<9>",BI=9$,$IB,"<8>",BI=8$,$IB,"<9>",BI=9$,$IB,"<10
CSprite *enemy_hacking_imgs[4]={$IB,"<12>",BI=12$,$IB,"<11>",BI=11$,$IB,"<12>",BI=12$,$IB,"<13>",BI=13$};
U8 *enemy_hacking_imgs[4]={$IB,"<12>",BI=12$,$IB,"<11>",BI=11$,$IB,"<12>",BI=12$,$IB,"<13>",BI=13$};
@ -155,7 +155,7 @@ CSprite *enemy_hacking_imgs[4]={$IB,"<12>",BI=12$,$IB,"<11>",BI=11$,$IB,"<12>",B
$BG$
CSprite *landscape_imgs[LANDSCAPE_TYPES]=
U8 *landscape_imgs[LANDSCAPE_TYPES]=
{$IB,"<tree>",BI=14$,$IB,"<rock>",BI=15$,$IB,"<mountain>",BI=16$,$IB,"<castle>",BI=17$};
#define MAX_LANDSCAPE 64
@ -173,7 +173,7 @@ U0 MPDrawMen(CDC *dc2)
I64 i,r[16],lo=Gs->num*MAX_MAN/mp_cnt,hi=(Gs->num+1)*MAX_MAN/mp_cnt,
yy,phase,scroll_y=MAP_HEIGHT-100-100*(tS-t0);
Man *tempm;
CSprite *temps,**_temps;
U8 *temps,**_temps;
F64 tt,ts=tS;
for (i=lo;i<hi;i++) {
@ -215,7 +215,7 @@ U0 DrawIt(CTask *task,CDC *dc)
F64 tt,ts=tS;
Man *tempm;
Bullet *tempb;
CSprite *temps;
U8 *temps;
for (i=0;i<MAX_LANDSCAPE;i++) {
yy=(ls[i].y-scroll_y)&(MAP_HEIGHT-1);

BIN
Compiler/Compiler.BIN

Binary file not shown.

8
Demo/AcctExample/PersonalNotes.TXT

@ -48,8 +48,6 @@ $WW,1$$FG,5$$TX+CX,"TODO"$$FG$
* $LK,"::/Demo/Games/FlatTops.CPP"$ is torpedo, not bombs.
* $LK,"::/Demo/Games/EagleDive.CPP"$ foreground clipping issues.
* Reset MPs with $LK,"Core0StartMP",A="MN:Core0StartMP"$() after boot. Free old task memory?
* Use pen_width and pen_height when clipping with pen_width>1.
@ -69,7 +67,7 @@ $WW,1$$FG,5$$TX+CX,"TODO"$$FG$
* Change %h*c so the character is not a arg?
* $LK,"GrLineFat3",A="MN:GrLineFat3"$() needs work.
* $LK,"GrLineFat3",A="MN:GrLineFat3"$() needs a little work.
$FG,5$$TX+CX,"TODO? Meh"$$FG$
@ -406,13 +404,13 @@ Moses gets Aaron $TX,"Exodus 4:10-16",HTML="http://www.biblegateway.com/passag
There is no council against the Lord $TX,"Proverbs 21:30",HTML="http://www.biblegateway.com/verse/en/Proverbs%2021:30"$
Human help is worthless $TX,"Psalm 108:12",HTML="http://www.biblegateway.com/verse/en/Psalm%20108:12"$
Do not seek your own wealth $TX,"1 Corinthians 10:24",HTML="http://www.biblegateway.com/verse/en/1%20Corinthians%2010:24"$
The stone rejected is conrerstone $TX,"Matthew 21:42",HTML="http://www.biblegateway.com/verse/en/Matthew%2021:42"$
The stone rejected is cornerstone $TX,"Matthew 21:42",HTML="http://www.biblegateway.com/verse/en/Matthew%2021:42"$
New wineskins $TX,"Mark 2:22",HTML="http://www.biblegateway.com/verse/en/Mark%202:22"$
$FG,5$$TX+CX,"Misc Notes"$$FG$
Intel CEO's name: Brian Krzanich
>$FG,2$lspci -v$FG$
Size:$TX,"17408 KB",D="DD_TEMPLEOSCD_K_SIZE"$
Size:$TX,"17412 KB",D="DD_TEMPLEOSCD_K_SIZE"$
$FG,5$$TX+CX,"My Web Bookmarks"$$FG$$WW,0$
$TX,"My FireFox Bookmarks",HTML="http://www.templeos.org/Wb/Home/Downloads/Blog/Bookmarks"$

32
Demo/AcctExample/Registry.CPP

@ -10,40 +10,40 @@ $ID,-2$$TR,"CircleTrace"$
$ID,2$F64 best_score=4.9425;
$ID,-2$$TR,"DiningStars"$
$ID,2$F64 best_score=9999.0000;
$ID,-2$$TR,"DunGen"$
$ID,2$F64 best_score=20.5295;
$ID,-2$$TR,"Staff"$
$ID,2$#define PERSONAL_INITIALS "TAD"
#define MACHINE_CFG 0
$ID,-2$$TR,"RawHide"$
$ID,2$F64 best_score=96.1279;
$ID,-2$$TR,"BlackDiamond"$
$ID,2$I64 best_score=9;
$ID,-2$$TR,"DunGen"$
$ID,2$F64 best_score=20.5295;
$ID,-2$$TR,"ZoneOut"$
$ID,2$F64 best_score=8.1373;
$ID,-2$$TR,"Varoom"$
$ID,2$F64 best_score=46.2643;
$ID,-2$$TR,"FlapBat"$
$ID,2$F64 best_score=16.4090;
$ID,-2$$TR,"Wenceslas"$
$ID,2$F64 best_score=43.9944;
$ID,-2$$TR,"BomberGolf"$
$ID,2$I64 best_score=175;
$ID,-2$$TR,"TimeOut"$
$ID,2$I64 best_score=22202;
$ID,-2$$TR,"ZoneOut"$
$ID,2$F64 best_score=8.1373;
$ID,-2$$TR,"RawHide"$
$ID,2$F64 best_score=96.1279;
$ID,-2$$TR,"KeepAway"$
$ID,2$I64 best_score0=68,best_score1=30;
$ID,-2$$TR,"Varoom"$
$ID,2$F64 best_score=46.2643;
$ID,-2$$TR,"CastleFrankenstein"$
$ID,2$F64 best_score=33.8405;
$ID,-2$$TR,"XCaliber"$
$ID,2$I64 best_score=248;
I64 msg_flags=1;
$ID,-2$$TR,"Wenceslas"$
$ID,2$F64 best_score=43.9944;
$ID,-2$$TR,"BomberGolf"$
$ID,2$I64 best_score=175;
$ID,-2$$TR,"CastleFrankenstein"$
$ID,2$F64 best_score=33.8405;
$ID,-2$$TR,"EagleDive"$
$ID,2$I64 best_score=8;
$ID,-2$$ID,-2$$TR,"DemoCompany"$
$ID,2$
$TR,"Game1"$
$ID,2$F64 best_score=166.57305;
$ID,2$F64 best_score=168.87967;
$TR,"SimpleVal"$
$ID,2$1329;
$ID,2$1330;
$ID,-2$$ID,-2$

2
Demo/AcctExample/TOSCfg.CPP

@ -68,6 +68,6 @@ U0 TOSInit()
#define TOS_DVD_CFG "Tb\n0x20000\nt \n\n\nAutoMountIDE\nCT\n"
#define TOS_DVD_DBG_CFG "A" CFG_BOOT_RESCUE_DRV\
"b\nScale2Mem(2048,0x40000)\n\n\n"\
"DontProbe\nBootRescueDrv\n"\
"NoMP\nTextMode\nDontProbe\nBootRescueDrv\n"\
"C:" CFG_BOOT_RESCUE_DRV_FILE "\n"\
CFG_BOOT_RESCUE_DRV_START "\n\n"

BIN
Demo/Games/BattleLines.CPP

Binary file not shown.

BIN
Demo/Games/BlackDiamond.CPP

Binary file not shown.

BIN
Demo/Games/BomberGolf.CPP

Binary file not shown.

2
Demo/Games/CastleFrankenstein.CPP

@ -141,7 +141,7 @@ U0 DrawIt(CTask *task,CDC *dc)
c,x1w,y1w,x1h,y1h,xh,yh,zh,
cx=task->pix_width/2,
cy=task->pix_height/2;
CSprite *temps;
U8 *temps;
F64 tt;
CD3I32 poly[4];
Monster *tempm;

465
Demo/Games/EagleDive.CPP

File diff suppressed because one or more lines are too long

BIN
Demo/Games/FlapBat.CPP

Binary file not shown.

2
Demo/Games/FlatTops.CPP

@ -154,7 +154,7 @@ $SP,"<5>",BI=5$
$SP,"<6>",BI=6$
$BG$
CSprite *imgs[NUM_PLAYERS][OT_NUM_TYPES]={{$IB,"<1>",BI=1$,$IB,"<2>",BI=2$,$IB,"<3>",BI=3$},{$IB,"<4>",BI=4$,$IB,"<5>",BI=5$,$IB,"<6>",BI=6$}};
U8 *imgs[NUM_PLAYERS][OT_NUM_TYPES]={{$IB,"<1>",BI=1$,$IB,"<2>",BI=2$,$IB,"<3>",BI=3$},{$IB,"<4>",BI=4$,$IB,"<5>",BI=5$,$IB,"<6>",BI=6$}};
U0 DrawIt(CTask *task,CDC *dc)
{

4
Demo/Games/Varoom.CPP

@ -129,7 +129,7 @@ class Car
{
CD3I32 p;
F64 é,,speed;
CSprite *img;
U8 *img;
Track *t;
} c[NUM_CARS];
@ -563,7 +563,7 @@ U0 AnimateTask(I64)
}
}
CSprite *imgs[8]={$IB,"<1>",BI=1$,$IB,"<1>",BI=1$,$IB,"<2>",BI=2$,$IB,"<2>",BI=2$,$IB,"<3>",BI=3$,$IB,"<4>",BI=4$,$IB,"<4>",BI=4$,$IB,"<4>",BI=4$};
U8 *imgs[8]={$IB,"<1>",BI=1$,$IB,"<1>",BI=1$,$IB,"<2>",BI=2$,$IB,"<2>",BI=2$,$IB,"<3>",BI=3$,$IB,"<4>",BI=4$,$IB,"<4>",BI=4$,$IB,"<4>",BI=4$};
U0 InitBushes()

7
Demo/Games/Wenceslas.CPP

@ -83,8 +83,8 @@ RegExeBranch("TempleOS/Wenceslas");
$SP,"<11>",BI=11$
CSprite *king_imgs[4]={$IB,"<2>",BI=2$,$IB,"<1>",BI=1$,$IB,"<2>",BI=2$,$IB,"<3>",BI=3$};
CSprite *peasant_imgs[4]={$IB,"<5>",BI=5$,$IB,"<4>",BI=4$,$IB,"<5>",BI=5$,$IB,"<6>",BI=6$};
U8 *king_imgs[4]={$IB,"<2>",BI=2$,$IB,"<1>",BI=1$,$IB,"<2>",BI=2$,$IB,"<3>",BI=3$};
U8 *peasant_imgs[4]={$IB,"<5>",BI=5$,$IB,"<4>",BI=4$,$IB,"<5>",BI=5$,$IB,"<6>",BI=6$};
#define NUM_TREES 8
@ -121,8 +121,7 @@ class Step
U0 DrawIt(CTask *task,CDC *dc)
{
I64 r[16],i,w=task->pix_width,h=task->pix_height,x,y;
U8 *img;
CSprite *temps;
U8 *img,*temps;
Step *tempst;
Peasant *tempp;
F64 tt;

BIN
Demo/Graphics/Camp.CPP

Binary file not shown.

BIN
Demo/Graphics/Elephant.CPP

Binary file not shown.

BIN
Demo/Graphics/Mountain.CPP

Binary file not shown.

BIN
Demo/Graphics/Pick3D.CPP

Binary file not shown.

BIN
Demo/Graphics/WallPaperFish.CPP

Binary file not shown.

6
Demo/ToHtmlToTXTDemo/DemoInPage.TXT

@ -44,6 +44,6 @@ $HC,"<object width=\"640\" height=\"520\"><param name=\"movie\" value=\"http://w
I wrote all $LK,"118,851",A="FF:~/Web/LineRep.TXT,Kernel.PRJ",D="DD_TEMPLEOS_LOC"$ lines of TempleOS over the last $TX,"12.5",D="DD_TEMPLEOS_AGE"$ years, full-time, including the 64-bit compiler. It was called, at various times, "$FG,4$$TX,"Hoppy",HTML="http://web.archive.org/web/*/http://www.simstructure.hare.com/*"$$FG$", "$FG,4$$TX,"The J Operating System",HTML="http://wayback.archive.org/web/*/http://www.justrighteous.org/*"$$FG$", "$FG,4$$TX,"LoseThos",HTML="http://web.archive.org/web/*/http://www.losethos.com/*"$$FG$" and "$FG,4$$TX,"SparrowOS",HTML="http://web.archive.org/web/*/http://www.sparrowos.com/*"$$FG$". Here are my $FG,4$$TX,"college transcripts",HTML="http://www.templeos.org/files/ASU_Transcripts.pdf"$$FG$. I've been a professional operating system developer since 1990 when I was hired to work on Ticketmaster's VAX OS.
$FG,8$
* "Commodore 64" was a trademark of Commodore Business Machines.
* "Linux" is probably a trademark owned by Linus Torvalds.
* "Windows" and "DOS" are trademark of MicroSoft Corp.
* "Commodore 64" was a trademark owned by Commodore Business Machines.
* "Linux" is a trademark owned by Linus Torvalds.
* "Windows" and "DOS" are trademarks owned by MicroSoft Corp.

12
Doc/ChangeLog.TXT

@ -2,7 +2,13 @@ $WW,1$$FG,5$$TX+CX,"Change Log"$$FG$
Use $LK,"R",A="MN:R"$() to rename if I change a label.
$IV,1$----07/04/16 14:13:54----$IV,0$
$IV,1$----07/07/16 00:41:12----$IV,0$
$IV,1$----07/06/16 23:45:30----$IV,0$
* Fixed multicore bug in $LK,"Sprite3",A="MN:Sprite3"$().
* Improved $LK,"::/Demo/Games/EagleDive.CPP"$.
$IV,1$----07/05/16 06:03:47----$IV,0$
* $BK,1$TempleOS version 4.09 Released$BK,0$
* Improved $LK,"::/Demo/Games/EagleDive.CPP"$.
* Improved $LK,"GrFillTri0",A="MN:GrFillTri0"$().
@ -10,7 +16,7 @@ $IV,1$----07/04/16 14:13:54----$IV,0$
$IV,1$----07/03/16 04:30:05----$IV,0$
* Added $LK,"Unmount",A="MN:Unmount"$().
* Made BootLoader mandatory in $LK,"RedSeaISO",A="MN:RedSeaISO"$().
* Added $LK,"BDT_FILE_READ",A="MN:BDT_FILE_READ"$.
* Added $LK,"BDT_ISO_FILE_READ",A="MN:BDT_ISO_FILE_READ"$.
$IV,1$----07/01/16 05:29:08----$IV,0$
* Made underscore mandatory on $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ callable asm functions.
@ -67,7 +73,7 @@ $IV,1$----05/23/16 01:30:28----$IV,0$
* $LK,"R",A="MN:R"$("ISOFileCreate","$LK,"ISO9660ISO",A="MN:ISO9660ISO"$");
$IV,1$----05/19/16 02:16:09----$IV,0$
* Added $LK,"BDT_FILE_WRITE",A="MN:BDT_FILE_WRITE"$.
* Added $LK,"BDT_ISO_FILE_WRITE",A="MN:BDT_ISO_FILE_WRITE"$.
$IV,1$----05/17/16 07:16:38----$IV,0$
* Worked on compiler $LK,"CICArg",A="MN:CICArg"$.a1_type_pointed_to.

6
Doc/Charter.TXT

@ -62,9 +62,9 @@ $ID,-5$
* $FG,4$No multimedia$FG$. Sounds and images will be primarily calculated in real-time, not fetched from storage.
$FG,8$
* "Commodore 64" was a trademark of Commodore Business Machines.
* "The Simpsons" is a trademark of Fox.
* "Windows" is a trademark of MicroSoft Corp.
* "Commodore 64" was a trademark owned by Commodore Business Machines.
* "The Simpsons" is a trademark owned by Fox.
* "Windows" is a trademark owned by MicroSoft Corp.
$FG$

19
Doc/Credits.TXT

@ -1,6 +1,6 @@
$WW,1$$FG,5$$TX+CX,"Credits"$$FG$
I, $FG,2$Terry A. Davis$FG$, wrote all $TX,"120,268",D="DD_TEMPLEOS_LOC"$ lines of TempleOS over the past $TX,"12.9",D="DD_TEMPLEOS_AGE"$ years (full-time). It can run on some bare metal 64-bit PC's from about 2005-2010 with no layering, libraries, tools, modules or anything from other sources. Otherwise, you run it in a virtual machine, like $FG,2$VMware$FG$, $FG,2$QEMU$FG$ or $FG,2$VirtualBox$FG$. It is independent and stands alone. It has no networking, so it certainly doesn't call home. 100% of the src code is including on all distro's, from the kernel to the compiler to the boot loaders! It is public domain, not GPL.
I, $FG,2$Terry A. Davis$FG$, wrote all $TX,"121,193",D="DD_TEMPLEOS_LOC"$ lines of TempleOS over the past $TX,"12.9",D="DD_TEMPLEOS_AGE"$ years (full-time). It can run on some bare metal 64-bit PC's from about 2005-2010 with no layering, libraries, tools, modules or anything from other sources. Otherwise, you run it in a virtual machine, like $FG,2$VMware$FG$, $FG,2$QEMU$FG$ or $FG,2$VirtualBox$FG$. It is independent and stands alone. It has no networking, so it certainly doesn't call home. 100% of the src code is including on all distro's, from the kernel to the compiler to the boot loaders! It is public domain, not GPL.
*) $LK,"::/Kernel/FontStd.CPP"$, is taken from $FG,4$$TX,"FreeDOS",HTML="http://www.freedos.org"$$FG$. It's public domain.
@ -49,12 +49,13 @@ I, $FG,2$Terry A. Davis$FG$, wrote all $TX,"120,268",D="DD_TEMPLEOS_LOC"$ lines
*) The random number generator is from Donald Knuth in the wikipedia entry for $TX,"Linear_congruential_generator",HTML="http://en.wikipedia.org/wiki/Linear_congruential_generator"$.
$FG,8$
* "MSDOS", "Windows", "MovieMaker" "MS Paint" and "FAT32" are trademarks of MicroSoft Corp.
* "SiteBuilder" is a trademark of Yahoo! Inc.
* "MagicISO" is a trademark of MagicISO Corp.
* "MATLAB" is a trademark of The Math Works, Inc.
* "$TX,"FreeDOS",HTML="http://www.freedos.org"$" is a trademark of Jim Hall.
* "VAX" is a trademark of Digital Equipment Corp.
* "Linux" is probably a trademark owned by Linus Torvalds.
* "VAXTMOS" is a trademark of Ticketmaster.
* "MSDOS", "Windows", "MovieMaker", "MS Paint" and "FAT32" are trademarks owned by MicroSoft Corp.
* "SiteBuilder" is a trademark owned by Yahoo! Inc.
* "MagicISO" is a trademark owned by MagicISO Corp.
* "MATLAB" is a trademark owned by The Math Works, Inc.
* "$TX,"FreeDOS",HTML="http://www.freedos.org"$" is a trademark owned by Jim Hall.
* "QEMU" is a trademark owned by Fabrice Bellard.
* "VAX" is a trademark owned by Digital Equipment Corp.
* "Linux" is a trademark owned by Linus Torvalds.
* "VAXTMOS" is a trademark owned by Ticketmaster.
$FG$

6
Doc/Demands.TXT

@ -48,6 +48,6 @@ $LK,"::/Kernel/Mem/PageTables.CPP"$ :135 lines to identity-map gets eliminated.
* We will make a $LK,"Standard TempleOS PC",A="FI:::/Doc/StdTempleOSPC.TXT"$.
$FG,8$
* "VMware" is a trademark of VMware, Inc.
* "Linux" is probably a trademark owned by Linus Torvalds.
* "Windows" and "Paint" are trademarks of MicroSoft Corp.$FG$
* "VMware" is a trademark owned by VMware, Inc.
* "Linux" is a trademark owned by Linus Torvalds.
* "Windows" and "Paint" are trademarks owned by MicroSoft Corp.$FG$

9
Doc/FAQ.TXT

@ -88,8 +88,9 @@ $ID,-2$$TR,"Why does it finds files that aren't there?"$
$ID,2$If not found, $FG,2$.Z$FG$ is added or removed from filename and a search is done again. If a file is still not found, the parent directories are searched for a file of the same name.
$ID,-2$
$FG,8$
* "Windows" is a trademark of MicroSoft Corp.
* "Linux" is probably a trademark owned by Linus Torvalds.
* "VMware" is a trademark of VMware, Inc.
* "VirtualBox" is a trademark of Oracle.
* "Windows" is a trademark owned by MicroSoft Corp.
* "Linux" is a trademark owned by Linus Torvalds.
* "QEMU" is a trademark owned by Fabrice Bellard.
* "VMware" is a trademark owned by VMware, Inc.
* "VirtualBox" is a trademark owned by Oracle.
$FG$

2
Doc/GuideLines.TXT

@ -130,4 +130,4 @@ $FG$
* RAX holds function return values, of course.
$FG,8$
* "MagicISO" is a trademark of MagicISO Corp.
* "MagicISO" is a trademark owned by MagicISO Corp.

6
Doc/HolyC.TXT

@ -131,12 +131,12 @@ $ID,2$$FG,2$I64 i;
for (i=0;i<10;i++)
switch (i) {
case 0: "Zero "; break;
case 2: "Two "; break;
case 2: "Two "; break;
case 4: "Four "; break;
start:
"[";
case 1: "One"; break;
case 3: "Three"; break;
case 3: "Three";break;
case 5: "Five"; break;
end:
"] ";
@ -251,7 +251,7 @@ $ID,2$$FG,2$U0 Main()
{
I16 i1;
I32 j1;
j1=i1=0x12345678; //Resing i1 is 0x5678 but j1 is 0x12345678
j1=i1=0x12345678; //Resulting i1 is 0x5678 but j1 is 0x12345678
I64 i2=0x8000000000000000;
Print("%X\n",i2>>1); //Res is 0xC000000000000000 as expected

4
Doc/Install.TXT

@ -44,6 +44,6 @@ If you have anti-virus software, it might object to having a different master bo
$ID,-2$
$FG,8$
* "Windows" is a trademark of MicroSoft Corp.
* "Linux" is probably a trademark owned by Linus Torvalds.
* "Windows" is a trademark owned by MicroSoft Corp.
* "Linux" is a trademark owned by Linus Torvalds.
$FG$

2
Doc/Quirks.TXT

@ -42,6 +42,6 @@ $FG,2$$ID,2$$ID,2$U0 Main()
U16 *_w=0xA0000;
*_w|=0x8000;
}
$ID,-2$$FG$The $FG,2$|=$FG$ will be coded as a $FG,2$U32 Bts$FG$ inst resing in a $FG,2$U32$FG$ access instead of a $FG,2$U16$FG$ access. This affects some hardware operations.
$ID,-2$$FG$The $FG,2$|=$FG$ will be coded as a $FG,2$U32 Bts$FG$ inst resulting in a $FG,2$U32$FG$ access instead of a $FG,2$U16$FG$ access. This affects some hardware operations.
$ID,-2$
* Compiler warning or error message line numbers will be off if you have a block of word-wrapped comments. You might press $FG,2$<CTRL-t>$FG$ before doing an editor goto-line-number command.

6
Doc/StdTempleOSPC.TXT

@ -81,6 +81,6 @@ $HC,"<object width=\"640\" height=\"520\"><param name=\"movie\" value=\"http://w
I thought 2.5' x 1.5' x 1.5' was ridiculously big, but it looks like it is reasonable for super-cooled refrigeration systems!
$FG,8$
* "Commodore 64" was a trademark of Commodore Business Machines.
* "Linux" is probably a trademark owned by Linus Torvalds.
* "Windows" is a trademark of MicroSoft Corp.$FG$
* "Commodore 64" was a trademark owned by Commodore Business Machines.
* "Linux" is a trademark owned by Linus Torvalds.
* "Windows" is a trademark owned by MicroSoft Corp.$FG$

2
Doc/TOSZ.TXT

@ -6,5 +6,5 @@ $FG,2$TOSZ [-ascii] filename$FG$
Will uncompress a single file from within Linux. The $FG,2$-ascii$FG$ flag will convert the irregular TempleOS ASCII 5 and ASCII 31 characters to spaces. (ASCII 5 is used to mark the cursor pos and ASCII 31 is used for shifted space characters and will cause problems unless you convert them.)
$FG,8$
* "Linux" is probably a trademark owned by Linus Torvalds.
* "Linux" is a trademark owned by Linus Torvalds.
$FG$

2
Doc/Tips.TXT

@ -148,5 +148,5 @@ $FG,2$Merge(\"C:/*\",\"D:/*\",\"+r+d\");$FG$ to check my changes.
* The first line of the $MA-X+PU,"Psalmody",LM="#include \"::/Apps/Psalmody/Run\"\n"$ $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ song files is a comment with a category recognized by $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CPP,JukeBox"$(). The categories are $FG,2$"no nothing"$FG$, $FG,2$"has words"$FG$, $FG,2$"has graphics"$FG$, or $FG,2$"special"$FG$. The third character in the song comment is a digit rating number, shown in $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CPP,JukeBox"$(). You can set the song rating in $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CPP,JukeBox"$() by pressing $FG,2$0$FG$-$FG,2$9$FG$. You can press $FG,2$<DELETE>$FG$ to delete songs.
$FG,8$
* "Linux" is probably a trademark owned by Linus Torvalds.
* "Linux" is a trademark owned by Linus Torvalds.
$FG$

27
Doc/Welcome.TXT

@ -7,19 +7,19 @@ $ID,2$* Professionals doing hobby projects
* Teenagers doing projects
* Non-professional, older-persons projects
$ID,-2$
Simplicity is a goal to $LK,"keep the line count down",A="FI:::/Doc/Strategy.TXT"$, so it's easy to tinker with. As it turns-out, simplicity makes it faster in some ways, too. It never switches privilege levels, never changes address maps, tends to load whole contiguous files and other, similar things which boost speed. It's only $TX,"80,120",D="DD_TEMPLEOS_LOC_OFFICIAL"$ lines of code including the kernel, the 64-bit compiler, the graphics library and all the tools. More importantly, it's designed to keep the user's line count down -- you can do a $LK,"Hello World",A="FI:::/Doc/HelloWorld.TXT"$ application in one line of code and can put graphics on the screen with a three line program!
Simplicity is a goal to $LK,"keep the line count down",A="FI:::/Doc/Strategy.TXT"$, so it's easy to tinker with. As it turns-out, simplicity makes it faster in some ways, too. It never switches privilege levels, never changes address maps, tends to load whole contiguous files and other, similar things which boost speed. It's only $TX,"81,056",D="DD_TEMPLEOS_LOC_OFFICIAL"$ lines of code including the kernel, the 64-bit compiler, the graphics library and all the tools. More importantly, it's designed to keep the user's line count down -- you can do a $LK,"Hello World",A="FI:::/Doc/HelloWorld.TXT"$ application in one line of code and can put graphics on the screen with a three line program!
It's a kayak, not a Titanic -- it will crash if you do something wrong. You quickly reboot, however. DOS and the 8-bit home computers of the 80's worked fine without memory protection and most computers in the world -- the embedded ones -- operate without protection. The resing simplicity of no protections is why TempleOS has value. In facts, that's the point of TempleOS. See the $LK,"TempleOS Charter",A="FI:::/Doc/Charter.TXT"$.
It's a kayak, not a Titanic -- it will crash if you do something wrong. You quickly reboot, however. DOS and the 8-bit home computers of the 80's worked fine without memory protection and most computers in the world -- the embedded ones -- operate without protection. The resulting simplicity of no protections is why TempleOS has value. In facts, that's the point of TempleOS. See the $LK,"TempleOS Charter",A="FI:::/Doc/Charter.TXT"$.
Conventional thinking is "failure is not an option" for general purpose operating systems. Since this OS is used in addition to Windows or Linux, however, failure is an option -- just use Windows if you can't do something. I cherry-pick what it will and won't do to make it maximally beautiful.
Conventional thinking is "failure is not an option" for general purpose operating systems. Since this OS is used in addition to Windows or Linux, however, failure is an option -- just use Windows or Linux if you can't do something. I cherry-pick what it will and won't do to make it maximally beautiful.
Two things to know about TempleOS are that $UL,1$tasks$UL,0$ have $LK,"MAlloc",A="MN:MAlloc"$/$LK,"Free",A="MN:Free"$ heap memory, not applications, and tasks have compiler symbol tables that persist at a scope like environment variables in other operating systems, and the symbols can include functions.
In other operating systems, I hated learning one language for command line scripts and another for programming. With $FG,2$TempleOS$FG$, the command line feeds right into the $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ compiler, line by line, and it places code into memory it $LK,"MAlloc",A="MN:MAlloc"$()s. The compiler is paused at the command line, waiting for input. Naturally, you $FG,2$#include$FG$ a program to load it into memory and, usually, start it.
For other operating systems, I hated learning one language for command line scripts and another for programming. With $FG,2$TempleOS$FG$, the command line feeds right into the $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ compiler, line by line, and it places code into memory it $LK,"MAlloc",A="MN:MAlloc"$()s. The compiler is paused at the command line, waiting for input. Naturally, you $FG,2$#include$FG$ a program to load it into memory and, usually, start it.
During the boot process, many files get $LK,"compiled",A="FI:::/StartOS.CPP"$ before you have access to the command line. (Don't worry, booting takes only a couple of seconds.) All the header declarations for the operating system are compiled and are available for use in your programs without needing to $FG,2$#include $FG$them. Everything is truly compiled to native $FG,2$$TX,"x86_64",HTML="http://en.wikipedia.org/wiki/Amd64#AMD64"$$FG$ machine code, nothing is $FG,2$interpreted$FG$ and there is no $FG,2$byte code$FG$.
During the boot process, many files get $LK,"compiled",A="FI:::/StartOS.CPP"$ before you have access to the command line. (Don't worry, booting takes only two seconds.) All the header declarations for the operating system are compiled and are available for use in your programs without needing to $FG,2$#include $FG$them. Everything is truly compiled to native $FG,2$$TX,"x86_64",HTML="http://en.wikipedia.org/wiki/Amd64#AMD64"$$FG$ machine code, nothing is $FG,2$interpreted$FG$ and there is no $FG,2$byte code$FG$.
Stmts at the global scope -- outside the scope of functions -- execute immediately. There is no $FG,2$main()$FG$ function. Instead, you give meaningful names to what would be $FG,2$main()$FG$ functions and you invoke them by calling them with a stmt in the global scope, usually at the bottom of your file.
Statements at the global scope -- outside the scope of functions -- execute immediately. There is no $FG,2$main()$FG$ function. Instead, you give meaningful names to what would be $FG,2$main()$FG$ functions and you invoke them by calling them with a statement in the global scope, usually at the bottom of your file.
I started with $FG,2$C$FG$ syntax, but didn't like the command line for a directory listing looking like this:
@ -33,7 +33,7 @@ $FG$I didn't like that, so I made parentheses optional on calls with no args and
>$FG,2$Dir;$FG$
The syntax change created an ambiguity when specifying function addresses. To resolve it, I made a '$FG,2$&$FG$' required in front of function names when specifying an address of a function, which is better anyway.
The syntax change created an ambiguity when specifying function addresses, like for calling $LK,"QSort",A="MN:QSort"$(). To resolve it, I made a '$FG,2$&$FG$' required in front of function names when specifying an address of a function, which is better anyway.
Once I was no longer using standard C/C++ syntax, I decided to change everything I didn't like and call it $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$. Here are the new $LK,"operator precedence",A="FF:::/Doc/HolyC.TXT,operator precedence"$ rules. It's Biblical! See $LK,"Luke,5:37",A="BF:Luke,5:37"$.
@ -57,7 +57,7 @@ In $FG,2$TempleOS$FG$, $LK,"Adam Task",A="FF:::/Doc/Glossary.TXT,Adam Task"$$FG$
For easy back-ups, place everything you author in your $FG,2$/Home$FG$ directory and subdirectories. Then, use $LK,"CopyTree",A="MN:CopyTree"$(). That should make upgrading easy, too. Customizable start-up scripts go in your $FG,2$/Home$FG$ directory. The default start-up scripts are in the root directory. Copy the start-up files you wish to customize into $FG,2$/Home$FG$ and modify them. See $LK,"Home Files",A="FF:::/Doc/GuideLines.TXT,/Home Files"$. You can make your own distro that includes everything and is a bootable live CD with $LK,"::/Misc/DoDistro.CPP"$.
Typically, your usage pattern through the day will be repeatedly left or right clicking on filenames in a cmd line $LK,"Dir",A="MN:Dir"$() listing. You left-click files to edit them and right-click to $FG,2$#include$FG$ them. To begin a project, type $LK,"Ed",A="MN:Ed"$("filename");, supplying a filename. You can also run programs with $FG,2$<F5>$FG$ when in the editor. $FG,2$<ESC>$FG$ to save and exit the file. You'll need to do a new $LK,"Dir",A="MN:Dir"$() cmd, periodically, so make a macro on your PersonalMenu. Access your PersonalMenu by pressing $FG,2$<CTRL-m>$FG$, cursoring until you are on top of it and pressing $FG,2$<SPACE>$FG$.
Typically, your usage pattern through the day will be repeatedly left or right clicking on filenames in a cmd line $LK,"Dir",A="MN:Dir"$() listing. You left-click files to edit them and right-click to $FG,2$#include$FG$ them. To begin a project, type $LK,"Ed",A="MN:Ed"$("filename");, supplying a filename. You can also run programs with $FG,2$<F5>$FG$ when in the editor. $FG,2$<ESC>$FG$ to save and exit the file. You'll need to do a new $LK,"Dir",A="MN:Dir"$() cmd, periodically, so make a macro on your PersonalMenu. Access your PersonalMenu by pressing $FG,2$<CTRL-m>$FG$, cursoring until you are on top of it and pressing $FG,2$<SPACE>$FG$.
$FG,2$<CTRL-t>$FG$ toggles plain text mode, showing format commands, a little like viewing html code.
$FG,2$<CTRL-l>$FG$ inserts a text widgets.
@ -73,6 +73,7 @@ $FG,2$<ALT-h>$FG$ horizontally tiles windows.
The $FG,2$ALT$FG$ keys are defined in $LK,"~/HomeKeyPlugIns.CPP"$. You can customize them.
$FG,2$<CTRL-ALT-t>$FG$ new terminal window.
$FG,2$$FG,2$<CTRL-ALT-n>$FG$ switches to the next window.
$FG,2$<CTRL-ALT-x>$FG$ kills a window.
$LK,"Find",A="MN:Find"$() is your best friend. There's a wrapper function called $LK,"F",A="MN:F"$() in your $FG,2$~/HomeWrappers.CPP.Z$FG$ file. Feel free to make wrapper functions for functions you use often and customize the args. By the way, $LK,"Find",A="MN:Find"$() or $LK,"R",A="MN:R"$() can be used to replace strings across multiple files. You can access $LK,"Find",A="MN:Find"$() using $FG,2$<CTRL-SHIFT-f>$FG$.
@ -81,10 +82,14 @@ As you browse code, use the $FG,2$AutoComplete$FG$ window to look-up functions,
Use the $LK,"Help & Index",A="FI:::/Doc/HelpIndex.TXT"$ or $LK,"Demo Index",A="FI:::/Doc/DemoIndex.TXT"$ to find-out what exists. Press $FG,2$<F1>$FG$ for help or use the links on your menu ($FG,2$<CTRL-m>$FG$). Also, look in the $FG,2$/Demo$FG$ or $FG,2$/Apps$FG$ directories for inspiration.
3rd parties can make TempleOS software. It will be distributed as $LK,"RedSea ISO Files",A="MN:RedSeaISO"$. Burn a CD/DVD, or in a $FG,2$QEMU$FG$$FG$, $FG,2$VMware$FG$ or $FG,2$VirtualBox$FG$, set your CD/DVD to point to the ISO file. Then, access the $FG,2$'T'$FG$ drive. Or, $LK,"Mount",A="MN:Mount"$() the ISO file and access the $FG,2$'M'$FG$ drive. Ideally, do not install applications such as games onto your hard drive because we wish to keep hard drive usage low, so the whole $FG,2$'C'$FG$ drive can quickly be copied to $FG,2$'D'$FG$. Also, the $LK,"FileMgr",A="MN:FileMgr"$() starts too slowly with lots of hard drive files.
$MA-X+PU,"Take Tour",LM="User(\"Cd(\\\"::/Misc/Tour\\\");;AutoFile(\\\"Tour\\\");\n\");"$
$FG,8$
* "Linux" is probably a trademark owned by Linus Torvalds.
* "Windows" is a trademark of MicroSoft Corp.
$FG$
* "Linux" is a trademark owned by Linus Torvalds.
* "Windows" is a trademark owned by MicroSoft Corp.
* "QEMU" is a trademark owned by Fabrice Bellard.
* "VMware" is a trademark owned by VMware, Inc.
* "VirtualBox" is a trademark owned by Oracle.
$FG$$FG$

2
Kernel/BlkDev/DskATA.CPP

@ -229,7 +229,7 @@ I64 ATAReadNativeMax(CBlkDev *bd,F64 timeout)
res.u8[4]=InU8(bd->base0+ATAR0_LCYL);
res.u8[5]=InU8(bd->base0+ATAR0_HCYL);
if (res>>24==res&0xFFFFFF) {//Kludge to make qemu-kvm work
if (res>>24==res&0xFFFFFF) {//Kludge to make QEMU work
bd->flags&=~BDF_EXT_SIZE;
res&=0xFFFFFF;
}

8
Kernel/BlkDev/DskAddDev.CPP

@ -5,8 +5,8 @@ U0 BlkDevLockFwdingSet(CBlkDev *bd)
switch (bd->type) {
case BDT_RAM:
break;
case BDT_FILE_READ:
case BDT_FILE_WRITE:
case BDT_ISO_FILE_READ:
case BDT_ISO_FILE_WRITE:
bd->lock_fwding=Let2BlkDev(*bd->file_dsk_name);
break;
case BDT_ATA:
@ -41,8 +41,8 @@ I64 BlkDevAdd(CBlkDev *bd,Bool one_drv,Bool make_free)
dv->size=bd->max_blk+1-bd->drv_offset;
switch (bd->type) {
case BDT_RAM:
case BDT_FILE_READ:
case BDT_FILE_WRITE:
case BDT_ISO_FILE_READ:
case BDT_ISO_FILE_WRITE:
dv->dv_signature=DRV_SIGNATURE_VAL;
dv->fs_type=FSt_REDSEA;
//This is to force creation of a RAM

8
Kernel/BlkDev/DskBlk.CPP

@ -47,8 +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_READ:
case BDT_FILE_WRITE:
case BDT_ISO_FILE_READ:
case BDT_ISO_FILE_WRITE:
FRBlks(bd->file_dsk,buf,blk,cnt);
break;
case BDT_ATA:
@ -87,8 +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_READ:
case BDT_FILE_WRITE:
case BDT_ISO_FILE_READ:
case BDT_ISO_FILE_WRITE:
FWBlks(bd->file_dsk,buf,blk,cnt);
break;
case BDT_ATA:

6
Kernel/BlkDev/DskBlkDev.CPP

@ -50,7 +50,7 @@ Bool BlkDevInit(CBlkDev *bd)
RedSeaFmt(bd->first_drv_let);
res=TRUE;
break;
case BDT_FILE_READ:
case BDT_ISO_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);
@ -66,7 +66,7 @@ Bool BlkDevInit(CBlkDev *bd)
}
}
break;
case BDT_FILE_WRITE:
case BDT_ISO_FILE_WRITE:
if (!bd->file_dsk_name) {
StrPrint(buf,"%C:/Drv%C.DRV.C",
blkdev.boot_drv_let,bd->first_drv_let);
@ -136,7 +136,7 @@ CBlkDev *BlkDevNextFreeSlot(U8 first_drv_let,I64 type)
case BDT_RAM:
res->flags&=~BDF_READ_CACHE;
break;
case BDT_FILE_READ:
case BDT_ISO_FILE_READ:
res->flags|=BDF_READ_ONLY;
break;
case BDT_ATAPI:

8
Kernel/BlkDev/DskDrv.CPP

@ -166,9 +166,9 @@ I64 Let2BlkDevType(U8 drv_let)
if ('C'<=drv_let<='L')
return BDT_ATA;
if ('M'<=drv_let<='P')
return BDT_FILE_READ;
return BDT_ISO_FILE_READ;
if ('Q'<=drv_let<='S')
return BDT_FILE_WRITE;
return BDT_ISO_FILE_WRITE;
if ('T'<=drv_let<='Z')
return BDT_ATAPI;
return BDT_NULL;
@ -259,7 +259,7 @@ Bool Drv(U8 drv_let)
if (bd->flags & BDF_REMOVABLE && !(bd->flags & BDF_INITIALIZED))
ChgDsk(Drv2Let(dv));
if (bd->type==BDT_RAM ||
bd->type==BDT_FILE_READ || bd->type==BDT_FILE_WRITE)
bd->type==BDT_ISO_FILE_READ || bd->type==BDT_ISO_FILE_WRITE)
BlkDevInit(bd);
}
Fs->cur_dv=dv;
@ -354,7 +354,7 @@ U0 DrvRep()
" Serial#:%s\n",st;
Free(st);
}
if (bd->type==BDT_FILE_READ || bd->type==BDT_FILE_WRITE)
if (bd->type==BDT_ISO_FILE_READ || bd->type==BDT_ISO_FILE_WRITE)
" File=\"%s\"\n",bd->file_dsk_name;
" %016X-%016X\n$$FG$$$$BG$$",dv->drv_offset,dv->drv_offset+dv->size-1;
}

4
Kernel/Kernel.MAP

@ -1585,7 +1585,6 @@ $LK,"_MEMSET",A="FL:::/Kernel/KUtils.CPP.Z,3"$
$LK,"ROP_COLLISION",A="FL:::/Kernel/KernelA.HPP,2943"$
$LK,"TK_PLUS_PLUS",A="FL:::/Kernel/KernelA.HPP,2078"$
$LK,"sys_heap_init_val",A="FL:::/Kernel/KernelB.HPP,181"$
$LK,"BDT_FILE_WRITE",A="FL:::/Kernel/KernelA.HPP,2633"$
$LK,"MemVGAAlloc",A="FL:::/Kernel/Mem/MemPhysical.CPP.Z,156",BI=355$
$LK,"DOCEF_DEREF_DATA",A="FL:::/Kernel/KernelA.HPP,1011"$
$LK,"VGAP_REG_WRITE",A="FL:::/Kernel/KernelA.HPP,3737"$
@ -1748,7 +1747,6 @@ $LK,"SUF_REM_LEADING",A="FL:::/Kernel/KernelA.HPP,3793"$
$LK,"OPTf_USE_IMM64",A="FL:::/Kernel/KernelA.HPP,1547"$
$LK,"Raw",A="FL:::/Kernel/KMisc.CPP.Z,238",BI=396$
$LK,"Msg",A="FL:::/Kernel/SrvCmd.CPP.Z,257",BI=397$
$LK,"BDT_FILE_READ",A="FL:::/Kernel/KernelA.HPP,2632"$
$LK,"OPTf_GLBLS_ON_DATA_HEAP",A="FL:::/Kernel/KernelA.HPP,1544"$
$LK,"KbdInit",A="FL:::/Kernel/SerialDev/Keyboard.CPP.Z,424",BI=398$
$LK,"chars_bmp_zero_tab_ff_cr_nl_cursor_dollar",A="FL:::/Kernel/StrA.CPP.Z,368"$
@ -2121,6 +2119,7 @@ $LK,"MBS_USED_SIGNATURE_VAL",A="FL:::/Kernel/KernelA.HPP,2856"$
$LK,"HeapCtrlDel",A="FL:::/Kernel/Mem/HeapCtrl.CPP.Z,15",BI=471$
$LK,"_CALLEXTSTR",A="FL:::/Kernel/KUtils.CPP.Z,392"$
$LK,"FF_USE_OLD_DATETIME",A="FL:::/Kernel/KernelA.HPP,2785"$
$LK,"BDT_ISO_FILE_READ",A="FL:::/Kernel/KernelA.HPP,2632"$
$LK,"CCf_PAREN",A="FL:::/Kernel/KernelA.HPP,2164"$
$LK,"CCF_PAREN",A="FL:::/Kernel/KernelA.HPP,2163"$
$LK,"ACD_BLK_SIZE",A="FL:::/Kernel/KernelA.HPP,1513"$
@ -2308,6 +2307,7 @@ $LK,"FifoU8Cnt",A="FL:::/Kernel/KDataTypes.CPP.Z,227",BI=506$
$LK,"C:/Doc/TimeHPET.TXT.Z",A="FL:::/Kernel/KernelB.HPP,283"$
$LK,"DOCf_PLAIN_TEXT",A="FL:::/Kernel/KernelA.HPP,1294"$
$LK,"CArcEntry",A="FL:::/Kernel/KernelA.HPP,3752"$
$LK,"BDT_ISO_FILE_WRITE",A="FL:::/Kernel/KernelA.HPP,2633"$
$LK,"AOT_BIN_BLK_SIZE",A="FL:::/Kernel/KernelA.HPP,1798"$
$LK,"DOCf_FORM",A="FL:::/Kernel/KernelA.HPP,1302"$
$LK,"DOCF_FORM",A="FL:::/Kernel/KernelA.HPP,1266"$

4
Kernel/KernelA.HPP

@ -2629,8 +2629,8 @@ public class CDirEntry
#define BDT_NULL 0
#define BDT_RAM 1
#define BDT_ATA 2
#define BDT_FILE_READ 3
#define BDT_FILE_WRITE 4
#define BDT_ISO_FILE_READ 3
#define BDT_ISO_FILE_WRITE 4
#define BDT_ATAPI 5
#define BDT_NUM_TYPES 6

1
Kernel/KernelC.HPP

@ -195,6 +195,7 @@ 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);

Loading…
Cancel
Save