mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2025-03-28 19:05:10 +00:00
Remove shift-space.
This commit is contained in:
parent
ff561bb802
commit
c5d8554337
167 changed files with 784 additions and 823 deletions
Zenith-latest-2020-02-29-19_54_22.iso
src
Apps
Budget
GrModels
KeepAway
Psalmody
Span
Strut
ToTheFront
Compiler
Demo
AcctExample
Asm
Carry.CCClassMeta.CCDolDoc
Exceptions.CCGames
GlobalVars.CCGraphics
InFile
KeyBitMap.CCLectures
MultiCore
RandDemo.CCRegistryDemo.CCSound
SuggestSpelling.CCToHtmlToTXTDemo
WebLogDemo
Doc
Home
HomeKeyPlugIns.CCKernel
Binary file not shown.
|
@ -35,11 +35,11 @@ U0 BgtIns(CBgtEntry *tmpb)
|
|||
|
||||
class CBgtEntryForm
|
||||
{
|
||||
U8 date[512] format "$$DA-P,A=\"Date:%s\"$$\n";
|
||||
F64 amount format "Amount$$$$$$DA,A=\"%10.2f\"$$\n";
|
||||
U8 credit[512] format "$$DA-P,A=\"Credit(from)Acct:%s\"$$\n";
|
||||
U8 debit [512] format "$$DA-P,A=\"Debit(to)Acct:%s\"$$\n";
|
||||
U8 desc [512] format "$$DA-P,A=\"Desc:%s\"$$\n";
|
||||
U8 date[512] format "$$DA-P,A=\"Date :%s\"$$\n";
|
||||
F64 amount format "Amount $$$$$$DA,A=\"%10.2f\"$$\n";
|
||||
U8 credit[512] format "$$DA-P,A=\"Credit (from) Acct:%s\"$$\n";
|
||||
U8 debit [512] format "$$DA-P,A=\"Debit (to) Acct:%s\"$$\n";
|
||||
U8 desc [512] format "$$DA-P,A=\"Desc :%s\"$$\n";
|
||||
};
|
||||
|
||||
CBgtEntry *BgtEntryPrompt(CBgtEntry *default=NULL)
|
||||
|
|
|
@ -44,9 +44,9 @@ class CBgtTemplate
|
|||
U0 start;
|
||||
U16 type format "$$LS,D=\"ST_BGT_TEMPLATE_TYPES\"$$\n";
|
||||
U16 flags;
|
||||
U8 start_date[16] format "$$DA-P,A=\"StartDate:%s\"$$\n";
|
||||
U8 end_date[16] format "$$DA-P,A=\"EndDate:%s\"$$\n";
|
||||
F64 period format "$$DA,A=\"Period:%8.2f\"$$\n";
|
||||
U8 start_date[16] format "$$DA-P,A=\"Start Date:%s\"$$\n";
|
||||
U8 end_date[16] format "$$DA-P,A=\"End Date :%s\"$$\n";
|
||||
F64 period format "$$DA,A=\"Period :%8.2f\"$$\n";
|
||||
U0 end;
|
||||
|
||||
CBgtEntry b;
|
||||
|
|
|
@ -13,7 +13,7 @@ class Ball
|
|||
|
||||
class BallDefineStruct
|
||||
{
|
||||
F64 radius format "$$DA-TRM,A=\"Radius:%8.3f\"$$\n";
|
||||
F64 radius format "$$DA-TRM,A=\"Radius :%8.3f\"$$\n";
|
||||
I64 n_longitude format "$$DA-TRM,A=\"Longitude Faces:%5d\"$$\n";
|
||||
I64 n_lattitude format "$$DA-TRM,A=\"Lattitude Rings:%5d\"$$\n";
|
||||
};
|
||||
|
|
|
@ -14,66 +14,66 @@ class Man
|
|||
class ManDefineStruct
|
||||
{
|
||||
F64 head_rad format
|
||||
"$$DA-TRM,A=\"Head Radius:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"Head Radius :%8.3f\"$$\n";
|
||||
|
||||
F64 torso_len format
|
||||
"$$DA-TRM,A=\"Torso Length:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"Torso Length :%8.3f\"$$\n";
|
||||
F64 arm_len format
|
||||
"$$DA-TRM,A=\"Arm Length:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"Arm Length :%8.3f\"$$\n";
|
||||
F64 hand_len format
|
||||
"$$DA-TRM,A=\"Hand Length:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"Hand Length :%8.3f\"$$\n";
|
||||
F64 leg_len format
|
||||
"$$DA-TRM,A=\"Leg Length:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"Leg Length :%8.3f\"$$\n";
|
||||
F64 foot_len format
|
||||
"$$DA-TRM,A=\"Foot Length:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"Foot Length :%8.3f\"$$\n";
|
||||
F64 torso_width format
|
||||
"$$DA-TRM,A=\"Torso Width:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"Torso Width :%8.3f\"$$\n";
|
||||
F64 torso_depth format
|
||||
"$$DA-TRM,A=\"Torso Depth:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"Torso Depth :%8.3f\"$$\n";
|
||||
F64 arm_rad format
|
||||
"$$DA-TRM,A=\"Arm Radius:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"Arm Radius :%8.3f\"$$\n";
|
||||
F64 hand_rad format
|
||||
"$$DA-TRM,A=\"Hand Radius:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"Hand Radius :%8.3f\"$$\n";
|
||||
F64 leg_rad format
|
||||
"$$DA-TRM,A=\"Leg Radius:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"Leg Radius :%8.3f\"$$\n";
|
||||
F64 foot_rad format
|
||||
"$$DA-TRM,A=\"Foot Radius:%8.3f\"$$\n\n";
|
||||
"$$DA-TRM,A=\"Foot Radius :%8.3f\"$$\n\n";
|
||||
|
||||
F64 r_shoulder_a1 format
|
||||
"$$DA-TRM,A=\"R.ShoulderFront/BackAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"R.Shoulder Front/Back Angle:%8.3f\"$$\n";
|
||||
F64 l_shoulder_a1 format
|
||||
"$$DA-TRM,A=\"L.ShoulderFront/BackAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"L.Shoulder Front/Back Angle:%8.3f\"$$\n";
|
||||
F64 r_hip_a1 format
|
||||
"$$DA-TRM,A=\"R.HipFront/BackAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"R.Hip Front/Back Angle :%8.3f\"$$\n";
|
||||
F64 l_hip_a1 format
|
||||
"$$DA-TRM,A=\"L.HipFront/BackAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"L.Hip Front/Back Angle :%8.3f\"$$\n";
|
||||
|
||||
F64 r_shoulder_a2 format
|
||||
"$$DA-TRM,A=\"R.ShoulderSideAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"R.Shoulder Side Angle :%8.3f\"$$\n";
|
||||
F64 l_shoulder_a2 format
|
||||
"$$DA-TRM,A=\"L.ShoulderSideAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"L.Shoulder Side Angle :%8.3f\"$$\n";
|
||||
F64 r_hip_a2 format
|
||||
"$$DA-TRM,A=\"R.HipSideAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"R.Hip Side Angle :%8.3f\"$$\n";
|
||||
F64 l_hip_a2 format
|
||||
"$$DA-TRM,A=\"L.HipSideAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"L.Hip Side Angle :%8.3f\"$$\n";
|
||||
|
||||
F64 r_elbow_a format
|
||||
"$$DA-TRM,A=\"R.ElbowAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"R.Elbow Angle :%8.3f\"$$\n";
|
||||
F64 l_elbow_a format
|
||||
"$$DA-TRM,A=\"L.ElbowAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"L.Elbow Angle :%8.3f\"$$\n";
|
||||
F64 r_knee_a format
|
||||
"$$DA-TRM,A=\"R.KneeAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"R.Knee Angle :%8.3f\"$$\n";
|
||||
F64 l_knee_a format
|
||||
"$$DA-TRM,A=\"L.KneeAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"L.Knee Angle :%8.3f\"$$\n";
|
||||
|
||||
F64 r_wrist_a format
|
||||
"$$DA-TRM,A=\"R.WristAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"R.Wrist Angle :%8.3f\"$$\n";
|
||||
F64 l_wrist_a format
|
||||
"$$DA-TRM,A=\"L.WristAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"L.Wrist Angle :%8.3f\"$$\n";
|
||||
F64 r_ankle_a format
|
||||
"$$DA-TRM,A=\"R.AnkleAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"R.Ankle Angle :%8.3f\"$$\n";
|
||||
F64 l_ankle_a format
|
||||
"$$DA-TRM,A=\"L.AnkleAngle:%8.3f\"$$\n";
|
||||
"$$DA-TRM,A=\"L.Ankle Angle :%8.3f\"$$\n";
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ U0 Models()
|
|||
I64 i;
|
||||
Bool old_form=LBts(&(DocPut)->flags,DOCf_FORM);
|
||||
DocClear;
|
||||
"Make a CSprite model.Then, cut-and-Paste it.\n\n";
|
||||
"Make a CSprite model. Then, cut-and-Paste it.\n\n";
|
||||
"$$LM,4$$";
|
||||
"\n\n$$BT,\"Man\",LE=T_MAN$$\n\n";
|
||||
"\n\n$$BT,\"Ball\",LE=T_BALL$$\n\n";
|
||||
|
|
|
@ -390,7 +390,7 @@ U0 DrawIt(CTask *task,CDC *dc)
|
|||
}
|
||||
dc->color=BLACK;
|
||||
}
|
||||
GrPrint(dc,0,0,"Time:%d:%04.1fScore:",ToI64(tt),(tt-ToI64(tt))*60);
|
||||
GrPrint(dc,0,0,"Time:%d:%04.1f Score:",ToI64(tt),(tt-ToI64(tt))*60);
|
||||
GrPrint (dc,FONT_WIDTH*27,0,"Best Score:");
|
||||
|
||||
dc->color=LTCYAN;
|
||||
|
|
|
@ -8,11 +8,11 @@ U0 Song()
|
|||
try {
|
||||
while (!ScanKey) {
|
||||
Play("5qEsCDCDqCDeEGsE4B5E4B5eC4B5sD4A5D4A",
|
||||
"Be\0like\0\0a\0\0child\0\0\0\0"
|
||||
"some\0\0re\0\0spect.\n\0\0\0\0\0\0");
|
||||
"Be \0like \0 \0a \0 \0child \0 \0 \0 \0"
|
||||
"some \0 \0re\0 \0spect.\n\0 \0 \0 \0 \0 \0");
|
||||
Play("5qEsCDCDqCDeEGsE4B5E4B5eC4B5sD4A5D4A",
|
||||
"Ma\0tur\0\0i\0\0ty\0\0\0\0don't\0\0"
|
||||
"ne\0\0glect.\n\0\0\0\0\0\0");
|
||||
"Ma\0tur\0 \0i\0 \0ty \0 \0 \0 \0don't \0 \0"
|
||||
"ne\0 \0glect.\n\0 \0 \0 \0 \0 \0");
|
||||
Play("4eB5DqF4sGAGAqAAA5etD4AA5sD4B5D4B");
|
||||
Play("4eB5DqF4sGAGAqAAA5etD4AA5sD4B5D4B");
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -93,13 +93,13 @@ Bool JBPutKey(CDoc *doc,U8 *,I64 ch,I64 sc)
|
|||
"\"%s\"\n",st);
|
||||
Free(st);
|
||||
}
|
||||
In("");
|
||||
In(" ");
|
||||
}
|
||||
return TRUE;
|
||||
} else if (ch==CH_SPACE||ch==CH_ESC)
|
||||
tmpde->user_data++; //JB_RUN_LEVEL++
|
||||
//<SPACE> is followed by <ESC> --> JB_RUN_LEVEL_TWO
|
||||
//Actual <ESC> just exits--> JB_RUN_LEVEL_ONE
|
||||
//Actual <ESC> just exits --> JB_RUN_LEVEL_ONE
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ This uses four types of output
|
|||
|
||||
2) The Fs->draw_it() for the staff region, drawn every refresh.
|
||||
|
||||
3) The gr.dc persistent layer for the note chooser, meter chooser.The persistent layer is used during drag-and-drop.
|
||||
3) The gr.dc persistent layer for the note chooser, meter chooser. The persistent layer is used during drag-and-drop.
|
||||
|
||||
4) The Fs->next_ctrl for the tempo/stacatto sliders.
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ Bool PsmBlink()
|
|||
|
||||
Bool PsmHasWords(U8 *st)
|
||||
{
|
||||
if (st && *st && (StrLen(st)>1 || *st!=CH_SPACE && *st!=CH_SHIFT_SPACE))
|
||||
if (st && *st && (StrLen(st)>1 || *st!=CH_SPACE))
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
|
@ -389,18 +389,18 @@ U0 PsmMenu(I64 psm_octave)
|
|||
"$$LTGREEN$$Right Mouse$$FG$$\tChange duration or set word\n";
|
||||
Sprite($IB,"<6>",BI=6$,"$$SP+LIS,\"\","
|
||||
"LM=\"Message(MESSAGE_KEY_DOWN,0,SCF_CTRL|SC_CURSOR_LEFT);\",BI=%d$$");
|
||||
"";
|
||||
" ";
|
||||
if (psm.playing)
|
||||
Sprite($IB,"<9>",BI=9$,"$$SP,\"\",LM=\"x\",BI=%d$$");
|
||||
else
|
||||
Sprite($IB,"<8>",BI=8$,"$$SP,\"\",LM=\"x\",BI=%d$$");
|
||||
"";
|
||||
" ";
|
||||
if (psm.record_entry->checked) {
|
||||
psm.record_entry->checked=TRUE;
|
||||
Sprite($IB,"<10>",BI=10$,"$$SP,\"\",LM=\"z\",BI=%d$$");
|
||||
} else
|
||||
Sprite($IB,"<11>",BI=11$,"$$SP,\"\",LM=\"z\",BI=%d$$");
|
||||
"";
|
||||
" ";
|
||||
Sprite($IB,"<7>",BI=7$,"$$SP+LIS,\"\","
|
||||
"LM=\"Message(MESSAGE_KEY_DOWN,0,SCF_CTRL|SC_CURSOR_RIGHT);\",BI=%d$$");
|
||||
"$$CM+LX,0,6$$";
|
||||
|
|
|
@ -345,13 +345,13 @@ U8 *PsmSaveSong(U8 *dirname,U8 *full_filename)
|
|||
DocPrint(doc,
|
||||
"U0 Song()\n"
|
||||
"{\n"
|
||||
"Fs->task_end_cb=&SoundTaskEndCB;\n"
|
||||
"MusicSettingsReset;\n"
|
||||
"music.tempo=%6.3f;\n"
|
||||
"music.stacatto_factor=%6.3f;\n"
|
||||
"try {\n"
|
||||
"while (!ScanKey) {\n"
|
||||
"\tPlay(\"",music.tempo+0.0005,music.stacatto_factor+0.0005);
|
||||
"\tFs->task_end_cb=&SoundTaskEndCB;\n"
|
||||
"\tMusicSettingsReset;\n"
|
||||
"\tmusic.tempo=%6.3f;\n"
|
||||
"\tmusic.stacatto_factor=%6.3f;\n"
|
||||
"\ttry {\n"
|
||||
"\t\twhile (!ScanKey) {\n"
|
||||
"\t\t\tPlay(\"",music.tempo+0.0005,music.stacatto_factor+0.0005);
|
||||
|
||||
tmpn=psm.head.next;
|
||||
tmpn1=tmpn;
|
||||
|
@ -372,19 +372,17 @@ U8 *PsmSaveSong(U8 *dirname,U8 *full_filename)
|
|||
if (tmpn1->type!=PSMT_METER) {
|
||||
if (ptr=tmpn1->word) {
|
||||
while (ch=*ptr) {
|
||||
if (ch==CH_SPACE)
|
||||
*ptr=CH_SHIFT_SPACE;
|
||||
ptr++;
|
||||
}
|
||||
DocPrint(doc,"%Q\\0",tmpn1->word);
|
||||
} else
|
||||
DocPrint(doc,"%c\\0",CH_SHIFT_SPACE);
|
||||
DocPrint(doc,"%c\\0",CH_SPACE);
|
||||
}
|
||||
tmpn1=tmpn1->next;
|
||||
}
|
||||
}
|
||||
DocPrint(doc,"\");\n"
|
||||
"\tPlay(\"");
|
||||
"\t\t\tPlay(\"");
|
||||
two_measure_left=2*measure_len;
|
||||
tmpn1=tmpn;
|
||||
has_words=FALSE;
|
||||
|
@ -396,22 +394,20 @@ U8 *PsmSaveSong(U8 *dirname,U8 *full_filename)
|
|||
if (tmpn1->type!=PSMT_METER) {
|
||||
if (ptr=tmpn1->word) {
|
||||
while (ch=*ptr) {
|
||||
if (ch==CH_SPACE)
|
||||
*ptr=CH_SHIFT_SPACE;
|
||||
ptr++;
|
||||
}
|
||||
DocPrint(doc,"%Q\\0",tmpn1->word);
|
||||
} else
|
||||
DocPrint(doc,"%c\\0",CH_SHIFT_SPACE);
|
||||
DocPrint(doc,"%c\\0",CH_SPACE);
|
||||
}
|
||||
tmpn1=tmpn1->next;
|
||||
}
|
||||
}
|
||||
DocPrint(doc,"\");\n"
|
||||
"}\n"
|
||||
"} catch\n"
|
||||
"PutExcept;\n"
|
||||
"Sound;\n"
|
||||
"\t\t}\n"
|
||||
"\t} catch\n"
|
||||
"\t\tPutExcept;\n"
|
||||
"\tSound;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"Song;\n");
|
||||
|
|
|
@ -83,7 +83,7 @@ U0 PsmRightClick(I64 x,I64 y)
|
|||
tmpn->word=MStrPrint("%q",st);
|
||||
Free(st);
|
||||
} else
|
||||
tmpn->word=StrNew("");
|
||||
tmpn->word=StrNew(" ");
|
||||
if (DocPut) DocPut->flags=DocPut->flags&
|
||||
~DOCF_FORM|old_doc_flags&DOCF_FORM;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ U0 MyDerivative(CMathODE *ode,F64,COrder2D3 *,COrder2D3 *)
|
|||
{
|
||||
//The forces due to springs and drag are
|
||||
//automatically handled by the
|
||||
//ode code.We can add new forces
|
||||
//ode code. We can add new forces
|
||||
//here.
|
||||
CTask *task=ode->win_task;
|
||||
F64 d,dd;
|
||||
|
|
|
@ -307,7 +307,7 @@ U0 Span()
|
|||
|
||||
PopUpOk(
|
||||
"Build a bridge to hold-up the\n"
|
||||
"red masses.Test your design\n"
|
||||
"red masses. Test your design\n"
|
||||
"by pressing run/stop.\n\n"
|
||||
"The lowest cost bridge that\n"
|
||||
"stays standing wins.\n\n"
|
||||
|
|
|
@ -183,7 +183,7 @@ U0 MyDerivative(CMathODE *ode,F64,COrder2D3 *,COrder2D3 *)
|
|||
{
|
||||
//The forces due to springs and drag are
|
||||
//automatically handled by the
|
||||
//ode code.We can add new forces
|
||||
//ode code. We can add new forces
|
||||
//here.
|
||||
F64 d,dd;
|
||||
CD3 p;
|
||||
|
@ -606,10 +606,10 @@ U0 Strut()
|
|||
"\n$$WW,1$$$$PURPLE$$$$TX+CX,\"Build a ship.\"$$$$FG$$\n\n"
|
||||
"Sel mass mode.\tLeft-click to place masses.\n"
|
||||
"Sel spring mode.\tLeft-drag to make members.\n"
|
||||
"Sel thruster mode.\tPress a digit, 0-9.Drag to make thruster.\n"
|
||||
"Sel connector mode.\tPress a digit, 0-9."
|
||||
"Sel thruster mode.\tPress a digit, 0-9. Drag to make thruster.\n"
|
||||
"Sel connector mode.\tPress a digit, 0-9. "
|
||||
"Drag to make breakable connector.\n\n"
|
||||
"Press $$GREEN$$<SPACE>$$FG$$ to run the game.Press digits to operate "
|
||||
"Press $$GREEN$$<SPACE>$$FG$$ to run the game. Press digits to operate "
|
||||
"thrusters and break connectors.\n\n"
|
||||
"Press $$GREEN$$<z>$$FG$$ or $$GREEN$$<SHIFT-Z>$$FG$$ to zoom in/out.\n\n";
|
||||
|
||||
|
|
|
@ -37,11 +37,11 @@ F64 HitDamage(Unit *tmpu,Unit *target,I64 facing=1,F64 range_factor=0)
|
|||
if (target->armor) {
|
||||
d=target->armor/100.0*(5-facing)/5.0;
|
||||
if (d>=0) {
|
||||
"ArmorAttack\t\t:%6.2f\n",ToF64(tmpu->armored_attack);
|
||||
"Armor Attack\t\t:%6.2f\n",ToF64(tmpu->armored_attack);
|
||||
res*=(tmpu->armored_attack/100.0)/d;
|
||||
} else
|
||||
res=0;
|
||||
"Armor(%z)Defense\t:%6.2f\n",facing,
|
||||
"Armor(%z) Defense\t:%6.2f\n",facing,
|
||||
"Front\0FrontSide\0RearSide\0Rear\0",100*d;
|
||||
} else {
|
||||
d=1.0-range_factor;
|
||||
|
@ -120,31 +120,31 @@ U0 UnitDirectFire(Unit *tmpu,Unit *target)
|
|||
RowCol2XY(&x1,&y1,tmpu->row,tmpu->col);
|
||||
RowCol2XY(&x2,&y2,target->row,target->col);
|
||||
d=100*Rand;
|
||||
"+%5.2fRoll\n",d;
|
||||
"+%5.2f Roll\n",d;
|
||||
d+=tmpu->accuracy;
|
||||
"+%2d.00Accuracy\n",tmpu->accuracy;
|
||||
"+%2d.00 Accuracy\n",tmpu->accuracy;
|
||||
|
||||
range_factor=Sqrt(Sqr(x2-x1)+Sqr(y2-y1))/(tmpu->range*2*DSIN);
|
||||
"-%5.2f%% of Range\n",100*range_factor;
|
||||
d-=100*range_factor;
|
||||
if (t2==TREES) {
|
||||
"-30.00Target in Trees Penalty\n";
|
||||
"-30.00 Target in Trees Penalty\n";
|
||||
d-=30;
|
||||
}
|
||||
if (t1==MOUNTAINS && t2!=MOUNTAINS) {
|
||||
"+30.00High Ground Bonus\n";
|
||||
"+30.00 High Ground Bonus\n";
|
||||
d+=30;
|
||||
}
|
||||
"_______\n";
|
||||
target_unit=target;
|
||||
if (d>=0) {
|
||||
"+%5.2fHit\n",d;
|
||||
"+%5.2f Hit\n",d;
|
||||
target_hit=TRUE;
|
||||
Noise(500*animation_delay,34,41);
|
||||
Sleep(500*animation_delay);
|
||||
Line(NULL,x1,y1,0,x2,y2,0,&BulletPlot);
|
||||
} else {
|
||||
"-%5.2fMiss\n",-d;
|
||||
"-%5.2f Miss\n",-d;
|
||||
target_hit=FALSE;
|
||||
Noise(1000*animation_delay,69,74);
|
||||
Sleep(1000*animation_delay);
|
||||
|
@ -222,9 +222,9 @@ U0 IndirectResolveAll()
|
|||
RowCol2XY(&x1,&y1,tmpu->row,tmpu->col);
|
||||
RowCol2XY(&x2,&y2,tmpi->row,tmpi->col);
|
||||
d=100*Rand;
|
||||
"+%5.2fRoll\n",d;
|
||||
"+%5.2f Roll\n",d;
|
||||
d+=tmpu->accuracy;
|
||||
"+%2d.00Accuracy\n",tmpu->accuracy;
|
||||
"+%2d.00 Accuracy\n",tmpu->accuracy;
|
||||
range_factor=Sqrt(Sqr(x2-x1)+Sqr(y2-y1))/(tmpu->range*2*DSIN);
|
||||
"-%5.2f%% of Range\n",100*range_factor;
|
||||
d-=100*range_factor;
|
||||
|
@ -232,11 +232,11 @@ U0 IndirectResolveAll()
|
|||
|
||||
|
||||
if (d>=0) {
|
||||
"+%5.2fHit\n",d;
|
||||
"+%5.2f Hit\n",d;
|
||||
Noise(500*animation_delay,34,41);
|
||||
Sleep(500*animation_delay);
|
||||
} else {
|
||||
"-%5.2fMiss\n",-d;
|
||||
"-%5.2f Miss\n",-d;
|
||||
Noise(1000*animation_delay,69,74);
|
||||
Sleep(1000*animation_delay);
|
||||
i=RandU16%6;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*I got tricky by not defining a color
|
||||
right away in these $LK,"CSprite",A="MN:CSprite"$s so they can
|
||||
work for both players by setting dc->color
|
||||
before drawing them.I actually made these
|
||||
before drawing them. I actually made these
|
||||
graphics by defining a color in the <CTRL-r>
|
||||
menu, drawing the unit and deleting the color.
|
||||
|
||||
|
|
|
@ -136,10 +136,10 @@ Bool VisRecalc(I64 mode,Unit *tmpu=NULL)
|
|||
I64 i,hi,k,count;
|
||||
Bool res;
|
||||
/*The compiler doesn't go out of it's way
|
||||
to know if something is const.;-)This
|
||||
to know if something is const.;-) This
|
||||
just compiles with the val at compile
|
||||
time, an advantage of just-in-time over
|
||||
AOT binaries.ZenithOS has a limited
|
||||
AOT binaries. ZenithOS has a limited
|
||||
stack size, so don't get in the habit.
|
||||
$LK,"MAlloc",A="MN:MAlloc"$() would probably be the better choice.
|
||||
*/
|
||||
|
|
|
@ -168,10 +168,10 @@ U0 ToTheFront()
|
|||
"$$GREEN$$<SPACE>$$FG$$\tor $$GREEN$${Right-click}$$FG$$ to end phase.\n"
|
||||
"$$GREEN$$<SHIFT>$$FG$$\tto show line-of-sight.\n"
|
||||
"$$GREEN$$<ENTER>$$FG$$\tto start new game.\n"
|
||||
"$$GREEN$$1$$FG$$\tPlayer 1 view.\n"
|
||||
"$$GREEN$$2$$FG$$\tPlayer 2 view.\n"
|
||||
"$$GREEN$$c$$FG$$\tView odds calculations.\n"
|
||||
"$$GREEN$$d$$FG$$\tSet animation delay.");
|
||||
"$$GREEN$$ 1$$FG$$\tPlayer 1 view.\n"
|
||||
"$$GREEN$$ 2$$FG$$\tPlayer 2 view.\n"
|
||||
"$$GREEN$$ c$$FG$$\tView odds calculations.\n"
|
||||
"$$GREEN$$ d$$FG$$\tSet animation delay.");
|
||||
Fs->task_end_cb=&TaskEndCB; //<CTRL-ALT-x>
|
||||
Fs->draw_it=&DrawIt;
|
||||
try {
|
||||
|
|
|
@ -153,13 +153,13 @@ U0 AsmLineList(CCompCtrl *cc)
|
|||
if (doc_e2=aotc->list_last_line) {
|
||||
if (tmpf->flags& LFSF_DOC) {
|
||||
while (doc_e2->y<doc_e->y) {
|
||||
"%h*c%08X",24-aotc->list_col,CH_SPACE,aotc->list_last_rip;
|
||||
"%h*c%08X ",24-aotc->list_col,CH_SPACE,aotc->list_last_rip;
|
||||
aotc->list_col=0;
|
||||
doc_e2=LexPutLine(cc,doc_e2);
|
||||
}
|
||||
} else {
|
||||
while (*doc_e2(U8 *) && doc_e2!=doc_e) {
|
||||
"%h*c%08X",24-aotc->list_col,CH_SPACE,aotc->list_last_rip;
|
||||
"%h*c%08X ",24-aotc->list_col,CH_SPACE,aotc->list_last_rip;
|
||||
aotc->list_col=0;
|
||||
doc_e2=LexPutLine(cc,doc_e2);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ each intermediate code's output code.
|
|||
However, intermediate codes must be
|
||||
coupled together based on the arg and
|
||||
res type specifications in the
|
||||
$LK,"CICArg",A="MN:CICArg"$.RAX is the most common reg
|
||||
$LK,"CICArg",A="MN:CICArg"$. RAX is the most common reg
|
||||
for coupling intermediate codes.
|
||||
|
||||
Internal calculations take place on
|
||||
|
|
|
@ -215,8 +215,8 @@ CIntermediateStruct intermediate_code_table[IC_ICS_NUM]={
|
|||
U0 CompLoadDefines()
|
||||
{
|
||||
DefineListLoad("ST_RAW_TYPES",
|
||||
"\0"
|
||||
"\0"
|
||||
" \0"
|
||||
" \0"
|
||||
"I0\0"
|
||||
"U0\0"
|
||||
"I8\0"
|
||||
|
@ -409,7 +409,7 @@ U0 CompLoadDefines()
|
|||
"RAX\0"
|
||||
"CL\0"
|
||||
"DX\0"
|
||||
"\0"
|
||||
" \0"
|
||||
"SREG\0"
|
||||
"SS\0"
|
||||
"DS\0"
|
||||
|
|
|
@ -252,10 +252,7 @@ lgc_start2:
|
|||
case 0xFF: //nobound switch
|
||||
}
|
||||
lgc_done:
|
||||
if (cc->last_U16==CH_SHIFT_SPACE)
|
||||
cc->last_U16=CH_SPACE;
|
||||
if (cc->opts & OPTF_ECHO &&
|
||||
cc->last_U16<256 && Bt(char_bmp_printable,cc->last_U16))
|
||||
if (cc->opts & OPTF_ECHO && cc->last_U16<256 && Bt(char_bmp_printable,cc->last_U16))
|
||||
'' cc->last_U16;
|
||||
}
|
||||
return cc->last_U16;
|
||||
|
|
|
@ -28,7 +28,7 @@ U0 OptPass3(CCompCtrl *cc,COptReg *reg_offsets)
|
|||
tmpc=OptClassFwd(tmpm->member_class);
|
||||
if (0<=tmpm->reg<REG_REGS_NUM) {
|
||||
if (Bts(&used_reg_mask,tmpm->reg))
|
||||
PrintWarn("Reg in use\n $$LK,\"FL:%s,%d\"$$'%s' in '%s'\n",
|
||||
PrintWarn("Reg in use\n $$LK,\"FL:%s,%d\"$$ '%s' in '%s'\n",
|
||||
cc->lex_include_stack->full_name,
|
||||
cc->lex_include_stack->line_num,tmpm->str,cc->htc.fun->str);
|
||||
reg_offsets[tmpm->reg].offset=tmpm->offset;
|
||||
|
@ -41,7 +41,7 @@ U0 OptPass3(CCompCtrl *cc,COptReg *reg_offsets)
|
|||
mv[member_count].offset_end=tmpm->offset+MaxI64(1,tmpm->size);
|
||||
mv[member_count++].m=tmpm;
|
||||
} else if (tmpm->reg==REG_ALLOC)
|
||||
PrintWarn("Can't reg var\n $$LK,\"FL:%s,%d\"$$'%s' in '%s'\n",
|
||||
PrintWarn("Can't reg var\n $$LK,\"FL:%s,%d\"$$ '%s' in '%s'\n",
|
||||
cc->lex_include_stack->full_name,
|
||||
cc->lex_include_stack->line_num,tmpm->str,cc->htc.fun->str);
|
||||
tmpm=tmpm->next;
|
||||
|
@ -547,7 +547,7 @@ R12 and R13 as non-pointer register variables, such as index variables i,j,k.
|
|||
mv[j++].offset_end=mv[i].offset_end;
|
||||
} else {
|
||||
if (mv[i].m->reg==REG_ALLOC)
|
||||
PrintWarn("Can't reg var\n $$LK,\"FL:%s,%d\"$$'%s' in '%s'\n",
|
||||
PrintWarn("Can't reg var\n $$LK,\"FL:%s,%d\"$$ '%s' in '%s'\n",
|
||||
cc->lex_include_stack->full_name,
|
||||
cc->lex_include_stack->line_num,mv[i].m->str,cc->htc.fun->str);
|
||||
}
|
||||
|
@ -576,7 +576,7 @@ R12 and R13 as non-pointer register variables, such as index variables i,j,k.
|
|||
!StrIMatch("Bool",tmpm->member_class->str) &&
|
||||
tmpm->member_class->type&HTT_INTERNAL_TYPE)
|
||||
PrintWarn("Using 64-bit reg var.\n "
|
||||
"$$LK,\"FL:%s,%d\"$$'%s' in '%s'\n",
|
||||
"$$LK,\"FL:%s,%d\"$$ '%s' in '%s'\n",
|
||||
cc->lex_include_stack->full_name,
|
||||
cc->lex_include_stack->line_num,
|
||||
tmpm->str,cc->htc.fun->str);
|
||||
|
@ -604,7 +604,7 @@ R12 and R13 as non-pointer register variables, such as index variables i,j,k.
|
|||
!StrIMatch("Bool",tmpm->member_class->str) &&
|
||||
tmpm->member_class->type&HTT_INTERNAL_TYPE)
|
||||
PrintWarn("Using 64-bit reg var.\n "
|
||||
"$$LK,\"FL:%s,%d\"$$'%s' in '%s'\n",
|
||||
"$$LK,\"FL:%s,%d\"$$ '%s' in '%s'\n",
|
||||
cc->lex_include_stack->full_name,
|
||||
cc->lex_include_stack->line_num,
|
||||
tmpm->str,cc->htc.fun->str);
|
||||
|
|
|
@ -178,7 +178,7 @@ U0 OptPass6(CCompCtrl *cc)
|
|||
cc->htc.fun->clobbered_reg_mask=clobbered_reg_mask;
|
||||
if (Bt(&cc->flags,CCf_PASS_TRACE_PRESENT) &&
|
||||
Bt(&cc->saved_pass_trace,6)) {
|
||||
"UsedReg Mask:%04X\n",cc->htc.fun->used_reg_mask;
|
||||
"Used Reg Mask:%04X\n",cc->htc.fun->used_reg_mask;
|
||||
"Clobbered Reg Mask:%04X\n",clobbered_reg_mask;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -194,11 +194,11 @@ U0 ParseFun(CCompCtrl *cc,CHashClass *tmp_return,U8 *name,I64 fsp_flags)
|
|||
while (tmpm) {
|
||||
if (tmpm->flags & MLF_NO_UNUSED_WARN) {
|
||||
if (tmpm->use_count>1&&StrCompare(tmpm->str,"_anon_"))
|
||||
PrintWarn("Unneeded no_warn\n $$LK,\"FL:%s,%d\"$$'%s' in '%s'\n",
|
||||
PrintWarn("Unneeded no_warn\n $$LK,\"FL:%s,%d\"$$ '%s' in '%s'\n",
|
||||
cc->lex_include_stack->full_name,cc->lex_include_stack->line_num,
|
||||
tmpm->str,cc->htc.fun->str);
|
||||
} else if (!tmpm->use_count && GetOption(OPTf_WARN_UNUSED_VAR))
|
||||
PrintWarn("Unused var\n $$LK,\"FL:%s,%d\"$$'%s' in '%s'\n",
|
||||
PrintWarn("Unused var\n $$LK,\"FL:%s,%d\"$$ '%s' in '%s'\n",
|
||||
cc->lex_include_stack->full_name,cc->lex_include_stack->line_num,
|
||||
tmpm->str,cc->htc.fun->str);
|
||||
tmpm=tmpm->next;
|
||||
|
@ -333,7 +333,7 @@ U0 ParseGlobalVarList(CCompCtrl *cc,I64 saved_mode,CHashClass *saved_tmpc,
|
|||
break;
|
||||
default:
|
||||
if (cc->flags&CCF_AOT_COMPILE) {
|
||||
if (Bt(&cc->opts,OPTf_GLBLS_ON_DATA_HEAP)) {
|
||||
if (Bt(&cc->opts,OPTf_GLOBALS_ON_DATA_HEAP)) {
|
||||
if (cc->token=='=')
|
||||
LexExcept(cc,"Can't init glbl var on data heap in AOT module ");
|
||||
tmpg=CAlloc(sizeof(CHashGlobalVar));
|
||||
|
@ -367,7 +367,7 @@ U0 ParseGlobalVarList(CCompCtrl *cc,I64 saved_mode,CHashClass *saved_tmpc,
|
|||
AOTStoreCodeU8(cc,0); //Init AOT glbl to zero.
|
||||
}
|
||||
} else {
|
||||
if (Bt(&cc->opts,OPTf_GLBLS_ON_DATA_HEAP)) {
|
||||
if (Bt(&cc->opts,OPTf_GLOBALS_ON_DATA_HEAP)) {
|
||||
tmpg=CAlloc(sizeof(CHashGlobalVar),Fs->code_heap);
|
||||
tmpg->data_addr=MAlloc(j);
|
||||
tmpg->flags=GVF_DATA_HEAP;
|
||||
|
|
|
@ -56,7 +56,7 @@ U0 ParseVarInit(CCompCtrl *cc,U8 **_dst,CHashClass *tmpc,CArrayDim *tmpad,
|
|||
machine_code=LexExpression2Bin(cc,&type);
|
||||
if (old_flags&CCF_AOT_COMPILE &&
|
||||
cc->flags&CCF_NOT_CONST &&
|
||||
!Bt(&cc->opts,OPTf_GLBLS_ON_DATA_HEAP)) {
|
||||
!Bt(&cc->opts,OPTf_GLOBALS_ON_DATA_HEAP)) {
|
||||
cc->flags=cc->flags&~CCF_NO_ABSS|CCF_AOT_COMPILE;
|
||||
Free(machine_code);
|
||||
if (pass==2) {
|
||||
|
@ -208,7 +208,7 @@ U0 ParseGlobalInit(CCompCtrl *cc,CHashGlobalVar *tmpg,I64 pass)
|
|||
U8 *dst=tmpg->data_addr;
|
||||
ParseVarInit2(cc,&dst,tmpg->var_class,&tmpg->dim,
|
||||
tmpg->data_addr_rip,&tmpg->data_addr,
|
||||
Bt(&cc->opts,OPTf_GLBLS_ON_DATA_HEAP)||
|
||||
Bt(&cc->opts,OPTf_GLOBALS_ON_DATA_HEAP)||
|
||||
Bt(&cc->flags,CCf_AOT_COMPILE),pass);
|
||||
}
|
||||
|
||||
|
|
|
@ -531,7 +531,7 @@ U0 Ui(U8 *buf,U8 **_rip,I64 seg_size=64,I64 *_jmp_dst=NULL,Bool just_ins=FALSE)
|
|||
imm=*rip(U8 *)++;
|
||||
CatPrint(arg1_st,"%02X",imm);
|
||||
if (tmpins->opcode[0]==0xCD && (ptr=DefineSub(imm,"ST_INT_NAMES")))
|
||||
CatPrint(arg1_st,"%s",ptr);
|
||||
CatPrint(arg1_st," %s",ptr);
|
||||
break;
|
||||
case ARGt_IMM16:
|
||||
case ARGt_UIMM16:
|
||||
|
@ -578,7 +578,7 @@ U0 Ui(U8 *buf,U8 **_rip,I64 seg_size=64,I64 *_jmp_dst=NULL,Bool just_ins=FALSE)
|
|||
case ARGt_AL ... ARGt_DX:
|
||||
case ARGt_SS ... ARGt_ST0:
|
||||
CatPrint(arg1_st,"%z",arg1-ARGt_AL,
|
||||
"AL\0AX\0EAX\0RAX\0CL\0DX\0\0\0SS\0DS\0ES\0FS\0GS\0CS\0ST0\0");
|
||||
"AL\0AX\0EAX\0RAX\0CL\0DX\0 \0 \0SS\0DS\0ES\0FS\0GS\0CS\0ST0\0");
|
||||
break;
|
||||
case ARGt_STI:
|
||||
rip--;
|
||||
|
@ -617,7 +617,7 @@ U0 Ui(U8 *buf,U8 **_rip,I64 seg_size=64,I64 *_jmp_dst=NULL,Bool just_ins=FALSE)
|
|||
case ARGt_AL ... ARGt_DX:
|
||||
case ARGt_SS ... ARGt_ST0:
|
||||
CatPrint(arg2_st,"%z",arg2-ARGt_AL,
|
||||
"AL\0AX\0EAX\0RAX\0CL\0DX\0\0\0SS\0DS\0ES\0FS\0GS\0CS\0ST0\0");
|
||||
"AL\0AX\0EAX\0RAX\0CL\0DX\0 \0 \0SS\0DS\0ES\0FS\0GS\0CS\0ST0\0");
|
||||
break;
|
||||
case ARGt_STI:
|
||||
rip--;
|
||||
|
|
|
@ -77,12 +77,12 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
case SC_F1:
|
||||
if (sc&SCF_SHIFT) {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/LTPURPLE");
|
||||
KeyDescSet("Dol /LTPURPLE");
|
||||
else
|
||||
"$$LTPURPLE$$";
|
||||
} else {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/PURPLE");
|
||||
KeyDescSet("Dol /PURPLE");
|
||||
else
|
||||
"$$PURPLE$$";
|
||||
}
|
||||
|
@ -90,12 +90,12 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
case SC_F2:
|
||||
if (sc&SCF_SHIFT) {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/LTRED");
|
||||
KeyDescSet("Dol /LTRED");
|
||||
else
|
||||
"$$LTRED$$";
|
||||
} else {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/RED");
|
||||
KeyDescSet("Dol /RED");
|
||||
else
|
||||
"$$RED$$";
|
||||
}
|
||||
|
@ -103,12 +103,12 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
case SC_F3:
|
||||
if (sc&SCF_SHIFT) {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/LTGREEN");
|
||||
KeyDescSet("Dol /LTGREEN");
|
||||
else
|
||||
"$$LTGREEN$$";
|
||||
} else {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/GREEN");
|
||||
KeyDescSet("Dol /GREEN");
|
||||
else
|
||||
"$$GREEN$$";
|
||||
}
|
||||
|
@ -116,12 +116,12 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
case SC_F4:
|
||||
if (sc&SCF_SHIFT) {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/Default Color");
|
||||
KeyDescSet("Dol /Default Color");
|
||||
else
|
||||
"$$FG$$";
|
||||
} else {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/BLUE");
|
||||
KeyDescSet("Dol /BLUE");
|
||||
else
|
||||
"$$BLUE$$";
|
||||
}
|
||||
|
@ -129,12 +129,12 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
case SC_F8:
|
||||
if (sc&SCF_SHIFT) {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/DirLinksIns");
|
||||
KeyDescSet("Cmd /DirLinksIns");
|
||||
else
|
||||
DirLinksIns;
|
||||
} else {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/FileLinkIns");
|
||||
KeyDescSet("Cmd /FileLinkIns");
|
||||
else
|
||||
FileLinkIns;
|
||||
}
|
||||
|
@ -143,19 +143,19 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
break;
|
||||
case 'a':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/AutoComplete On");
|
||||
KeyDescSet("Cmd /AutoComplete On");
|
||||
else
|
||||
AutoComplete(ON);
|
||||
return TRUE;
|
||||
case 'A':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/AutoComplete Off");
|
||||
KeyDescSet("Cmd /AutoComplete Off");
|
||||
else
|
||||
AutoComplete;
|
||||
return TRUE;
|
||||
case 'f': //With sync
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/FrameGrabber Sync");
|
||||
KeyDescSet("Cmd /FrameGrabber Sync");
|
||||
else if (fg_on)
|
||||
FrameGrabberToggle(FALSE,FALSE);
|
||||
else
|
||||
|
@ -163,7 +163,7 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
return TRUE;
|
||||
case 'F': //With sync and intro TOS theme
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/FrameGrabber Intro");
|
||||
KeyDescSet("Cmd /FrameGrabber Intro");
|
||||
else if (fg_on)
|
||||
FrameGrabberToggle(FALSE,FALSE);
|
||||
else
|
||||
|
@ -171,7 +171,7 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
return TRUE;
|
||||
case 'h':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/WinTileHorz");
|
||||
KeyDescSet("Cmd /WinTileHorz");
|
||||
else
|
||||
WinTileHorz;
|
||||
return TRUE;
|
||||
|
@ -183,7 +183,7 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
return TRUE;
|
||||
case 'm':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/WinMax");
|
||||
KeyDescSet("Cmd /WinMax");
|
||||
else {
|
||||
WinBorder;
|
||||
WinMax;
|
||||
|
@ -191,7 +191,7 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
return TRUE;
|
||||
case 'v':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/WinTileVert");
|
||||
KeyDescSet("Cmd /WinTileVert");
|
||||
else
|
||||
WinTileVert;
|
||||
return TRUE;
|
||||
|
@ -218,7 +218,7 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
return TRUE;
|
||||
case 'p':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/JukeBox");
|
||||
KeyDescSet("Cmd /JukeBox");
|
||||
else
|
||||
PopUp("#include \"::/Apps/Psalmody/Load\";"
|
||||
"JukeBox(\"::/Home/Sup3/Sup3Hymns\");");
|
||||
|
@ -234,37 +234,37 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
//Ins your own ALT-key plug-ins
|
||||
case '1':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/ã");
|
||||
KeyDescSet("Dol /ã");
|
||||
else
|
||||
'ã';
|
||||
return TRUE;
|
||||
case '2':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/é");
|
||||
KeyDescSet("Dol /é");
|
||||
else
|
||||
'é';
|
||||
return TRUE;
|
||||
case '3':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/è");
|
||||
KeyDescSet("Dol /è");
|
||||
else
|
||||
'è';
|
||||
return TRUE;
|
||||
case '4':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/ê");
|
||||
KeyDescSet("Dol /ê");
|
||||
else
|
||||
'ê';
|
||||
return TRUE;
|
||||
case '9':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/Indent 5");
|
||||
KeyDescSet("Dol /Indent 5");
|
||||
else
|
||||
"$$ID,5$$";
|
||||
return TRUE;
|
||||
case '0':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/Unindent 5");
|
||||
KeyDescSet("Dol /Unindent 5");
|
||||
else
|
||||
"$$ID,-5$$";
|
||||
return TRUE;
|
||||
|
|
|
@ -29,7 +29,7 @@ U0 StartUpTasks()
|
|||
user2=User;
|
||||
WinToTop(user1);
|
||||
WinTileVert;
|
||||
"BootTime:%7.3fs\n",tS;
|
||||
"Boot Time:%7.3fs\n",tS;
|
||||
XTalk(user1,"Cd;#include \"Once\";\n");
|
||||
Silent;
|
||||
ACInit("/*;!*/Bible.TXT*;!*.TXT"); //No Bible, no uncompressed DD.
|
||||
|
|
|
@ -53,7 +53,7 @@ U0 TOSInit()
|
|||
"HeapInit\n0\nMemInit\n0\nVarInit\n0\n\n"
|
||||
#define TOS_CONFIG "\n" CONFIG_RAM_DRIVES CONFIG_DVD_DRIVES CONFIG_HARD_DRIVES "\n"\
|
||||
CONFIG_DISK_CACHE CONFIG_OPTS
|
||||
#define TOS_DVD_CONFIG "TB\n0x20000\nT\n\n\nStaffMode\nMountIDEAuto\nCT\n"
|
||||
#define TOS_DVD_CONFIG "TB\n0x20000\nT \n\n\nStaffMode\nMountIDEAuto\nCT\n"
|
||||
#define TOS_DVD_DEBUG_CONFIG "A" CONFIG_DEBUG_DISTRO\
|
||||
"B\nScale2Mem(2048,0x40000)\n\n\n"\
|
||||
"NoMP\nTextMode\nDontProbe\nDebugDistro\n"\
|
||||
|
|
|
@ -114,7 +114,7 @@ class CMoviesForm
|
|||
{
|
||||
I64 timestamp;
|
||||
U8 rnd0[512] format "$$DA-P,"
|
||||
"A=\"Movie#1-100 (2 Decimal Digits from Hex):%s\"$$\n";
|
||||
"A=\"Movie #1-100 (2 Decimal Digits from Hex):%s\"$$\n";
|
||||
U8 rnd1[512];
|
||||
U8 rnd2[512];
|
||||
U8 rnd3[512];
|
||||
|
@ -133,7 +133,7 @@ class CPaintings100Form
|
|||
{
|
||||
I64 timestamp;
|
||||
U8 rnd0[512] format "$$DA-P,"
|
||||
"A=\"Painting#00-99 (2 Decimal Digits from Hex):%s\"$$\n";
|
||||
"A=\"Painting #00-99 (2 Decimal Digits from Hex):%s\"$$\n";
|
||||
U8 rnd1[512];
|
||||
U8 rnd2[512];
|
||||
U8 rnd3[512];
|
||||
|
@ -152,7 +152,7 @@ class CPaintings1000Form
|
|||
{
|
||||
I64 timestamp;
|
||||
U8 rnd0[512] format "$$DA-P,"
|
||||
"A=\"Painting#000-999 (3 Decimal Digits from Hex):%s\"$$\n";
|
||||
"A=\"Painting #000-999 (3 Decimal Digits from Hex):%s\"$$\n";
|
||||
U8 rnd1[512];
|
||||
U8 rnd2[512];
|
||||
U8 rnd3[512];
|
||||
|
@ -171,7 +171,7 @@ class CPoems100Form
|
|||
{
|
||||
I64 timestamp;
|
||||
U8 rnd0[512] format "$$DA-P,"
|
||||
"A=\"Poems#00-99 (2 Decimal Digits from Hex):%s\"$$\n";
|
||||
"A=\"Poems #00-99 (2 Decimal Digits from Hex):%s\"$$\n";
|
||||
U8 rnd1[512];
|
||||
U8 rnd2[512];
|
||||
U8 rnd3[512];
|
||||
|
@ -190,7 +190,7 @@ class CMetallicaForm
|
|||
{
|
||||
I64 timestamp;
|
||||
U8 rnd0[512] format "$$DA-P,"
|
||||
"A=\"Song#1-99 (2 Decimal Digits from Hex):%s\"$$\n";
|
||||
"A=\"Song #1-99 (2 Decimal Digits from Hex):%s\"$$\n";
|
||||
U8 rnd1[512];
|
||||
U8 rnd2[512];
|
||||
U8 rnd3[512];
|
||||
|
@ -251,14 +251,14 @@ class CImgurForm
|
|||
{
|
||||
U8 tag[STR_LEN];
|
||||
U8 special[STR_LEN] format "$$DA-P,A=\"SerialNum:%s\"$$\n";
|
||||
I64 min format "$$DA,A=\"Width:%d\"$$\n";
|
||||
I64 sec format "$$DA,A=\"Height:%d\"$$\n";
|
||||
I64 min format "$$DA,A=\"Width :%d\"$$\n";
|
||||
I64 sec format "$$DA,A=\"Height :%d\"$$\n";
|
||||
};
|
||||
|
||||
class CWikipediaForm
|
||||
{
|
||||
U8 tag[STR_LEN] format "$$DA-P,A=\"Tag Text:%s\"$$\n";
|
||||
U8 special[STR_LEN] format "$$DA-P,A=\"Index:%s\"$$\n";
|
||||
U8 special[STR_LEN] format "$$DA-P,A=\"Index :%s\"$$\n";
|
||||
I64 min;
|
||||
I64 sec;
|
||||
};
|
||||
|
@ -277,18 +277,18 @@ DefineListLoad("ST_FAMLY_PHOTOS","Family1_58-78\0Family2_78-86\0"
|
|||
class CFamilyPhotoForm
|
||||
{
|
||||
I64 volume format "$$LS,D=\"ST_FAMLY_PHOTOS\"$$\n";
|
||||
I64 part format "$$DA,A=\"Part:%d\"$$\n";
|
||||
I64 part format "$$DA,A=\"Part :%d\"$$\n";
|
||||
U8 picture[STR_LEN] format "$$DA-P,A=\"Picture:%s\"$$\n";
|
||||
I64 width format "$$GREEN$$640x427 or 640x960$$FG$$\n"
|
||||
"$$DA,A=\"Width:%d\"$$\n";
|
||||
I64 height format "$$DA,A=\"Height:%d\"$$\n";
|
||||
"$$DA,A=\"Width :%d\"$$\n";
|
||||
I64 height format "$$DA,A=\"Height :%d\"$$\n";
|
||||
};
|
||||
|
||||
class CBlogImgForm
|
||||
{
|
||||
U8 picture[STR_LEN] format "$$DA-P,A=\"Picture:%s\"$$\n";
|
||||
I64 width format "$$DA,A=\"Width:%d\"$$\n";
|
||||
I64 height format "$$DA,A=\"Height:%d\"$$\n";
|
||||
I64 width format "$$DA,A=\"Width :%d\"$$\n";
|
||||
I64 height format "$$DA,A=\"Height :%d\"$$\n";
|
||||
};
|
||||
|
||||
class CBlogVideoForm
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*Asm labels can only be defined once
|
||||
in a task.<F5> will spawn a new task
|
||||
in a task. <F5> will spawn a new task
|
||||
each time, so you don't get redefine
|
||||
error, like when repeatedly #including
|
||||
it from the cmd line.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*Asm labels can only be defined once
|
||||
in a task.<F5> will spawn a new task
|
||||
in a task. <F5> will spawn a new task
|
||||
each time, so you don't get redefine
|
||||
error, like when repeatedly #including
|
||||
it from the cmd line.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*Asm labels can only be defined once
|
||||
in a task.<F5> will spawn a new task
|
||||
in a task. <F5> will spawn a new task
|
||||
each time, so you don't get redefine
|
||||
error, like when repeatedly #including
|
||||
it from the cmd line.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*Asm labels can only be defined once
|
||||
in a task.<F5> will spawn a new task
|
||||
in a task. <F5> will spawn a new task
|
||||
each time, so you don't get redefine
|
||||
error, like when repeatedly #including
|
||||
it from the cmd line.
|
||||
|
@ -7,7 +7,7 @@ it from the cmd line.
|
|||
These are many useful kernel
|
||||
routines $LK,"::/Kernel/StrA.CC",A="FF:::/Kernel/StrA.CC,PUT_CHARS"$
|
||||
intended to be called from
|
||||
asm.Generally, they preserve
|
||||
asm. Generally, they preserve
|
||||
regs.
|
||||
|
||||
You can call any routine you
|
||||
|
|
|
@ -58,7 +58,7 @@ _extern _MUL_U64_U64_TO_U128 U0 MulU64(I64 n1,I64 n2,U128 *_prod);
|
|||
U0 MulByHand()
|
||||
{
|
||||
U128 p;
|
||||
"2*7=0x%X\n",MulU8(2,7);
|
||||
"2*7 =0x%X\n",MulU8(2,7);
|
||||
"100*10=0x%X\n",MulU8(100,10);
|
||||
|
||||
MulU64(0x0123456789ABCDEF,0x1000001,&p);
|
||||
|
|
|
@ -8,7 +8,7 @@ U0 BigCount()
|
|||
while (hi<0x10) {
|
||||
lo+=1<<58;
|
||||
hi+=Carry;
|
||||
"%016X%016X\n",hi,lo;
|
||||
"%016X %016X\n",hi,lo;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ U0 BigShift()
|
|||
hi<<=1;
|
||||
lo<<=1;
|
||||
hi+=Carry;
|
||||
"%016X%016X\n",hi,lo;
|
||||
"%016X %016X\n",hi,lo;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*Demonstrates class meta data.
|
||||
Basically, we make use of the compiler's
|
||||
data about a class.We can add to the
|
||||
data about a class. We can add to the
|
||||
compilers data arbitrary items, either string or
|
||||
or int or F64 (if you typecast).
|
||||
|
||||
|
@ -41,7 +41,7 @@ U0 DumpStruct(U8 *_d,U8 *class_name=lastclass)
|
|||
"%s:",ml->str;
|
||||
|
||||
//All our items are I64's. If you want, you can check
|
||||
//the data type of the member var.See $LK,"ClassRep",A="MN:ClassRep"$().
|
||||
//the data type of the member var. See $LK,"ClassRep",A="MN:ClassRep"$().
|
||||
q=_d+ml->offset;
|
||||
|
||||
if (print_str=MemberMetaData("print_str",ml))
|
||||
|
|
|
@ -32,7 +32,7 @@ all flags and cmds.
|
|||
|
||||
Note: the default page length is 66 lines
|
||||
and branching back more than the page length
|
||||
will reset the column to 1.So, set page
|
||||
will reset the column to 1. So, set page
|
||||
length to a large number if you want to
|
||||
branch back a long distance.
|
||||
*/
|
||||
|
|
|
@ -27,7 +27,7 @@ public U0 DocProfile(U8 *filename,I64 flags)
|
|||
"$$GREEN$$The lowest byte of the 32-bit 'doc_e->type', "
|
||||
"'$$PURPLE$$doc_e->type.u8[0]$$GREEN$$', "
|
||||
"is cmd and accessed with the union "
|
||||
"'$$PURPLE$$doc_e->type_u8$$GREEN$$'."
|
||||
"'$$PURPLE$$doc_e->type_u8$$GREEN$$'. "
|
||||
"See $$LK,\"CDocEntry\",A=\"MN:CDocEntry\"$$, "
|
||||
"$$LK,\"Doc Type Defines\",A=\"MN:DOCT_TEXT\"$$ and "
|
||||
"$$LK,\"Doc Type Codes\","
|
||||
|
@ -39,16 +39,16 @@ public U0 DocProfile(U8 *filename,I64 flags)
|
|||
|
||||
"\n$$GREEN$$'$$PURPLE$$doc_e->type.u8[1]$$GREEN$$' is "
|
||||
"the screen color attr of the "
|
||||
"entry.'$$PURPLE$$doc_e->type.u16[1]"
|
||||
"entry. '$$PURPLE$$doc_e->type.u16[1]"
|
||||
"$$GREEN$$' is some flags for blinking and "
|
||||
"stuff.See $$LK,\"Doc Type Flag "
|
||||
"stuff. See $$LK,\"Doc Type Flag "
|
||||
"Defines\",A=\"MN:DOCET_BLINK\"$$.\n$$FG$$";
|
||||
|
||||
for (i=16;i<32;i++)
|
||||
if (type_flags_stats[i])
|
||||
"%4d:%d\n",i,type_flags_stats[i];
|
||||
|
||||
"$$GREEN$$\n'$$PURPLE$$doc_e->de_flags$$GREEN$$' is 64-bit."
|
||||
"$$GREEN$$\n'$$PURPLE$$doc_e->de_flags$$GREEN$$' is 64-bit. "
|
||||
"See $$LK,\"Doc Flag Defines\",A=\"MN:DOCEf_TAG\"$$ and "
|
||||
"$$LK,\"Doc Flag Codes\","
|
||||
"A=\"FF:::/Zenith/DolDoc/DocInit.CC,ST_DOC_FLAGS\"$$.\n"
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
class FDStruct
|
||||
{//Use <CTRL-l> and sel "Data", "List" or "Check Box"
|
||||
//to generate the formats.
|
||||
F64 num1 format "$$DA-TRM,A=\"Float1:%12.8f\"$$\n";
|
||||
F64 num2 format "$$DA-TRM,A=\"Float2:%12e\"$$\n";
|
||||
I64 num3 format "$$DA-TRM,A=\"Int1:0x%016X\"$$\n";
|
||||
I64 num4 format "$$DA-TRM,A=\"Int2:%12d\"$$\n";
|
||||
F64 num1 format "$$DA-TRM,A=\"Float 1:%12.8f\"$$\n";
|
||||
F64 num2 format "$$DA-TRM,A=\"Float 2:%12e\"$$\n";
|
||||
I64 num3 format "$$DA-TRM,A=\"Int 1:0x%016X\"$$\n";
|
||||
I64 num4 format "$$DA-TRM,A=\"Int 2:%12d\"$$\n";
|
||||
I64 type format "$$LS,D=\"ST_PERSON_TYPE\"$$\n";
|
||||
U8 name[32] format "$$DA-P,A=\"Name:%s\"$$\n";
|
||||
U8 name[32] format "$$DA-P,A=\"Name :%s\"$$\n";
|
||||
U8 *address1 format "$$DA+M,A=\"Address:%s\"$$\n"; //+M is unlimited len U8 *.
|
||||
U8 *address2 format "$$DA+M,A=\"Address:%s\"$$\n"; //+M is unlimited len U8 *.
|
||||
CDate datetime format "$$DA-TRM,A=\"Date:%8D\"$$\n";
|
||||
CDate datetime format "$$DA-TRM,A=\"Date :%8D\"$$\n";
|
||||
Bool check format "$$CB,\"Check\"$$\n";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//This example shows bttns.Bttns return a menu val
|
||||
//unless you rig them to send macros.Menu entries are
|
||||
//This example shows bttns. Bttns return a menu val
|
||||
//unless you rig them to send macros. Menu entries are
|
||||
//about the same as bttns, but don't have a border.
|
||||
|
||||
I64 PopUpFreq()
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
"\nSuper: 3$$SY,-3$$2$$SY,0$$=9\n\n"
|
||||
"Sub: H$$SY,3$$2$$SY,0$$O\n\n"
|
||||
"Color: $$RED$$Test$$FG$$\n\n"
|
||||
"Blink: $$BK,1$$Test$$BK,0$$\n\n"
|
||||
"Invert: $$IV,1$$Test$$IV,0$$\n\n"
|
||||
"\nSuper : 3$$SY,-3$$2$$SY,0$$=9\n\n"
|
||||
"Sub : H$$SY,3$$2$$SY,0$$O\n\n"
|
||||
"Color : $$RED$$Test$$FG$$\n\n"
|
||||
"Blink : $$BK,1$$Test$$BK,0$$\n\n"
|
||||
"Invert : $$IV,1$$Test$$IV,0$$\n\n"
|
||||
"UnderLine: $$UL,1$$Test$$UL,0$$\n\n"
|
||||
"Link: $$LK,\"KStart16.CC\",A=\"::/Kernel/KStart16.CC\"$$\n\n\n"
|
||||
"Bttn:$$BT-X,\"OKAY\",LE=1$$\n\n\n\n";
|
||||
"Link : $$LK,\"KStart16.CC\",A=\"::/Kernel/KStart16.CC\"$$\n\n\n"
|
||||
"Bttn : $$BT-X,\"OKAY\",LE=1$$\n\n\n\n";
|
||||
|
||||
//You can do it this way if you like.
|
||||
"\nSuper: 3$SY,-3$2$SY,0$=9\n\n"
|
||||
"Sub: H$SY,3$2$SY,0$O\n\n"
|
||||
"\nSuper : 3$SY,-3$2$SY,0$=9\n\n"
|
||||
"Sub : H$SY,3$2$SY,0$O\n\n"
|
||||
//Can't see color because of syntax highlighting. Press <CTRL-t>
|
||||
"Color: $FG,4$Test$FG$\n\n"
|
||||
"Blink: $BK,1$Test$BK,0$\n\n"
|
||||
"Invert: $IV,1$Test$IV,0$\n\n"
|
||||
"Color : $FG,4$Test$FG$\n\n"
|
||||
"Blink : $BK,1$Test$BK,0$\n\n"
|
||||
"Invert : $IV,1$Test$IV,0$\n\n"
|
||||
"UnderLine: $UL,1$Test$UL,0$\n\n"
|
||||
//<CTRL-SHIFT-T> on this link to toggle individual commands.
|
||||
"Link: $LK,"KStart16.CC",A="::/Kernel/KStart16.CC"$\n\n\n"
|
||||
"Link : $LK,"KStart16.CC",A="::/Kernel/KStart16.CC"$\n\n\n"
|
||||
|
||||
"Bttn:$BT,"OKAY",LE=1$\n\n\n\n";
|
||||
"Bttn : $BT,"OKAY",LE=1$\n\n\n\n";
|
||||
|
|
|
@ -56,7 +56,7 @@ U0 UnusedDefineScan()
|
|||
doc_e=doc->head.next;
|
||||
while (doc_e!=doc) {
|
||||
if (doc_e->type_u8==DOCT_LINK) {
|
||||
"%s",tmph->str;
|
||||
"%s ",tmph->str;
|
||||
doc_e2=DocEntryCopy(doc,doc_e);
|
||||
DocInsEntry(old_put_doc,doc_e2);
|
||||
'\n';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//$BK,1$WARNING:$BK,0$ Don't return out of a catch{}.This
|
||||
//$BK,1$WARNING:$BK,0$ Don't return out of a catch{}. This
|
||||
//might get fixed.
|
||||
|
||||
//You can use $LK,"PutExcept",A="MN:PutExcept"$() in a catch stmt
|
||||
|
|
|
@ -18,7 +18,7 @@ U0 SongTask(I64)
|
|||
|
||||
U0 DrawIt(CTask *task,CDC *dc)
|
||||
{
|
||||
GrPrint(dc,0,0,"Error:%6.3fTime:%6.3fScore:%6.3fBest:%8.3f",
|
||||
GrPrint(dc,0,0,"Error:%6.3f Time:%6.3f Score:%6.3f Best:%8.3f",
|
||||
avg_error,elapsed_time,score,best_score);
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ U0 CircleTrace()
|
|||
score=elapsed_time*avg_error;
|
||||
|
||||
//$LK,"Sleep",A="MN:Sleep"$()s until the next time the
|
||||
//window mgr task runs.The
|
||||
//window mgr task runs. The
|
||||
//window mgr calls the UpdateWin() routine
|
||||
//and places messages in the que, so there's
|
||||
//no need to do anything until the window mgr runs.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//This loads a list of zero terminated
|
||||
//strings into the sym table and
|
||||
//gives a name to it.Strings like
|
||||
//gives a name to it. Strings like
|
||||
//this are known as Define entries.
|
||||
|
||||
//See $LK,"ST_RAINBOW_10",A="FF:::/Zenith/Gr/GrPalette.CC,ST_RAINBOW_10"$
|
||||
|
@ -30,8 +30,8 @@ U0 Digits()
|
|||
DocClear;
|
||||
//Set default background and foreground
|
||||
"$$WW,1$$$$BG,DKGRAY$$$$FD,WHITE$$"
|
||||
"\nThis is a memory game."
|
||||
"Try to remember the digits and enter them."
|
||||
"\nThis is a memory game. "
|
||||
"Try to remember the digits and enter them. "
|
||||
"They are colored based on electrical "
|
||||
"engineering color codes.\n";
|
||||
for (i=0;i<10;i++)
|
||||
|
|
|
@ -21,7 +21,7 @@ U0 DrawIt(CTask *task,CDC *)
|
|||
#define STACK_SIZE 2048
|
||||
//We would put these as local vars
|
||||
//in SolveMaze() but the system stack size
|
||||
//is limited, so it's a bad habit.The heap
|
||||
//is limited, so it's a bad habit. The heap
|
||||
//is the normal ZenithOS technique, but
|
||||
//it's a pain in this case.
|
||||
I64 stack_ptr,
|
||||
|
|
Binary file not shown.
|
@ -37,7 +37,7 @@ on and off within your programs, leaving
|
|||
ones which need initialization on the code heap.
|
||||
|
||||
You can't dynamically initialize data heap
|
||||
glbls--they are consts.This might be a silly
|
||||
glbls--they are consts. This might be a silly
|
||||
point, but might res in odd differences, perhaps
|
||||
from the order things are evaluated.
|
||||
|
||||
|
@ -46,7 +46,7 @@ because they don't take-up room in the .BIN file.
|
|||
*/
|
||||
|
||||
#ifjit
|
||||
#exe {Option(OPTf_GLBLS_ON_DATA_HEAP,ON);};
|
||||
#exe {Option(OPTf_GLOBALS_ON_DATA_HEAP,ON);};
|
||||
|
||||
Test g2[]={
|
||||
{10,"name1"},
|
||||
|
@ -70,7 +70,7 @@ U0 Main2()
|
|||
|
||||
Main2;
|
||||
|
||||
#exe {Option(OPTf_GLBLS_ON_DATA_HEAP,ON);};
|
||||
#exe {Option(OPTf_GLOBALS_ON_DATA_HEAP,ON);};
|
||||
#endif
|
||||
|
||||
'\n';
|
||||
|
|
|
@ -10,7 +10,7 @@ U0 BSplineDemo()
|
|||
Fs->win_inhibit=WIG_TASK_DEFAULT-WIF_SELF_FOCUS-WIF_SELF_BORDER;
|
||||
|
||||
DocClear;
|
||||
"Sel ctrl points with left mouse.Right when finished.\n";
|
||||
"Sel ctrl points with left mouse. Right when finished.\n";
|
||||
DCFill;
|
||||
do {
|
||||
message_code=GetMessage(&arg1,&arg2,1<<MESSAGE_MS_L_UP+1<<MESSAGE_MS_R_UP);
|
||||
|
|
Binary file not shown.
|
@ -51,7 +51,7 @@ U0 PredatorPrey()
|
|||
CDC *dc=DCAlias;
|
||||
|
||||
PopUpOk("This will plot multiple predator-prey\n"
|
||||
"trajectories.It restarts many times\n"
|
||||
"trajectories. It restarts many times\n"
|
||||
"with different, random, initial populations.\n");
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
try {
|
||||
|
|
|
@ -27,7 +27,7 @@ U0 Lighting(CDC *dc,CD3I32 *ls,CD3I32 *poly,I64 color)
|
|||
vn_y*=d;
|
||||
vn_z*=d;
|
||||
//Vn is the cross product of V1 and V3
|
||||
//which means it is perpendicular.It
|
||||
//which means it is perpendicular. It
|
||||
//is the normal vect to the surface.
|
||||
//It has been scaled to length 65536.
|
||||
Mat4x4MulXYZ(r,&vn_x,&vn_y,&vn_z);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*This was done with <CTRL-SHIFT-L> template code.
|
||||
It's conceptually easy to do a ctrl,
|
||||
but tedious.You have complete freedom.
|
||||
but tedious. You have complete freedom.
|
||||
|
||||
See $LK,"CCtrl",A="MN:CCtrl"$.
|
||||
*/
|
||||
|
|
Binary file not shown.
|
@ -5,7 +5,7 @@ This example shows how you can drive pop-up
|
|||
windows.
|
||||
*/
|
||||
|
||||
In("");
|
||||
In(" ");
|
||||
"PopUp #1:%X\n",PopUpNoYes;
|
||||
|
||||
InStr("Message(MESSAGE_KEY_DOWN,0,SC_CURSOR_RIGHT);'' CH_SPACE;");
|
||||
|
|
|
@ -2,7 +2,7 @@ U0 DoWait()
|
|||
{
|
||||
I64 i;
|
||||
for (i=0;i<3;i++) {
|
||||
"PopUpNoYes;\n";
|
||||
"PopUpNoYes;\n ";
|
||||
|
||||
//Necessary after a $LK,"DocEntryRun",A="MN:DocEntryRun"$()
|
||||
//which occurs when PopUp's close.
|
||||
|
@ -16,11 +16,11 @@ U0 DoNoWait()
|
|||
{
|
||||
I64 i;
|
||||
for (i=0;i<3;i++)
|
||||
"PopUpNoYes;\n\"%d\\n\\n\";\n",i;
|
||||
"PopUpNoYes;\n \"%d\\n\\n\";\n",i;
|
||||
}
|
||||
|
||||
"//With Wait";PressAKey;
|
||||
"//With Wait ";PressAKey;
|
||||
DoWait;
|
||||
"//With No Wait";PressAKey;
|
||||
"//With No Wait ";PressAKey;
|
||||
DoNoWait;
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1,11 +1,11 @@
|
|||
/*"Fixed point" means you use ints
|
||||
that are scaled by a value.A common
|
||||
that are scaled by a value. A common
|
||||
example would be using number of pennies
|
||||
instead of dollars with a float.
|
||||
|
||||
Fixed-point used to be much $TX,"faster",HTML="http://en.wikipedia.org/wiki/X87"$,
|
||||
but modern processors do well with
|
||||
floats.It also depends on the compiler
|
||||
floats. It also depends on the compiler
|
||||
and my compiler is poor with floats.
|
||||
|
||||
I often use 64-bit ints with upper 32-bits
|
||||
|
@ -27,13 +27,13 @@ U0 Main()
|
|||
t0=tS;
|
||||
for (i=1000000000;i;i--)
|
||||
i_sum+=i_val;
|
||||
"IntSum\t\t:%.9f Time:%7.3fs\n",i_sum/ToF64(0x100000000),tS-t0;
|
||||
"Int Sum\t\t:%.9f Time:%7.3fs\n",i_sum/ToF64(0x100000000),tS-t0;
|
||||
|
||||
f_val= 2.0000002;
|
||||
t0=tS;
|
||||
for (i=1000000000;i;i--)
|
||||
f_sum+=f_val;
|
||||
"FloatSum\t:%.9f Time:%7.3fs\n",f_sum,tS-t0;
|
||||
"Float Sum\t:%.9f Time:%7.3fs\n",f_sum,tS-t0;
|
||||
'\n';
|
||||
}
|
||||
|
||||
|
@ -48,9 +48,9 @@ U0 DoIt2()
|
|||
/* Standard int types are declared
|
||||
with a special compiler feature which
|
||||
allows a structure to be accessed as a
|
||||
whole.That's why the i variable can
|
||||
whole. That's why the i variable can
|
||||
be accessed normally in addition to
|
||||
structure member access $LK,"I64",A="MN:I64"$.The actual
|
||||
structure member access $LK,"I64",A="MN:I64"$. The actual
|
||||
intrinsic compiler type is U64i.
|
||||
|
||||
public U64i union I64
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/*"Fixed point" means you use ints
|
||||
that are scaled by a value.A common
|
||||
that are scaled by a value. A common
|
||||
example would be using number of pennies
|
||||
instead of dollars with a float.
|
||||
|
||||
Fixed-point used to be much $TX,"faster",HTML="http://en.wikipedia.org/wiki/X87"$,
|
||||
but modern processors do well with
|
||||
floats.It also depends on the compiler
|
||||
floats. It also depends on the compiler
|
||||
and my compiler is poor with floats.
|
||||
|
||||
I often use 64-bit ints with upper 32-bits
|
||||
|
@ -91,7 +91,7 @@ U0 Main()
|
|||
}
|
||||
end=GetTSC;
|
||||
overhead_time=end-start;
|
||||
"$$RED$$Overhead Cycles:%10.5f$$FG$$\n",
|
||||
"$$RED$$Overhead Cycles :%10.5f$$FG$$\n",
|
||||
ToF64(overhead_time)/SAMPLE_SIZE;
|
||||
|
||||
//Measure F64 arithmetic
|
||||
|
@ -104,8 +104,8 @@ U0 Main()
|
|||
fsum+=d1*coordinates[i&65535];
|
||||
end=GetTSC;
|
||||
test_time=end-start;
|
||||
"Float Sum:%X\n",ToI64(fsum);
|
||||
"$$RED$$Float Cycles:%10.5f$$FG$$\n",
|
||||
"Float Sum :%X\n",ToI64(fsum);
|
||||
"$$RED$$Float Cycles :%10.5f$$FG$$\n",
|
||||
ToF64(test_time)/SAMPLE_SIZE;
|
||||
|
||||
//Measure fixed point arithmetic
|
||||
|
@ -118,8 +118,8 @@ U0 Main()
|
|||
}
|
||||
end=GetTSC;
|
||||
test_time=end-start;
|
||||
"Fixed-Point Sum:%X\n",sum;
|
||||
"$$RED$$Fixed-Point Cycles:%10.5f$$FG$$\n",
|
||||
"Fixed-Point Sum :%X\n",sum;
|
||||
"$$RED$$Fixed-Point Cycles :%10.5f$$FG$$\n",
|
||||
ToF64(test_time)/SAMPLE_SIZE;
|
||||
|
||||
//Measure fixed point arithmetic
|
||||
|
@ -127,7 +127,7 @@ U0 Main()
|
|||
sum=AsmFixedPt;
|
||||
end=GetTSC;
|
||||
test_time=end-start;
|
||||
"Asm Fixed-Point Sum:%X\n",sum;
|
||||
"Asm Fixed-Point Sum :%X\n",sum;
|
||||
"$$RED$$Asm Fixed-Point Cycles:%10.5f$$FG$$\n",
|
||||
ToF64(test_time)/SAMPLE_SIZE;
|
||||
|
||||
|
@ -136,8 +136,8 @@ U0 Main()
|
|||
sum=AsmFloat;
|
||||
end=GetTSC;
|
||||
test_time=end-start;
|
||||
"Asm Float Sum:%X\n",sum;
|
||||
"$$RED$$Asm Float Cycles:%10.5f$$FG$$\n",
|
||||
"Asm Float Sum :%X\n",sum;
|
||||
"$$RED$$Asm Float Cycles :%10.5f$$FG$$\n",
|
||||
ToF64(test_time)/SAMPLE_SIZE;
|
||||
|
||||
}
|
||||
|
@ -148,26 +148,26 @@ Main;
|
|||
|
||||
Machine 1:
|
||||
8 Cores 2.660GHz
|
||||
$FG,4$Overhead Cycles:2.00814$FG$
|
||||
Float Sum:FFFFE1D361BEED68
|
||||
$FG,4$Float Cycles:10.16076$FG$
|
||||
Fixed-Point Sum:FFFFE1D361729914
|
||||
$FG,4$Fixed-Point Cycles:5.29392$FG$
|
||||
Asm Fixed-Point Sum:FFFFE1D361729914
|
||||
$FG,4$Asm Fixed-Point Cycles:4.20464$FG$
|
||||
Asm Float Sum:FFFFE1D361BEED56
|
||||
$FG,4$Asm Float Cycles:3.04635$FG$
|
||||
$FG,4$Overhead Cycles : 2.00814$FG$
|
||||
Float Sum :FFFFE1D361BEED68
|
||||
$FG,4$Float Cycles : 10.16076$FG$
|
||||
Fixed-Point Sum :FFFFE1D361729914
|
||||
$FG,4$Fixed-Point Cycles : 5.29392$FG$
|
||||
Asm Fixed-Point Sum :FFFFE1D361729914
|
||||
$FG,4$Asm Fixed-Point Cycles: 4.20464$FG$
|
||||
Asm Float Sum :FFFFE1D361BEED56
|
||||
$FG,4$Asm Float Cycles : 3.04635$FG$
|
||||
|
||||
Machine 2:
|
||||
8 Cores 3.395GHz
|
||||
$FG,4$Overhead Cycles:4.87040$FG$
|
||||
Float Sum:D20A01DB177
|
||||
$FG,4$Float Cycles:10.11558$FG$
|
||||
Fixed-Point Sum:D209FD18CC7
|
||||
$FG,4$Fixed-Point Cycles:4.50618$FG$
|
||||
Asm Fixed-Point Sum:D209FD18CC7
|
||||
$FG,4$Asm Fixed-Point Cycles:3.02426$FG$
|
||||
Asm Float Sum:D20A01DB17B
|
||||
$FG,4$Asm Float Cycles:3.21070$FG$
|
||||
$FG,4$Overhead Cycles : 4.87040$FG$
|
||||
Float Sum :D20A01DB177
|
||||
$FG,4$Float Cycles : 10.11558$FG$
|
||||
Fixed-Point Sum :D209FD18CC7
|
||||
$FG,4$Fixed-Point Cycles : 4.50618$FG$
|
||||
Asm Fixed-Point Sum :D209FD18CC7
|
||||
$FG,4$Asm Fixed-Point Cycles: 3.02426$FG$
|
||||
Asm Float Sum :D20A01DB17B
|
||||
$FG,4$Asm Float Cycles : 3.21070$FG$
|
||||
|
||||
$HL,1$*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//This is the software interrupt num
|
||||
//we will use.See $LK,"Software Int's",A="MN:I_WAKE"$ for
|
||||
//picking a num.Nums are subject to change.
|
||||
//we will use. See $LK,"Software Int's",A="MN:I_WAKE"$ for
|
||||
//picking a num. Nums are subject to change.
|
||||
|
||||
#define I_F_UNARY_MINUS I_USER
|
||||
|
||||
|
@ -64,14 +64,14 @@ U0 TimeIns()
|
|||
for (i=0;i<SAMPLE_SIZE;i++)
|
||||
UnaryMinusInt(ã);
|
||||
end=GetTSC;
|
||||
"Interrupt Cycles:%10.5f\n",ToF64(end-start)/SAMPLE_SIZE;
|
||||
"Interrupt Cycles: %10.5f\n",ToF64(end-start)/SAMPLE_SIZE;
|
||||
|
||||
//Measure call time
|
||||
start=GetTSC;
|
||||
for (i=0;i<SAMPLE_SIZE;i++)
|
||||
UnaryMinusCall(ã);
|
||||
end=GetTSC;
|
||||
"CallCycles:%10.5f\n",ToF64(end-start)/SAMPLE_SIZE;
|
||||
"Call Cycles: %10.5f\n",ToF64(end-start)/SAMPLE_SIZE;
|
||||
|
||||
IntEntrySet(I_F_UNARY_MINUS,old_irq,IDTET_IRQ);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*$WW,1$
|
||||
$TR-C,"Main Compiler"$
|
||||
$ID,2$The mini compiler is like the main compiler, except the main compiler's lexical analyser removes comments and does preprocessing.$LK,"Lex",A="MN:Lex"$(),$LK,"Echo",A="MN:Echo"$(ON).
|
||||
$ID,2$The mini compiler is like the main compiler, except the main compiler's lexical analyser removes comments and does preprocessing. $LK,"Lex",A="MN:Lex"$(),$LK,"Echo",A="MN:Echo"$(ON).
|
||||
|
||||
The main compiler generates $LK,"Intermediate Code",A="FF:::/Compiler/CompilerA.HH,IC_END"$ at the parser stage.See $LK,"ParseExpression",A="MN:ParseExpression"$(), $LK,"ParseStatement",A="MN:ParseStatement"$().
|
||||
The main compiler generates $LK,"Intermediate Code",A="FF:::/Compiler/CompilerA.HH,IC_END"$ at the parser stage. See $LK,"ParseExpression",A="MN:ParseExpression"$(), $LK,"ParseStatement",A="MN:ParseStatement"$().
|
||||
|
||||
The main compiler optimizes See $LK,"Intermediate Code Attributes",A="MN:intermediate_code_table"$, $LK,"Combining Consts",A="FF:::/Compiler/OptPass012.CC,case IC_MUL"$, $LK,"Choosing Reg Vars",A="FF:::/Compiler/OptPass3.CC,comp.num_reg_vars"$.Use $LK,"PassTrace",A="MN:PassTrace"$() to see the optimization stages.
|
||||
The main compiler optimizes See $LK,"Intermediate Code Attributes",A="MN:intermediate_code_table"$, $LK,"Combining Consts",A="FF:::/Compiler/OptPass012.CC,case IC_MUL"$, $LK,"Choosing Reg Vars",A="FF:::/Compiler/OptPass3.CC,comp.num_reg_vars"$. Use $LK,"PassTrace",A="MN:PassTrace"$() to see the optimization stages.
|
||||
|
||||
The main compiler makes machine code in the back end.See $LK,"IC Struct",A="MN:CIntermediateCode"$, $LK,"COCCompile",A="MN:COCCompile"$ and $LK,"OptPass789A",A="FF:::/Compiler/OptPass789A.CC,IC_MUL"$(),$LK,"BackEnd",A="FF:::/Compiler/BackA.CC,ICMul"$.Set $LK,"Trace",A="MN:Trace"$(ON) to see the output of the backend.
|
||||
The main compiler makes machine code in the back end. See $LK,"IC Struct",A="MN:CIntermediateCode"$, $LK,"COCCompile",A="MN:COCCompile"$ and $LK,"OptPass789A",A="FF:::/Compiler/OptPass789A.CC,IC_MUL"$(), $LK,"BackEnd",A="FF:::/Compiler/BackA.CC,ICMul"$. Set $LK,"Trace",A="MN:Trace"$(ON) to see the output of the backend.
|
||||
$ID,-2$
|
||||
$TR-C,"Mini Compiler"$
|
||||
$ID,2$For this mini compiler, some things you should know about 64-bit asm:
|
||||
|
@ -98,7 +98,7 @@ U0 ParseTerm(U8 **_src,U8 **_dst,I64 prec)
|
|||
src2=*_src;
|
||||
dst2=*_dst;
|
||||
while (TRUE) {
|
||||
//This is inefficient.The main compiler doesn't back-up like this.
|
||||
//This is inefficient. The main compiler doesn't back-up like this.
|
||||
i=Parse(&src2,&dst2);
|
||||
if (PREC_MUL<=i<prec) {
|
||||
*_src=src2;
|
||||
|
@ -216,8 +216,8 @@ U0 Main()
|
|||
throw;
|
||||
"$$RED$$This code is not efficient, but the compiler is simple.$$FG$$\n";
|
||||
Un(code,dst-code); //Unassemble the code we created.
|
||||
//$LK,"Call",A="MN:Call"$() is a function.See $LK,"_CALL",A="FF:::/Kernel/KUtils.CC,_CALL"$::
|
||||
//See also $LK,"CallInd",A="MN:CallInd"$().See $LK,"_CALL_IND",A="FF:::/Kernel/KUtils.CC,_CALL_IND"$::
|
||||
//$LK,"Call",A="MN:Call"$() is a function. See $LK,"_CALL",A="FF:::/Kernel/KUtils.CC,_CALL"$::
|
||||
//See also $LK,"CallInd",A="MN:CallInd"$(). See $LK,"_CALL_IND",A="FF:::/Kernel/KUtils.CC,_CALL_IND"$::
|
||||
"$$LTBLUE$$Answer:%d$$FG$$\n",Call(code);
|
||||
} catch {
|
||||
"$$RED$$Error$$FG$$\n";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*lock{} is a compiler stmt
|
||||
which places asm LOCK inst
|
||||
prefixes on code.Only use it on
|
||||
prefixes on code. Only use it on
|
||||
read-modify-write statements.
|
||||
It will generate invalid insts
|
||||
if you misuse it and it will crash.
|
||||
|
|
|
@ -2,7 +2,7 @@ U0 Job(CDoc *doc)
|
|||
{
|
||||
I64 i;
|
||||
for (i=0;i<2;i++)
|
||||
DocPrint(doc,"$$FG,%d$$CPU%d",Gs->num&15,Gs->num);
|
||||
DocPrint(doc,"$$FG,%d$$CPU%d ",Gs->num&15,Gs->num);
|
||||
}
|
||||
|
||||
U0 MPPrintDemo()
|
||||
|
|
|
@ -16,7 +16,7 @@ U0 RandDemo()
|
|||
{
|
||||
I64 i;
|
||||
|
||||
"Seed(0) will do timer XORed random numbers."
|
||||
"Seed(0) will do timer XORed random numbers. "
|
||||
"A task starts with $LK,"Seed(0)",A="FF:::/Kernel/KTask.CC,Seed("$ by default.\n";
|
||||
PressAKey;
|
||||
Seed;
|
||||
|
@ -24,7 +24,7 @@ U0 RandDemo()
|
|||
DCFill;
|
||||
|
||||
"\nSeed(num) will do deterministic, non-timer random numbers starting at "
|
||||
"a specific seed.You can run a specific video game over and over "
|
||||
"a specific seed. You can run a specific video game over and over "
|
||||
"by typing Seed(num) at the cmd line before the game.\n";
|
||||
PressAKey;
|
||||
Seed(1);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*The ~/Registry.CC file is CosmiC code.
|
||||
You can execute a tree branch of it.The Zenith
|
||||
You can execute a tree branch of it. The Zenith
|
||||
branch is executed in the Zenith task boot phase.
|
||||
Normally, you will place var declarations
|
||||
in the branch you make, but since an arthmetic expression
|
||||
|
|
Binary file not shown.
|
@ -143,7 +143,7 @@ U0 Morse()
|
|||
|
||||
"$$GREEN$$";
|
||||
|
||||
doc_e=DocPrint(DocPut,"$$TX+TC,\"\"$$");
|
||||
doc_e=DocPrint(DocPut,"$$TX+TC,\" \"$$");
|
||||
doc_e->tag_cb=&MorseTimes;
|
||||
|
||||
"$$FG$$\n";
|
||||
|
|
|
@ -5,31 +5,31 @@ U0 Song()
|
|||
try //Catch <CTRL-ALT-c> exit
|
||||
while (!ScanChar) {
|
||||
Play("6hEqDC5B6CDhE",
|
||||
"God\0is\0a\0g\0od\0of\0love.\n\0");
|
||||
"God \0is \0a \0g\0od \0of \0love.\n\0");
|
||||
Play("5GqFEFhG6E",
|
||||
"\0\0\0\0\0He\0");
|
||||
" \0 \0 \0 \0 \0He \0");
|
||||
Play("6qDC5B6CDhE5G",
|
||||
"wat\0ches\0us\0from\0a\0bove.\n\0\0");
|
||||
"wat\0ches \0us \0from \0a\0bove.\n\0 \0");
|
||||
Play("5qFEFhGB6qC",
|
||||
"\0\0\0\0Our\0world\0");
|
||||
" \0 \0 \0 \0Our \0world \0");
|
||||
Play("6DhCeDC5hBG",
|
||||
"is\0n't\0al\0ways\0nice.\n\0\0");
|
||||
"is\0n't \0al\0ways \0nice.\n\0 \0");
|
||||
Play("5qFEFhG6EqD",
|
||||
"\0\0\0\0Be\0fore\0");
|
||||
" \0 \0 \0 \0Be\0fore \0");
|
||||
Play("6C5B6CDhE5G",
|
||||
"you\0gr\0ipe\0think\0twice.\n\0\0");
|
||||
"you \0gr\0ipe \0think \0twice.\n\0 \0");
|
||||
Play("5qFEFhG6EqD",
|
||||
"\0\0\0\0He\0wat\0");
|
||||
" \0 \0 \0 \0He \0wat\0");
|
||||
Play("6C5B6CDhE5G",
|
||||
"ches\0us\0from\0a\0bove.\n\0\0");
|
||||
"ches \0us \0from \0a\0bove.\n\0 \0");
|
||||
Play("5qFEFhG6EqD",
|
||||
"\0\0\0\0He'll\0smack\0");
|
||||
" \0 \0 \0 \0He'll \0smack \0");
|
||||
Play("6C5B6CDhE5G",
|
||||
"you\0with\0out\0a\0glove.\n\0\0");
|
||||
"you \0with \0out \0a \0glove.\n\0 \0");
|
||||
Play("5qFEFhGB6qC",
|
||||
"\0\0\0\0Our\0world\0");
|
||||
" \0 \0 \0 \0Our \0world \0");
|
||||
Play("6DhCeDC5hBG",
|
||||
"is\0n't\0al\0ways\0nice.\n\0\0");
|
||||
"is\0n't \0al\0ways \0nice.\n\0 \0");
|
||||
Play("5qFEFhG");
|
||||
}
|
||||
catch
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*This does a really crappy job of
|
||||
suggesting spellings.Write a better
|
||||
suggesting spellings. Write a better
|
||||
one for fun.
|
||||
*/
|
||||
|
||||
|
@ -83,7 +83,7 @@ U0 CtrlAltL(I64)
|
|||
if (Fs!=zenith_task)
|
||||
SuggestSpellingDemo;
|
||||
else {
|
||||
CtrlAltCBSet('L',&CtrlAltL,"Cmd/Suggest Spelling");
|
||||
CtrlAltCBSet('L',&CtrlAltL,"Cmd /Suggest Spelling");
|
||||
//Appears in the Zenith Task Window
|
||||
"<CTRL-ALT-l> installed\n";
|
||||
}
|
||||
|
|
|
@ -58,7 +58,6 @@ U0 HtmlPutS(CDoc *doc,I64 u32_attr,I64 *_old_u32_attr,Bool underline_update,
|
|||
break;
|
||||
|
||||
start:
|
||||
case CH_SHIFT_SPACE: ptr=""; break;
|
||||
case '&': ptr="&"; break;
|
||||
case '<': ptr="<"; break;
|
||||
case '>': ptr=">"; break;
|
||||
|
@ -184,7 +183,7 @@ public CDoc *Doc2Html(CDoc *doc_in,U8 *html_header=NULL,U8 *body_header=NULL,
|
|||
"<head>\n"
|
||||
"<meta http-equiv=\"Content-Type\" "
|
||||
"content=\"text/html;charset=US-ASCII\">\n"
|
||||
"<meta name=\"generator\" content=\"$TX,"ZenithOS V5.03",D="DD_OS_NAME_VERSION"$\">\n";
|
||||
"<meta name=\"generator\" content=\"$TX,"ZenithOS V1.00",D="DD_OS_NAME_VERSION"$\">\n";
|
||||
if (!body_header) body_header=
|
||||
"<body>\n"
|
||||
"<pre style=\"font-family:courier;font-size:10pt\">\n";
|
||||
|
@ -211,7 +210,7 @@ public CDoc *Doc2Html(CDoc *doc_in,U8 *html_header=NULL,U8 *body_header=NULL,
|
|||
if (line_anchors)
|
||||
DocPrint(doc_out,"<a name=\"l%d\"></a>",y+1);
|
||||
if (line_nums)
|
||||
DocPrint(doc_out,"%0*d",digits,y+1);
|
||||
DocPrint(doc_out,"%0*d ",digits,y+1);
|
||||
old_y=y;
|
||||
}
|
||||
while (y<doc_e->y) {
|
||||
|
@ -221,7 +220,7 @@ public CDoc *Doc2Html(CDoc *doc_in,U8 *html_header=NULL,U8 *body_header=NULL,
|
|||
if (line_anchors)
|
||||
DocPrint(doc_out,"<a name=\"l%d\"></a>",y+1);
|
||||
if (line_nums)
|
||||
DocPrint(doc_out,"%0*d",digits,y+1);
|
||||
DocPrint(doc_out,"%0*d ",digits,y+1);
|
||||
old_y=y;
|
||||
}
|
||||
col=0;
|
||||
|
@ -240,7 +239,7 @@ public CDoc *Doc2Html(CDoc *doc_in,U8 *html_header=NULL,U8 *body_header=NULL,
|
|||
if (no_bwd)
|
||||
while (col<doc_e->x)
|
||||
HtmlPutS(doc_out,doc_e->settings.final_u32_attr&~DOCET_UNDERLINE,
|
||||
&old_u32_attr,TRUE,"",&col,style_bitmap);
|
||||
&old_u32_attr,TRUE," ",&col,style_bitmap);
|
||||
|
||||
link_st=NULL;
|
||||
if (doc_e->de_flags&DOCEF_HTML_LINK)
|
||||
|
|
|
@ -372,14 +372,14 @@ U0 DownLoadRep(LogStruct *head,CDate dstart,CDate dend)
|
|||
|
||||
"\n\nDownloads of /TOS_Distro.ISO\n";
|
||||
for (i=dstart;i<=dend;i+=1<<32)
|
||||
"%DDups:%5dTotal:%5dUniques:%5d\n",i,
|
||||
"%D Dups:%5d Total:%5d Uniques:%5d\n",i,
|
||||
day_dup_counts[(i+local_time_offset)>>32-days_start],
|
||||
day_counts[(i+local_time_offset)>>32-days_start],
|
||||
day_counts[(i+local_time_offset)>>32-days_start]-
|
||||
day_dup_counts[(i+local_time_offset)>>32-days_start];
|
||||
|
||||
"\n\nDownloads of /TOS_Distro.ISO\n"
|
||||
"'-' is a dup.'+' is not a dup.\n";
|
||||
"'-' is a dup. '+' is not a dup.\n";
|
||||
if (hours_end-hours_start>=HOURS_MAX)
|
||||
i=hours_end-HOURS_MAX+1;
|
||||
else
|
||||
|
@ -393,7 +393,7 @@ U0 DownLoadRep(LogStruct *head,CDate dstart,CDate dend)
|
|||
'+';
|
||||
'\n';
|
||||
}
|
||||
"Total:%dDups:%dUniques:%d\n",count,dups,count-dups;
|
||||
"Total:%d Dups:%d Uniques:%d\n",count,dups,count-dups;
|
||||
|
||||
"\n\nDownloads of /TOS_Distro.ISO\n";
|
||||
LinkTreeTraverse(link_root);
|
||||
|
@ -458,9 +458,9 @@ U0 IndexRep(LogStruct *head,CDate dstart,CDate dend)
|
|||
}
|
||||
|
||||
"\n\nHits on /index.html\n"
|
||||
"'-' is a dup.'+' is not a dup.\n";
|
||||
"'-' is a dup. '+' is not a dup.\n";
|
||||
for (i=dstart;i<=dend;i+=1<<32)
|
||||
"%DDups:%5dTotal:%5dUniques:%5d\n",i,
|
||||
"%D Dups:%5d Total:%5d Uniques:%5d\n",i,
|
||||
day_dup_counts[(i+local_time_offset)>>32-days_start],
|
||||
day_counts[(i+local_time_offset)>>32-days_start],
|
||||
day_counts[(i+local_time_offset)>>32-days_start]-
|
||||
|
@ -480,7 +480,7 @@ U0 IndexRep(LogStruct *head,CDate dstart,CDate dend)
|
|||
'+';
|
||||
'\n';
|
||||
}
|
||||
"Total:%dDups:%dUniques:%d\n",count,dups,count-dups;
|
||||
"Total:%d Dups:%d Uniques:%d\n",count,dups,count-dups;
|
||||
|
||||
"\n\nHits on /index.html\n";
|
||||
LinkTreeTraverse(link_root);
|
||||
|
@ -505,7 +505,7 @@ U0 WebLogRep(U8 *mask,U8 *output_filename)
|
|||
PrintErr("No Data.\n");
|
||||
else {
|
||||
dstart=GetDate("Start(%D):",dstart);
|
||||
dend =GetDate("End(%D):",dend);
|
||||
dend =GetDate("End (%D):",dend);
|
||||
BlockIPNuip(head);
|
||||
|
||||
DocClear;
|
||||
|
|
|
@ -18,7 +18,7 @@ U0 LogScrambleFile(U8 *name)
|
|||
I64 i;
|
||||
U32 num;
|
||||
U8 *st,*st2;
|
||||
"Scrambling:%s\n",name;
|
||||
"Scrambling: %s\n",name;
|
||||
while (doc_e!=doc) {
|
||||
if (doc_e->type_u8==DOCT_TEXT) {
|
||||
st=MAlloc(StrLen(doc_e->tag)+1);
|
||||
|
|
|
@ -2,11 +2,10 @@ $WW,1$$FG,5$$TX+CX,"Char Overview"$$FG$
|
|||
|
||||
A $FG,2$Char$FG$acter is a single byte holding an ASCII code for a letter, num or sym. The $FG,2$ZenithOS$FG$ term is a $FG,2$U8$FG$.
|
||||
|
||||
Standard ASCII values range from 0 to 127. Values below 32 are ctrl key's. So, an ASCII #3 is a $FG,2$<CTRL-c>$FG$. ZenithOS uses a few nonstandard values below 32. See $LK,"Char Definitions",A="MN:CH_SHIFT_SPACE"$.
|
||||
Standard ASCII values range from 0 to 127. Values below 32 are ctrl key's. So, an ASCII #3 is a $FG,2$<CTRL-c>$FG$. ZenithOS uses a few nonstandard values below 32. See $LK,"Char Definitions",A="MN:CH_CTRLA"$.
|
||||
|
||||
ASCII #5 is the cursor location in a saved file.
|
||||
ASCII #28 is $FG,2$<SHIFT-ESC>$FG$.
|
||||
ASCII #31 is a $FG,2$<SHIFT-SPACE>$FG$.
|
||||
|
||||
ZenithOS ASCII is 8-bit instead of 7-bit, so it also uses the range from 128-255. Press $FG,2$<CTRL-ALT-a>$FG$ to see shapes for 128-255. Technically, $FG,2$<CTRL-ALT-a>$FG$ are $LK,"screen codes",A="HI:TextBase Layer"$.
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ $ID,2$ZenithOS runs in $FG,2$High-res 32-bit color VBE$FG$ graphics modes, not t
|
|||
$ID,-2$$TR,"Where is the kernel memory?"$
|
||||
$ID,2$ZenithOS identity-maps all memory, all the time. It is like paging is not used. There is no special kernel $FG,2$high half$FG$ memory space. ZenithOS is ring-0-only, so everything is kernel, even user programs. There is a special task called $FG,2$Zenith$FG$ and he doesn't die, so his heap never gets freed. That's as close to $FG,2$kernel memory$FG$ as it gets. All code goes in the lowest 2Gig of addresses, known as the $LK,"Code Heap",A="FF:::/Doc/Glossary.DD,Code and Data Heaps"$, so that the $FG,2$REL32$FG$ addressing mode can be used. See $LK,"MemoryOverview",A="FI:::/Doc/MemoryOverview.DD"$.
|
||||
$ID,-2$$TR,"Why does it run code from stack addresses?"$
|
||||
$ID,2$ZenithOS puts all code in the lowest 2Gig, known as the $LK,"Code Heap",A="FF:::/Doc/Glossary.DD,Code and Data Heaps"$, so that the $FG,2$REL32$FG$ addressing mode can be used. ZenithOS is 64-bit, but $FG,2$2Gig$FG$ is enough for code. It actually puts global variables there, too, but you can turn that off with $LK,"OPTf_GLBLS_ON_DATA_HEAP",A="MN:OPTf_GLBLS_ON_DATA_HEAP"$. $LK,"MAlloc",A="MN:MAlloc"$() allocs higher memory.
|
||||
$ID,2$ZenithOS puts all code in the lowest 2Gig, known as the $LK,"Code Heap",A="FF:::/Doc/Glossary.DD,Code and Data Heaps"$, so that the $FG,2$REL32$FG$ addressing mode can be used. ZenithOS is 64-bit, but $FG,2$2Gig$FG$ is enough for code. It actually puts global variables there, too, but you can turn that off with $LK,"OPTf_GLOBALS_ON_DATA_HEAP",A="MN:OPTf_GLOBALS_ON_DATA_HEAP"$. $LK,"MAlloc",A="MN:MAlloc"$() allocs higher memory.
|
||||
$ID,-2$$TR,"How does it SYSCALL?"$
|
||||
$ID,2$ZenithOS doesn't use software interrupts or $FG,2$SYSCALL$FG$ insts because it never needs to change out of ring-0, even running user programs. Calls are always $FG,2$CALL REL32$FG$ insts.
|
||||
$ID,-2$$TR,"How do you fault-in stack?"$
|
||||
|
|
|
@ -11,7 +11,6 @@ File
|
|||
Edit
|
||||
{
|
||||
Ed(,CH_SPACE);
|
||||
Plain(,CH_SHIFT_SPACE);
|
||||
Copy(,CH_CTRLC);
|
||||
Paste(,CH_CTRLV);
|
||||
DeleteFile(,CH_CTRLY);
|
||||
|
|
|
@ -151,7 +151,7 @@ $ID,2$This is Zenith, as in the $MA-X+PU,"most important task",LM="ACDDefsPut(Do
|
|||
$ID,-2$$TR,"Daemon Tasks"$
|
||||
$ID,2$Each CPU core has an executive task called $FG,2$Daemon$FG$ that is immortal. The Zenith task on $FG,2$Core0$FG$ is also its $FG,2$Daemon$FG$ task.
|
||||
$ID,-2$$TR,"Code and Data Heaps"$
|
||||
$ID,2$ZenithOS uses the asm $FG,2$CALL$FG$ inst, exclusively, and that inst is limited to calling routines $FG,2$+/-2Gig$FG$ from the current code location. To prevent out-of-range issues, I decided to separate code and data, placing all code within the lowest $FG,2$2Gig$FG$ of memory, addresses $FG,2$00000000$FG$-$FG,2$7FFFFFFF$FG$. The compiler and $LK,"Load",A="MN:Load"$()er alloc memory from the code heap to store code and glbl vars, unless the compiler option $LK,"OPTf_GLBLS_ON_DATA_HEAP",A="MN:OPTf_GLBLS_ON_DATA_HEAP"$ is used. When programs call $LK,"MAlloc",A="MN:MAlloc"$() is from the data heap, which in not limited in size, except by physical RAM memory. You can alloc from any heap in any task at any time on any core, even making $LK,"independent",A="MN:MemPagAlloc"$ heaps.
|
||||
$ID,2$ZenithOS uses the asm $FG,2$CALL$FG$ inst, exclusively, and that inst is limited to calling routines $FG,2$+/-2Gig$FG$ from the current code location. To prevent out-of-range issues, I decided to separate code and data, placing all code within the lowest $FG,2$2Gig$FG$ of memory, addresses $FG,2$00000000$FG$-$FG,2$7FFFFFFF$FG$. The compiler and $LK,"Load",A="MN:Load"$()er alloc memory from the code heap to store code and glbl vars, unless the compiler option $LK,"OPTf_GLOBALS_ON_DATA_HEAP",A="MN:OPTf_GLOBALS_ON_DATA_HEAP"$ is used. When programs call $LK,"MAlloc",A="MN:MAlloc"$() is from the data heap, which in not limited in size, except by physical RAM memory. You can alloc from any heap in any task at any time on any core, even making $LK,"independent",A="MN:MemPagAlloc"$ heaps.
|
||||
$ID,-2$$TR,"Parent, Child and PopUp Tasks"$
|
||||
$ID,2$Often a task will $LK,"Spawn",A="MN:Spawn"$() or $LK,"PopUp",A="MN:PopUp"$() a task as a helper. The helper is known as a child Task, though you can $LK,"Spawn",A="MN:Spawn"$ a task and assign it a different parent... like $FG,2$Zenith$FG$. Links are kept as to who's whose child, so when one task is $LK,"Kill",A="MN:Kill"$()ed the child helper tasks die, too. You can get a report of current system tasks with $LK,"TaskRep",A="MN:TaskRep"$(). There is just one window per task, so child tasks are needed for pop-ups.
|
||||
$ID,-2$$TR,"CosmiC"$
|
||||
|
|
|
@ -86,8 +86,6 @@ $ID,-5$
|
|||
|
||||
* I don't use $FG,2$U0 *$FG$ because the size is zero for ptr arithmetic.
|
||||
|
||||
* Use $FG,2$$LK,"CH_SHIFT_SPACE",A="MN:CH_SHIFT_SPACE"$$FG$ for spaces in quotes in source code because I run $LK,"Spaces-to-Tabs",A="FF:::/Zenith/Utils/StrUtils.CC,S2T"$ on source code.
|
||||
|
||||
* Do not use $FG,2$#if$FG$ or $FG,2$#ifdef$FG$
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ $WW,1$$FG,5$$TX+CX,"Compiler Options"$$FG$
|
|||
|
||||
Use $LK,"Option",A="MN:Option"$(). You might need to do $FG,2$#exe {Option();}$FG$.
|
||||
|
||||
$LK,"OPTf_GLBLS_ON_DATA_HEAP",A="MN:OPTf_GLBLS_ON_DATA_HEAP"$ without this option, global vars are placed in the code heap which is limited to 2Gig. In $FG,2$AOT$FG$ modules, global vars take-up room in the $FG,2$.BIN$FG$ file, so you might want to use this option, instead. You might wish to turn it on and off around specific vars. A disadvantage of data heap global vars in $FG,2$AOT$FG$ modules is they can't be initialized.
|
||||
$LK,"OPTf_GLOBALS_ON_DATA_HEAP",A="MN:OPTf_GLOBALS_ON_DATA_HEAP"$ without this option, global vars are placed in the code heap which is limited to 2Gig. In $FG,2$AOT$FG$ modules, global vars take-up room in the $FG,2$.BIN$FG$ file, so you might want to use this option, instead. You might wish to turn it on and off around specific vars. A disadvantage of data heap global vars in $FG,2$AOT$FG$ modules is they can't be initialized.
|
||||
|
||||
$LK,"OPTf_EXTERNS_TO_IMPORTS",A="MN:OPTf_EXTERNS_TO_IMPORTS"$ and $LK,"OPTf_KEEP_PRIVATE",A="MN:OPTf_KEEP_PRIVATE"$ are strange options, you'll never need. They're to allow the same header file for $FG,2$Kernel$FG$ to act as $FG,2$extern$FG$s when compiling itself and $FG,2$import$FG$s when compiled by $FG,2$AOT$FG$ modules.
|
||||
|
||||
|
|
|
@ -115,6 +115,6 @@ $WW,1$
|
|||
|
||||
* An unused gap on the stack is left for $FG,2$reg$FG$ vars.
|
||||
|
||||
* Note: $FG,2$static$FG$ function vars do not go on the data heap, no matter the setting of the $LK,"OPTf_GLBLS_ON_DATA_HEAP",A="MN:OPTf_GLBLS_ON_DATA_HEAP"$$FG$. They may in the future.
|
||||
* Note: $FG,2$static$FG$ function vars do not go on the data heap, no matter the setting of the $LK,"OPTf_GLOBALS_ON_DATA_HEAP",A="MN:OPTf_GLOBALS_ON_DATA_HEAP"$$FG$. They may in the future.
|
||||
|
||||
* $LK,"OPTf_EXTERNS_TO_IMPORTS",A="MN:OPTf_EXTERNS_TO_IMPORTS"$ will treat $FG,2$_extern$FG$ as $FG,2$_import$FG$ and $FG,2$extern$FG$ as $FG,2$import$FG$. This allows a header to be used either as a $FG,2$JIT compiled$FG$ or $FG,2$AOT compiled$FG$ header.
|
||||
|
|
|
@ -49,7 +49,7 @@ Therefore, the range of numbers it can represent is split between the negative s
|
|||
|----------------------------|
|
||||
$FG,5$ Signed byte range
|
||||
|--------------------------|
|
||||
$FG,0$-255-1270127255$FG$
|
||||
$FG,0$-255 -127 0 127 255$FG$
|
||||
|
||||
|
||||
Now, you can imagine how this plays out with numbers that are bigger than 1 byte.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//Make Your own Distro by #include-ing this file.
|
||||
|
||||
#define STD_DISTRO_DVD_CONFIG "TB\nScale2Mem(2048,0x40000)\nT\n\n1024\n768\n\n\n"
|
||||
#define STD_DISTRO_DVD_CONFIG "TB\nScale2Mem(2048,0x40000)\nT \n\n1024\n768\n\n\n"
|
||||
|
||||
U0 MakeMyISO(U8 *_out_iso_filename)
|
||||
{//Does everything with current drive.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
In("CC\n\n1\n\n5\n\n\n");
|
||||
BootHDIns;
|
||||
"\n\nSuccessful?";
|
||||
"\n\nSuccessful? ";
|
||||
if(YorN)
|
||||
{
|
||||
Once("CursorRemove(\"/*\");;;#include\"DoDistro\";;if(DriveIsWritable){Del(\"~/Registry.CC\");OutU16(0x4004, 0x3400);}");
|
||||
Once("CursorRemove(\"/*\");;;#include \"DoDistro\";;if(DriveIsWritable){Del(\"~/Registry.CC\");OutU16(0x4004, 0x3400);}");
|
||||
Reboot;
|
||||
}
|
||||
|
|
|
@ -36,14 +36,14 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
if (sc&SCF_SHIFT)
|
||||
{
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/LTPURPLE");
|
||||
KeyDescSet("Dol /LTPURPLE");
|
||||
else
|
||||
"$$LTPURPLE$$";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/PURPLE");
|
||||
KeyDescSet("Dol /PURPLE");
|
||||
else
|
||||
"$$PURPLE$$";
|
||||
}
|
||||
|
@ -52,14 +52,14 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
if (sc & SCF_SHIFT)
|
||||
{
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/LTRED");
|
||||
KeyDescSet("Dol /LTRED");
|
||||
else
|
||||
"$$LTRED$$";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/RED");
|
||||
KeyDescSet("Dol /RED");
|
||||
else
|
||||
"$$RED$$";
|
||||
}
|
||||
|
@ -67,12 +67,12 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
case SC_F3:
|
||||
if (sc&SCF_SHIFT) {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/LTGREEN");
|
||||
KeyDescSet("Dol /LTGREEN");
|
||||
else
|
||||
"$$LTGREEN$$";
|
||||
} else {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/GREEN");
|
||||
KeyDescSet("Dol /GREEN");
|
||||
else
|
||||
"$$GREEN$$";
|
||||
}
|
||||
|
@ -80,12 +80,12 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
case SC_F4:
|
||||
if (sc&SCF_SHIFT) {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/Default Color");
|
||||
KeyDescSet("Dol /Default Color");
|
||||
else
|
||||
"$$FG$$";
|
||||
} else {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/BLUE");
|
||||
KeyDescSet("Dol /BLUE");
|
||||
else
|
||||
"$$BLUE$$";
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
case SC_F7:
|
||||
if (!(sc&SCF_SHIFT)) {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/TimeIns");
|
||||
KeyDescSet("Cmd /TimeIns");
|
||||
else
|
||||
TimeIns;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
case SC_DELETE:
|
||||
if(sc & SCF_SHIFT) {
|
||||
if(sc & SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/Soft Reboot");
|
||||
KeyDescSet("Cmd /Soft Reboot");
|
||||
else
|
||||
BootRAM;
|
||||
}
|
||||
|
@ -110,25 +110,25 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
break;
|
||||
case 'a':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/AutoComplete On");
|
||||
KeyDescSet("Cmd /AutoComplete On");
|
||||
else
|
||||
AutoComplete(ON);
|
||||
return TRUE;
|
||||
case 'A':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/AutoComplete Off");
|
||||
KeyDescSet("Cmd /AutoComplete Off");
|
||||
else
|
||||
AutoComplete;
|
||||
return TRUE;
|
||||
case 'h':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/WinTileHorz");
|
||||
KeyDescSet("Cmd /WinTileHorz");
|
||||
else
|
||||
WinTileHorz;
|
||||
return TRUE;
|
||||
case 'm':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/WinMax");
|
||||
KeyDescSet("Cmd /WinMax");
|
||||
else {
|
||||
WinBorder;
|
||||
WinMax;
|
||||
|
@ -136,7 +136,7 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
return TRUE;
|
||||
case 'v':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd/WinTileVert");
|
||||
KeyDescSet("Cmd /WinTileVert");
|
||||
else
|
||||
WinTileVert;
|
||||
return TRUE;
|
||||
|
@ -165,37 +165,37 @@ Bool MyPutKey(I64 ch,I64 sc)
|
|||
//Ins your own ALT-key plug-ins
|
||||
case '1':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/ã");
|
||||
KeyDescSet("Dol /ã");
|
||||
else
|
||||
'ã';
|
||||
return TRUE;
|
||||
case '2':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/é");
|
||||
KeyDescSet("Dol /é");
|
||||
else
|
||||
'é';
|
||||
return TRUE;
|
||||
case '3':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/è");
|
||||
KeyDescSet("Dol /è");
|
||||
else
|
||||
'è';
|
||||
return TRUE;
|
||||
case '4':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/ê");
|
||||
KeyDescSet("Dol /ê");
|
||||
else
|
||||
'ê';
|
||||
return TRUE;
|
||||
case '9':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/Indent 5");
|
||||
KeyDescSet("Dol /Indent 5");
|
||||
else
|
||||
"$$ID,5$$";
|
||||
return TRUE;
|
||||
case '0':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Dol/Unindent 5");
|
||||
KeyDescSet("Dol /Unindent 5");
|
||||
else
|
||||
"$$ID,-5$$";
|
||||
return TRUE;
|
||||
|
|
|
@ -3,25 +3,25 @@ Bool BootDVDProbe(CBlkDev *bd)
|
|||
U8 *img=CAlloc(DVD_BLK_SIZE);
|
||||
I64 i;
|
||||
Bool res=FALSE;
|
||||
"Port:%04X,%04XUnit:%02X",bd->base0,bd->base1,bd->unit;
|
||||
"Port: %04X,%04X Unit: %02X ",bd->base0,bd->base1,bd->unit;
|
||||
if (ATAProbe(bd->base0,bd->base1,bd->unit)==BDT_ATAPI) {
|
||||
"ATAPI";
|
||||
" ATAPI";
|
||||
if (ATAPIStartStop(bd,tS+5.0,TRUE)) {
|
||||
"Started";
|
||||
" Started";
|
||||
for (i=0;i<2;i++) {//Retry
|
||||
if (ATAPIReadBlks2(bd,tS+7.0,img,sys_boot_blk,1,FALSE)) {
|
||||
if ((img+sys_boot_src.u16[1]<<BLK_SIZE_BITS)(CKernel *)
|
||||
->compile_time==sys_compile_time) {
|
||||
"Found\n";
|
||||
" Found\n";
|
||||
return TRUE;
|
||||
} else
|
||||
"Read";
|
||||
" Read";
|
||||
} else
|
||||
"NoRead";
|
||||
" NoRead";
|
||||
}
|
||||
}
|
||||
}
|
||||
"Nope\n";
|
||||
" Nope\n";
|
||||
Free(img);
|
||||
return res;
|
||||
}
|
||||
|
@ -97,15 +97,15 @@ U0 ATARepEntry(I64 base0,I64 base1,I64 unit,U8 *message,
|
|||
CATARep *tmpha;
|
||||
if (type=ATAProbe(base0,base1,unit)) {
|
||||
*num_hints+=1;
|
||||
"\n$$PURPLE$$$$BT+X,\"%d\",LM=\"%d\\n\"$$$$FG$$$$LM,4$$",*num_hints,*num_hints;
|
||||
"\n$$PURPLE$$ $$BT+X,\"%d\",LM=\"%d\\n\"$$$$FG$$$$LM,4$$",*num_hints,*num_hints;
|
||||
if (type==BDT_ATA)
|
||||
"$$RED$$HardDrive$$LTBLUE$$ATA";
|
||||
"$$RED$$Hard Drive $$LTBLUE$$ATA ";
|
||||
else
|
||||
"$$RED$$CD/DVDDrive$$LTBLUE$$ATAPI";
|
||||
"$$RED$$CD/DVD Drive $$LTBLUE$$ATAPI ";
|
||||
"%s$$FG$$\n",message;
|
||||
if (base0==blkdev.ins_base0 && unit==blkdev.ins_unit)
|
||||
"$$PURPLE$$(Drive originally installed from.)$$FG$$\n";
|
||||
"Base0:0x%04XBase1:0x%04XUnit:%d$$LM,0$$\n",
|
||||
"Base0:0x%04X Base1:0x%04X Unit:%d$$LM,0$$\n",
|
||||
base0,base1,unit;
|
||||
if (_head) {
|
||||
tmpha=CAlloc(sizeof(CATARep));
|
||||
|
|
|
@ -56,7 +56,7 @@ Bool BlkDevInit(CBlkDev *bd)
|
|||
try bd->file_disk=FOpen(bd->file_disk_name,"rc",bd->max_blk+1);
|
||||
catch {
|
||||
if (Fs->except_ch=='File')
|
||||
PrintErr("Not Contiguous.Move file to filename.ISO.C.\n");
|
||||
PrintErr("Not Contiguous. Move file to filename.ISO.C.\n");
|
||||
Fs->catch_except=TRUE;
|
||||
}
|
||||
if (bd->file_disk) {
|
||||
|
|
|
@ -8,7 +8,7 @@ Bool CopySingleZ(U8 *f1,U8 *f2) //Just one file
|
|||
file_buf=FileRead(f1,&size,&attr);
|
||||
attr=FileAttr(f2,attr);
|
||||
if (file_buf) {
|
||||
"Copying%s to %s\n",f1,f2;
|
||||
"Copying %s to %s\n",f1,f2;
|
||||
c=FileWrite(f2,file_buf,size,de.datetime,attr);
|
||||
Free(file_buf);
|
||||
return ToBool(c);
|
||||
|
|
|
@ -127,21 +127,21 @@ I64 Dir(U8 *files_find_mask,Bool full)
|
|||
csize=Bsr(csize)/4+1;
|
||||
c=Bsr(c)/4+1;
|
||||
|
||||
"$$MA,T=\"Directory\",LM=\"PopUpCd;Dir;\n\"$$of%s\n",st;
|
||||
"$$MA,T=\"Directory\",LM=\"PopUpCd;Dir;\n\"$$ of %s\n",st;
|
||||
if (full)
|
||||
"__DATE____TIME__%*ts%*ts\n",
|
||||
"__DATE__ __TIME__ %*ts %*ts\n",
|
||||
csize,"SIZE",c,"BLK";
|
||||
else
|
||||
"DATE_TIME_%*ts\n",csize,"SIZE";
|
||||
"DATE_ TIME_ %*ts\n",csize,"SIZE";
|
||||
while (tmpde1) {
|
||||
tmpde2=tmpde1->next;
|
||||
res++;
|
||||
if (full)
|
||||
"%D%T%0*tX%0*tX ",tmpde1->datetime,tmpde1->datetime,
|
||||
"%D %T %0*tX %0*tX ",tmpde1->datetime,tmpde1->datetime,
|
||||
csize,tmpde1->size,c,tmpde1->clus;
|
||||
else {
|
||||
Date2Struct(&ds,tmpde1->datetime+local_time_offset);
|
||||
"%02d/%02d%02d:%02d%0*tX ",ds.mon,ds.day_of_mon,ds.hour,ds.min,
|
||||
"%02d/%02d %02d:%02d %0*tX ",ds.mon,ds.day_of_mon,ds.hour,ds.min,
|
||||
csize,tmpde1->size;
|
||||
}
|
||||
if (tmpde1->attr & RS_ATTR_DIR)
|
||||
|
|
|
@ -350,16 +350,16 @@ U0 DriveRep()
|
|||
attr&15,attr>>4,drv_let,drive->fs_type&FSG_TYPE_MASK,"ST_DRIVE_TYPES",
|
||||
bd->type,"ST_BLKDEV_TYPES",bd->base0,bd->base1,bd->unit;
|
||||
if (st=DriveModelNum(drv_let)) {
|
||||
"Model#:%s\n",st;
|
||||
" Model# :%s\n",st;
|
||||
Free(st);
|
||||
}
|
||||
if (st=DriveSerialNum(drv_let)) {
|
||||
"Serial#:%s\n",st;
|
||||
" Serial#:%s\n",st;
|
||||
Free(st);
|
||||
}
|
||||
if (bd->type==BDT_ISO_FILE_READ || bd->type==BDT_ISO_FILE_WRITE)
|
||||
"File=\"%s\"\n",bd->file_disk_name;
|
||||
"%016X-%016X\n$$FG$$$$BG$$",drive->drv_offset,drive->drv_offset+drive->size-1;
|
||||
" File=\"%s\"\n",bd->file_disk_name;
|
||||
" %016X-%016X\n$$FG$$$$BG$$",drive->drv_offset,drive->drv_offset+drive->size-1;
|
||||
}
|
||||
}
|
||||
"Home Dir:\"%s\"\n",blkdev.home_dir;
|
||||
|
|
|
@ -86,8 +86,8 @@ U0 FAT32Format(U8 drv_let,Bool quick=TRUE)
|
|||
br->log_drive_num=0x80;
|
||||
br->ext_signature=0x29;
|
||||
br->serial_num=RandU32;
|
||||
MemCopy(br->vol_name,"NONAME",11);
|
||||
br->fat_name[0](I64)='FAT32';
|
||||
MemCopy(br->vol_name,"NO NAME ",11);
|
||||
br->fat_name[0](I64)='FAT32 ';
|
||||
br->signature=0xAA55;
|
||||
fis->signature1='RRaA';
|
||||
fis->signature2='rrAa';
|
||||
|
|
|
@ -30,7 +30,7 @@ public U64 sys_font_std[256] = {
|
|||
0x0000000000000000,
|
||||
0x0000000000000000,
|
||||
0x0000000000000000,
|
||||
0x0008000000000000,//
|
||||
0x0000000000000000,
|
||||
0x0000000000000000,//
|
||||
0x000C000C0C1E1E0C,//!
|
||||
0x0000000000121236,//"
|
||||
|
|
|
@ -163,9 +163,9 @@ U0 D(U8 *addr,I64 count=0x80,Bool show_offset=TRUE)
|
|||
U8 *ptr=addr;
|
||||
while (count) {
|
||||
if (show_offset)
|
||||
"%08X",ptr-addr;
|
||||
"%08X ",ptr-addr;
|
||||
else
|
||||
"%010X",ptr;
|
||||
"%010X ",ptr;
|
||||
if (count>16)
|
||||
j=16;
|
||||
else
|
||||
|
@ -173,10 +173,11 @@ U0 D(U8 *addr,I64 count=0x80,Bool show_offset=TRUE)
|
|||
for (i=0;i<j;i++)
|
||||
"%02X ",ptr[i];
|
||||
for (;i<16;i++)
|
||||
"";
|
||||
for (i=0;i<j;i++) {
|
||||
" ";
|
||||
for (i=0;i<j;i++)
|
||||
{
|
||||
ch=ptr[i];
|
||||
if (ch<CH_SHIFT_SPACE || ch==CH_BACKSPACE)
|
||||
if (ch< CH_SPACE || ch==CH_BACKSPACE)
|
||||
ch='.';
|
||||
'' ch;
|
||||
if (ch=='$$')
|
||||
|
@ -568,10 +569,10 @@ U0 Fault3(I64 fault_num,I64 fault_err_code)
|
|||
Beep(62,TRUE);
|
||||
if (fault_num==I_DEBUG) {
|
||||
if (debug.message) {
|
||||
"\n!!!%s",debug.message;
|
||||
"\n!!! %s",debug.message;
|
||||
if (debug.message_num)
|
||||
"%016X",debug.message_num;
|
||||
"!!!\n\n";
|
||||
" !!!\n\n";
|
||||
}
|
||||
}
|
||||
if (debug.panic)
|
||||
|
@ -606,7 +607,7 @@ U0 Fault2(I64 fault_num,I64 fault_err_code)
|
|||
fault_num,fault_num,"ST_INT_NAMES",fault_err_code;
|
||||
was_in_debug=DebugMode(ON);
|
||||
"RIP:%08X",Fs->rip; //Sometimes crashes on %p, so do this first
|
||||
":%pRSP:%08X\n",Fs->rip,Fs->rsp;
|
||||
":%p RSP:%08X\n",Fs->rip,Fs->rsp;
|
||||
if (fault_num==I_PAGE_FAULT) {
|
||||
MOV_RAX_CR2
|
||||
i=GetRAX;
|
||||
|
|
|
@ -117,8 +117,8 @@ U0 SysDefinesLoad()
|
|||
"File\0"
|
||||
"Module\0"
|
||||
"HelpFile\0"
|
||||
"FramePtr\0"
|
||||
"\0\0\0\0\0\0"
|
||||
"Frame Ptr\0"
|
||||
" \0 \0 \0 \0 \0 \0"
|
||||
"Private\0"
|
||||
"Public\0"
|
||||
"Export\0"
|
||||
|
@ -159,8 +159,8 @@ U0 SysDefinesLoad()
|
|||
"V\0"
|
||||
"D\0"
|
||||
"A\0"
|
||||
"\0"
|
||||
"\0"
|
||||
" \0"
|
||||
" \0"
|
||||
"X\0"
|
||||
"T\0"
|
||||
"C\0"
|
||||
|
@ -214,12 +214,12 @@ U0 SysDefinesLoad()
|
|||
"Stack Segment Fault\0"
|
||||
"General Protection\0"
|
||||
"Page Fault\0"
|
||||
"\0"
|
||||
" \0"
|
||||
"Math Fault\0"
|
||||
"Alignment Check\0"
|
||||
"Machine Check\0"
|
||||
"SIMD Exception\0"
|
||||
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||
" \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0"
|
||||
"MP Crash\0"
|
||||
"Wake\0"
|
||||
"Debug\0");
|
||||
|
|
|
@ -86,7 +86,7 @@ U0 SysGrInit()
|
|||
|
||||
//patch some chars
|
||||
text.aux_font[10] = text.font[10]; //"Return" symbol
|
||||
text.aux_font['' - 1] = text.font['' - 1]; //Shift-space
|
||||
text.aux_font[' ' - 1] = text.font[' ' - 1]; //Shift-space
|
||||
text.aux_font[255] = text.font[255]; //Block symbol ÿ
|
||||
|
||||
text.border_chars[2] (I64)='ÄͳºÚÉ¿»';
|
||||
|
@ -154,7 +154,7 @@ U0 KMain()
|
|||
IntInit1;
|
||||
|
||||
//Before this point use $LK,"Sound",A="MN:Sound"$() and $LK,"Busy",A="MN:Busy"$()
|
||||
//to debug.After this point, use $LK,"RawPrint",A="MN:RawPrint"$()
|
||||
//to debug. After this point, use $LK,"RawPrint",A="MN:RawPrint"$()
|
||||
LBts(&sys_run_level,RLf_RAW);
|
||||
"ZenithOS V%5.3f\t%D %T\n\n",
|
||||
sys_os_version,sys_compile_time,sys_compile_time;
|
||||
|
|
|
@ -85,7 +85,7 @@ U0 Busy(I64
|
|||
}
|
||||
|
||||
U0 SleepUntil(I64 wake_jiffy)
|
||||
{//Not for power-saving.It is to make a program pause without hogging the CPU.
|
||||
{//Not for power-saving. It is to make a program pause without hogging the CPU.
|
||||
Bool old_idle=LBts(&Fs->task_flags,TASKf_IDLE);
|
||||
Fs->wake_jiffy=wake_jiffy;
|
||||
Yield;
|
||||
|
@ -93,7 +93,7 @@ U0 SleepUntil(I64 wake_jiffy)
|
|||
}
|
||||
|
||||
U0 Sleep(I64 mS)
|
||||
{//Not for power-saving.It is to make a program pause without hogging the CPU.
|
||||
{//Not for power-saving. It is to make a program pause without hogging the CPU.
|
||||
if (!mS)
|
||||
Yield;
|
||||
else
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue