home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / MISC / FPC355_1.ZIP / FPC.ZIP / FPCWORDS.TXT < prev    next >
Encoding:
Text File  |  1989-11-01  |  23.5 KB  |  682 lines

  1.  
  2. °Forth-help              F-PC Forth Command Help
  3.                          ───────────────────────
  4.  
  5.                            F-PC word catgories
  6.  
  7.        ∙Applications          ∙Boolean-words         ∙Branch/Loop
  8.  
  9.        ∙Color-words           ∙Compile-Directives    ∙Display-words
  10.  
  11.        ∙DOS-Commands          ∙Double-Number         ∙Field-words
  12.  
  13.        ∙File-words            ∙Internals             ∙Keyboard-words
  14.  
  15.        ∙LineEdit-words        ∙Logical-words         ∙Math-words
  16.  
  17.        ∙Memory-words          ∙Menu-words            ∙Number-Conversion
  18.  
  19.        ∙String-words          ∙Time/Date-words       ∙Window-words
  20.  
  21.  
  22.  
  23. °Applications         F-PC Application generation words
  24.                       ─────────────────────────────────
  25.  
  26.        ∙FSAVE           Save the current memory image to a file.
  27.  
  28.        ∙TURNKEY         Save reduced size memory image to a file
  29.                         without heads.
  30.  
  31.        ∙BOOT            A deferred word that you can fill with your
  32.                         own boot time routine.
  33.  
  34.        ∙DEFAULT         A deferred word that handles the DOS command
  35.                         line entered at the beginning of execution.
  36.  
  37.        ∙INITSTUFF       A deferred word initialization CHAIN of routines
  38.                         to perform in sequence at cold start time.
  39.  
  40.  
  41.  
  42.   (F9 will browse the source for a word, and Alt-H will browse its Help)
  43.  
  44. °Boolean-words          Boolean Operators in F-PC
  45.                         ─────────────────────────
  46.  
  47.  
  48.                 ∙<              ∙>              ∙0<             ∙0>
  49.  
  50.                 ∙<=             ∙>=             ∙U<             ∙U>
  51.  
  52.                 ∙U<=            ∙U>=            ∙<>
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.   (F9 will browse the source for a word, and Alt-H will browse its Help)
  64.  
  65. °Branch/Loop       Conditional Branch and Loop Control
  66.                    ───────────────────────────────────
  67.  
  68.  
  69.                 ∙IF     ...     ∙ELSE   ...     ∙THEN
  70.  
  71.                 ∙BEGIN  ...     ∙UNTIL
  72.  
  73.                 ∙BEGIN  ...     ∙WHILE  ...     ∙REPEAT
  74.  
  75.                 ∙DO     ...     ∙LEAVE  ...     ∙LOOP
  76.  
  77.                 ∙DO     ...     ∙?LEAVE ...     ∙+LOOP
  78.  
  79.                 ∙FOR    ...     ∙NEXT
  80.  
  81.                 ∙UNDO
  82.  
  83.  
  84.   (F9 will browse the source for a word, and Alt-H will browse its Help)
  85.  
  86. °Color-words            Color Control in F-PC
  87.                         ─────────────────────
  88.  
  89.  
  90.                 ∙RED            ∙GREEN          ∙BLUE
  91.  
  92.                 ∙YELLOW         ∙MAGENTA        ∙CYAN
  93.  
  94.                 ∙BROWN          ∙WHITE          ∙BLACK
  95.  
  96.                 ∙LTGRAY         ∙DKGRAY         ∙LTBLUE
  97.  
  98.                 ∙LTGREEN        ∙LTRED          ∙LTMAGENTA
  99.  
  100.                 ∙>FG            ∙>BG            ∙>COLOR
  101.  
  102.                 ∙>LCD           ∙>MONO
  103.  
  104.  
  105.   (F9 will browse the source for a word, and Alt-H will browse its Help)
  106.  
  107. °Compile-Directives         Compiler Controls
  108.                             ─────────────────
  109.  
  110.  
  111.                 ∙COMMENT:       ∙(              ∙\
  112.  
  113.                 ∙}              ∙\\             ∙/*
  114.  
  115.                 ∙#IF            ∙#ELSE          ∙#THEN
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.   (F9 will browse the source for a word, and Alt-H will browse its Help)
  127.  
  128. °Display-words      Display Output and Control Words
  129.                     ────────────────────────────────
  130.  
  131.         ∙>ATTRIB1       ∙>ATTRIB2       ∙>ATTRIB3       ∙>ATTRIB4
  132.  
  133.         ∙>ATTRIB5       ∙>ATTRIB6       ∙>ATTRIB7       ∙>ATTRIB8
  134.  
  135.         ∙>BOLD          ∙>BOLDBLNK      ∙>BOLDUP        ∙>LCD
  136.  
  137.         ∙>MONO          ∙>NORM          ∙>REV           ∙>REVBLNK
  138.  
  139.         ∙>UL            ∙AT             ∙CLS            ∙CR
  140.  
  141.         ∙DARK           ∙EEOL           ∙EMIT           ∙FEMIT
  142.  
  143.         ∙IBM--LINE      ∙IBM-AT         ∙IBM-AT?        ∙IBM-DARK
  144.  
  145.         ∙PAGE           ∙SPACE          ∙SPACES         ∙TYPE
  146.  
  147.   (F9 will browse the source for a word, and Alt-H will browse its Help)
  148.  
  149. °DOS-Commands                DOS Commands
  150.                              ────────────
  151.  
  152.  
  153.                 ∙CD             ∙CHDIR          ∙CLS
  154.  
  155.                 ∙COPY           ∙DEL            ∙DIR
  156.  
  157.                 ∙REN            ∙RENAME         ∙SYS
  158.  
  159.                 ∙`              ∙$SYS           ∙"SYSCOMMAND
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.   (F9 will browse the source for a word, and Alt-H will browse its Help)
  169.  
  170. °Double-Number          Double Number Operators
  171.                         ───────────────────────
  172.  
  173.  
  174.                 ∙*D             ∙2!             ∙2>R
  175.  
  176.                 ∙2@             ∙2DROP          ∙2DUP
  177.  
  178.                 ∙2R>            ∙D+             ∙D-
  179.  
  180.                 ∙D.             ∙D.R            ∙D0=
  181.  
  182.                 ∙D2/            ∙D<             ∙D=
  183.  
  184.                 ∙D>             ∙DMAX           ∙DMIN
  185.  
  186.                 ∙DU<            ∙UD.            ∙UD.R
  187.  
  188.  
  189.   (F9 will browse the source for a word, and Alt-H will browse its Help)
  190.  
  191. °Field-words            F-PC Field Conversion Words
  192.                         ───────────────────────────
  193.  
  194.         Moves From      CFA     ∙>BODY    BODY      Moves To
  195.  
  196.                         CFA     ∙>LINK    LINE
  197.  
  198.                         CFA     ∙>NAME    NAME
  199.  
  200.                         BODY    ∙BODY>    CFA
  201.  
  202.                         LINK    ∙L>NAME   NAME
  203.  
  204.                         LINK    ∙LINK>    CFA
  205.  
  206.                         NAME    ∙N>LINK   LINK
  207.  
  208.                         NAME    ∙NAME>    CFA
  209.  
  210.   (F9 will browse the source for a word, and Alt-H will browse its Help)
  211.  
  212. °File-words             File Control Words
  213.                         ──────────────────
  214.  
  215.   F-PC uses HANDLES to interface with DOS files. A handle to DOS is a 16 bit
  216. number in the range 0 to 20. The first handles 0 to 4 are taken for DOS's
  217. standard devices. F-PC uses a structure in CODE space that holds the number
  218. DOS calls a handle, as well as the name of the file associated with the
  219. handle.  F-PC calls this entire STRUCTURE a HANDLE.  You can create handles
  220. which hold the above mentioned items, with the word HANDLE.  A handle that
  221. contains a name can be opened, closed, deleted renamed etc.  A handle once
  222. created returns address, and all file words know how to step into a handle
  223. to get or set the information they need.
  224.  
  225.   More information is available on the following items:
  226.  
  227.  
  228.         ∙Handle-Structure       ∙File-Wordset       ∙Lineread-Example
  229.  
  230.  
  231.   Also see the Users Manual Chapter 5 for additional information.
  232.  
  233. °Handle-Structure       F-PC handle structure
  234.                         ─────────────────────
  235.  
  236.  
  237.         The HANDLE memory data structure is as shown here.
  238.  
  239.  
  240.           1byte    65 bytes      2 bytes    2 bytes
  241.         ┌────────┬───────────────┬──────────┬─────────────┐
  242.         │ count  │ Filename....0 │ attrib   │ handle > -1 │
  243.         └────────┴───────────────┴──────────┴─────────────┘
  244.           addr     addr+1          addr+66    addr+68
  245.            │        │               │          │
  246.            │        └ >NAM          └ >ATTRIB  └ >HNDLE
  247.            │
  248.            └ Address of the array returned by a word defined with HANDLE.
  249.  
  250.    A >HNDLE value of less than 0 indicates no file is open on this handle.
  251.  
  252.  
  253.  
  254. °Lineread-Example       An Example of File Usage
  255.                         ────────────────────────
  256.  
  257. A sequential line read word LINEREAD is provided, which reads one line at a
  258. time from the file whose handle is in SEQHANDLE, returning an address of a
  259. count string which also includes the CRLF characters at the end of the
  260. line.  You will have to strip them off if you don't want them. The LINEREAD
  261. word is used as follows:
  262.  
  263. : sample        ( | <filename> --- )
  264.         open                    \ open a file
  265.         0.0 seek                \ reset file pointer buffer
  266.         begin
  267.                 lineread        \ read a line, returns an address of counted $
  268.                 dup c@          \ check for length,
  269.         0 <> while              \ while buffer contains something
  270.                 cr count 2- type\ type line just read without the CRLF chars.
  271.         repeat  drop            \ repeat till file empty.
  272.         close ;                 \ close the file.
  273.  
  274.  
  275. °File-Wordset           The File Control Wordset
  276.                         ────────────────────────
  277.  
  278.  ∙$FILE          ∙$FLOAD         ∙$HOPEN         ∙.FILE          ∙.FPATH
  279.  
  280.  ∙>LINE          ∙CHARREAD       ∙CLOSE          ∙CLOSEALL       ∙CURPOINTER
  281.  
  282.  ∙FILE           ∙FILE>TIB       ∙FL             ∙FLOAD          ∙FPATH
  283.  
  284.  ∙FPATH+         ∙HCLOSE         ∙HCLOSE         ∙HCREATE        ∙HDELETE
  285.  
  286.  ∙HIDELINES      ∙HNDLS          ∙HOPEN          ∙HRENAME        ∙IBLEN
  287.  
  288.  ∙IBRESET        ∙LINEREAD       ∙LOAD           ∙MOVEPOINTER    ∙OBLEN
  289.  
  290.  ∙OK             ∙OPEN           ∙SEEK           ∙SEQDOWN        ∙SEQHANDLE
  291.  
  292.  ∙SEQHANDLE+     ∙SEQUP          ∙SETTIB         ∙SHOWLINES      ∙HANDLE
  293.  
  294.   (F9 will browse the source for a word, and Alt-H will browse its Help)
  295.  
  296. °Internals              F-PC Internal Structure
  297.                         ───────────────────────
  298.    F-PC is a DTC (Direct Thread Code) 16 bit Forth. Both stacks are 16 bits.
  299.  F-PC obtains its large addressing space through the use of segment pointers
  300.  to COLON definitions which are located outside of Forth's normal 64k CODE
  301.  area. F-PC's symbols or headers are also kept in an external 64k segment
  302.  area, leaving all of the 64k CODE area for CODE and DATA. Additional space
  303.  savings have been obtained by placing all ." strings in LIST space with the
  304.  COLON definitions.  The primary limiting factor in F-PC with respect to
  305.  space utilization seems to be symbol space, which is limited to around
  306.  5000 symbols max. To a large extent even this limit can be overcome through
  307.  the use of a built in BEHEAD mechanism. VERY LARGE applications can be
  308.  coded in F-PC.  F-TC does have the usual 8086 type problem of dealing with
  309.  large linear data areas across 64k segment boundries, but again there are
  310.  the usual solutions to this problem involving the use of either segment and
  311.  offset double pointers, or of placing data elements on segment boundries.
  312.  
  313. Internals for   ∙CODE-DEFs   ∙COLON-DEFs  ∙VARIABLEs   ∙CONTANTs
  314.  
  315.                 ∙HEADERs     ∙VALUEs      ∙DEFERREDs    ∙CREATE-DOESs
  316.  
  317. °HEADERs               F-PC Internal Structure  (Headers)
  318.                         ───────────────────────
  319.                         The Header of the word ∙HEX
  320.  
  321.              ┌───────┐
  322.      ∙>VIEW  │ view  │  16 bit-offset into file where word was defined.
  323.              ├───────┤
  324.      ∙>LINK  │ link  │  Offset of next lower definition's LINK field.
  325.              ├───────┤
  326.      ∙>NAME  │  cnt  │  Usual count type with smudge and immediate bits.
  327.              ├───────┤
  328.              │   H   │  First letter of the HEX definition.
  329.              ├───────┤
  330.              │   E   │
  331.              ├─┬─────┤
  332.              │1│ X   │  Most significant bit of last char set to 1.
  333.              ├─┴─────┤
  334.              │CFA PTR│  Offset of CFA in CODE space.
  335.              └───────┘
  336.                         ("Y" operators are used to manipulate HEAD space.)
  337.  
  338. °COLON-DEFs            F-PC Internal Structure  (COLON)
  339.                         ───────────────────────
  340.                 The CODE Field of the COLON definition ∙HEX
  341.  
  342.  
  343.                 CFA
  344.            +0┌──────┐
  345.       ∙BODY> │  $E9 │   The infamous CFA (Code Field Address).
  346.            +1├──────┤
  347.              │ NEST │   Relative offset to NEST for COLON definition.
  348.            +3├──────┤
  349.       ∙>BODY │ LIST │   BODY starts at CFA + 3, and contains the RELATIVE
  350.              └──────┘   SEGMENT of where the the list is located in LIST
  351.                         space.
  352.  
  353.                         ("X" & Long operators are used to manipulate
  354.                         LIST space.)
  355.  
  356.        The next screen shows the LIST space for the COLON definition HEX.
  357.  
  358.  
  359.                         F-PC Internal Structure  (COLON)
  360.                         ───────────────────────
  361.                  The LIST space of the COLON definition ∙HEX
  362.  
  363.          +0┌─────────┐
  364.            │  ∙(LIT) │  The formula below returns this the LIST address.
  365.          +2├─────────┤
  366.            │   $10   │  ' HEX >BODY @ XSEG @ + ( --- A1 )
  367.          +4├─────────┤
  368.            │  ∙BASE  │
  369.          +6├─────────┤
  370.            │   ∙!    │  The remaining 6 bytes of the 16 byte segment are
  371.          +8├─────────┤  null filled.
  372.            │ ∙UNNEST │
  373.            └─────────┘
  374.  
  375.   a1 returned by the above calculation is in LIST space, and you could use
  376. ∙LDUMP to examine it, but ∙XDUMP will perform the calculation for you if
  377. used as follows:
  378.                         ' HEX >BODY @ 10  ∙XDUMP
  379.  
  380. °CODE-DEFs             F-PC Internal Structure  (CODE)
  381.                         ───────────────────────
  382.                 The CODE Field of the CODE definition ∙2+
  383.  
  384.                 CFA
  385.            +0┌─────┐
  386.              │ $E9 │            POP AX
  387.              ├─────┴─────┐
  388.              │ $05 $0200 │      ADD AX, # $0002
  389.              ├─────┬─────┘      ───────────────┐
  390.              │ $50 │            PUSH AX        ├─ The last four instructions
  391.              ├─────┤            ───────────┐   │  makeup the 1PUSH macro
  392.              │ $26 │            ES:        │   │
  393.              ├─────┤                       │   │
  394.              │ $AD │            LODSW      ├─ The last three instructions
  395.              ├─────┴─┐                     │  makeup the NEXT macro
  396.              │ $FFE0 │          JMP AX     │   │
  397.              └───────┘          ───────────┘ ──┘
  398.  
  399.         As you can see the CFA of a CODE definition contains CODE.
  400.  
  401. °VARIABLEs             F-PC Internal Structure  (VARIABLEs)
  402.                         ───────────────────────
  403.                   The CODE Field of the VARIABLE ∙DPL
  404.  
  405.  
  406.                 CFA
  407.            +0┌───────┐
  408.       ∙BODY> │  $E8  │  CALL instruction.
  409.            +1├───────┤
  410.              │ NEXT  │  Relative offset to NEXT code routine.
  411.            +3├───────┤
  412.       ∙>BODY │ VALUE │  The BODY of a VARIABLE contains the actual
  413.              └───────┘  variables value.
  414.  
  415.  
  416.   The code for a variable simply CALLs NEXT which pushes the address of the
  417. BODY of the variable on the data stack and continues execution.
  418.  
  419.  
  420.  
  421.  
  422. °CONSTANTs             F-PC Internal Structure  (CONSTANTs)
  423.                         ───────────────────────
  424.                   The CODE Field of the CONSTANT ∙MAGENTA
  425.  
  426.  
  427.                 CFA
  428.            +0┌───────┐
  429.       ∙BODY> │  $E8  │  CALL instruction.
  430.            +1├───────┤
  431.              │ DOCON │  Relative offset to DOCONSTANT code routine.
  432.            +3├───────┤
  433.       ∙>BODY │ VALUE │  The BODY of a CONSTANT contains the actual
  434.              └───────┘  constant's value.
  435.  
  436.  
  437.   The code for a constant CALLs DOCONSTANT which pushes the contents of the
  438. BODY of the constant on the data stack and continues execution.
  439.  
  440.  
  441.  
  442.  
  443. °VALUEs                F-PC Internal Structure  (VALUEs)
  444.                         ───────────────────────
  445.                   The CODE Field of the VALUE ∙ROWS
  446.  
  447.  
  448.                 CFA
  449.            +0┌───────┐
  450.       ∙BODY> │  $E8  │  CALL instruction.
  451.            +1├───────┤
  452.              │ DOVAL │  Relative offset to DOVALUE code routine.
  453.            +3├───────┤
  454.       ∙>BODY │ VALUE │  The BODY of a VALUE contains the actual
  455.              └───────┘  VALUE's value.
  456.  
  457.  
  458.   The code for a constant CALLs DOVALUE which pushes the contents of the
  459. BODY of the value on the data stack and continues execution.
  460.  
  461.  
  462.  
  463.  
  464. °DEFERREDs              F-PC Internal Structure  (DEFERREDs)
  465.                         ───────────────────────
  466.                   The CODE Field of the DEFERed word ∙CR
  467.  
  468.  
  469.                 CFA
  470.            +0┌───────┐
  471.       ∙BODY> │  $E8  │  CALL instruction
  472.            +1├───────┤
  473.              │ DODEF │  Relative offset to DODEFER code routine.
  474.            +3├───────┤
  475.       ∙>BODY │ VALUE │  The BODY of a DEFERRED word contains the CFA of
  476.              └───────┘  the word CR is deferred to (CRLF in this case).
  477.  
  478.  
  479.   The code for a deferred word CALLs DODEFER which executes the contents of
  480. the BODY of the deferred word.
  481.  
  482.  
  483.  
  484.  
  485. °CREATE-DOESs          F-PC Internal Structure  (CREATE-DOESs)
  486.                         ───────────────────────
  487.  
  488.  
  489.   The structure of CREATE DOES> words in F-PC is fairly complex, so we will
  490. look at a simple but specific example of how such a word is compiled into
  491. the various segments used by F-PC. The example we will use is for a
  492. defining word that creates words that type a single graphics character to
  493. the display:
  494.  
  495.         : GREMIT <name> ( N1 --- )
  496.                         CREATE C, DOES> 1 TYPE ;
  497.  
  498.         $02 GREMIT HAPPY        \ $02 is the hex value for "" A happy face.
  499.  
  500.  
  501.   On the next screen we will see how these words get compiled into memory.
  502.  
  503.  
  504.                 Press PgDn to see the compiled structure.
  505.  
  506.                         F-PC Internal Structure  (CREATE-DOESs cont.)
  507.                         ───────────────────────
  508.  
  509.         List segment of GREMIT                   Child's List segment
  510.       ┌─┴──────┬────┬─────────┬─────────────────┬┴──────┬───┬──────┬────────┐
  511.  LIST │ CREATE │ C, │ (;CODE) │ GREMIT-DOES ptr │ (LIT) │ 1 │ TYPE │ UNNEST │
  512.       └─┬──────┴────┴─────────┴─┬───────────────┴───┬───┴───┴──────┴────────┘
  513.         │         ┌──────────┐  │           ┌───────┴──┐
  514.         └───<─────┤ XSEG @ + │  │           │ XSEG @ + │
  515.                   └───┬──────┘  V           └──┬───────┘
  516.                       ^         │              ^
  517.       ┌──────────┬────┴─────┬───┴──┬────────┬──┴────────────┐
  518.  CODE │ JMP NEST │ LIST ptr │ CALL │ DODOES │ DOES-LIST ptr │   ...
  519.       └──────────┴──────────┴──┬───┴────────┴───────────────┘
  520.                                ^        CODE and BODY for the word GREMIT
  521.                  ┌─────────────┘
  522.       ┌──────┬───┴─────────┬─────┐
  523.  CODE │ CALL │ GREMIT-DOES │ $02 │      CODE and BODY of the word HAPPY
  524.       └──────┴─────────────┴─────┘
  525.                                         Press PgDn for more description
  526.  
  527.                         F-PC Internal Structure  (CREATE-DOESs cont.)
  528.                         ───────────────────────
  529.  
  530.   As you can see in the previous screen, building the definition GREMIT
  531. (shown top and middle) compiles information into both the LIST and CODE
  532. areas. The child word HAPPY (at the bottom) compiles a small amount
  533. information into the CODE area.  This is a particularly efficient way to
  534. create classes of words that differ only in their data. In this case HAPPY
  535. uses only five bytes of CODE memory.
  536.  
  537.   The child of a CREATE-DOES word in effect calls a headerless COLON
  538. definition that is built as part of the defining word.
  539.  
  540.   When compiling GREMIT, a pointer to GREMIT-DOES is compiled into LIST
  541. space for later use when compiling the child words. The child word is then
  542. linked to call the DOES portion of the parent word.
  543.  
  544.   When the parent word is executing through its LIST, parent execution
  545. actually stops after (;CODE) is executed.  The remainder of the parent
  546. definition is only executed by the child words.
  547.  
  548. °Keyboard-words              Keyboard Words
  549.                              ──────────────
  550.  
  551.   F-PC provides flexible and powerful access to the keyboard.  You can read
  552. all keys on the keyboard that will return keycodes, and even differentiate
  553. between keys that return the same keycodes but different scancodes. It is
  554. also possible to look ahead one keystroke to see what key has been pressed
  555. but has not been read yet.
  556.  
  557.                 ∙KEY            ∙KEY?           ∙KEYFILTERing
  558.  
  559.                 ∙(KEY)          ∙(KEY?)         ∙Looking-Ahead
  560.  
  561.                 ∙BIOSKEY        ∙BIOSKEY?       ∙?KEYPAUSE
  562.  
  563.                 ∙SCANCODES
  564.  
  565.  
  566.  
  567.  
  568.  
  569. °KEYFILTERing          Key Filtering: What's it for?
  570.                        ────────────────────────────
  571.  
  572.   A deferred word ∙KEYFILTER is provided for the purpose of allowing
  573. applications to process all keys returned from the keyboard prior to those
  574. keys being passed to the rest of the Forth system.
  575.  
  576.  
  577. °Looking-Ahead
  578. °SCANCODES       Looking at the next key without getting it
  579.                  ──────────────────────────────────────────
  580.  
  581.   A VALUE ∙BIOSKEYVAL is provided which holds the keycode and scancode of
  582. the most recent call to ∙BIOSKEY? . Since the key is not actually read
  583. from the keyboard buffer, this provides a mechanism for looking ahead one
  584. keystroke. This can be useful when writing a key interpreter for an
  585. application.
  586.  
  587.                              Scan Codes
  588.                              ──────────
  589.  
  590.   Scancodes are values assigned to keys according to their position on the
  591. keyboard rather than by their ASCII table position. Immediately after a key
  592. is accepted using ∙KEY you can look at the value in ∙BIOSKEYVAL . The upper
  593. byte of this word will contain the Scan code for the key just read.  This
  594. allows you to see the keypad + - * and number keys as different from the
  595. same keys in the main body of the keyboard.  See the IBM documentation for
  596. a table of scan codes.
  597.  
  598.  
  599. °LineEdit-words           Using the Line Editor
  600.                           ─────────────────────
  601.  
  602.   F-PC provides a very nice general purpose line editor for use in your
  603. programs. The word to invoke it is ∙LINEEDITOR . Its usage is as follows:
  604.  
  605.                 20 8 MYBUF 22 LINEEDITOR ( --- f1 )
  606.  
  607.   In the above example, the edit will start at column 20 of row 8. The edit
  608. will be performed on the counted string in MYBUF, and the maximum length the
  609. edit will be allowed to be will be 22 characters.  The line editor is
  610. terminated by either the Enter key or the ESC key. If the ESC key was
  611. pressed then a FALSE boolean flag is returned, otherwise a TRUE flag is
  612. returned.  A mouse can be used to position the cursor within the edit line.
  613.  
  614.   If the edit is completed with Enter, then the edit string is placed back
  615. into MYBUF. If the edit is terminated with ESC then MYBUF will contain the
  616. original string unmodified by any edit operations performed during
  617. lineedit.
  618.  
  619.  
  620. °Logical-words             Logical Operators
  621.                             ─────────────────
  622.  
  623.   F-PC provides the usual logical operators. These operators are BIT logical.
  624.  
  625.                      ∙AND    ∙OR     ∙NOT    ∙XOR
  626.  
  627. °Math-words                  Math Operators
  628.                              ──────────────
  629.   F-PC provides several single and double precision math operators, as well
  630. as several shift operators. Most of these are written in assembly language
  631. to provide high performance. An additional set of math operators is
  632. provided in an add-on file supporting floating point math. Both software and
  633. hardware floating point math are supported: see the files SFLOAT.SEQ and
  634. HFLOAT.SEQ for further information on floating point math.
  635.  
  636.         ∙+      ∙-      ∙*      ∙/      ∙MOD    ∙/MOD   ∙*/MOD
  637.  
  638.         ∙*/     ∙NEGATE ∙ABS    ∙UM*    ∙U*D    ∙*D     ∙M/MOD
  639.  
  640.         ∙MU/MOD ∙UM/MOD ∙1+     ∙2+     ∙1-     ∙2-     ∙S>D
  641.  
  642.         ∙2*     ∙8*     ∙2/     ∙U2/    ∙U8/    ∙U16/   ∙?NEGATE
  643.  
  644.         ∙D+     ∙D-     ∙DABS   ∙D2*    ∙D2/
  645.  
  646.         ∙DNEGATE        ∙?DNEGATE
  647.  
  648. °Memory-words                Memory Operators
  649.                              ────────────────
  650.  
  651.   A full complement of memory operators is provided in F-PC to access
  652. normal CODE segment memory, as well as external areas of the PC outside the
  653. 64k boundry.  Additional support is provided for EXPANDED memory: see the
  654. file EXPANDED.SEQ.
  655.  
  656.         ∙@      ∙!      ∙C@     ∙C!     ∙MOVE   ∙CMOVE  ∙CMOVE>
  657.  
  658.         ∙@L     ∙!L     ∙C@L    ∙C!L    ∙CMOVEL ∙CMOVEL>
  659.  
  660.         ∙HERE   ∙?CS:   ∙?ES:   ∙COMPARE ∙SSEG  ∙YSEG  ∙YCSET
  661.  
  662.         ∙YHERE  ∙YS:    ∙Y@     ∙Y!     ∙YC@    ∙YC!    ∙Y,
  663.  
  664.         ∙XHERE  ∙X,     ∙XC,    ∙XDP    ∙XDPSEG ∙SCAN   ∙SKIP
  665.  
  666.         ∙PARSE
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.