LTCD_060719.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:45:17 +02:00
commit f86e69648b
156 files changed
+49537

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
$WW,1$See $LK,"::/LT/DOC/Dollar.TXZ","FI:::/LT/DOC/Dollar.TXZ"$ for details of dollar sign cmds.
$FG,2$"Expression"$FG$ a number or C+ algebraic term with operators and C+ symbols can be entered.
$FG,2$"Macro"$FG$ Most entries can behave like macro entries if you assign them macro strings.
$FG,2$"AutoString"$FG$ Like a macro except it is an $LK,"AutoFile","FF:::/LT/DOC/OSGlossary.GLZ,AutoFile"$. You cannot have both an autostring and macro text defined.
$FG,5$Displayed Text$FG$ is the text that will be displayed for the item. For links, you can leave it blank and the details of the link will be shown.
$FG,5$Hide$FG$ means display nothing, making an entry invisible.
$FG,5$Left X$FG$ relative to the left margin.
$FG,5$Center X$FG$ relative to the horizontal center of the window.
$FG,5$Right X$FG$ relative to the right margin.
$FG,5$Top Y$FG$ relative to the top of the window.
$FG,5$Center Y$FG$ relative to the vertical center of the window.
$FG$$FG,5$Bottom Y$FG$ relative to the bottom of the window.
$FG,5$Blink$FG$ make the text blink.
$FG,5$Invert$FG$ make the text inverted.
$FG,5$Underline$FG$ make the text underlined.
$FG,5$Scroll X Length Expression$FG$ if a value is entered, the text will scroll in an area of this width.
$FG,5$Y Offset Expression$FG$ if a value is entered, the text will be shifted vertically by this many pixels, so you can make superscripts or subscripts.
$FG,5$X Offset Expression$FG$ if a value is entered, the text will be shifted horizontally by this many pixels.
$FG,5$Tree$FG$ The item will behave like a tree widget, with this as the adam.
$FG,5$Collapsed$FG$ The tree or hidden widget will begin collapsed.
$FG,5$Alias$FG$ For tree entries, the text of the subentry the cursor is on will appear here. This is for drop-down lists.
$FG,5$Quote$FG$ Make the result suitable for including in a program, in quotes, especially $FG,4$format_str$FG$ entries in class definitions.
$FG,5$X Expression$FG$ For cursor movements, this is the horizontal value.
$FG,5$Y Expression$FG$ For cursor movements, this is the vertical value.
$FG,5$$BK,1$PopUp$BK,0$$FG$ For macro's, run the macro in a PopUp window. Do this when making a macro to run a program, so it doesn't tie-up memory.
$FG,5$Escape$FG$ For macro's, send an ESC char to exit before running the macro. Without this, the macro runs in the wrong window, usually.
$FG,5$Refresh Data$FG$ For entries in programs where values are prompted, this flag updates the entry continuously.
$FG,5$Password$FG$ When items are prompted, the value will be shown as "*".
+151
View File
@@ -0,0 +1,151 @@
$WW,1$$FG,5$DOLLAR SIGN CMDS$FG$
LoseThos supports rich-text type commands which are bracketed with "$$". Use CTRL-L to experiment with them. Use CTRL-T to toggle between plain text and rich text.
The format of "$$" commands includes a two character code, +/-flags, a comma and parameters separated by commas. The flags often determine how many and what parameters the command takes.
See $LK,"default_flags","FA:::/LT/ADAM/LTF.CPZ,default_flags"$.
$TR,"TX Text"$
$ID,2$Normally, text is not bracketed with "$$", but if you wish to specify flag attributes to center text, you can bracket them with "$$" and enter flags such as "$FG,4$+CX$FG$". You cannot edit them if they are bracketed by "$$" unless you toggle to plain text mode with CTRL-T.
$ID,-2$$TR,"CR Hard Carriage Return"$
$ID,2$Carriage returns are normally specified without being bracketed with "$$".
$ID,-2$$TR,"SR Soft Carriage Return"$
$ID,2$Word wrap uses soft carriage returns which are not saved. You never place soft carriage returns by yourself.
$ID,-2$$TR,"TB Tab"$
$ID,2$Tabs are normally not bracketed with "$$", but are stored as ASCII#9.
$ID,-2$$TR,"CU Cursor position"$
$ID,2$The cursor position is usually stored as a ASCII#5 I1acter and is not bracketed with "$$". You do not normally enter cursor position commands yourself.
$ID,-2$$TR,"ID Indent +/- number"$
$ID,2$This changes the indention deeper if positive or shallower if negative. It effects the behavior of trees.
$ID,-2$$TR,"DA Data"$
$ID,2$This is primarily used for forms that prompt for data. Use CTRL-L as a resource editor-type thing to generate the text you'll need in your "fmtdata" command in a struct. If you add it directly with LtfPutS, you'll need to fill-in the data address. See $LK,"DoForm","MN:DoForm"$().
$ID,-2$$TR,"Text Colors"$
$ID,2$You place an expression(usually a color define--see $LK,"color defines","MN:BLACK"$) to indicate which of the 16 colors to use. If you enter no number, color returns to the default.
$FG,5$FG Foreground Color$FG$
$FG,5$BG Background Color$FG$
$FG,5$FD Default Foreground Color$FG$
$FG,5$BD Default Background Color$FG$
$FG,5$FL Foreground of Link Color$FG$
$FG,5$BL Background of Link Color$FG$
$FG,5$FM Foreground of Macro/Menu-Value Color$FG$
$FG,5$BM Background of Macro/Menu-Value Color$FG$
$FG,5$FA Foreground of Anchor Color$FG$
$FG,5$BA Background of Anchor Color$FG$
$FG,5$FH Foreground of Hidden widget Color$FG$
$FG,5$BH Background of Hidden widget Color$FG$
$FG,5$FE Foreground of Tree Color$FG$
$FG,5$BE Background of Tree Color$FG$
$ID,-2$$TR,"FU,BU User Prompts"$
$ID,2$These are special color changing commands. They are used when the user is prompted for text at the command line. They reset the cursor position if the cursor is positioned before them on the line. They are also used to indicate the start of a prompted string.
$ID,-2$$TR,"CL clear"$
$ID,2$Clear all entries except ones with hold($FG,4$+H$FG$) flags. This is good for programs which update data to the command line. It keeps the quantity of ltf entries down.
$ID,-2$$TR,"WW Word Wrap"$
$ID,2$Include a 1 or 0.
$ID,-2$$TR,"UL Underline"$
$ID,2$Include a 1 or 0.
$ID,-2$$TR,"IV Invert"$
$ID,2$Include a 1 or 0.
$ID,-2$$TR,"BK Blink"$
$ID,2$Include a 1 or 0.
$ID,-2$$TR,"SX Shift X position"$
$ID,2$* Include a number from -16 to 15.
* Only foreground is shifted.
* Positive right.
* For negative be sure to preceed with a comma.
$ID,-2$$TR,"SY Shift Y position"$
$ID,2$* Include a number from -16 to 15.
* Only foreground is shifted.
* Positive down.
* For negative be sure to preceed with a comma.
$ID,-2$$TR,"CM Cursor Movement"$
$ID,2$
$ID,-2$$TR,"AN Anchor"$
$ID,2$
$ID,-2$$TR,"LK Link"$
$ID,2$By default, links have a separate display text from link text, but with the $FG,4$-A$FG$ flag you can make the link displayed as in example 3.
Examples (Press CTRL-T to see):
1)$LK,"File link to Help.TXZ","::/LT/DOC/Help.TXZ"$
2)$LK,"File link to Help.TXZ with link type file","FI:::/LT/DOC/Help.TXZ"$
3)File link without different display string.$LK-A,"::/LT/DOC/Help.TXZ"$
4)$LK,"File find link searching for 'Admin'","FF:::/LT/DOC/Help.TXZ,Admin"$
5)$LK,"File find link searching for 3rd 'CTRL'","FF:::/LT/OSMain/ADAMK.HPZ,CTRL:3"$
6)$LK,"Manual page link","MN:PrintF"$
7)$LK,"File line number link","FL:::/LT/OSMain/ADAMK.HPZ,200"$
8)$LK,"File anchor link--Press CTRL-T to see anchor after you click","FA:::/LT/OSMain/SYSTEXT.CPZ,OS_SYSTEXT"$
$ID,-2$$TR,"BT Button"$
$ID,2$
$ID,-2$$TR,"CB Check Box"$
$ID,2$
$ID,-2$$TR,"MA Macro"$
$ID,2$Macro's are usually placed into menu/help areas and they have the '$FG,4$+X$FG$' flag set by default. Adding '$FG,4$-X$FG$' prevents the usual ESC from being sent (which exits the macro screen). Note that when you output a macro to the cmd line, when the user clicks on it, it will go to the bottom and execute it unless you cancel the ESC with a '$FG,4$-X$FG$'.
$ID,-2$$TR,"MU Menu Value"$
$ID,2$
$ID,-2$$TR,"HX Hex Edit"$
$ID,2$
$ID,-2$$TR,"Hidden Text Widget"$
$ID,2$$FG,5$HS Start of hidden text$FG$
$FG,5$HE End of hidden text$FG$
$FG,5$$FG$Hidden text widgets allow text to be placed in collapsable brackets like this $HS$$FG$This is hidden.$HE$ which can be expanded by clicking them. If you place a '$FG,4$-C$FG$' flag to uncollapse it, it will start expanded like this $HS-C$$FG$Click to hide$HE$. They can be nestled like this $HS$Click here:$HS$This is nestled.$HE$ okay?$HE$.
$ID,-2$$TR,"TR Tree Widget"$
$ID,2$A tree widget is a branch in a collapsable tree. The domain of the branch extends from the first +indent until enough -indents bring it back to where it started. Tree's begin collapsed unless a $FG,4$-C$FG$ flag is present.
$ID,-2$$TR,"PI Picture"$
$ID,2$You can insert a picture into text with CTRL-R. It is critical where the cursor is at the time you enter CTRL-R because the picture will be offset from that location. This is especially important when adding images to programs. Numbers for pictures are automatically chosen because copying to and from the clipboard requires this. You can insert another picture with the same image by hitting CTRL-T and manually adding a $$PI$$ entry with the same number. You can cause the $$PI$$ command to appear with some text associated with it by manually adding text into the $$PI$$ command, as in $$PI,"pic 2",2$$.
$ID,-2$$TR,"IB Insert Binary"$
$ID,2$This cmd is used to tell the compiler to fetch the binary data stored after the end of text. There is basically one type of binary data in LTF's at this point--pictures-- created with CTRL-R. They have a number associated with them. This number is automatically chosen, because copying to the clip-board and back requires renumbering. To use a $$IB$$ command, toggle to plain text (CTRL-T) after inserting a picture and check the number in the $$PI$$ command. Create a $$IB$$ command with the same number and the picture will be inserted into the compiled stream like a string constant. You can optionally include text to be displayed for the $$IB$$ command.
The main reason for the $$IB$$ command at this point is to pass a parameter to the $LK,"GrElemsPlot","MN:GrElemsPlot"$() function. See $LK,"::/LT/DEMO/Graphics/Sprite1.CPZ","FI:::/LT/DEMO/Graphics/Sprite1.CPZ"$.
$ID,-2$$TR,"IT Insert Binary Type"$
$ID,2$See $$IB$$. This command inserts a number into the compiled stream describing the type of binary data associated with a number. See $LK,"LTFBT_ELEMENT_GRAPH","MN:LTFBT_ELEMENT_GRAPH"$ for the types of binary data in LTF's.
$ID,-2$$TR,"IS Insert Binary Size"$
$ID,2$See $$IB$$. This command inserts a number into the compiled stream describing the size of binary data associated with a number.
$ID,-2$$TR,"BP Break Point"$
$ID,2$This is used by the debugger to mark a break point.
$ID,-2$$TR,"ER Error"$
$ID,2$When errors are detected in dollar commands, an $FG,5$ER$FG$ entry is generated to hold the garbage so it is not lost.
$ID,-2$
$FE,4$$TR,"FLAGS"$
$ID,2$$TR,"+H Hold"$
$ID,2$Hold entry and do not delete it when cleared with $FG,5$CL$FG$ or when the l->max_entries is exceeded. Word wrap is a good one to hold.
$ID,-2$$TR,"+A Auxilliary String"$
$ID,2$Most commands display a string. Some need other strings. A $FG,4$+A$FG$ means an auxilliary string is present. Links have $FG,4$+A$FG$ by default, so use a $FG,4$-A$FG$ if you wish the display string and the link string to be the same.
$ID,-2$$TR,"+TR Tree"$(obsolete)
$ID,2$* There is now a separate $FG,5$TR$FG$ command so this flag is obsolete.
* Make a tree branch. Usually this is placed on a text($FG,5$TX$FG$) entry. The tree extends from the start until another tree entry or when indentation has been expanded and reduced back to the starting value.
* A $FG,4$+C$FG$ flag on a tree will start it collapsed.
$ID,-2$$TR,"+PU PopUp"$
$ID,2$A PopUp flag on a macro ($FG,5$MA$FG$) will cause the commands to run in a pop-up window.
$ID,-2$$TR,"+C Collapsed"$
$ID,2$A collapsed flag on a tree $FG,5$TR$FG$ entry or a hide start $FG,5$HS$FG$ will cause it to start collapsed. A $FG,4$-C$FG$ flag will make it start open.
$ID,-2$$TR,"+X Exit"$
$ID,2$* A exit flag will cause a macro to send an ESC before running(to exit the macro screen and return to the cmd prompt). Actually, the default has an exit flag set so you might add a $FG,4$-X$FG$ to turn-off ESC.
* If an entry is in the cmd prompt window, the $FG,4$+X$FG$ will cause a movement to the bottom of the window.
$ID,-2$$TR,"+Q Quit"$
$ID,2$A quit flag is similar to a $FG,4$+X$FG$ except a CTRL-Q instead of an ESC to exit.
$ID,-2$$TR,"+PW Password"$
$ID,2$A password flag on a data entry ($FG,5$DA$FG$) will cause text to be shown as '*'s.
$ID,-2$$TR,"+Z Zero"$
$ID,2$A zero flag on a hex edit($FG,5$HX$FG$) entry will cause the offset from zero. A $FG,4$-X$FG$ will show the actual mem address. By default, $FG,5$HX$FG$ has the zero flag set.
$ID,-2$$TR,"+AL Alias"$
$ID,2$An alias flag on a tree entry ($FG,4$+TR$FG$) will cause the text of the current entry the cursor is on to be copied to this entry. This creates something similar to a drop-down window, but it doesn't work well yet.
$ID,-2$$TR,"+RD Refresh Data"$
$ID,2$The Refresh Data flag on a $FG,5$DA$FG$ or a $FG,5$CB$FG$ makes the value updated continuously.
$ID,-2$$ID,-2$$FE,5$
$FG,5$EXAMPLES:
$FG$Press CTRL-T to see how the following were done.
$UL,1$Underlined$UL,0$ $IV,1$Inverted$IV,0$ $BK,1$Blinking$BK,0$ $SY,-3$super$SY,0$ $SY,0$$SY,3$sub$SY,0$
$TX+SCX,"This is a big long scrolling message.",10$
$FG,5$Cursor Movements:$FG$
$CM+LX,3,3$Cursor moved 3 rows down and to 3rd column from left.
$CM+RX,-40,3$Note mandatory comma after flags
The following may be changed to modes instead of attributes with flags.
$TX+CX,"This is centered"$
$TX+RX,"This is right justified"$
+19
View File
@@ -0,0 +1,19 @@
$WW,1$* $LK,"grbase","MN:grbase"$ is a bitmap for persistent data on the screen, not needing to be redrawn. You create an alias for this by using $LK,"GrNew","MN:GrNew"$() and work with that. This image is XORed on top of everything, so the colors you work with, you usually XOR with GR_WHITE to compensate. (White is usually the text background color. XORing twice gets you to what you started with.) It's slightly simpler using this bitmap then $LK,"grbase2","MN:grbase2"$, but it's not as good because changes aren't syncronized to the screen update and window borders are not enforced. See $LK,"::/LT/DEMO/Graphics/DotNet.CPZ","FI:::/LT/DEMO/Graphics/DotNet.CPZ"$
* $LK,"grbase2","MN:grbase2"$ is a bitmap for the screen, redrawn each refresh. You create an alias with $LK,"GrNew","MN:GrNew"$() and work with that. You must change the "$FG,2$Fs->update_window$FG$" variable to point to your update function and must draw everything in the window over and over again. "$FG,2$DrawIt()$FG$" is the preferred name for your update function, so everyone is consistent. See $LK,"::/LT/DEMO/Graphics/Box.CPZ","FI:::/LT/DEMO/Graphics/Box.CPZ"$
* Use $LK,"GrNew","MN:GrNew"$() to create your own structure for accessing the screen and pass it either $LK,"grbase","MN:grbase"$ or $LK,"grbase2","MN:grbase2"$. (Free it with $LK,"GrDel","MN:GrDel"$() when finished). A $LK,"GrBitMap","MN:GrBitMap"$ returned by $LK,"GrNew","MN:GrNew"$() stores the pen width and current color. It also can hold info necessary to rotate the whole image in 3D and shift it around.
* Use $LK,"GrBitMapNew","MN:GrBitMapNew"$() to create a memory bitmap which can be used to work off-line and which can be $LK,"GrBlot","MN:GrBlot"$ed onto the screen. If you set $FG,2$brush$FG$ member of $FG,2$GrBitMap$FG$ to another $FG,2$GrBitMap$FG$, all the graphic routines will $LK,"GrBlot","MN:GrBlot"$() the brush instead of $LK,"GrPlot","MN:GrPlot"$(). See $LK,"::/LT/DEMO/Graphics/Blot.CPZ","FI:::/LT/DEMO/Graphics/Blot.CPZ"$.
* There are various flavors of line and point plotting routines. $LK,"GrLine","MN:GrLine"$() and $LK,"GrPlot","MN:GrPlot"$() are the simplest. The others allow 3 dimensional graphics.
* $LK,"GrTheta","MN:GrTheta"$() and $LK,"GrPhi","MN:GrPhi"$() create matrices for 3 dimensional rotations. You pass them an angle in radians. To make the matrices take effect, assign them to your graphic $LK,"GrBitMap","MN:GrBitMap"$'s "$FG,2$r$FG$" variable and set the $LK,"BMF_TRANSFORMATION","MN:BMF_TRANSFORMATION"$ flag. Transformations (rotations) can be combined using $LK,"GrMulMat","MN:GrMulMat"$(). See $LK,"::/LT/DEMO/Graphics/Box.CPZ","FI:::/LT/DEMO/Graphics/Box.CPZ"$.
* You can rotate single points using $LK,"GrRotate","MN:GrRotate"$().
* You can shift the image around by changing a $LK,"GrBitMap","MN:GrBitMap"$'s "$FG,2$x$FG$","$FG,2$y$FG$" and "$FG,2$z$FG$" variables.
* Use the resource editor, $FG,2$CTRL-R$FG$, to create a picture-like thing called a Graphic Element that can be plotted with $LK,"GrElemsPlot","MN:GrElemsPlot"$(). Use $FG,2$$$IB,"",1$$$FG$ in a source program to insert the address of picture #1. (After creating a picture with $FG,2$CTRL-R$FG$ in your source code, toggle to plain text with $FG,2$CTRL-T$FG$ and check it's number. Then, make an assignment to a pointer variable with $FG,2$$$IB,"",n$$$FG$ as the value. See $LK,"::/LT/DEMO/Graphics/Sprite1.CPZ","FI:::/LT/DEMO/Graphics/Sprite1.CPZ"$ and $LK,"::/LT/DEMO/Graphics/Sprite2.CPZ","FI:::/LT/DEMO/Graphics/Sprite2.CPZ"$.) The origin (zero point) for a graphic element is defined by the cursor location when you press $FG,2$CTRL-R$FG$. The "$FG,2$x$FG$", "$FG,2$y$FG$" and "$FG,2$z$FG$" values you pass to $LK,"GrElemsPlot","MN:GrElemsPlot"$() shift it around. You can edit a Graphic Element by clicking the cursor on it and pressing $FG,2$CTRL-R$FG$ again.
* There is a mechanism built-in for generating motion based on differential equations, which allows real-world physics. You create an $LK,"Ode","MN:Ode"$ struct with $LK,"OdeNew","MN:OdeNew"$(), passing it the number of variables in the state vector. For real-world physics, you usually have 2 state variables for each dimension (for each mass) because motion is governed by f=ma which is a 2nd order equation. The two states are position and velocity and to solve these you need to supply the derivative of position and velocity. The derivative of position is usually simply the current velocity and the derivative of velocity is the acceleration (the sum of forces on a mass divided by mass). To help provide meaningful names for values in the state vector, you can create an $LK,"Order2D3","MN:Order2D3"$ pointer and point it to a mass in the state vector. Six elements in the state vector are required for each mass. See $LK,"::/LT/DEMO/Graphics/StarTrek2.CPZ","FI:::/LT/DEMO/Graphics/StarTrek2.CPZ"$. Or, see $LK,"::/LT/DEMO/Graphics/StarTrek3.CPZ","FI:::/LT/DEMO/Graphics/StarTrek3.CPZ"$ where an angle instead of a Z dimension is used. The values in the state don't have to be positions and velocities.
+88
View File
@@ -0,0 +1,88 @@
$WW,1$$FG,5$$TX+CX,"OS PROGRAMMING GUIDELINES:"$$FG$
* Virtual mem is not used. The stack does not grow, so allocate enough when the task (process) is $LK,"Spawn","MN:Spawn"$ed and use the heap for most things. (The "heap" refers to $LK,"MAlloc","MN:MAlloc"$() and $LK,"Free","MN:Free"$().)
* I've tried to standardize names see $LK,"Naming convention","FF:::/LT/DOC/OSGlossary.GLZ,Naming convention"$
* There are two modes of compiling $LK,"Static Compiled Mode","FF:::/LT/DOC/OSGlossary.GLZ,Static Compiled Mode"$ and $LK,"Dynamic Compiled Mode","FF:::/LT/DOC/OSGlossary.GLZ,Dynamic Compiled"$. Actual compilation is done in both--nothing is "interpreted".
$FG,5$$TX+CX,"Departures from C/C++:"$$FG$
* Built-in types include $FG,2$I0,I1,I2,I4,I8$FG$ for signed ints and $FG,2$U0,U1,U2,U4,U8$FG$ for unsigned ints and $FG,2$double$FG$.
* The "$FG,2$`$FG$" operator raises a base to a power.
* Operator Precidence
1) $FG,2$`$FG$,$FG,2$>>$FG$,$FG,2$<<$FG$
2) $FG,2$*$FG$,$FG,2$/$FG$,$FG,2$%$FG$
3) $FG,2$&$FG$
4) $FG,2$|$FG$,$FG,2$^$FG$
5) $FG,2$+$FG$,$FG,2$-$FG$
6) $FG,2$==$FG$,$FG,2$!=$FG$,$FG,2$<$FG$,$FG,2$>$FG$,$FG,2$<=$FG$,$FG,2$>=$FG$
7) $FG,2$&&$FG$
8) $FG,2$||$FG$,$FG,2$^^$FG$
9) $FG,2$:$FG$,$FG,2$?$FG$
10) $FG,2$=$FG$,$FG,2$<<=$FG$,$FG,2$>>=$FG$,$FG,2$*=$FG$,$FG,2$/=$FG$,$FG,2$&=$FG$,$FG,2$|=$FG$,$FG,2$^=$FG$,$FG,2$+=$FG$,$FG,2$-=$FG$
* No conditional compilation, except with the $FG,2$exe{}$FG$ feature. With this statement blk in your source code, you can place programs that insert text into the stream of code being compiled. See $LK,"exe {}","FF:::/LT/OSMain/END.CPZ,exe {"$ for an example where the date/time and compile-time prompting for configuration data is placed into a program. The $LK,"ExePrintF","MN:ExePrintF"$() and $LK,"ExePutS","MN:ExePutS"$() place text into a source program stream following the conclusion of the $FG,2$exe{}$FG$ blk. I do hope to add conditional compilation, but it's not a priority.
* No "$FG,2$#define$FG$" functions exist (I'm not a fan)
* Pointer arithmetic is not based on size of objects (I'd have no objections to this changing)
* No type-checking
* Variable parameter cnts ($FG,2$...$FG$) are accessed with "$FG,2$argc$FG$" and "$FG,2$argv[]$FG$" which are predefined invisible local variable.
* "$FG,2$cout$FG$" works with commas but not "$FG,2$<<$FG$" and and has no "$FG,2$endl$FG$" or other codes. Use "$FG,2$coutln$FG$" to print a carriage return after other stuff. An alias for "$FG,2$cout$FG$" is "$FG,2$dbgo$FG$" or "$FG,2$dbgoln$FG$" and is useful for debugging--I often place debug output all over the place and do a $LK,"Grep","MN:Grep"$() to locate them all.
* Type casting is done with "$FG,2$><(classname)$FG$" and is postfix.
* When dealing with function addresses, preceed the name with "$FG,2$&$FG$". This allows functions to be called like Pascal procedure with no "()" if there are no parameters or there are just default parameters.
* "$FG,2$$$$FG$" is an escape character. Two dollar signs signify an ordinary $$. See $LK,"::/LT/DOC/Dollar.TXZ","FI:::/LT/DOC/Dollar.TXZ"$.
* There is not a "$FG,2$struct$FG$" keyword, just "$FG,2$class$FG$".
* "$FG,2$union$FG$" is more like a class, so you don't referrence it with a "$FG,2$union$FG$" label after you define it. Some common unions are declared in $LK,"ADAMK.HPZ","MN:U2"$ for 1,2,4 and 8 byte objects. If you place a type in front of a union declaration, that is the type when used by itself.
* You cannot declare instances of "$FG,2$class$FG$es" or "$FG,2$unions$FG$" in the same statement where they are defined.
* $FG,2$class$FG$ member vars have two keywords for associating data with member vars -- "$FG,2$fmtstr$FG$" and "$FG,2$fmtdata$FG$". All compiler structures are saved and you can access the compiler's info about classes and variables. In the future, I hope to have arbitrary named data on class definitions.
* "$FG,2$static$FG$" variables in functions are not allowed and I have no plans for doing them--just use a global variable.
* See $LK,"::/LT/DEMO/Exceptions.CPZ","FI:::/LT/DEMO/Exceptions.CPZ"$. "$FG,2$try{} catch{}$FG$ and $FG,2$throw$FG$" are different from C++. "$FG,2$throw$FG$" is a function with variable ("$FG,2$...$FG$") parameters. The values passed in "$FG,2$throw()$FG$" can be accessed from within a "$FG,2$catch{}$FG$" using the "$FG,2$Fs->except_argc$FG$" and "$FG,2$Fs->except_argv[]$FG$" variables. Within a "$FG,2$catch {}$FG$" blk, set the var "$FG,2$Fs->catch_except$FG$" to "$FG,2$TRUE$FG$" if you want to terminate the search for a handler. By convention, the first parameter of $FG,2$except_argv[]$FG$ specifies the exception type number. A list of assigned exception types can be found at $LK,"EXCEPT_LOCAL","MN:EXCEPT_LOCAL"$. For a handler that will catch all excepts, you can use $LK,"CatchAll","MN:CatchAll"$().
* A function is available similar to "$FG,2$sizeof$FG$" which provides the offset of a member of a class. It's called "$FG,2$offset()$FG$". You place the class name and member inside as in "$FG,2$offset(classname.membername)$FG$". It has nothing to do with 16-bit code. $FG,2$sizeof()$FG$ cannot be applied to variables, just classes. Also, both $FG,2$sizeof()$FG$ and $FG,2$offset()$FG$ only accept one level of member variables. That is you cannot do $FG,2$sizeof(classname.membername.submembername)$FG$.$FG$
* There is a function called $LK,"MSize","MN:MSize"$() which gives the size of an object allocated off the heap. For larger size allocations, the system rounds-up to a power of two, so $FG,2$MSize()$FG$ lets you know the real size.
* You can $LK,"Free","MN:Free"$() a $FG,2$NULL$FG$ pointer. Useful variants of $LK,"MAlloc","MN:MAlloc"$() can be found $LK,"Here","MN:MAllocZ"$. Each task has a heap and you can $FG,2$MAlloc$FG$ and $FG,2$Free$FG$ off of other task's heaps.
$FG,5$$TX+CX,"PrintF Family"$$FG$
$LK,"MSPrintF","MN:MSPrintF"$() is like $LK,"SPrintF","MN:SPrintF"$() but it returns a $LK,"MAlloc","MN:MAlloc"$ated string. It is vary handy because you don't have to worry about overflow.
$LK,"Auto","MN:Auto"$(I1 *src,...) and text to the current task's input buffer.
$LK,"AutoString","MN:AutoString"$(I1 *src,...) sends text of an $LK,"AutoFile","FF:::/LT/DOC/OSGlossary.GLZ,AutoFile"$ to the keyboard stream of the current TASK but can also do mouse commands.
$LK,"XTalk","MN:XTalk"$(TssStruct *tss,I1 *src,...) and text to another task's input buffer.
$LK,"XTalkString","MN:XTalkString"$(TssStruct *tss,I1 *src,...) sends text of an $LK,"AutoFile","FF:::/LT/DOC/OSGlossary.GLZ,AutoFile"$ to the keyboard stream of another TASK but can also do mouse commands.
$LK,"LtfPutS","MN:LtfPutS"$(Ltf *l,I1 *src) and $LK,"LtfPrintF","MN:LtfPrintF"$(Ltf *l,I1 *src,...) send text to a linked text file. You can buffer to a Ltf and save it, providing the functionality of $FG,2$fprintf$FG$. See $LK,"::/LT/DEMO/FPrintF.CPZ","FI:::/LT/DEMO/FPrintF.CPZ"$.
$LK,"Adam","MN:Adam"$(I1 *src,...) send text to the adam task to be compiled and run.
$LK,"AdamLog","MN:AdamLog"$(I1 *src,...) and $LK,"AdamErr","MN:AdamErr"$(I1 *src,...) send text to the adam task to be displayed.
$LK,"Lpt1PrintF","MN:Lpt1PrintF"$(I1 *src,...) send text to the printer port.
$LK,"ExePrintF","MN:ExePrintF"$(I1 *src,...) and $LK,"ExePutS","MN:ExePutS"$(I1 *src) send text to the stream of code being compiled and must reside in a $FG,2$exe{}$FG$ blk.
$LK,"CommPrintF","MN:CommPrintF"$(U4 port,I1 *src,...) sends text to the comm ports.
$BK,1$Note:$BK,0$ If no $FG,2$PutS$FG$ variant is available, you can use $FG,2$PrintF("%s",src)$FG$.
The $LK,"PrintF","MN:PrintF"$() family supports extended format codes.
* $FG,2$"%S"$FG$ will print a systext entry.
* $FG,2$"%F"$FG$ will print a text file.
* $FG,2$"t"$FG$ is a flag which will truncate to field width.
* $FG,2$"%P"$FG$ will display a PSECT expression which is good for pointers or addresses.
* $FG,2$"%T"$FG$ and $FG,2$"%D"$FG$ will display a date or time and the format is selected with a subcode, entered after a "$FG,2$h$FG$". Example: "$FG,2$%20h1D$FG$" uses date format code "1". See $LK,"MSPrintFDate","FF:::/LT/OSMain/SPRINTF.CPZ,MSPrintFDate"$() and $LK,"MSPrintFTime","FF:::/LT/OSMain/SPRINTF.CPZ,MSPrintFTime"$() for subcodes.
* $FG,2$"%z"$FG$ will display a sub entry of an enumerated list of text entries. It calls $LK+S,"PointAtListEntry","MN:PointAtListEntry"$().
* $FG,2$"%Z"$FG$ will display a SysText sub entry.
* $FG,2$"%Q"$FG$ will convert "\" to "\\" and quote to backslash quote. (For use in creating strings in strings.)
$FG,5$$TX+CX,"Hash symbol tables:"$$FG$
* See $LK,"::/LT/UTILS/HASHUTIL.CPZ","FI:::/LT/UTILS/HASHUTIL.CPZ"$ for examples of how the hash tables are set-up. Basically, symbols are placed into hash tables and child process hash tables are chained to parents. This provides scopes for variables and functions.
* "$FG,2$adam_tss->hash_table$FG$" holds the C/C++ symbols loaded in on start-up.
* "$FG,2$Fs->hash_table$FG$" holds user C+ symbols and if a symbol is not found, it checks parents. When a duplicate symbol is added to the table, it overshadows the previous symbol. When developing software, typically you include the file at the command prompt, make changes and reinclude it. Old symbols are overshadowed but they are still there. Periodically, kill the TASK and start fresh when mem is low. If you wish your applications to free themselves instead of staying in mem, spawn or $LK,"PopUp","MN:PopUp"$() a task to run the application and kill it when it's done.
* To display the contents of a hash table, use the $LK,"HashRep","MN:HashRep"$() routine or the varients.
$FG,5$$TX+CX,"Assembly Language Concerns:"$$FG$
* Segment registers except $FG,2$FS$FG$ are set to $FG,2$0x00000000$FG$ as a base.
* $FG,2$FS$FG$ must always point to the per-TASK's structure. See $LK,"C+","FF:::/LT/OSMain/ADAMK.HPZ,TssStruct:2"$$LK "C++ task struct" "FF:::/LT/OSMain/ADAMK.HPZ,TssStruct"$ and $LK,"Asm","FF:::/LT/OSMain/OSINC.ASZ,TSS_EIP"$$LK "ASM task struct" "FF:::/LT/OSMain/OSINC.ASZ,TSS_BACK_LINK"$.
* Don't change the segment registers unless interrupts are off.
* When interacting with compiled code, preserve $FG,2$EBP, ESI, EDI$FG$ because the compiler uses these for register vars. You are free to trash $FG,2$EAX, EBX, ECX, EDX$FG$.
+78
View File
@@ -0,0 +1,78 @@
$WW+H,1$Left-click on the word "$FG,2$MENU$FG$" in the window title bar to pull-up the menu. Underlined text is usually a link. Left click with the mouse or press SPACE when the cursor is on top of them to edit/view them. Right click or press $FG,2$ENTER$FG$ to $FG,2$#include$FG$ them, often causing them to execute.
$FG,9$ESC$FG$ Exits and saves
$FG,9$CTRL Q$FG$ Aborts
$FG,9$Window's Key$FG$ Views the Menu/Help/Macro area
Double mouse clicks send $FG,2$ESC$FG$ or $FG,2$CTRLQ$FG$.
Remember to terminate commands with a semicolon.
$TR,"USER HELP"$
$ID,2$
See $LK,"::/LT/DOC/OSGlossary.GLZ","FL:::/LT/DOC/OSGlossary.GLZ,1"$ for a glossary.
$TR,"DOLLAR SIGN COMMANDS"$
$ID,2$$LK,"Dollar Sign Commands","FI:::/LT/DOC/Dollar.TXZ"$ are rich-text commands. The editor, compiler, assembler and operating system are seamlessly equiped to handle LoseThos rich text. Commands like $LK,"Dir","MN:Dir"$() and $LK,"Grep","MN:Grep"$() can output links to the command line.
$ID,-2$$TR,"COMMAND PROMPT"$
$ID,2$The LoseThos command line interface is based on C/C++. Explore the ".CPZ" files or $MA+A-X+PU,"Click Here","HFunsRep;View;"$ to learn which commands are available. A command which takes no parameters may be executed by typing the name and a semicolon. Commands with parameters require placing the parameter in parentheses like a function call.
$MA,"Dir(\"*\");"$ will list files in the current directory.
$MA,"Dir;"$ uses default of "*".
$MA,"Cd(\"::/LT/APPS\");"$ will change directories
Directories are referenced with "/" not "\". The Boot drive is referred to with "$FG,2$::$FG$". Other drives are referred to by a letter and a colon. Your user account directory is referred to with "$FG,2$HOME$FG$".
If a file is not found in one directory, all it's parents are searched.
$FG,9$Edit("FILENAME.TXZ");$FG$ Invokes the editor. See $LK,"Editor cmds","::/LT/ADAM/EDIT.MUZ"$. Note that editor commands work practically everywhere--like at the command prompt or within help.
$ID,-2$$TR,"BURNING CD-ROMs/DVDs"$
$ID,2$0) Prepare a partition (drive) with the files you wish to burn.
1) Use $LK+S,"CreateCDFile","MN:CreateCDFile"$() to make an ISO image file of a partition.
2) Use $LK+S,"WriteCDImage","MN:WriteCDImage"$() to burn an ISO file onto a CD or DVD.
Note: You can create a $LK,"File Partition","FF:::/LT/DOC/OSGlossary.GLZ,File Partition"$ on an ordinary partition, copy files into it, create an image and burn it.
$ID,-2$
See $LK+S,"::/LT/DOC/Quirks.TXZ","FI:::/LT/DOC/Quirks.TXZ"$ for things to watch for.
$ID,-2$$TR,"ADMIN HELP"$
$ID,2$
$TR,"ADDING DRIVES"$
$ID,2$Use $LK,"AddDrives","MN:AddDrives"$() to enable disk drives.
See $LK+S,"File Partition","FF:::/LT/DOC/OSGlossary.GLZ,File Partition"$ for a definition.
$ID,-2$
See $LK,"::/LT/DOC/Install.TXZ","FI:::/LT/DOC/Install.TXZ"$ for details on installing to a hard drive.
See $LK-A+S,"::/LT/OSMain/ADAMK.CPZ"$ for the LoseThos equivalent of the AUTOEXEC.BAT.
$TR,"ACCOUNTS"$
$ID,2$
You can add and remove accounts by making or removing directories in the $FG,2$::/LT/ACCOUNTS$FG$ directory. You'll have to copy start-up files into them.
See $LK-A,"HOME/USER.CPZ"$ for the user start-up file.
See $LK-A,"HOME/USER.MUZ"$ for a personalizable menu/macro area which can be viewed at the command line with the windows key or by clicking "$FG,2$MENU$FG$" in the upper left border area of a window.
See $LK-A,"HOME/FAVOR.MUZ"$ for a handy "favorites" file which can be reached by pressing $FG,2$CTRL-SHIFT-F$FG$, pretty-much anywhere. Users can place links and todo lists or any text within this.
See $LK-A,"HOME/ADAM3.CPZ"$ for the user files that get loaded into the adam task. These are only loaded once.
See $LK-A,"HOME/SYSTEM.CPZ"$ for the start-up file used when a $LK,"System","MN:System"$() command is used.
See $LK-A,"HOME/SERVANT.CPZ"$ for the start-up file other commands which $LK,"Spawn","MN:Spawn"$() tasks.
See $LK-A,"HOME/FAULT.CPZ"$ for a start-up file called when a fault occurs. When debugging you might place data display commands here.
$ID,-2$
$ID,-2$$TR,"DEVELOPER HELP"$
$ID,2$
See $LK-A+S,"::/LT/DOC/GuideLines.TXZ"$ for some programming guidelines.
See $LK+S,"::/LT/DOC/Graphics.TXZ","FI:::/LT/DOC/Graphics.TXZ"$ for details on graphics programming.
$ID,-2$
See $BK,1$$LK+S,"::/LT/DOC/Mysteries.TXZ","FI:::/LT/DOC/Mysteries.TXZ"$$BK,0$ for mysteries explained.
See $BK,1$$LK+S,"::/LT/DOC/News.TXZ","FL:::/LT/DOC/News.TXZ,1"$$BK,0$ for the latest news.
+31
View File
@@ -0,0 +1,31 @@
$WW,1$$FG,5$$TX+CX,"Preinstallation Notes"$$FG$
1) The CD-ROM INSTALL or UPGRADE boot options will automate much of this.
2) Make partitions with Windows or Linux. You used to do it with FDISK, now you do it during installation.
3) Only LBA 28 bit disk access is supported, so drives of size 120Gig are the limit. Ancient drives with CHS are not supported.
4) Test your hard drive by adding it with $LK,"AddDrives","MN:AddDrives"$(). Typically, hard drives are "ATA" not "ATAPI", and are found at port address 0x1F0, unit 0. When AddDrives() displays defined partitions, make sure your partition shows-up. Note the drive letter, though you can move them around. $LK,"PartitionRep","MN:PartitionRep"$() will give a report.
5) $BK,1$WARNING!!!$BK,0$ Each partition has one boot record, so do not attempt to boot both LoseThos and some other operating system from the same partition.
6) More than one LoseThos partition on a hard drive is very useful for development work (I have three). You might accidentally change files rendering your partition unbootable, needing to resort to a back-up to fix it. A floppy or CD will work.
$FG,5$$TX+CX,"Installing to a hard drive"$$FG$
1) Create a FAT32 partition or two (highly recommended) on your hard drive. You'll need Linux and Linux's LILO present on the hard drive as well. I have Windows, Linux and LoseThos all on my hard drive. (Install Windows before Linux.)
2) Boot to a LoseThos floppy or CD and add your hard disk with $LK,"AddDrives","MN:AddDrives"$(). Note the partition (drive) letter of the partition you wish to boot from in the future.
3) Use $LK,"Format","MN:Format"$() to make it a LoseThos partition.
4) Copy the "/LT" directory to the partition with $LK,"CopyTree","MN:CopyTree"$("T:/LT","D:/LT"); where "T" is the source drive letter and "D" is the destination.
5) Type "$LK,"InstallBoot","MN:InstallBoot"$('?');" where the question is the drive. Enter the requested prompts during recompilation, making sure to add your hard drive (again) so it will be present when you boot.
6) Boot to Linux and modify LILO. Go to the "/etc" directory, edit "lilo.conf" and run "lilo". You'll need to know the Linux name for the LoseThos partition--something like "hda3" or whatever.
$FG,5$$TX+CX,"Postinstallation Notes"$$FG$
1) Once installed, you can recompile the hard drive OSmain with "$LK,"InstallBoot","MN:InstallBoot"$('D');" or whatever drive.
+31
View File
@@ -0,0 +1,31 @@
$WW,1$$FG,5$This is to clearify how several mysterious things happen in this operating system.$FG$
1) There are symbol(hash) tables maintained by each task. When a symbol is not found, the parent task's symbol table is checked. All process chain back to the adam process.
2) Binary files have export symbols which are loaded into tables. The operating system OSmain has such a table. In addition, some map files are processed to provide more information on symbols--source file links. This is how the $LK,"Man","MN:Man"$() page feature works.
3) The word "$FG,2$public$FG$" does very little except allow the $LK,"HashRep","MN:HashRep"$() program varients to exclude meaningless symbols. If you wish a full report of public and nonpublic symbols $MA+A-X+PU,"Click Here","LtfSetMax(1000000);HAllRep;View;\r"$.
4) When compilation takes place "dynamically", the structures used by the compiler stick around. Data on classes can be accessed. See $LK,"ClassRep","MN:ClassRep"$() or $LK,"TssRep","MN:TssRep"$().
5) When the joystick is calibrated, a file is created. To recalibrate the joystick, you must del the file "$FG,2$::/LT/ADAM/JOY.DTZ$FG$".
6) Filenames ending in '$FG,2$Z$FG$' are automatically compressed and uncompressed when writing to disk. File size in directory listing is the compressed size. You can view uncompressed size with $LK,"Dir","MN:Dir"$("*",TRUE);
7) Some memory objects are allocated when needed and will decrease the available memory displayed. A task keeps memory objects smaller than a couple blocks in it's own separate heap when freed and these are not counted in the available system free memory, though they are free. They get returned to the system when the task is killed. To get a sense of this, compile the operating system and see the amount of memory used. Then, compile it again and far less will be allocated. This is because it is reusing the small chunks.
8) The cursor location is stored as an $FG,2$ASCII 5$FG$ in files. $FG,2$ASCII 31$FG$ is used for $FG,2$SHIFT-SPACE$FG$, a character which does not get converted to tabs by $LK,"S2T","MN:S2T"$().
9) Binary data is stored beyond the terminating $FG,2$NULL$FG$ in text files. Map files store debug source lines and other files store pictures.
10) Pictures are stored as line coordinates, instead of bit maps. If you have a drawing with, like 10 lines, 40 numbers are stored, compared to, like 200x200 bytes, for a bitmap. Therefore, graphics don't take much room. If the number of lines is large, however, it'd be more efficient to store a bitmap, but this is not yet fully supported.
11) If you change code in the $FG,2$/LT/ADAM$FG$ or $FG,2$/LT/UTILS$FG$ directory, you don't need to recompile, you just need to reboot because those directories get recompiled when you boot. It uses dynamic compilation. There is no "$FG,2$.BIN$FG$" file for dynamic compilation.
12) If you find crappy code, it might be from before the compiler had features like the type cast "$FG,2$><$FG$$FG$" statement. Or, it might have been something done hurriedly just to get results. Some things I dive into without planning, like the dollar sign commands. After, the idea matures, I cleaned-it-up.
13) The hits on hash entries reflect times they have been searched for and found. The $LK,"FindExtern","MN:FindExtern"$() function is used to search the hash tables for functions which weren't in existence yet. The $LK,"DrawBorder","MN:DrawBorder"$() function, for example, is searched for every time the screen is updated, therefore it has lots of hits in a hash table report.
14) If a file is not found, the parent directories are searched for a file of the same name.
15) LoseThos partitions will appear as FAT32 to other operating systems, but will not work. Do not access them from other operating systems. This is to fool my bootloader.
+133
View File
@@ -0,0 +1,133 @@
$WW,1$
$IV,1$----07/18/06 10:25:00----$IV,0$
* Unmask IRQ's during mouse polling. Might have side-effects.
$IV,1$----07/16/06 11:44:46----$IV,0$
* Changed "Message" to "Msg"
* Expanded serial communication
* Cleaned-up externs in Adam directory
$IV,1$----07/13/06 09:22:24----$IV,0$
* Fixed some bugs in disassembler.
$IV,1$----07/12/06 16:47:29----$IV,0$
* Modified FlagsStruct converting from 128-bit to 64-bit.
* Fixed bad default flag in $LK,"FileOccurrences","MN:FileOccurrences"$().
* Fixed bug in FindFile for CD-ROM. Cd() result was bad.
$IV,1$----07/11/06 17:51:02----$IV,0$
* Probably fixed problem with SHIFT or CTRL keys getting locked on.
$IV,1$----07/11/06 09:02:06----$IV,0$
* Fixed bugs with use of HOME directory in Cd() and other spots. Wasn't changing partitions to the home drive.
* Moved $LK,"FindFiles","MN:FindFiles"$() to $LK,"SysFindFiles","MN:SysFindFiles"$() and enveloped it so it now supports specifying directories.
$IV,1$----07/11/06 04:43:20----$IV,0$
* Changed $LK,"Dir","MN:Dir"$() listing--shortened date/time, sorts by filename extension.
* Moved stuff around in files
$IV,1$----07/10/06 10:46:36----$IV,0$
* Combined Ltf flags and flags2
$IV,1$----07/10/06 04:24:01----$IV,0$
* sped-up screen update
* Enhanced $LK,"ProfRep","MN:ProfRep"$();
* Increased RAM disk size from 2880 blks to 8192 blks. This is the 'B' drive.
$IV,1$----07/08/06 05:27:06----$IV,0$
* Changed music_tempo. It is now a recripocal and a different scale.
$IV,1$
----07/08/06 00:07:23----$IV,0$
* Changed eigth note tripolets in $LK,"Play","MN:Play"$() from 'S' to "et".
$IV,1$----07/06/06 23:33:18----$IV,0$
* Fixed $LK,"Edit","MN:Edit"$() menu so that it is active when you click commands.
* Fixed $LK,"WriteCdImage","MN:WriteCdImage"$() to use proper path in filename.
$IV,1$----07/03/06 23:53:32----$IV,0$
* Converted some compression routines to asm to speed things up.
$IV,1$----07/01/06 22:30:45----$IV,0$
* Improved $LK,"::/LT/DEMO/WinMgr2.CPZ","FI:::/LT/DEMO/WinMgr2.CPZ"$. You really should try it. It demo's the Ode feature.
$IV,1$----07/01/06 03:55:58----$IV,0$
* Sped-up compiler$IV,1$
----06/30/06 21:55:59----$IV,0$
* Fixed some memory leaks in compiler.
* Changed syntax for type casting. Now, requires parenthesis. It's designated with "><(class *)" and it is post-fix.
$IV,1$----06/30/06 16:40:43----$IV,0$
* Fixed compiler bugs
$IV,1$----06/29/06 03:32:32----$IV,0$
* Added $LK,"CurDir","MN:CurDir"$() which returns both drive and directory.
* Fixed $LK,"CopyTree","MN:CopyTree"$()
$IV,1$
----06/28/06 11:13:23----$IV,0$
* Made major improvement in screen update speed.
* Sped-up compile time a little
$IV,1$----06/28/06 05:30:34----$IV,0$
* Added significant compiler optimization
* Probably fixed bug on Install option for distributed CD-ROMs (fixed SysGetChar)
$IV,1$
----06/27/06 23:32:19----$IV,0$
* Added minor compiler optimization
$IV,1$----06/27/06 21:20:14----$IV,0$
* Fixed bug with F2 macro
* Added minor compiler optimization
$IV,1$----06/27/06 03:50:53----$IV,0$
* Added compiled_lines to wallpaper
$IV,1$----06/26/06 22:43:23----$IV,0$
* Fixed $LK,"GrCircle","MN:GrCircle"$() and $LK,"Circle","MN:Circle"$();
* Added minor compiler optimization.
* Fixed bug in editor involving cursor-up on nontext widgets.
* Fixed lacking feature with CTRL-R, adding "END" for text insert points.
$IV,1$
----06/25/06 19:13:38----$IV,0$
* Altered the way string constants and Pictures are stored when compiled so that it looks like it is on the heap. This might fix lots of bugs.
* Added $LK,"LtfPutGrElem","MN:LtfPutGrElem"$();
See $LK,"::/LT/DEMO/Graphics/Sprite3.CPZ","FI:::/LT/DEMO/Graphics/Sprite3.CPZ"$.
$IV,1$
----06/24/06 18:20:28----$IV,0$
* fixed missed optimization in compiler--code is smaller and faster
$IV,1$----06/20/06 19:36:07----$IV,0$
* $BK,1$WARNING$BK,0$: swapped keyboard scan-code flags SCf_KEY_UP and SCf_E0_PREFIX. If you have a EditPlugIn, you might need to change it. See $LK,"My_EditPlugIns","FF:::/LT/ACCOUNTS/ADAM3.CPZ,My_EditPlugIns"$.
* Added numeric keypad support
* Added HOME/END keys to editor
$IV,1$
----06/20/06 13:00:25----$IV,0$
* $BK,1$WARNING$BK,0$: renamed "trap" to "except"
* renamed "heap_cache" stuff to "heap_hash".
$IV,1$----06/14/06 21:01:01----$IV,0$
* Fixed a word-wrap bug, pretty-much.
$IV,1$
----06/12/06 06:02:07----$IV,0$
* Fixed bug on cursor movement in forms.
* Added $LK,"::/LT/DEMO/WinMgr2.CPZ","FI:::/LT/DEMO/WinMgr2.CPZ"$
$IV,1$----06/10/06 15:29:42----$IV,0$
* worked on mouse and mouse wheel
* modified $LK,"Grep","MN:Grep"$() to return match count.
* added $LK,"FileOccurrences","MN:FileOccurrences"$()
$IV,1$
----06/07/06 15:08:58----$IV,0$
* Implemented Scroll-Lock
* Sets keyboard LEDs
* Added BSplines
$IV,1$----06/05/06 12:47:59----$IV,0$
* implemented returns out of catch{}
$IV,1$----06/05/06 08:51:40----$IV,0$
* fixed bug in exception handling and implenmented returns out of try{} but not catch {} statements.
$IV,1$----06/04/06 07:39:40----$IV,0$
* Added array nd structure initialization for global variables
$IV,1$----05/20/06 04:20:38----$IV,0$
* Added F4 and SHIFT-F4 for picking directories and files.
+169
View File
@@ -0,0 +1,169 @@
$WW,1$$TR,"Task"$
$ID,2$A "task" is the Intel term for a "process". Each task has a $LK+S,"TssStruct","MN:TssStruct"$, the name derived from "Task State Something". The "$FG,2$Fs$FG$" segment register is maintained pointing to the current TssStruct.
$ID,-2$$TR,"Adam Task"$
$ID,2$This is Adam, as in Adam and Eve, the parent of all tasks. This task is created at start-up and appears in the small window at the top beneath the user windows. On it's heap are all mem objects which are system wide. When created, it runs the file $LK,"::/LT/OSMain/ADAMK.CPZ","FI:::/LT/OSMain/ADAMK.CPZ"$$ER+A,""$ Normally, ADAMK.CPZ ends by $FG,2$#include$FG$ $LK,"::/LT/ADAM/ADAM2.CPZ","FI:::/LT/ADAM/ADAM2.CPZ"$ where the remainder of the operating system is "$FG,2$#include$FG$d". When start-up is finished, the adam task enters a server mode where it accepts requests from other tasks. The $LK,"Adam","MN:Adam"$("") routine will cause the adam task to compile and run text source code. "$FG,2$#include$FG$" statements can be sent to the $LK,"Adam","MN:Adam"$("") routine, creating system-wide code and data which don't disappear when any particular task ends.
$ID,-2$$TR,"Parent/Child Task"$
$ID,2$Often a task will $LK,"Spawn","MN:Spawn"$() or $LK,"PopUp","MN:PopUp"$() a task as a helper. The helper is known as a Child Task, though you can $FG,2$Spawn$FG$ a task and assign it a different parent... like Adam. Links are kept as to who Spawned what so that when one task is $LK,"Kill","MN:Kill"$()ed the helper tasks disappear, too. You see a report on current system tasks with $LK,"TaskRep","MN:TaskRep"$(). There is just one possible window per task, so child tasks are needed.
$ID,-2$$TR,"C+"$
$ID,2$The language used by LoseThos is more than "$FG,2$C$FG$" and less than "$FG,2$C++$FG$", so it's just "$FG,2$C+$FG$".
$ID,-2$$TR,"Static Compiled Mode"$
$ID,2$I coined this term to refer to conventional compilation mode, but it is not the preferred mode for this operating system and is discouraged. "$FG,2$.BI?$FG$" files are created directly, skipping "$FG,2$.OBJ$FG$" files. In this mode, code and data are contiguous. After compiling, you do a $LK,"Load","MN:Load"$() cmd which is available from right-clicking on a link (like from $LK,"Dir","MN:Dir"$()). There is no "$FG,2$main()$FG$" routine. Instead, statements outside functions are automatically executed upon loading. There is no way to unload except by killing the task. To invoke $FG,2$Static Compiled Mode$FG$, use the $LK,"CompileFile","MN:CompileFile"$() routine or right-click on a link. The OSmain and compiler are made in static compiled mode and stored in "$FG,2$BOOT.BIC$FG$" and "$FG,2$CMP.BIZ$FG$".
$ID,-2$$TR,"Dynamic Compiled Mode"$
$ID,2$I coined this term to refer to the mode when the compiler allocates objects(code and data) from the heap, noncontiguously. This mode is used during command-line operations. When you "$FG,2$#include$FG$" a file, it is compiled function by function and objects are placed all over in mem. The $LK,"ExecuteFile","MN:ExecuteFile"$() routine is the same as "$FG,2$#include$FG$" but can be placed in programs. $LK,"ExecuteString","MN:ExecuteString"$() routine will compile and run a string. "$FG,2$asm{}$FG$" cmds are not allowed in Dynamic mode.
$ID,-2$$TR,"Compiler Intermediate Code"$
$ID,2$The compiler generates instructions one step before making actual assembly(machine) language instructions. This code is reverse polish in nature and can be viewed with $LK,"PTrace","MN:PTrace"$() or $LK,"OTrace","MN:OTrace"$(). The compiler does not "interpret" code, except in the process of optimization. The assembly language can be viewed when it is compiled with the $LK,"CTrace","MN:CTrace"$() routine, or afterward with $LK,"Dasm","MN:Dasm"$().
$ID,-2$$TR,"AutoFile"$
$ID,2$A $FG,2$C+$FG$ script who's stdout goes to a task's input buffer. (A $FG,2$PrintF$FG$ will result in characters going to a parent task as though the user typed it.) $LK,"Msg","MN:Msg"$() can be included in an autofile to send mouse or other commands. While an autofile is running, the normal input gets diverted to the autofile task and can be filtered and sent back to the parent task. Unless you are driving functions which prompt for data, you can probably use an $FG,2$#include$FG$ file in place of an $FG,2$AutoFile$FG$. See $LK,"::/LT/DEMO/AutoFile/Demo1.AUZ","FI:::/LT/DEMO/AutoFile/Demo1.AUZ"$. Note: $LK,"Auto","MN:Auto"$() is a simple routine which call $FG,2$PutS$FG$ from within the helper(child) task to send a string to the parent's input stream. It differs from $LK,"AutoString","MN:AutoString"$(). You'll probably use $LK,"Auto","MN:Auto"$() a lot but not $LK,"AutoString","MN:AutoString"$(). With $LK,"Auto","MN:Auto"$() you can place answers to the prompts for recompiling the OSMain with $LK,"InstallBoot","MN:InstallBoot"$().
$ID,-2$$TR,"File Partition"$
$ID,2$There are physical partitions on disks and then there are virtual partitions which are stored in files on other partitions. This is a LoseThos feature. You can create a file partition using AddDrives or at the prompt when you recompile the operating system. If you answer "Yes" to the prompt on reformating, this partition will be reformatted each time you use it for the first time after booting. The original purpose of file partitions was as a holding area to collect files to write to a CD-ROM. Use the file partition's letter when calling $LK,"CreateCDFile","MN:CreateCDFile"$().
$ID,-2$$TR,"GrElem (Graphic Element)"$
$ID,2$A graphic element is a line or point or poly-line or whatever, created with $FG,2$CTRL-R$FG$. Several graphic elements are clustered by $FG,2$CTRL-R$FG$.
$ID,-2$$TR,"SysText"$
$ID,2$To allow different languages, LoseThos uses strings to identify actual strings to be displayed. This is basically a level of indirection. Support for lists of strings is also provided, but it's not especially effecient. See $LK,"SysText","MN:SysText"$(), $LK,"LoadStr","MN:LoadStr"$(), $LK,"LoadList","MN:LoadList"$(), $LK,"MatchSysTextEntry","MN:MatchSysTextEntry"$() and $LK,"SysTextSub","MN:SysTextSub"$(). $LK,"PrintF","MN:PrintF"$() also has some special codes to support SysText.
$ID,-2$$TR,"Hard-coded"$
$ID,2$When you use a raw number instead of a $FG,2$#define$FG$'ed label, that's called "hard-coding". Use labels whenever possible or your programs will fail if numbers change when the operating system is updated.
$ID,-2$
$FG,5$$TX+CX,"FileNames"$$FG$
$FG,5$Wildcards$FG$
FileName wild card matching allows "$FG,2$*$FG$" to match sequences of arbitrary characters and "$FG,2$?$FG$" for a single arbitrary character. For some commands, you can enter multiple specifiers separated by "$FG,2$;$FG$". You don't need to, but can, use "$FG,2$*.*$FG$" instead of "$FG,2$*$FG$" for filenames. You can specify names to exclude by using a "$FG,2$~$FG$".
$FG,5$*.??Z$FG$
Automatically compressed and uncompresses files when read and written.
$FG,5$$FG,5$*.??C$FG$
Contiguous files--NOT compressed.
$FG,5$*.TX?$FG$
Text Files
$FG,5$*.GL?$FG$
Glossary Files--WordStat will show a "$FG,2$#$FG$" next to words which are defined as anchors within glossary files.
$FG,5$*.CP?$FG$
C+ source files. The default C+ compiler type is "$FG,2$.CPZ$FG$".
$FG,5$*.HP?$FG$
C+ source header files.
$FG,5$*.AS?$FG$
Assembly source files. The default assembler type is "$FG,2$.ASZ$FG$".
$FG,5$*.MU?$FG$
Menu/Help/Macro files
$FG,5$*.MP?$FG$
Compiler "map" files
$FG,5$*.BI?$FG$
Binary executable files, created by $LK,"CompileFile","MN:CompileFile"$() and read by $LK,"Load","MN:Load"$().
$FG,5$*.DT?$FG$
Data files
$FG,5$*.DVC$FG$
File Partition Drive (A drive stored in a file on another partition)
$FG,5$$FG,5$*.IS?$FG$
CD-ROM image file--ISO9660. To burn on other operating systems, rename "$FG,2$.ISO$FG$"
$FG,5$*.AUZ$FG$
"AutoFile" Basically a C+ program who's stdout goes to the input of a task when $LK,"AutoFile","MN:AutoFile"$() is called.
$LK,"SOURCE_FILE_MASK","MN:SOURCE_FILE_MASK"$$FG$
This $FG,2$#define$FG$ holds a list of source file extensions.
$LK,"TEXT_FILE_MASK","MN:TEXT_FILE_MASK"$$FG$
This $FG,2$#define$FG$ holds a list of text file extensions.
$FG,5$$TX+CX,"Naming conventions"$
$FG$
$FG,5$$FG$The following are rules I stick to. If you work on the operating system, it'd be good to stick with them for uniformity, but you can do what you like. Since there are no "$FG,2$namespaces$FG$" and I don't plan to implement name spaces, I highly recommend putting a 2-3 character module code prefix on symbols. e.g. "Ws","Ltf","Lex"
$FG,5$ALL_CAPS$FG$
Assembly Language labels are capitalized with underscores between words. So are $FG,2$#define$FG$'s.
$FG,5$MixedCaps$FG$
$FG,2$C+$FG$ Functions and class names are MixedCaps.
$FG,5$lower_case$FG$
Local function vars and glbl vars are lower case. Class member names are also lower_case.
$FG,5$SYSf_????$FG$
Flags which are designated with bit numbers instead of bit values are designated with a lower case "$FG,2$f$FG$".
$FG,5$CP_????$FG$
Assembly language routines which are C+ callable have a prefix "CP_".
$AN,"Fs","Fs"$
This refers to the CPU segment register called FS. This register is special in LoseThos because it points to the currently active task's $LK,"TssStruct","MN:TssStruct"$.
$AN,"Tss","Tss"$
This is an Intel abbreviation for task state something. Each task has one of these structures. LoseThos doesn't actually use this CPU feature.
$AN,"Bt,Bts,Btr,Btc","Bt,Bts,Btr,Btc"$
These are bit manipulation functions named after Intel instructions. They stand for "Bit Test", "Bit Test and Set", "Bit Test and Reset" and "Bit Test and Compliment".
$AN,"Cli,Sti","Cli,Sti"$
These functions turn on or off interrupts. They are named after the Intel instructions. "Cli" turns off interrupts.
$AN,"Root","root"$
Refers to the base of a binary tree or the head of a queue.
$AN,"Put","Put"$/$AN,"PrintF","PrintF"$
This usually means sending data to a character stream. I try to use this instead of "Display" or "Dump".
$AN,"Get","Get"$
This is the opposite of "Put".
$AN,"Write","Write"$
This usually refers to sending data to disk and not to be confused with "Save".
$AN,"Read","Read"$
This is the opposite of "Write" and not to be confused with "Load".
$AN,"Load","Load"$
Refers to doing more than just reading.
$AN,"Save","Save"$
This is an editor cmd.
$AN,"Find","Find"$
I try to use this instead of "Locate", etc.
$AN,"struct","struct"$
I try to use this instead of "Record" or "Node".
$AN,"Join","Join"$
When two parts of a program have a common low-level routine, that routine is often labeled SomethingJoin.
$AN,"Free","Free"$/$AN,"Unused","Unused"$
"Free" is a verb meaning to return something (to the system) like mem or disk space. "Unused" is an adjective.
$FG,5$$TX+CX,"Abreviations"$$FG$
$FG,5$Attr$FG$ Attribute
$FG,5$Blk$FG$ Block
$FG,5$Buf$FG$ Buffer
$FG,5$Cb$FG$ Call-back (or code block)
$FG,5$Chnl$FG$ Channel
$FG,5$$FG,5$Cmd$FG$ Command
$FG,5$Cnt$FG$ Count
$FG,5$Ctrl$FG$ Control. The control key is indicated with "$FG,2$^$FG$" in documentation.
$FG,5$Cur$FG$ Current
$FG,5$Dbg$FG$ Debug
$FG,5$Del$FG$ Delete
$FG,5$Dev$FG$ Device
$FG,5$Dir$FG$ Directory
$FG,5$Elem$FG$ Element
$FG,5$Glbl$FG$ Global
$FG,5$Gr$FG$ Graphic
$FG,5$ip_$FG$ Input Pointer. See $LK,"::/LT/ADAM/INPTR.CPZ","FI:::/LT/ADAM/INPTR.CPZ"$.
$FG,5$Lex$FG$ Lexical analyser
$FG,5$Lpt$FG$ I think this stands for "line printer port". (It's a DOS term.)
$FG,5$Ltf$FG$ Linked-Text-File (doubly-linked-list of rich text cmds)
$FG,5$Mem$FG$ Memory
$FG,5$$FG,5$Msg$FG$ Message
$FG,5$Num$FG$ Number
$FG,5$$FG,5$Ode$FG$ Ordinary differential equation
$FG,5$Pmt$FG$ Prompt
$FG,5$Ptr$FG$ Pointer
$FG,5$Rep$FG$ Report
$FG,5$$FG,5$Rmt$FG$ Remote
$FG,5$Rx$FG$ Receive
$FG,5$$FG,5$$FG,5$Str$FG$ String
$FG,5$Sys$FG$ System
$FG,5$Tx$FG$ Transmit
$FG,5$$FG,5$Var$FG$ Variable
+9
View File
@@ -0,0 +1,9 @@
$WW,1$* Call $LK,"ChangeDisk","MN:ChangeDisk"$() when you insert a new removable media.
* You can only $FG,2$extern$FG$ something once. There is a varient called $FG,2$LTextern$FG$ which binds a C+ definition to a asm symbol. This, too, can only be done once.
* Use $FG,2$MulI8,MulU8,DivI8,DivU8,ModI8,ModU8$FG$ when doing 64-bit arithmetic, except if 32-bit results are guarenteed. When I move to a true 64-bit CPU, these won't be needed.
* $FG,2$switch/case$FG$ statements allocate a single jump table--do not use with wide, sparce ranges of case values. Eventually, this might be fixed.
* Don't use default string constant parameters on functions compiled in $LK,"Static Compiled Mode","FF:::/LT/DOC/OSGlossary.GLZ,Static Compiled Mode"$ because there is a bug.
* A $LK,"Cd","MN:Cd"$() cmd must be followed by two semicolons if a $FG,2$#include$FG$ is after it. This is because the precompiler processes the next instruction early.
* The last semicolon on the cmd line is converted to a double semicolon because the compiler looks ahead before doing a cmd. This normally has no negative effect, but when entering "$FG,2$if$FG$" statements with "$FG,2$else$FG$" clauses it presents problems.
* You cannot use $FG,2$$$IB$$,$$IT$$ or $$IS$$$FG$ at the command line or before the $LK,"::/LT/ADAM/EDIT.CPZ","FI:::/LT/ADAM/EDIT.CPZ"$ file has been included during start-up.
* The assembler error messages are often off by a line and undefines are cryptic.
Binary file not shown.
+78
View File
@@ -0,0 +1,78 @@
$WW,1$$FG,5$$IV,1$$TX+CX,"MISC"$$IV,0$$FG$
* Press the $FG,2$WINDOW$FG$'s key at the command line to access your macro/menu area. Place macros there with $FG,2$CTRL-L$FG$. Use the "$FG,2$Pop-Up$FG$" option on macros to $LK,"Spawn","MN:Spawn"$ a task to run a file. It dies when it is finished. This returns memory to the system allocated by programs. Be sure to press $FG,2$CTRL-S$FG$ to save your macro/menu area after making changes.
* You can adjust the screen refresh rate (software). It is automatically adjusted based on load. The range is $LK,"win_min_refresh","MN:win_min_refresh"$,$LK,"win_max_refresh","MN:win_max_refresh"$.
* You can adjust the number of answers displayed by setting $FG,2$Fs->answers_displayed$FG$ to a number from 0-8. See $LK,"answers_displayed","FF:HOME/USER.CPZ,answers_displayed"$ in your $LK,"HOME/USER.CPZ","FI:HOME/USER.CPZ"$ file.
* You can use "$FG,2$ans0$FG$","$FG,2$ans1$FG$", etc in expressions. You can use the cmd prompt as a calculator by just entering expressions like "$FG,2$1+2*3;$FG$". $FG,2$double$FG$ results can be accessed with "$FG,2$ansd0$FG$" or "$FG,2$ansd1$FG$".
* You can recompile and reinstall the kernel with $LK,"InstallBoot","MN:InstallBoot"$(). You can upgrade to 800x600 VGA resolution if your video chip supports it. You can turn-off $FG,2$WORDSTAT$FG$ initialization by entering $FG,2$<ENTER>$FG$ at the prompt. To start $FG,2$WORDSTAT$FG$ later, use $LK,"WsInit","MN:WsInit"$().
* Filenames ending in "$FG,2$Z$FG$" will be automatically compressed and uncompressed when read or written. The compression method is not supported elsewhere.
* The joystick can be recalibrated with $LK,"JoyCalibration","MN:JoyCalibration"$().
* You might speed-up CD-ROM access by changing $FG,2$bdev->max_reads$FG$ if your drive can handle more. See $LK+S,"InitBlkDev","MN:InitBlkDev"$() under ATAPI.
* $LK,"MergeChk","MN:MergeChk"$() can be used to see what's changed. The "$FG,2$+d$FG$" flag will show differences of files which have changed and allow you to merge code. (The "$FG,2$+r$FG$" flag will recurse.)
* Use $LK,"Plain","MN:Plain"$() to edit a plain text file. You'll need this if your file has $FG,2$$$$FG$'s.
* Use $LK,"Silent","MN:Silent"$() to disable output. Or, $LK,"Btr","MN:Btr"$(&sys_flags,SYSf_NO_IO_SOUND) to turn-off disk IO feedback.
* There are handy functions--$FG,2$F(),R(),FD()$FG$ and $FG,2$RD()$FG$ which are defined in $LK,"HOME/USER.CPZ","FI:HOME/USER.CPZ"$. They will perform find-and-replace operations accross multiple files. The "$FG,2$+l$FG$" flag is particularly useful since it limits to whole labels.
* You can save files after making changes, anytime you are within the editor, like when viewing help/macro files. $FG,2$CTRL-A$FG$ saves as, $FG,2$CTRL-S$FG$ saves with the same name in the scrolling title bar. Hitting $FG,2$ESC$FG$ will exit and save. ($FG,2$CTRL-Q$FG$ will exit and not save). You can save the cmd line window to a file, too, since you're actually in the editor when you're at the cmd line.
* When using $FG,2$CTRL-L$FG$ to insert links in documents, you can usually leave the "Display Text" blank and it will be filled-in automatically based on other entries.
* There is a feature of the compiler/assembler which allows code to be executed in the middle of compilation and data inserted into the compilation stream. You do a "$FG,2$exe{}$FG$" blk similar to an "$FG,2$asm{}$FG$" blk. Click here for an example: $LK,"exe {","FF:::/LT/OSMain/END.CPZ,exe {"$.
* Use $LK,"LtfSetMax","MN:LtfSetMax"$() to adjust the size of the cmd line buf.
* If you output to the cmd line and wish to allow users to scroll around and view data, you can use $LK,"View","MN:View"$(). $LK,"Example","MN:WsPutMatrix"$
* Use $LK+S,"View","MN:View"$() in Pop-up macros to linger until the user presses $FG,2$ESC$FG$ or $FG,2$CTRL-Q$FG$.
* You can access the word under the cursor at $LK,"ws_cur_word","MN:ws_cur_word"$, but you should probably turn-off preemption or interrupts momentarily to copy it.
* You can reactivate WORDSTAT after closing it by pressing $FG,2$CTRL-FUNCTION KEY$FG$.
* $LK,"Preempt","MN:Preempt"$() is used to keep a task from being interrupted and swapped-out. It has a similar effect to turning-off interrupts. Each task has it's own preemption control. A task with preemption turned-off can voluntarily $LK,"SwapInNext","MN:SwapInNext"$() with preemption off.
* You can set a color for different drives with $LK,"SetDriveTextAttr","MN:SetDriveTextAttr"$(). Place calls to this in $LK,"::HOME/USER.CPZ","FI:::HOME/USER.CPZ"$.
* If you toggle to plain text when you are working with graphics in a document, you can add duplicate entries for pictures by entering a "$FG,2$PI$FG$" command with the same number.
* If you toggle to plain text when working with graphics, you can add a string to the $FG,2$$$PI$$$FG$ entry to keep track of it. Try "$FG,2$$$PI,"+",2$$$FG$" where '2' is the picture number.
* I use spaces-to-tab operations on all my files to keep them small. You have to be careful, though, because spaces in messages will be converted. I use $FG,2$SHIFT-SPACE$FG$ ' ' in such cases. See $LK,"S2T","MN:S2T"$() for spaces-to-tabs.
* You can edit an existing Graphic Element by putting the cursor on it and pressing $FG,2$CTRL-R$FG$.
* You can customize the "wallpaper" by adding stuff to the $LK,"WallPaper","MN:WallPaper"$() routine.
$FG,5$$IV,1$$TX+CX,"DEBUGGING"$$FG$$IV,0$
* While debugging, you specify addresses of assembly OSmain $FG,2$asm{}$FG$ routines with just the label, as in "$FG,2$CP_MALLOC+0x20$FG$". You specify C+ labels with "&" before functions as in "$FG,2$&Printf+0x10$FG$".
$LK,"D","MN:D"$() $LK,"LtfD","MN:LtfD"$() to hex dump mem with numbering from zero. With $LK,"LtfD","MN:LtfD"$ the values are updated continually and you can alter mem by editing.
$LK,"Dm","MN:Dm"$() $LK,"LtfDm","MN:LtfDm"$() to hex dump mem with addresses showing.
$LK,"Dasm","MN:Dasm"$() to disassemble mem.
$LK,"Prof","MN:Prof"$() and $LK,"ProfRep","MN:ProfRep"$() provide code profiling. See $LK,"::/LT/DEMO/AutoFile/Demo2.AUZ","FI:::/LT/DEMO/AutoFile/Demo2.AUZ"$ (This is an "$LK,"AutoFile","FF:::/LT/DOC/OSGlossary.GLZ,AutoFile"$".)
* Use $LK,"DbgNum","MN:DbgNum"$(), $LK,"DbgStr","MN:DbgStr"$() and $LK,"DbgAdd","MN:DbgAdd"$() to print debug info bypassing the window framework. You can use $LK,"Raw","MN:Raw"$($FG,2$TRUE$FG$) to make all output bypass the window framework.
* Use $LK,"SysDbg","MN:SysDbg"$() to set a flag which you can read with $LK,"IsSysDbg","MN:IsSysDbg"$() when you wish to trigger some debug activity.
* There are flags for various trace options that can help debugging. $LK,"Echo","MN:Echo"$() turns on or off raw data going into the lexical analyzer. $LK,"LTrace","MN:LTrace"$() shows the tokens coming out of the lexical analyzer. $LK,"CTrace","MN:CTrace"$() disassembles code generated from the C+ compiler. $LK,"PTrace","MN:PTrace"$() shows "intermediate code" comming out of the first stage of the compiler (it's not 100% valid because it hasn't been fixed-up). $LK,"OTrace","MN:OTrace"$() shows intermediate code coming-out after optimization. These flags can be set and reset by placing them in "$FG,2$exe{}$FG$" code blks.
* $FG,4$dbgo$FG$ is an alias for "$FG,2$cout$FG$" and can be used to place output. You can easily find and remove them doing a $LK,"Grep","MN:Grep"$().
* $LK,"SBpt","MN:SBpt"$() to set breakpoints. When the fault screen appears, use $LK,"Go","MN:Go"$() to continue. You can altering modify what is displayed each break-point by $LK,"HOME/FAULT.CPZ","FI:HOME/FAULT.CPZ"$ in your account's home directory.