IMD 1.18: 14/11/2012 8:32:48 nec         GD_0.6 { , READ.ME.TEXT \/A,f READ.ME1.TEXT\/ӧf HARD.DOC.TEXT\/ BIOS.DOC.TEXT\/QBIOS.DOC2.TEXT/$BIOS.DOC3.TEXT/*8 GRAFTEST.TEXT\/8K GRAFTEST.CODE\/Kw GRAFDRAW.CODE\/wNGRAFDRAW.CODE/^BZz?R^B27: G(et, S(ave, W(hat, N(ew, L(dir, R(em, C(hng, T(rans, D(ate, Q(uit, B(ad-blks, E(xt-dir, K(rnch, M(ake, P(refix, V(ols, X(amine, Z(ero, O(n/off-line, F(lip-swap/lock [D.6] z?^Bz? ,O^AA  On the graphics package, contained on GRAFICS:  "You have 6 program modules: %7220.Proc0.Text Contains entry points into the 7220.Core module. %7220.Proc1.Text Contains entry points into the 7220.Core module. %7220.Core.Text Contains assembly code for graphics assist. 8All other 7220.= files are included by this 8file. %Grafdraw.Text Contains Pascal interface text and code for 8GRAFDRAW unit. All other Graf.= files are 8included by this file. %Font.Comp.Text Font compiler %Pat.Comp.Text Pattern compiler  "You have 2 test/demo programs: %Demo.Text Short demonstration program. %Graftest.Text Extensive demonstration and validation suite. %  You have 2 versions of the GRAFDRAW unit code file: %*Grafdraw.Code Contains GRAFDRAW unit that has been run 8through the native code generator. %*NGrafdraw.Code Contains GRAFDRAW unit in P-Code  "You have 1 character font and 4 patterns:  GD_0.6 { , READ.ME.TEXT \/A,f READ.ME1.TEXT\/ӧf HARD.DOC.TEXT\/ BIOS.DOC.TEXT\/QBIOS.DOC2.TEXT/$BIOS.DOC3.TEXT/*8 GRAFTEST.TEXT\/8K GRAFTEST.CODE\/Kw GRAFDRAW.CODE\/wNGRAFDRAW.CODE/^BZz?R^B27: G(et, S(ave, W(hat, N(ew, L(dir, R(em, C(hng, T(rans, D(ate, Q(uit, B(ad-blks, E(xt-dir, K(rnch, M(ake, P(refix, V(ols, X(amine, Z(ero, O(n/off-line, F(lip-swap/lock [D.6] z?^Bz? ,%Font00.Font Data file containing the default character 8font. %Font.A.Text Contains the source of the first 2/3 of the font 8definition found in Font00.Font. %Font.A.Text Contains the source of the last 1/3 of the font 8definition found in Font00.Font. %Pat00.Ptrn Data file containing a medium sized triangle 8pattern. %Pat.A.Text Contains the source to the pattern in Pat00.Ptrn. %Pat01.Ptrn Data file containing a medium sized rectangle 8pattern. %P     at.B.Text Contains the source to the pattern in Pat01.Ptrn. %Pat02.Ptrn Data file containing a small grid pattern. %Pat.C.Text Contains the source to the pattern in Pat02.Ptrn. %Pat03.Ptrn Data file containing a large triangle pattern. %Pat.D.Text Contains the source to the pattern in Pat03.Ptrn.    To run the Demo program, first prefix to Grafics:, then X(ecute Demo.  A drawing of all rectangle and circle drawing modes will appear. n many, if not most, cases. I have consulted with %NEC on this problem, but their solutions do not seem to work. I %expect to have a good solution in time for the next release of %the GRAFDRAW unit. % "5) Due to limitations imposed by the NEC hardware, the DEFINE_COLOR %procedure performs no action. In addition, the SET_PALETTE and %PLANE_VISIBLE procedures also perform no action. However, the %INQ_COLOR does return values consistent with the Ramtek %implementation. %  It will stay on the screen until the [Return] key is hit.   To run the Graftest program, first prefix to Grafics:, then X(ecute  Graftest. A prompt for the background color will appear. Answer with a  digit in the range 0..7 to indicate which color will be the screen  background throughout this run (0 = black, 1 = red, 2 = green, 3 = yellow,  4 = blue, 5 = magenta, 6 = turquiose, 7 = white). A prompt for the  font number will then appear. Answer with a font number (0 is the only  font curren 6) Many of the options accessable through the SET_VALUE procedure %are not implemented. These include opcodes 1 and 3 and parts of %opcode 0 (options 1 through 7 and option 18). Option 1 of opcode %0 is not implemented because of hardware limitations. Options %2 through 7 and 18 of opcode 0 are not implemented because of %ambiguities in the GRAFDRAW specification. %  7) The Display_Mode option for the Text procedure is not implemented. %This is an optional feature used with special Ramtek tly defined) followed by [Return]. A prompt for the fill  pattern number will then appear. Answer with a pattern number (0..3 are  currently defined, as described above) followed by [Return]. This pattern  will be used whenever a rectangle or a circle are filled with a pattern.  The graphics demonstration is divided into 6 sections: the cursor, lines,  boxes, circles, text, and blocks. A prompt preceeds each section to  determine whether or not that section is to be demonstrated. The valid hardware, and %is not easy to implement on NEC hardware.   8) Patterns processed during rectangle and circle filling and patterns %processed with the WRITE_BLOCK_PIXELS and READ_BLOCK_PIXELS %procedures are limited to 255 pixels in the X direction. This is %because the assembly language procedures responsible for %processing these patterns can hold their inner-loop variables in %registers, thus maintaining a reasonably fast drawing speed on all %pattern drawing. %  responses are 'Y', 'N', and . Several frames are drawn within  each section. At the end of each frame, a prompt appears demanding  a to continue. An followed by a aborts the program. Note that because a frame may occupy the  entire screen, a prompt may not be legible. Since the set of responses  for the section and frame prompts are mutually exclusive, no ambiguities  should result.   Note that there may be a delay between the X(ecute co The additions are as follows: " "1) The GRAFDRAW unit specification does not mention any connection %between the WRITE_BLOCK_PIXELS and the Overlay_Mode. It appears %as though there is no interaction intended. I implemented this %procedure to draw in either Replace mode or XOR mode depending %on the value of Overlay_Mode. % %  The performance considerations are as follows:  "1) All drawing and filling procedes fastest when the Overlay_Mode %is set to XOR. This is because in Replace mode, ammand and the actual  execution of the program. This is due to system overhead involved with  the initialization of the system REALOPS unit.    All GRAFDRAW routines are included in the GRAFDRAW interface section.  Due to insufficient specification and/or insufficient hardware, not  all routines are implemented in the same manner as Ramtek's original  unit. Note that even though the implementation of most functions  are compatible with the Ramtek implementation, programs that run ll drawing must %be done in all three planes (either to set bits or to clear bits), %whereas in XOR mode, planes in which no bits need be processed are %not drawn. % "2) Since the NEC graphics hardware does not match the Ramtek hardware, %certain operations require extra processing in order to emulate %operation on the Ramtek. The most notable of these are the %READ_BLOCK_PIXELS and WRITE_BLOCK_PIXELS procedures. The %READ_BLOCK_PIXELS procedure is slightly slower than would be  with the Ramtek GRAFDRAW unit must be recompiled before they may be  used with the NEC GRAFDRAW unit because of differences in variable  and procedure declaration orders.   The differences between the Ramtek and the NEC implementations fall into  three categories: incompatibilities, additions, and performance  considerations.   Incompatibilities arise from the incomplete implementation of some  GRAFDRAW intrinsics. They include:   1) Circles are not clipped at the display edges. As curr%expected. The WRITE_BLOCK_PIXELS has a large startup time involved %with decomposing the source patterns into three plane images %(red, green, and blue) before the pattern can be drawn. This %decomposition occurs on each call to WRITE_BLOCK_PIXELS (the %time delay is approximately 10% of the actual drawing time). " " Using the font compiler:  "The font compiler accepts a series of text files containing a font "definition and produces a .FONT data file acceptable for use with "the GRAFDRAW uniently %implemented, they will draw off the end of the screen and %possibly reenter the screen at an unexpected location. This %applies to circle borders and circle filling. I believe it %is possible to perform proper clipping, but only with %nontrivial analysis and coding.  "2) No documentation was provided as to the initial states of most %of the GRAFDRAW Core attributes. I have set them to reasonable %defaults, but cannot predict what will happen during the execution t. To execute the font compiler, X(ecute FONT.COMP. "The compiler will prompt for the name of the first text file of "the font definition. This file contains font parameters and the "first part of the font definition. The next prompt is for the name "of the font data file. This should be specified as "FONTxx" where xx "is a two digit font number (e.g. 00 or 15). The compiler will store the "font definition in the file FONTxx.FONT. The font compiler then %of existing programs that depend on Ramtek's default values. % "3) Evidently, on most current NEC hardware the display hardware appears %to jam the leftmost pixels together. I understand that this can %be corrected by changing initialization parameters to the 7220. %I have not called NEC regarding these values as of yet, but %expect to doso in time to incorporate them into the next release %of the GRAFDRAW unit. % "4) When drawing a circle in XOR mode, the 45 degree points cancel %each other i     ite " "Each line corresponds to a row of the pattern image. There are as "many lines as there are rows in the pattern image. An example of a "character definition for an 11 by 11 pattern is: " /. b b b b b b b b b . /y . b b b b b b b . g /y y . b b b b b . g g /y y y . b b b . g g g /y y y y . b . g g g g /y y y y y . g g g g g /y y y y . r . g g g g /y y y . r r r . g g g /y y . r r r r r . g g "starting with the lowest valued character of the font and continuing "without interruption through the highest valued character. A "character definition consists of a line containing the character "enclosed in quotes (e.g. "G") followed by several lines containing a "drawing consisting of alternating patterns of either '.'s (representing "an empty pixel) or characters other than '.'s (representing a dot), "separated by two spaces. Each line corresponds to a row of the "character image. There /y . r r r r r r r . g /. r r r r r r r r r . " "Note that there should be no blank lines either at the end of the "pattern text file nor at the beginning. " "The format of the .PTRN datafile is: " &Word 1: Number of pixels in the horizontal direction &Word 2: Number of pixels in the vertical direction &Word 3-? Array [Word1..Word2] of pattern rows & &The pattern image is an array of word-aligned rows. Each row &consists of an array of color identifiers each occupyingare as many lines as there are rows in the "character image. The next character definition follows immediately "after the last line of the current character definition; there are no "intervening blank lines. An example of a character definition for "a 8 by 14 character is: " ;"b" ;. . . . . . . . ;. b . . . . . . ;. b . . . . . . ;. b . . . . . . ;. b . b b . . . ;. b b . . b . . ;. b . . . . b . ;. b . . . . b .  4 bits. &A row occupies (Word1 + 3) Div 4 words. The pattern occupies &Word2 * ((Word1 + 3) Div 4) words. Note that this format &corresponds to the internal representation of an array under the &UCSD Pascal system. An array declaration for the example &pattern might be 0 0Array [1..11] Of Packed Array [1..11] Of 0..15; * &The color token values for the possible colors are: & 20 for dark (black) 21 for red 22 for green ;. b . . . . b . ;. b . . . . b . ;. b b . . b . . ;. b . b b . . . ;. . . . . . . . ;. . . . . . . . = "Note that there should be no blank lines either at the end of the "font text file nor at the beginning. " "The format of the .FONT datafile is: " &Word 1: Number of pixels in the horizontal direction &Word 2: Number of pixels in the vertical direction &Word 3: Value of the first character in the font &Word 4: Value of the last character in23 for yellow 24 for blue 25 for purple 26 for turquoise 27 for white " "  the font &Word 5-? Array [Word3..Word4] of character images & &Each character image is an array of byte-aligned rows. Each row &occupies (Word1 + 7) Div 8 bytes. Each character occupies &Word2 * ((Word1 + 7) Div 8) bytes. There are no padding bytes &between rows nor between character definitions.     Using the pattern compiler:  "The pattern compiler accepts a text file containing a pattern "definition and produces a .PTRN data file acceptable for use with "the GRAFDRAW unit. To execute the pattern compiler, X(ecute PAT.COMP. "The compiler will prompt for the name of the text file containing "the pattern definition. This file contains pattern parameters and the "pattern definition. The next prompt is for the name of the pattern "data file. This should be specified as "PATxx" where xx is a two "digit font number (e.g. 00 or 15). The compiler will store the "pattern definition in the file PATxx.PTRN. The pattern compiler then "processes the patt$CURSOR $EQUAL $TAG  G.Wӧern definition until the end of the text file "is encountered. The pattern compiler then closes the pattern data "file and terminates. " "Pattern text files are line oriented. The first line of the text file "contains two numbers describing the pattern. The first number is the "number of pixels in the horizontal direction. The second number is the "number of pixels in the vertical direction. The numbers are separated "by one or more spaces. A follows the second number. "processes the character definitions until the end of the text file "is encountered. It then prompts for the name of a continuation "text file. If there are no other text files, a "causes the font compiler to close the font data file and terminate. " "Font text files are line oriented. The first line of the first "text file in a font definition contains four numbers describing the font. "The first number is the number of pixels in the horizontal direction. "The second number i"The remainder of the text file contains the pattern definition. A "pattern definition consists of several lines containing a drawing "consisting of color identifiers representing the value of each "pixel, each separated by two spaces. The color identifiers are: " *D, d, or . for dark (black) *R or r for red *G or g for green *Y or y for yellow *B or b for blue *P or p for purple *T or t for turquoise *W or w for whs the number of pixels in the vertical direction. "The third number is the ASCII value of the first character in the font "definition (e.g. 32 for ). The fourth number is the ASCII value "of the last character in the font definition (e.g. 127 for ). "Numbers are separated by one or more spaces. A "follows the last number. The remainder of the text file (and "all of any continuation text files) contains character definitions,       cursor out of &the viewport are ignored and a Draw_Result of Draw_Overflow is &returned (see section I.2). & *|-------------------------------------------------| [1023, 1023] *| | *| (X_Length-1, Y_Length-1) | *| ---------------------------- | *| | | | *| | | | *| | | |    Dear George,  #This is the documentation for the graphics disk I sent you last   week. It is organized as a list of changes to the existing routines   and exposition of the new routines. In addition, the assembly procedure   and the disk contents are described. Please review this to make sure   there are no typos nor transmission errors. If there are any omissions   or ambiguities, please let me know so that I may correct them.    Please make the following substitution *| | | | *| ____________________________ | *| [X_Start, Y_Start] | *| or (0, 0) | *|-------------------------------------------------| ([0, 0] 1[x, y] are global coordinates 1(x, y) are viewport coordinates 1 1 &In the example above, the global space is the 1024 by 1024 &rectangle. A viewport is defined at (X_Start, Y_Start) relative &to the global space. The viewpin the Graftest program. # # # # "Procedure Check_Result (Expected : Result_Set); "Var Ch : Char; "Begin " If Not (Core^.Draw_Result In Expected) Then &If Print_Errors Then (Begin *Write ('Unexpected draw result ', Core^.Draw_Result, 1'; Hit [RETURN]'); *Ch := Read_Key ([Chr (CR)]); (End {of If Check_Result}; " Core^.Draw_Result := 9; {Just to see if it changes} "End {of Check_Result}; " # PThanks, P P PBarry P P P  I Graphics Features  -------------------- $ ort is X_Length pixels wide and &Y_Length pixels high. & &Any operations attempting to draw outside of the current viewport &are clipped and a Draw_Clipped status is returned as the &Draw_Result. Generally, clipping is performed so that the figure &actually drawn appears exactly as it would have if no clipping &were performed, except that it is truncated at the viewport &boundaries. The exception to this rule is text. Text erased &using the Erase_Alpha procedure and text written to the screen &The August, 1983 graphics upgrade (version 0.5) contains four &major features: viewport and window facilities, draw statuses, &correct (and faster) arc clipping and color masking, and XOR in &conjunction with TEXT drawing. & &  I.1 Viewports and Windows  --------------------------  &The NEC APC is capable of drawing in a 1024 by 1024 pixel, 3 plane &graphics space and displaying a 640 by 480 pixel subset. The &GRAFDRAW unit defines a global coordinate space with dimensions &1024 by 1024 pix&using the Pascal and Unit I/O procedures is neither associated &with, nor constrained to a viewport. In addition, a character &written using the Text procedure is drawn only if the character &fits entirely within the viewport. & &Note that in addition to allowing drawing in a much larger &graphics space than is actually displayed, a viewport may also be &declared to be very small. This allows multiple zero-based &graphics spaces. It also provides a method of flooding subsets of ®ions. +  els. A rectangular subset of the global space may &be defined as the current working drawing region (called a &viewport). Another (possibly coincident) rectangular subset of &the global space may be defined as the currently displayed region &(called a window). & &In order to make applications using the GRAFDRAW unit portable, &Core variables have been added to indicate the size of the global &coordinate space. The variables Glob_X_Min and Glob_Y_Min are  I.1.2 Windows  -------------- $ &Windows are related to viewports only in that they are declared in &the same global coordinate space. While viewports are spaces in &which drawing can occur, windows are subsets of the global &coordinate space which the display hardware actually displays on &the screen. Windows may or may not be coincident with viewports. & &Windows are defined by calling the Set_Window procedure. The &Set_Window procedure accepts a pointer to a linked list of window &always set to zero. The variables Glob_X_Max and Glob_Y_Max are &set to the maximum global X and Y coordinates, respectively. Both &are 1023 for the NEC APC implementation. &   I.1.2 Viewports  ---------------- & &A viewport is defined using the Set_Region procedure. The &Set_Region procedure accepts four parameters: the global X and Y &coordinates of the viewport's lower left corner (X_Start and &Y_Start), and the number of pixels in the X and Y directions &(X_Length and Y_Length). & &records as a parameter. Each window record defines the global &coordinates of a window in the drawing space, its coordinates on &the physical screen and the window's size. The global coordinates &within the drawing space specify the lower left corner of the &window. The physical screen coordinates specify the location of &the lower left corner of the image on the display screen (assuming &the lower left corner is (0, 0)). The window's size is specified &by the number of pixels in the horizontal&All coordinates used in subsequent graphic operations are &interpreted relative to the viewport's lower left corner. As a &result of a call to Set_Region, the current position (X_CP, Y_CP) &and the cursor position are set to (0, 0) and the cursor is &disabled. In addition, the Core variables X_Max and Y_Max are set &to the viewport-relative coordinates of the upper right corner of &the viewport (i.e. (X_Length-1,Y_Length-1)). The Core variables  and vertical directions. &The record is declared as follows: ' -Win_Rec_P = ^Win_Rec; -Win_Rec = Record ?Next_Window : Win_Rec_P; { Link to next rec } ?Win_X_Org, { Global drawspace } ?Win_Y_Org, { coordinates } ?Disp_X_Org, { Display screen } ?Disp_Y_Org, { coordinates } ?Win_X_Size, { Window size } ?Win_Y_Size : Point; =End {of Win_Rec}; ' &Region_X_Org and Region_Y_Org are set to the global coordinates of &the viewport origin (X_Start and Y_Start, respectively). The &default viewport starts at (0, 0) relative to the global space and &is 640 pixels horizontally and 480 pixels vertically. & &A viewport may be of any size between 1-by-1 and 1024-by-1024. &However, a viewport must be contained entirely within the global &space. Attempts to define a viewport outside of this space or &attempts to move either the current position or the     pattern file. The Draw_Win_Ovfl status indicates &that an attempt was made to create too many windows. The &Draw_Win_Imp status indicates that an attempt was made to create a &window that the current hardware cannot process. The Draw_No_Font &status indicates that an attempt to draw text was made when no &font had been successfully defined. ( &In addition to the standard draw results, a pseude-draw result has &been defined to equal the highest defined draw result. The &constraints are placed on the contents of the window list. There &may be a minimum of zero and a maximum of two entries in the &window list. If there are no entries (i.e. the list pointer is &NIL), the screen is blanked. (Note that since the 7220 chip draws &quite quickly when the screen is blanked, this mode can be used to &increase drawing speed). If there are any entries in the window &list, each entry must have a Win_X_Size of 640 pixels and a &Disp_X_Org of zero since the 7220 chip is inca&Draw_Max result is provided to aid in defining draw result &subranges even as new draw results are added. The current draw &results are summarized below: & ( (Draw_OK = 0; {Nominal draw result} (Draw_Clipped = 1; {Draw performed, figure clipped} (Draw_Init = 2; {Draw variables at initial state}  (Draw_Overflow = 10; {Draw ignored, coordinate out of range} (Draw_Not_Imp = 11; {Draw ignored, feature not implemented} (Draw_Not_Found = 12; {Draw ignored, filepable of &horizontally-split screen display. In addition, all 480 rows of &the display must be allocated among the declared windows. &Finally, no windows may be declared to overlap. Attempts to &violate of any of these constraints cause an entire Set_Window &call to be ignored and a Draw_Win_Imp status to be returned as the &Draw_Result. & &The NEC APC is capable of setting a window boundary on 16-pixel &(word) boundaries in the global coordinate space instead of on any  not found} (Draw_No_Memory = 13; {Draw ignored, not enough memory} (Draw_Win_Ovfl = 14; {Draw ignored, window list out of range} (Draw_Win_Imp = 15; {Draw ignored, implementation restrict} (Draw_No_Font = 16; {Draw ignored, no font defined} ( (Draw_Max = Draw_No_Font; {Current maximum draw result number} ( (  I.3 Arc Drawing and Color Masking  ----------------------------------  &Previous releases of the GRAFDRAW unit contained flawed algorithms &pixel. The Core variables Win_X_Res and Win_Y_Res give the window &resolutions for X and Y coordinates, respectively. For the NEC &APC, the Win_X_Res is 16 and the Win_Y_Res is 1. Attempts to &declare a window having a global X or Y coordinate that is not &divisible by the respective resolution factor causes the &coordinate to be truncated toward the lower legal value and a &Draw_Result of Draw_Clipped to be returned. In addition, attempts &to declare a window that extends beyond the highest gl&for arc clipping and color masking. The arc clipping algorithms &caused arcs to be drawn beyond the bounds of the current viewport. &However, since the pervious releases equated the current viewport &and display window to the entire screen, the flaws were &unnoticable. In the current versions, the arc clipping algorigthms &do not use trigonometric functions and hence are not subject to &the sluggishness and roundoff problems of prior versions. &Additionally, arcs clipped at the top of screen oftenobal &coordinate space row or physical display row causes the window to &be truncated to fit in both coordinate systems and a Draw_Result &of Draw_Clipped to be returned. & &Windows may be used to produce a split screen display. Animation &may be simulated by switching a window between one or more &viewports. Smooth horizontal or vertical scrolling may be &performed by changing the window's global coordinates slowly. ( &Note that the window record list may be changed during the  appeared to &be clipped at their 45 degree points instead of the display &boundary. This problem has also been corrected. ( &In previous releases, the mask specified by calling the &Plane_Enable procedure was anded directly with the color value &before drawing. This had the unwanted effect of erasing images in &"disabled" planes when the Core Overlay_Mode was set to Replace. &In the current version, the "disabled" planes are not affected by &execution of GRAFDRAW procedures. The list is only relevant &during a call to the Set_Window procedure and is not referenced &afterward. & &  I.2 Draw Results  ----------------- ( &Each procedure in the GRAFDRAW unit returns a status describing &the success or failure of the requested operation. The status is &deposited in the Core variable Draw_Result. Hence, the &Draw_Result variable reflects the status of the most recent draw &request. Draw statuses with values below 10 are considered &any drawing operations regardless of the color of the draw. In &addition, the red and blue planes are automatically "disabled" &when using a monochrome graphics board. Note that the speed of a &draw varies directly with the number of "disabled" planes. (   I.4 Text XOR Mode  ------------------  &Use of the Core Overlay_Mode state is not specified in the Ramtek &GRAFDRAW specification. In previous releases of the GRAFDRAW &unit, the Text procedure drew in Replace mode only. In the &curre&successful or non-fatal statuses. Draw statuses of 10 and above &are considered fatal and cause the requested operation to be &ignored. & &The non-fatal statuses are Draw_OK, Draw_Clipped and Draw_Init. &Successful calls to GRAFDRAW procedures cause the Draw_Result to &be set to Draw_OK. The Draw_Clipped result is returned after a &successful draw that was clipped when it ran into a viewport &boundary. The Draw_Init is returned after the initialization or &The Core variable Window_List initially points to a window record &that declares a window at (0, 0) in the global coordinate space &and (0, 0) on the display screen for the entire display screen &(640 pixels horizontally and 480 pixels vertically). & & ,Global Coordinates Physical Display -(Drawing space) *|------------------| |----------| *| |-----| | | | *| | |=====================>| | *| |_____| | |......&reinitialization of the GRAFDRAW unit. ( &There are seven fatal draw statuses. The Draw_Overflow status &indicates that a coordinate was out of range of the relevant &coordinate system. The Draw_Not_Imp status indicates that the &desired operation is not currently implemented. The &Draw_Not_Found status indicates that a requested font or pattern &file was not available. The Draw_No_Memory status indicates that &there was not enough memory available to facilitate the opening of &a new font or ....| *| |----| | |=>|__________| *| | |=============| *| |____| | *|__________________|   &Global drawspace coordinates not within the global coordinate &space, physical display coordinates not within the screen's &coordinate space and negative window sizes cause an entire &Set_Window request to be ignored and a Draw_Overflow status to be &returned as the Draw_Result (see section I.2). & &Due to hardware constraints within the NEC APC, a number of      nt version, The Text procedure observes the state of the &Overlay_Mode variable and hence draws text in either Replace mode &or XOR mode. (  (  II Changes to GRAFDRAW  ----------------------- " &A number of the GRAFDRAW procedures have subtly changed as a &result of the addition of the viewport and windowing facilities. &This section briefly describes the changes made for each procedure &and variable in the GRAFDRAW interface. References to the tly of the other main &files. & &An executable GRAFDRAW unit is obtained by: & (1) Assembling 7220.PROC0.TEXT to 7220.PROC0.CODE. ( (2) Assembling 7220.PROC1.TEXT to 7220.PROC1.CODE.  (3) Assembling 7220.PROC2.TEXT to 7220.PROC2.CODE.  (4) Assembling 7220.CORE.TEXT to 7220.CORE.CODE. ( & 5) Compiling GRAFDRAW.TEXT to G.TEXT. ( (6) Redirecting input to the file L. ( &The L command file directs the system to link together all modules &relevant expository sections are also given. Note that all &procedures return a status in the Core Draw_Result variable. "   II.1 The Core Record  _____________________ " &The Overlay_Mode value is observed in the Text procedure. See §ion I.4. & &The Region_X_Org and Region_Y_Org variables contain the global &coordinates of the origin of the current viewport. See section &I.1.2. 9 &The Window_List variable points to the list of currently defined &windows. The Win_X_Res and Win_Y_R&into the GRAFDRAW.CODE file. This file contains an executable &version of the GRAFDRAW unit. & &A non-trivial overall speed increase can be obtained by running &the native code generator over the GRAFDRAW.CODE file. The &destination code file should be called NGRAFDRAW.CODE. & &Both the GRAFDRAW.CODE and NGRAFDRAW.CODE files should be &released.    IV Description of GRAFDRAW Source Disk  --------------------------------------- & &PAT.COMP.TEXT Pattern compiler source &PAT.COMes variables specify the window &placement resolution within the global coordinate space. See §ion I.1.2. 9 &The Glob_X_Min, Glob_X_Max, Glob_Y_Min and Glob_Y_Max variables &describe the bounds of the global coordinate space. See section &I.1. 9 &The Draw_Result variable indicates the result of the most recent &draw operation. See section I.2. "  II.2 The Move_Cursor Procedure  -------------------------------  &The Move_Cursor procedure has been changed to draw a clipped P.CODE Pattern compiler object &PAT.A.TEXT Sample pattern 0 source &PAT.B.TEXT Sample pattern 1 source &PAT.C.TEXT Sample pattern 2 source &PAT.D.TEXT Sample pattern 3 source &PAT00.PTRN Sample pattern 0 object &PAT02.PTRN Sample pattern 2 object &PAT03.PTRN Sample pattern 3 object &PAT01.PTRN Sample pattern 1 object &PONG.TEXT Pong game demonstration source &cursor when overrunning the edge of a viewport. Previous version &maintained axial symmetry at all times. " "  II.3 The Box_Abs and Box_Rel Procedures  ----------------------------------------  &In previous versions, boxes drawn with either the Box_Abs or &Box_Rel procedures were clipped so that all four sides of the &rectangle were always drawn. Currently, only the portions of the &rectangle sides that are contained within the viewport (if at all) &are drawn. " "  II.4 The Text Procedu&PONG.CODE Pong game demonstration object &FONT00.FONT Sample font 0 object &FONT.B.TEXT Sample font 0 source, part 2 &FONT.A.TEXT Sample font 0 source, part 1 &DEMO.TEXT Ramtek demonstration source &DEMO.CODE Ramtek demonstration object &HOT.DOG.TEXT Hot dog demonstration source &HOT.DOG.CODE Hot dog demonstration object &READ.ME.TEXT Old documentation source &HEXAGON.CODE Hexre  ------------------------  &The Overlay_Mode value is observed in the Text procedure. See §ion I.4. In addition, text drawn beyond the end of the &viewport is clipped. See section I.1.2. " "  II.5 The Circle_Abs and Circle_Rel Procedures  ----------------------------------------------  &The Circle_Abs and Circle_Rel procedures are now capable of &drawing circles of radius greater than 480. Circle clipping has &also been altered so that circles drawn over the top boundary are agon demonstration object &PAT.E.TEXT Sample pattern 5 source &PAT05.PTRN Sample pattern 5 object &GRAF.LINE.TEXT GRAFDRAW Pascal source include file &GRAF.CURS.TEXT GRAFDRAW Pascal source include file &GRAF.RECT.TEXT GRAFDRAW Pascal source include file &7220.PROC0.TEXT GRAFDRAW assembly source &7220.PROC0.CODE GRAFDRAW assembly object &GRAF.FLOOD.TEXT GRAFDRAW Pascal source include file &clipped at the top boundary instead of at their 45 degree points. &Clipping calculations are now also alot faster. See section I.3. " "  II.6 The Arc_Abs and Arc_Rel Procedures  ----------------------------------------------  &The Arc_Abs and Arc_Rel procedures are now capable of drawing arcs &of radius greater than 480. Arc clipping has also been altered so &that arcs drawn over the top boundary are clipped at the top &boundary instead of at their 45 degree points. Arc clipping now &obser&L GRAFDRAW Linker command file &7220.PROC1.CODE GRAFDRAW assembly object &7220.PROC1.TEXT GRAFDRAW assembly source &7220.PROC2.CODE GRAFDRAW assembly object &7220.PROC2.TEXT GRAFDRAW assembly source &GRAF.FONT.TEXT GRAFDRAW Pascal source include file &7220.ARC.TEXT GRAFDRAW assembly source include file &GRAF.CIRCL.TEXT GRAFDRAW Pascal source include file &G.CODE GRAFDRAW Pascal object (unlinked) &722ves viewport boundaries exactly instead of approximately. &Clipping calculations are now also alot faster. See section I.3. " "  II.7 The Set_Region Procedure  ------------------------------ " &The Set_Region procedure is new in this release and allows the &declaration of viewports. See section I.1.2.    II.8 The Set_Window Procedure  ------------------------------ " &The Set_Window procedure is new in this release and allows the &declaration of windows. See section I.1.3.   0.CIRCL.TEXT GRAFDRAW assembly source include file &7220.CORE.CODE GRAFDRAW assembly object &7220.FLOOD.TEXT GRAFDRAW assembly source include file &7220.RECT.TEXT GRAFDRAW assembly source include file &7220.MISC.TEXT GRAFDRAW assembly source include file &GRAFDRAW.CODE GRAFDRAW Pascal object (linked) &7220.CORE.TEXT GRAFDRAW assembly source include file &GRAFDRAW.BACK Junk &GRAFTEST.TEXT GRAFDRAW validation source  III Creating a GRAFDRAW Release  --------------------------------  &The GRAFDRAW unit is organized as a collection of Pascal and &assembly language files. The main Pascal file is GRAFDRAW.TEXT. &All Pascal include files have the GRAF. prefix. There are four &main assembly code files: 7220.PROC0.TEXT, 7220.PROC1.TEXT, &7220.PROC2.TEXT and 7220.CORE.TEXT. The remaining files with the &prefix 7220. are include files for the 7220.CORE file. Each main &file may be compiled or assembled independen     st, a &set of keys are defined to move the screen display over different &portions of the clipping region (viewport). The up-arrow key &moves the image up; the down-arrow key moves the image down. The &backspace and left-arrow keys move the image to the left; the &right-arrow key moves the image to the right. The [CLEAR-HOME] &key moves to the original image. Repitition factors may be &applied to any key by typing an integer followed by the key. A &boundary and clipping conditions are tested.    V.1 Initial Prompts  --------------------  &Certain parameters may be specified when the program starts. These &include the background color, the pattern number, the font number, &the enabled planes and the viewport location and size. These ¶meters influence the location and appearance of the tests on &the screen. & &The background color is specified as an integer followed by the &[RETURN] key. Possible values are: & 80 for Bla&repitition factor remains in effect until another repitition &factor is typed to superceed it. &  ck 81 for Red 82 for Green 83 for Yellow 84 for Blue 85 for Purple 86 for Pink 87 for White & &The recommended values for the background color are 0 or 1. & &The pattern number is specified as an integer between 0 and 5 &followed by the [RETURN] key. The pattern number selects a &PATxx.PTRN file containing pattern to be used during rectangle &and circle filling. The recommended value for the pattern &number is 1. & &The font number is specified by typing 0 followed by the [RETURN] &key. The font number selects a FONTxx.FONT file containing &pattern to be used during text drawing. (There is only one font &file supplied). & &The enabled planes is specified as an integer between 0 and 7 &followed by the [RETURN] key. The enabled planes indicate the &planes in which drawing may occur. Possible values are: & 80 for no planes 81 for the Red plane only 82 for the Green plane only 83 $CURSOR $EQUAL $TAG $LAST G.$for both the Red and Green planes 84 for the Blue plane only 85 for both the Red and Blue planes 86 for both the Green and Blue planes 87 for all planes & &The recommended value for the enabled plane is 7. & &The clipping region (viewport) location is the X and Y coordinates &of the viewport for the test. It is specified as an integer &between 0 and 1023 followed by a space and another integer between &0 and 1023, followed by the [RETURN] key. Recommended values for &the viewport location are either 0 0 or 200 200. The 0 0 &value shows the test occupying the entire screen, while the 200 &200 value shows the test and the effects of clipping. & &The clipping region (viewport) size is the X and Y size of the &viewport for the test. It is specified as an integer between 1 &and 1024 followed by a space and another integer between 1 and &1024, followed by the [RETURN] key. Recommended values for t 8The Hard.Con Utility 8==================== 8  1.0 Overview  ------------- ( %The Hard.Con utility is used to manage a hard disk drive. It  provides formatting and partitioning functions compatible with both the  UCSD p-System and Microsoft's MS-DOS.  %A major function of the Hard.Con utility is the partitioning of the  hard disk into volumes. A volume is an area on the hard disk that is  treated by either the p-System or MS-DOS as if it was a floppy disk  mounted in a floppy drive. A vhe &viewport size are either 640 480, 200 150 or 1024 1024. The 640 &480 value shows the test occupying the entire screen and should be &used with a location of 0 0, while the 200 150 value shows the &test and the effects of clipping and should be used with a &location of 200 200. The 1024 1024 value show the test occupying &the full 1024 by 1024 graphics space; this value is not &recommended for the cursor and circle tests, but is heartily &recommended for the window test.   &GRAFTEST.CODE GRAFDRAW validation object &NGRAFDRAW.CODE GRAFDRAW Pascal object (linked, native code gen) &GRAFDRAW.TEXT GRAFDRAW Pascal source &GRAF.MISC.TEXT GRAFDRAW Pascal source include file & &  V The Graftest Program  -----------------------  &The Graftest program is intended for the validation and demonstration &of the various features of the GRAFDRAW unit. This section describes &the legal and desirable responses to Graftest's prompts. The &Gr V.2 Ongoing Prompts  --------------------  &There are two types of prompts that appear at the bottom of the &screen. The first type asks whether or not to execute a &particular test. The approriate responses are 'Y' to execute the &test and 'N' to skip the test. The second type prompts for the &[RETURN] key before continuing to the next sub-test. Hitting the &[ESC] key in response to either prompt aborts the Graftest &program. & &In addition to the keys that control the progress of the teaftest program is not intended as a sales demonstration, but may &be used as such at the salesman's peril. & &The Graftest program contains several test suites, each testing &a different aspect of the GRAFDRAW unit. In order of appearance, &they are: & =Cursor =Line =Box =Text =Circle =Block =Area Fill =Arc =Windows < &Each test demonstrates typical usage of each related GRAFDRAW &procedure using most of the available modes. In addition, some      olume is accessable to either the p-System  or MS-DOS, but not both. Up to 9 volumes may reside on a hard disk  drive. The p-System's I/O system accesses them as I/O units 10 through  12. The first mounted p-System volume is assigned to I/O unit 10. The  second mounted p-System volume is assigned to I/O unit 11, and the third  mounted p-System volume is assigned to I/O unit 12.    2.0 Executing Hard.Con  -----------------------  sts  of a command name whose first letter is capitalized and is separated  from the rest of the command name by an open parenthesis ("("). A  command is invoked by typing the first letter of the command name. A  command to exit the prompt and return to the previous prompt is always  provided (usually the E(xit command).  %Line identifier prompts are used to select a line of the volumes  display. They are of the form:  0Delete which entry (A-C) ?  %The Hard.Con utility is executed by typing "X" (for X(ecute) at the  system command prompt, followed by "Hard.Con" and the [RETURN] key. The  Hard.Con utility starts by attempting to access configuration  information on the hard disk. If no valid configuration information is  available, a default hard disk configuration is assumed and the  following message appears:  1The drive configuration cannot be read, 1a new configuration will be created. 1Type to continue   Hitting the space%The response designates a line in the volumes display. A valid  response is a single letter (either upper- or lower-case) in the range  specified in parentheses. Hitting either the [ESC] key, the [RETURN]  key or the space bar aborts the prompt and returns to the previous  prompt.  %Data prompts are used to read numbers and character strings. They  consist of an underlined field with the cursor placed to the right of a  default value. The default value may be edited in a manner similar to  t bar causes the program to continue. Note that in  this situation, the hard disk may require formatting before it is  suitable for data storage. See section 2.0.4 for details. % %Once the configuration has been determined, it is displayed and the  following prompt (called the main command prompt) appears:  (Command: B(ad track, V(olumes, F(ormat, E(xit, U(pdate [A]  %Typing "E" for E(xit exits Hard.Con. Typing "B" for B(ad track he eX(change mode of the system editor; typing a printable character  causes the character under the cursor to be replaced. Certain keys  perform special functions:  &[Left-arrow] Moves the cursor one position left &[Right-arrow] Moves the cursor one position right &[DEL] Deletes the character under the cursor &[INS] Inserts a space under the cursor &[TAB] Moves the cursor to the end of the field &[SHIFT][DEL] Moves the cursor to the beginning of the field  allows the assignment of alternate tracks as replacements for defective  tracks. Typing "V" for V(olumes allows the creation and manipulation of  disk partitions, called "volumes". Typing "F" for F(ormat invokes the  hard disk formatter. Typing "U" for U(pdate causes the displayed  configuration to become permenant. Each command is described in detail  in sections 2.0.2 through 2.0.6.  %  2.0.0 The Display  ------------------  %The display consists of two main sections: the volumes displa&[ESC] Escapes from the command &[RETURN] Terminates input -- characters under and beyond 6the cursor are ignored &[ENTER] Terminates input -- all characters in the field 6are accepted  %An empty data input (specified either by deleting all characters in  a field or by positioning the cursor at the beginning of the field and  hitting the [RETURN] key) aborts non-mandatory data prompts. Note that  a short description of the required input is usually displayed at the  toy and  the bad tracks display. The volumes display is maintained in the upper  half of the screen and shows how the hard disk is partitioned into  logical volumes. The bad tracks display is maintained in the lower half  of the screen and displays a list of defective tracks and their  replacement tracks.  %One volume may be described on each line of the volumes display.  Each line is identified by a single letter at the left margin. Several  volume attributes are displayed, including a textual p of the screen. .   2.0.2 B(ad Tracks  ------------------  %The B(ad tracks command is used to specify defective tracks for  which the Hard.Con utility should assign alternate tracks. The B(ad  tracks command is invoked by typing "B" at the main command prompt.  An empty data prompt appears at the first available field in the bad  tracks display. The prompt may be aborted by hitting the [RETURN]  key as described in section 2.0.1.   description, a volume type, a current status, a disk location and a  volume size. The textual description is a user-defined string of up to  19 characters whose sole function is to describe the volume to a user  viewing the volumes display. The volume type indicates which system  (either the p-System or MS-DOS) can access the volume. The volume  status indicates whether the volume is mounted or dismounted. A volume  is accessable to the designated system only if it is mounted. The disk  space %The prompt is satisfied by entering the number of a defective  track. The Hard.Con utility searches for a reliable alternate track,  transfers all recoverable data from the defective track to the alternate  track, then updates the bad track display. The bad track display is  maintained in order of ascending track number. Henceforth, all accesses  to the defective track are automatically diverted to the alternate  track.   NOTE -- Defective tracks are automatically identified and reassigned  occupied by a volume is displayed as a starting track and an  ending track; the volume occupies all tracks between, and including, the  starting and ending tracks. A track is a group of 13 512-byte blocks. A  volume, therefore, contains an integral multiple of 13 blocks. The  number of blocks contained in a volume is calculated and displayed, in  addition to the number of unallocated blocks between the end of the  volume and the beginning of the next.  by the formatter (see section 2.0.4), but from time to time, defective  tracks are found that the formatter missed or that have become  defective since the hard disk was originally formatted. These tracks  may be identified when a read from the hard disk results in an error  (i.e. during a B(ad blocks scan using the system Filer). The number of  the track containing a bad block may be calculated using the following  formula:  ( DIV 13 + ( %A summary of the hard disk allocation appears at the bottom of the  volumes display. The size of a track, the bootstrap area, the volume  data area, and the alternate track area are given.  %  2.0.1 Prompts  --------------  %The prompts presented by the Hard.Con utility fall into three  categories: command prompts, line identifier prompts, and data prompts. % %Command prompts contain a list of command options separated by  commas (see section 2.0 for an example). Each command option consi     d allows the modification of certain attributes  of an existing volume. Typing "C" for C(hange causes the Hard.Con  utility to prompt for a letter identifying the line of the volumes  display to modify. Typing a valid line identifier causes the Hard.Con  utility to prompt for various fields on the specified line. The inputs  acceptable under the C(hange command are the same as those acceptable  under the A(dd command described in section 2.0.3.2. The only  display, assuming the system is bootstrapped from the hard disk) may  cause a system crash. $   2.0.3.0 A(dd  -------------  %The A(dd command allows the addition of a new volume. Typing "A"  for A(dd causes the Hard.Con utility to prompt for the name of the new  volume on the first unused line of the volumes display. Up to 19  characters describing the new volume may be entered.  %Next, a prompt for the volume type is displayed. By default,  volumes are p-System volumes. Typing eit difference is that the current values are treated as the default  responses to the prompts.  %Note that if the volume is an MS-DOS volume, it is not possible to  change the volume size. If the volume is the p-System volume, the  volume size may be changed. If the volume has a p-System directory, the  Hard.Con utility assures that the new volume size is large enough to  contain all p-System files already resident on the volume. The p-System  directory is automatically updated to reflect the newher "M" or "m" changes the  volume to an MS-DOS volume. Typing either "P" or "p" changes it back to  a p-System volume.  %Next, a prompt for the status is displayed. If the volume is a p-  System volume, the default status is "Mounted"; otherwise, the default  status is "Dismounted". Typing either "D" or "d" changes the status to  "Dismounted". Typing either "M" or "m" changes it back to "Mounted".  Note that if the number of existing volumes currently mounted is equal  size of the  volume.   NOTE -- Because the p-System assumes it has perpetual access to the  volume from which it is bootstrapped, C(hanging the bootstrap volume  (the first p-System volume in the display, assuming the system is  bootstrapped from the hard disk) from a mounted volume to a dismounted  volume may cause a system crash.    2.0.3.2 R(emove  ----------------  %The R(emove command allows the removal of an existing volume, thus  to the maximum number of mounted volumes for the new volume's system (3  for the p-System, 4 for MS-DOS), no status prompt is generated and the  new volume is automatically "Dismounted".  %Next, a prompt for the starting track number is displayed. The  starting track number is the number of the lowest track to be occupied  by the new volume. It should be an unallocated track between 8 and 1407.  Unallocated tracks may be determined by examining the "Unused" column of  the volumes display. Non-z releasing its tracks for future use. Typing "R" for R(emove causes the  Hard.Con utility to prompt for a letter identifying the line to erase  from the volumes display. Typing a valid line identifier causes the  Hard.Con utility to verify the removal:  (Removing entry C; are you sure (Y/N) ?   Hitting either the 'N' key, the 'n' key, the [RETURN] key, or the  space bar aborts the operation. Typing either 'Y' or 'y' causes the  specified display line to be erased and any subsequent lines to beero values in this column indicate empty  tracks after the track number listed in the "End" column on the same  line. The value in the "Unused" column indicates the number of blocks  available in the unallocated space. Note that if the first entry in the  volumes display does not start on track 8, a volume may be created  starting on track 8.  %Next, a prompt for the volume size is displayed. The volume size is  specified as a number of 512 byte blocks. The default volume size is the  moved  up.   NOTE -- A volume that is mistakenly R(emoved may be recovered as  long as no other volume has been created over or extended onto the  tracks occupied by the deleted volume. A deleted volume may be recovered  by A(dding a new volume that starts where the old one started and  occupies the same number of blocks. This new volume should NOT be  initialized, because the initialization process destroys an old  directory by overwriting it with an empty one.   number of unallocated blocks between the starting track and the  beginning of the next volume. Any volume size input not corresponding  to an integral number of tracks is automatically adjusted upward to  specify an integral number of tracks.  %Finally, a prompt is displayed asking whether or not to initialize  the new volume:  3Initialize this volume (Y/N) ? 0 %Hitting either the "N" key, the "n" key, the [RETURN] key or the  space bar skips volume initialization. Typing either "Y" or "y"  NOTE -- Because the p-System assumes it has perpetual access to the  volume from which it is bootstrapped, R(emoving the bootstrap volume  (the first p-System volume in the display, assuming the system is  bootstrapped from the hard disk) may cause a system crash.    2.0.3.4 M(ount and D(ismount  -----------------------------  %The M(ount and D(ismount commands allow modifications to the  status attribute of a volume entry. Typing either "M" for M(ount or "D"  for D(ismount causes the Hardcauses  volume initialization to proceed. If the new volume is an MS-DOS volume,  an empty MS-DOS directory is written onto it. If the new volume is a p-  System volume, a prompt is displayed requesting a directory name:  &What is the new volume name for entry C ( to escape) ? & %A directory name may be up to 7 characters long. Lower-case  characters are automatically converted to upper-case. Any embedded  ":"s, "$"s and "="s are removed. Hitting the [ESC] key or entering an  The volumes display contains the starting track for each volume.    2.0.3 V(olumes  ---------------  %The V(olumes command allows access to a number of commands that  affect the volumes display. These commands add, change, remove, mount,  dismount and initialize volumes. In addition, entire volume  configurations may be loaded from or dumped to a data file. Typing "V"  at the main command prompt causes the volumes prompt to be displayed:  (Volumes: A(dd, C(hange, R(emove, M(ount, D(ism empty directory name aborts volume initialization; otherwise, a new  directory is written onto the new volume.   NOTE -- Because the p-System assumes it has perpetual access to the  volume from which it is bootstrapped, A(dding a mounted p-System volume  at a track number lower than the bootstrap volume's (the first p-System  volume in the display, assuming the system is bootstrapped from the  hard disk) may cause a system crash. $   2.0.3.1 C(hange  ----------------  %The C(hange commanount, II(nit, L(oad, W(rite, E(xit  %Typing "E" for E(xit returns to the main command prompt (see  section 2.0). The A(dd, C(hange, R(emove, M(ount, and D(ismount affect  individual lines in the volumes display. The L(oad and W(rite commands  affect the entire volumes display.   NOTE -- Because the p-System assumes it has perpetual access to the  volume from which it is bootstrapped, R(emoving, C(hanging, D(ismounting  or I(nitializing the bootstrap volume (the first p-System volume in the      .Con utility to prompt for a letter  identifying a line in the volumes display. M(ounting a volume entry  makes the volume accessable to the system named under the "System"  column; D(ismounting a volume entry makes the volume inaccessable. Note  that a volume may be mounted or dismounted using the C(hange command,  but the M(ount and D(ismount commands are faster and more convenient.   NOTE -- The maximum number of mounted p-System volumes is 3. The  maximum number of MS-DOS volumes is 4.  eft corner of the screen. Second,  each track in the specified range is checked for reliability. Third,  any tracks found to be incapable of reliable data storage are marked  defective and alternate tracks are automatically allocated. Finally,  the bad tracks display is updated to reflect the addition of any new  defective tracks.   NOTE -- Formatting tracks marked defective does not deallocate any  alternate track that may have been assigned to it. Once a track is  NOTE -- Because the p-System assumes it has perpetual access to the  volume from which it is bootstrapped, D(ismounting the bootstrap volume  (the first p-System volume in the display, assuming the system is  bootstrapped from the hard disk) may cause a system crash.    2.0.3.6 I(nit  --------------  %The I(nit command allows an empty directory to be written on a  volume without having to R(emove and re-A(dd the volume. Typing "I" for  I(nit causes the Hard.Con utility to prompt for a lett designated defective, it is not redeemable.   NOTE -- Because the p-System assumes it has perpetual access to the  volume from which it is bootstrapped, F(ormatting tracks on the  bootstrap volume (the first p-System volume in the display, assuming the  system is bootstrapped from the hard disk) may cause a system crash.    2.0.5 E(xit  ------------  %The E(xit command terminates the Hard.Con utility without updating  the configuration information area on the hard disk. E(xit may be useder identifying a  volume in the volumes display to initialize. Typing a valid line  identifier causes the Hard.Con utility to verify the initialization:  (Initializing volume HARDVOL:; are you sure (Y/N) ?  %Hitting either the 'N' key, the 'n' key, the [RETURN] key or the  space bar aborts the initialization; typing either 'Y' or 'y' proceeds  with the operation. If the specified volume is an MS-DOS volume, a new  directory is written onto it. If the specified volume is a p-System   to cancel any changes that have been made to either the volumes display  or the bad blocks display. Note that E(xit does not cancel format  operations, volume initializations, and volume size changes to p-System  directories. %   2.0.6 U(pdate  --------------  %The U(pdate command terminates the Hard.Con utility after updating  the configuration information area on the hard disk.   NOTE -- Because the p-System assumes it has perpetual access to the  volume, a prompt is displayed requesting a directory name:  &What is the new volume name for entry C ( to escape) ? & %A directory name may be up to 7 characters long. Lower-case  characters are automatically converted to upper-case. Any embedded  ":"s, "$"s and "="s are removed. Hitting the [ESC] key or entering an  empty directory name aborts volume initialization; otherwise, a new  directory is written to the volume.   NOTE -- Because the p-System assumes it has perpetual access to t volume from which it is bootstrapped, certain operations on the  bootstrap volume (the first p-System volume in the display, assuming the  system is bootstrapped from the hard disk) may cause a system crash. See  the documentation for each Hard.Con command in order to determine  dangerous conditions.   he  volume from which it is bootstrapped, I(nitializing the bootstrap volume  (the first p-System volume in the display, assuming the system is  bootstrapped from the hard disk) may cause a system crash.    2.0.3.5 W(rite and L(oad  -------------------------  %The W(rite and L(oad commands allow the storage and retrieval of  volume display configurations in data files. Typing either 'W' or 'w' for  W(rite, or 'L' or 'l' for L(oad causes the Hard.Con utility to prompt for the  name of a data file. The default data file name is NEC.Vol.Data. The W(rite  command writes the current volumes display to the specified data  file. The L(oad command reads a volumes display from the  specified data file and display it.    2.0.4 F(ormat  --------------  %The F(ormat command is used to prepare a new hard disk drive for  data storage or to rejuvenate a damaged hard disk drive. Since the  formatting process destroys any data that may already exist on a disk,  the followinA _.G^Qg prompt is displayed:   Formatting may destroy data; are you sure (Y/N) ? $  Hitting either the "N" key, the "n" key, the [ESC] key, the  [RETURN] key or the space bar abort the F(ormat command. Typing  either the "Y" or "y" key allows the F(ormat command to ask for the  starting track number:  )What is the starting track ( to escape) ? $  The default starting track is track 0; hitting the [RETURN] key  causes track 0 to become the starting track. Next, a prompt for the  ending track is displayed:  )What is the ending track ( to escape) ? $  The default ending track is the number of the last track on the  disk; hitting the [RETURN] key causes this track to become the ending  track (see section 2.0.1). Note that the ending track number must not be  lower than the starting track number.  %Formatting commences after the ending track is specified. First,  each track in the specified range is formatted. The current track  number is displayed in the upper l     e Disable -- all subsequent Dprintable characters will be written Din normal video. %T 20 Restore Cursor Address to the value in Dthe "Saved Cursor Address" variable. %U 21 Restore Option to the value in Dthe "Saved Option Value" variable. DRequires an option identifier (see Dbelow) indicating which option's Dvalue is to be restored. If the Doption does not exist, no action Dis taken. %V 22 Restore Color to the value in the %G 7 Bell W 23 %H 8 Backspace X 24 %I 9 Tab Y 25 Home Cursor %J 10 Linefeed Z 26 Set Console Option %K 11 Clear to End of Screen [ 27 %L 12 Clear Screen \ 28 Nondestructive Forward Space %M 13 Carriage Return ] 29 Clear to End of Line %N 14 Set Color ^ 30 Set Cursor Address %O 15 Left Arrow (same as 8) _ 31 Reverse Linefeed $D"Saved Color" variable. %W 23 Null - No action. %X 24 Null - No action. %Y 25 Home Cursor to the top left margin. %Z 26 Set Console Option to the specified Dvalue. Requires a option Didentifier (see below) indicating Dwhich option value is to be set Dand the new value. If the option Ddoes not exist, no action is taken. %[ 27 Null - No action. %\ 28 Nondestructiv % %Control Character Action %================= ====== %@ 0 Null - no action %A 1 Save Cursor Address in the "Saved Cursor DAddress" variable for later recall %B 2 Save Console Option in the "Saved Console DOption" variable for later recall. DRequires an option letter (see below) Dto specify which option value to save. % If the specified option does not e Forward Space the cursor Dto the next column. Wrap around to Dthe next line if on the right margin Dunless cursor is on the last line. %] 29 Clear to End of Line and leave the cursor Dat its current position. %^ 30 Set Cursor Address according to the Dnext two ASCII values. The next Dvalue is the column address, biased Dby 20 hex, followed by the row Daddress, biased by 20 hex. %_ 31 Reverse Linefeed to the previous line. Dexist, no operation is performed. %C 3 Save Color in the "Saved Color" variable % for later recall. %D 4 Read Cursor Address into the keyboard Dinput buffer. The three character Dsequence necessary to position the Dcursor at its current position is Dreturned. %E 5 Read Console Option into the keyboard Dinput buffer. Requires an option Dletter (see below) in either upper Dcase or lower case to spDDo not scroll the screen in the Dreverse direction if the cursor is Dat the top of the screen.  $Console options are manipulated by a two character sequence $starting with control-Z and followed by either an upper case $letter (to enable an option) or a lower case letter (to disable an $option). All console options are initially disabled. Console $options may be set and disabled independent of each other. Note $that control-R and control-S are equivalent to (control-Z, E) and $(control-Z, e)ecify the Doption whose value is to be read. DThe two character sequence necessary Dto set the option to its current Dvalue is returned. If the option Ddoes not exist, the option Didentifier is returned as received. %F 6 Read Color into the keyboard input Dbuffer. The two character sequence Dnecessary to set the color to its Dcurrent value is returned. %G 7 Bell - sound an audible tone. , respectively. The control-B, control-E and control-U $sequences also require an option identifier, which may be in either $upper or lower case. The options are:  %Option Attribute %====== ========= 'A Underline Mode 8- Put a green line under all subsequent printable :characters. 'B Overline Mode ' - Put a green line over all subsequent printable :characters. 'C Vertical Line Mode %H 8 Backspace the cursor one position. Wrap Daround to the last column in the Dprevious line if currently at the Dleft margin. No wrap around occurs Dif the cursor is at the upper left Dcorner. %I 9 Tab the cursor to the next 8th column. Do Dnot wrap around if at the right margin. %J 10 Linefeed to the next screen row. Scroll the Dscreen if at the last row. %K 11 Clear to End of Screen and leave the D8- Put a green vertical line through all subsequent :printable characters. 'D Blink Mode 8- Make each subsequent printable character blink. 'E Inverse Mode 8- Print each subsequent character in inverse video. :The background is the character's color. 'F (Unallocated) 'G Blank system status line field 8- Disable entire system status line. No clock :interrupt time is used for status line display. :Normally, a status line containing three fielcursor at its current position. %L 12 Clear Screen and home the cursor. %M 13 Carriage Return to the left margin. %N 14 Set Color to a new color. Requires a Dcolor option specifying the new Dcolor (see below). %O 15 Left Arrow (same as Backspace). %P 16 Null - No action. %Q 17 Print Screen to printer. Requires Doperation code specifying destination :  Characters in the range 32 through 127 are displayed according to  their normal ASCII values. Characters in the range 128 through 255  each have special graphics forms, described in the NEC hardware  manual. Characters in the range 0 through 31 may be displayed as  special graphics characters, but normally indicate a special screen  function. These screen functions are intended to be a superset of  those defined for the Apple ][ in order to facilitate software  portability. They are describeDand operation. If the code is "0", % a form feed is transmitted to the Dparallel printer. If the code is D"1", the entire screen is transmitted. DIf the code is "4", a form feed is Dtransmitted to the serial printer. DIf the code is "5", the entire screen Dis transmitted. All other codes are Dignored. %R 18 Inverse Mode Enable -- all subsequent Dprintable characters will be written Din reverse video. %S 19 Inverse Modd as follows: $ 9Output Character Sequences 9========================== % %@ 0 Null P 16 DLE Expansion %A 1 Save Cursor Address Q 17 Print Screen %B 2 Save Console Option R 18 Inverse Mode Enable %C 3 Save Color S 19 Inverse Mode Disable %D 4 Read Cursor Address T 20 Restore Cursor Address %E 5 Read Console Option U 21 Restore Option %F 6 Read Color V 22 Restore Color      ds :appears at the top of the screen. In order for :a given field to be displayed, the status line :field must be enabled, and the particular field :must also be enabled. All fields are displayed :in green. 'H Blank system status line date field 8- Disable system status date field. No clock :interrupt time is used to calculate time and date. ' Normally, display contains the day, date, and time :to the nearest minute. Time is recalculated line is enabled. 'Y Keyboard click ' - Enables a short beep whenever a keyboard stroke :is detected. 'Z (Unallocated) '[ Alternate Font ' - Display subsequent characters using the alternate :16 by 16 font. '\ Visible control characters % - Display all control characters (except 1A) using :their graphic form instead of processing their :screen function. Note that processing of 1A :every 15 seconds and is redisplayed when the minute :changes. The month and day, but not the year, :are also recalculated. A new year may be set :using a utility program (as yet unwritten). 'I Blank system status line shift key status field 8- Disable system key status field. No clock :interrupt time is used to display keyboard :status. Normally, display contains the status :of the CAPS LOCK, ALT, GRPH1, and GRPH2 shift :keys and the keyboard. The display for a :given shift k:is still performed so that this mode may be :cancelled. % $The character color is set by a two character sequence starting $with control-N followed by a color option. The options are:  %Option Attribute %====== ========= '0 Secret (invisible) '1 Red '2 Blue '3 Purple '4 Green '5 Yellow '6 Turquoise '7 White %All others Ignored ' $The contents of the screen may be printey is in normal video if the :shift key is not down; otherwise, the display :is in reverse video. The keyboard display :is in normal video if the keyboard is enabled; :otherwise, the display is in reverse video. 'J Blank system status line floppy status field 8- Disable system floppy format status field. No ' clock interrupt time is used to display floppy :format status information. Normally, the :field contains the format used by the floppy ed on a printer by using $a two character sequence starting with control-P followed by $a print option. The options are: ' %Option Meaning %====== ======= '0 Send a formfeed to the parallel printer '1 Send a copy of the screen to the parallel printer '2 Unassigned (ignored) '3 Unassigned (ignored) '4 Send a formfeed to the serial printer '5 Send a copy of the screen to the serial printer :driver to access each floppy. If the floppy :format is the default NEC format, no format is :displayed. If the format is not NEC format, :the format and the name of the drive to which :it pertains is displayed. The floppy drivers :switch automatically between NEC and DEC :formats. Other formats may be set using the :keyboard sequences described below. 'K (Unallocated) 'L Nonblinking cursor 8- Display a solid cursor instead of the normal :blinking cursor. 'M '6 Unassigned (ignored) '7 Unassigned (ignored) %All others Ignored    The following description applies when no shift keys are down (shift keys  include FNC, CTRL, SHIFT, CAPS LOCK, GRPH1, GRPH2, and ALT): 1 6Unshifted Input Character Sequences 6=================================== % %Key ASCII Key ASCII Key ASCII %=== ===== === ===== === ===== %ESC 27 (1B) (^[) BS 8 (08) (^H) TAB  Underscore cursor ' - Display an underscore for the cursor instead of :the normal block cursor. 'N Invisible cursor ' - Render the cursor invisible instead of displaying :the cursor. 'O (Unallocated) 'P Ignore keyboard input 8- Disable all keyboard functions except local :key processing (see below). This also displays :the keyboard status indicator in the keyboard :status field of the system status line in  9 (09) (^I) %RETURN 13 (0D) (^M) HELP 63 (3F) (?) INS 23 (17) (^W) %DEL 24 (18) (^X) UP 31 (1F) (^_) LEFT 15 (0F) (^O) %DOWN 10 (0A) (^J) RIGHT 28 (1C) (^\) CL/HM 25 (19) (^Z) %PRINT 17 (11) (^Q) BRK/ST 19 (13) (^S) ENTER 3 (03) (^C) %  $The special function keys across the top row each return an escape $sequence consisting of an ESC (1B) followed by a letter that $identifies the key's position. The far left key is identified by :inverse video. 'Q Ignore FUNC shift key ' - Disable the FNC shift key except in local key :processing (see below). 'R Ignore CTRL shift key ' - Disable the CTRL shift key except in local key :processing (see below). 'S Ignore GRPH1 shift key 8- Disable the GRPH1 shift key except in local key :processing (see below). This also clears the :inverse video display for this key if the key :is depressed and the keyboard status field$'@' (40). The key to its right is identified by "A" (41), and so $on. The key on the far right is identified by "U" (55).  $All other keys on the keyboard return the ASCII equivalent of $their markings. The alpha keys return the lower-case alpha $character. Keys containing more than one symbol return the symbol $at the bottom of the key. Note that the "^" key returns "^" even $though the symbol at the bottom of the key is not "^". This is $because there is no ASCII equivalent for the symbol  :on the system status line is enabled. 'T Ignore GRPH2 shift key 8- Disable the GRPH2 shift key except in local key :processing (see below). This also clears the :inverse video display for this key if the key :is depressed and the keyboard status field :on the system status line is enabled. 'U (Unallocated) 'V Ignore ALT shift key 8- Disable the ALT shift key except in local key :processing (see below). This also clears the at the bottom $of the key. Note that LEFT and BS do not return the same value, $although, when output they have the same action. This occurs so $that BS and LEFT can be distinguished by the Advanced System Editor $in X(change mode.  1 The following description applies when only the SHIFT shift key is down: 1 6SHIFTed Input Character Sequences 6================================= % %Key ASCII Key ASCII Key ASCII :inverse video display for this key if the key :is depressed and the keyboard status field :on the system status line is enabled. 'W Ignore SHIFT shift key 8- Disable the SHIFT shift key except in local key :processing (see below). 'X Ignore CAPS shift key 8- Disable the CAPS LOCK shift key except in local :key processing (see below). This also clears the :inverse video display for this key if the key :is depressed and the keyboard status field :on the system status      5:) is changed by hitting the desired 'function key with the SHIFT key up. Assuming the floppy 'status display is enabled, the new format will be displayed 'at the top of the screen (see status display description above). 'Special function keys to which no floppy format has been assigned 'are ignored. ' 'In this mode, the PRINT key causes data to be transmitted to the 'printer. If the SHIFT key is not down, the entire screen is 'transferred; otherwise, a form feed is transferred. Transmission 6CTRL'd Input Character Sequences 6================================ % %Key ASCII Key ASCII Key ASCII %=== ===== === ===== === ===== %ESC 27 (1B) (^[) BS 8 (08) (^H) TAB 9 (09) (^I) %RETURN 13 (0D) (^M) HELP 63 (3F) (?) INS 30 (1E) (^^) %DEL 127 (7F) (RUB) UP 31 (1F) (^_) LEFT 15 (0F) (^O) %DOWN 10 (0A) (^J) RIGHT 28 (1C) (^\) CL/HM 12 (0C) (^L) %PRINT 29 (1D) (^]) B'is made to the parallel printer if it is on line; otherwise, 'the serial printer is used. If neither printer is on line, 'the PRINT key performs no action. ' 'In this mode, the BREAK/STOP character causes the system to 'reboot. ' % This mode is also useful for seeing if the system is still '"alive". ' '  The disk format used by the floppy disk driver in accessing a given  floppy drive can be queried and changed from within a user program using  unitreads and unitwrites to user unit 255. RK/ST 0 (00) (^@) ENTER 13 (0D) (^M) % $The alpha keys return the control-case alpha character. Keys $containing more than one symbol return the symbol at the top of $the key (as if they were SHIFTed).    The following describes how the FNC, ALT, CAPS LOCK, GRPH1 and GRPH2 shift  keys affect keyboard input:  $1) The CAPS LOCK causes alpha keys to emit alpha characters in the 'opposite case (i.e. if the SHIFT key is not down, upper case Both intrinsics require a  record and a drive number as follows:  0Unitread (255, Format_Record, Drive_Number); 0Unitwrite (255, Format_Record, Drive_Number); 0  where Drive_Number is either 0 (for drive A or #4:) or 1 (for drive B  or #5:). The Format_Record is of the form:  )Format_Record = Record ;Tracks_Disk : Integer; ;Sectors_Track : Integer; ;Bytes_Sector : Integer; ;Interleave : Integer; ;First_Track : Integer; ;Skew : Integer;  characters are emitted, if the SHIFT key is down, lower case 'characters are emitted). It has no effect on non-alpha keys.  $2) The ALT shift causes all keys to generate ASCII values with the 'high order bit on. Thus, all 256 ASCII values may be generated 'from the keyboard. It has no effect on values returned by the 'special function keys. ' $3) The GRPH1 shift causes an escape sequence to be emitted consisting 'of a 1A (^Z) followed by the value of the depressed key. The ALT 'shift;Name : Packed Array [0..3] Of Char; 9End {of Format_Record};  !The Integer parameters have the same interpretation as the parameters !described for the Disk_Change routine for the Adaptable System. The !Name parameter contains three alphanumeric characters followed by a !space. This name is displayed in the floppy status field of the system !status line when a drive is accessable under the format. ! !Unitread returns the format of the specified drive. Unitwrite configures !the spec has no effect on the escape prefix, but may influence the 'key value.  $4) The GRPH2 shift causes an escape sequence to be emitted consisting 'of a 0E (^N) followed by the value of the depressed key. The ALT 'shift has no effect on the escape prefix, but may influence the 'key value. If the GRPH2 shift key is also down, the GRPH1 prefix '(1A) is emitted, followed by the GRPH2 prefix (0E) and the character 'value.  $5) When the CTRL and FNC shifts are down at the same time, the ified drive to access floppies using the format. ! !The Unitclear intrinsic resets both drives to their default (NEC) format. ! ! 'keyboard operates locally (although the program can still send 'characters to to screen). Under these circumstances, any key '(other than special function keys) will be echoed directly on 'the terminal. This mode is especially local for clearing the 'screen (CTRL-FNC-SHIFT-CLEAR/HOME), homing the cursor '(CTRL-FNC-CLEAR/HOME), checking values of graphics characters '(CTRL-FNC-ALT-), setting option values '(CTRL-FNC-GRPH1-