home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / STARLET / ZBAS.ZIP / ZBAS.DOC < prev   
Text File  |  1990-01-06  |  13KB  |  428 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                                     FOREWORD
  7.  
  8.  
  9.  
  10.              ZBA╙á wa≤ originall∙ writteε t∩ ruε unde≥ NortΦ Sta≥ DO╙ anΣ ì
  11.         full∙ replacσ NortΦ Sta≥ BASIC«á Rathe≥ thaε completel∙ rewritinτ ì
  12.         al∞á disδá I/╧á functions¼á ╔ decideΣ t∩á usσá aεá existinτá CP/═ ì
  13.         interfacσ anΣ rewritσ anΣ full∙ integratσ it«á Therefore¼ ZBA╙ i≤ ì
  14.         unablσá t∩ acces≤ file≤ tha⌠ havσ an∙ filenamσ othe≥ thaεá *.?ZB« ì
  15.         Thσá las⌠á tw∩ letter≤ oµ thσ filσ typσ mustô bσ "ZBó fo≥ ZBA╙á t∩ ì
  16.         recognizσá thσá filσ a⌠ all«á Fo≥ morσ informatioε oεá filσá namσ ì
  17.         syntax refer to the disk related commands.
  18.  
  19.              ZBA╙ i≤ full∙ NortΦ Sta≥ BASI├ synta° compatible¼á witΦá al∞ ì
  20.         it'≤á advantage≤ anΣ disadvantages«á I⌠ perform≤ slightl∙á faste≥ ì
  21.         thaεá NortΦá Sta≥ BASIC«á And¼á oµ course¼á i⌠ offer≤ somσá extrß ì
  22.         command≤ anΣ run≤ unde≥ CP/═ full∙ configured¼á s∩ yo⌡ don'⌠ havσ ì
  23.         to go through the hassle of interfacing it yourself.
  24.  
  25.              ZBA╙á i≤á thσ produc⌠ oµ tw∩ yearsº worδ tryinτá t∩á improvσ ì
  26.         NortΦá Sta≥á BASI├á withou⌠á losinτá thσá compatibility«á Iεá al∞ ì
  27.         fairnes≤ ╔ havσ t∩ admi⌠ tha⌠ withou⌠ ß disassembl∙ oµ NortΦ Sta≥ ì
  28.         BASIC release 4.0 I would have not been able to do it.
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                         1
  62.          
  63.  
  64.  
  65.  
  66.                     List of directly executable commands only
  67.  
  68.              ALOAD     APPEND    AUTO      BYE       CAT       COMPACT
  69.              CONT      DELETE    EDIT      LIST      LOAD      MEMSET
  70.              NSAVE     PSIZE     REN       RUN       SAVE      SCR
  71.  
  72.  
  73.                                List of statements
  74.  
  75.              CHAIN     CLOSE     CREATE    DATA      DEF FN    DESTROY
  76.              ELSE      END       ERRSET    EXIT      FILL      FOR
  77.              GOSUB     GOTO      IF        INPUT     INPUT1    LET
  78.              LINE      NEXT      NOENDMARK ON        OPEN      OUT
  79.              PRINT     READ      REM       RESET     RESTORE   RETURN
  80.              SORT      SORT1     STOP      TROFF     TRON      WRITE
  81.  
  82.  
  83.                            List of built-in functions
  84.  
  85.              ABS       ASC       ATN       CALL      CHR$      COS
  86.              EXAM      EXP       FILE      FILEPTR   FILESIZE  FREE
  87.              INCHAR$   INP       INT       LEN       LOG       RND
  88.              SIN       SGN       SQRT      STR$      TYP       VAL$
  89.  
  90.  
  91.              Al∞á thσá keyword≤ whicΦ arσ identica∞ t∩ NortΦá Sta≥á BASI├ ì
  92.         synta°á wil∞ behavσ iε exactl∙ thσ samσ manner«á ListeΣ belo≈ arσ ì
  93.         the differences between ZBAS and North Star BASIC.
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.                                         2
  123.          
  124.  
  125.  
  126.                           ADDED COMMANDS AND STATEMENTS
  127.  
  128.                                       ALOAD
  129.  
  130.              Thσá ALOA─ commanΣ i≤ simila≥ t∩ thσ LOA─ command«á I⌠ will¼ ì
  131.         howeve≥á loaΣ ß filσ oµ typσ .2Z┬ whicΦ i≤ iεá ASCII«á Therefore¼ ì
  132.         ZBA╙ program≤ caε no≈ bσ prepareΣ usinτ aε editor« Thσ file≤ mus⌠ ì
  133.         conform to the following simple rules:
  134.              1« N∩ empt∙ line≤ o≥ line≤ startinτ witΦ ß non-numeriπ ASCI╔ ì
  135.         character.
  136.              2. Terminated by a Control/Z.
  137.  
  138.              Afte≥ loadinτ thσ file¼ ZBA╙ wil∞ tokenizσ thσ program« Thi≤ ì
  139.         caε takσ froε ß fe≈ second≤ t∩ a≤ mucΦ a≤ onσá minute¼á dependinτ ì
  140.         on the size of the program.
  141.  
  142.                                      COMPACT
  143.  
  144.              Thσ COMPAC╘ commanΣ work≤ oε thσ loadeΣ prograφ anΣá remove≤ ì
  145.         al∞á unnecessar∙ blank≤ fo≥ fas⌠ execution«á Blank≤ insidσ quoteΣ ì
  146.         string≤á anΣ RE═ statement≤ arσ lef⌠ untouched«á Wheε COMPAC╘á i≤ ì
  147.         finished¼á al∞ prograφ variable≤ anΣ datß wil∞ bσ los⌠ anΣ i⌠ ha≤ ì
  148.         to be re-run. COMPACT works only in direct mode.
  149.  
  150.                                       RESET
  151.  
  152.              RESE╘ i≤ useΣ afte≥ ß disδ changσ t∩ reinitializσ BDOS«á It¼ ì
  153.         a≤á wel∞á a≤ al∞ followinτ ne≈ keywords¼á i≤ botΦá executablσá iε ì
  154.         program- and direct mode.
  155.  
  156.                                  SORT and SORT1
  157.  
  158.              SOR╘ anΣ SORT▒ worδ oε strinτ variable≤ only« SOR╘ sort≤ thσ ì
  159.         strinτ iε ascendinτ order¼ whilσ SORT▒ sort≤ iε descendinτ order« ì
  160.         Thσá synta° is║á SOR╘ <strinτá variable>,<fields>,<fielΣá length>à ì
  161.         wherσ <strinτ variable╛ caε bσ an∙ lega∞ strinτ variable¼ sucΦ a≤ ì
  162.         A$¼á X9$¼á F$(7,99)¼ B$(S,E)¼ etc« <fields╛ i≤ thσ numbe≥ oµ sub-ì
  163.         string≤á t∩ bσ sorteΣ anΣ <fielΣ length╛ i≤ thσ sizσ oµ thσá sub-ì
  164.         strinτ whicΦ represent≤ thσ datß t∩ bσ sorted«á This¼á oµ course¼ ì
  165.         mean≤ tha⌠ witΦ tw∩ differen⌠ substrings¼á thσ shorte≥ onσ ha≤ t∩ ì
  166.         bσá paddeΣá (usuall∙á witΦ blanks.⌐ Thσ produc⌠ oµá <fields╛á anΣ ì
  167.         <fielΣá length╛ mus⌠ alway≤ bσ equa∞ t∩ o≥ les≤ thaε thσ sizσá oµ ì
  168.         thσá strinτá referenceΣ iε thσ strinτ variable«á Sincσá al∞á sub-ì
  169.         string≤ havσ t∩ bσ oµ equa∞ length¼á thσ lengtΦ oµ al∞ substring≤ ì
  170.         i≤ usuall∙ determineΣ b∙ thσ lengtΦ oµ thσ longes⌠ datß item.
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.                                         3
  184.          
  185.  
  186.  
  187.         EXAMPLES:
  188.  
  189.         10 DIM A$(1000)
  190.         20 ...  build string etc.
  191.         30 SORT A$,5,LEN(A$)/5
  192.              Iε thi≤ case¼á eacΦ substrinτ i≤ assumeΣ t∩ bσ 200á character≤ ì
  193.         long¼á witΦá 5á substring≤á fo≥á ß tota∞á oµá 100░á bytes«á Thσ ì
  194.         following example would produce an error, since 5 * 300 > 1000:
  195.         30 SORT A$,5,300
  196.              Iεá thσá nex⌠ case¼á n∩ erro≥ woulΣá occur¼á bu⌠á byte≤á 50░ ì
  197.         through 1000 in A$ would be left untouched:
  198.         30 SORT A$,5,100
  199.              Oµá coursσá i⌠á i≤ als∩ possiblσ t∩ usσá comple°á arithmetiπ ì
  200.         expressions in the sort statement:
  201.         30 SORT A$(N(I),N(J)),FNX(B/5),(N(I)-N(J))/(B/5)
  202.              Whethe≥á o≥ no⌠ i⌠ woulΣ worδ depend≤ solel∙ oε whethe≥á thσ ì
  203.         expressions evaluate to "in bounds."
  204.  
  205.  
  206.                                    TRON, TROFF
  207.  
  208.              TRO╬á anΣ TROF╞ arσ useΣ t∩ turε thσ TRacσ flaτ O╬ anΣá OFF« ì
  209.         Iε tracσ mode¼á al∞ linenumber≤ arσ displayeΣ iε squarσá bracket≤ ì
  210.         before they are executed.
  211.  
  212.  
  213.  
  214.              Fo≥á furthe≥ example≤ iε thσ forφ oµ ß prograφ LOA─ anΣá RU╬ ì
  215.         the file "TEST.2ZB" which is included in this package.
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.                                         4
  245.          
  246.  
  247.  
  248.                                   PECULIARITIES
  249.  
  250.              ZBA╙á fo≥á CP/═ i≤ ß compromise«á ╔ decideΣ no⌠ t∩á writσá ß ì
  251.         completσá ne≈ se⌠ oµ disδ I/╧ routines¼á bu⌠ rathe≥ settleΣ fo≥ ß ì
  252.         quitσá satisfactor∙á performancσá usinτá ßá highl∙á modifieΣá anΣ ì
  253.         trimmeΣ NSCP═ interface«á Thi≤ interfacσ wa≤ writteε fo≥ usσ witΦ ì
  254.         NortΦá Sta≥ BASI├ releasσ ┤ singlσ densit∙ anΣ pu⌠ iε thσá publiπ ì
  255.         domaiεá b∙ thσ CP/═ Use≥ Group«á ╔ modifieΣ anΣ redistributeΣá i⌠ ì
  256.         fo≥ usσ witΦ Doublσ Densit∙ BASI├ 5.▓ anΣ i⌠ i≤ availablσ oε man∙ ì
  257.         RCP═ systems«á Thσ followinτ i≤ ß lis⌠ oµ thing≤ t∩ watcΦ ou⌠ fo≥ ì
  258.         when using ZBAS.
  259.  
  260.         1«á   ZBA╙á filσ type≤ arσ .?Z┬ wherσ ┐á i≤ thσ "NortΦ Sta≥á filσ ì
  261.         type,ó iε ASCII« Fo≥ example¼ "TEST.2ZBó woulΣ bσ ß loadablσ ZBA╙ ì
  262.         prograφ anΣ "DATA,3ZBó woulΣ bσ ß datß file« Pleasσ notσ tha⌠ tw∩ ì
  263.         file≤á witΦá thσ samσ name¼á bu⌠ differen⌠á filσá type¼á sucΦá a≤ ì
  264.         "TEST.2ZBó anΣ "TEST.3ZBó cannotà coexis⌠ oε thσ samσ diskíá Also¼ ì
  265.         if your CP/M directory shows the following files:
  266.         TEST    .FZB    TEST    .2ZB    TEST    .ASM
  267.         Thσá filσ endinτ iε .AS═ woulΣ bσ inaccessiblσ b∙ ZBAS«á Thσ filσ ì
  268.         TEST.FZ┬á isàá accessible¼á bu⌠ duσ t∩ thσ fac⌠á thσá TEST.2Z┬á i≤ ì
  269.         second in the directory, it could not be loaded by ZBAS.
  270.  
  271.         2«á   Normally¼á ZBA╙á datß file≤ usσ thσ filσ typσ "3ó (a≤ NortΦ ì
  272.         Sta≥á BASI├ does,⌐ bu⌠ 30╚ i≤ addeΣ t∩ thσ filσ typσ iε orde≥á t∩ ì
  273.         bσ ablσ t∩ proces≤ anΣ displa∙ it«á Yo⌡ caε CREAT┼ ß filσ oµ typσ ì
  274.         ε iε ZBAS¼ wherσ ε mus⌠ bσ betweeε ░ anΣ 79¼ sincσ 79+48=127╗ thσ ì
  275.         highes⌠á displayablσ characte≥ iε ASCII«á ┴ typσ greate≥ thaεá 7╣ ì
  276.         will cause the actual file type to become (type MOD 79.)
  277.  
  278.         3«á   Internally¼á ZBA╙á simulate≤ ß NortΦ Sta≥ DO╙á environment« ì
  279.         Therefore¼á regardles≤á oµ wha⌠ drivσ yo⌡ arσ loggeΣá into¼á ZBA╙ ì
  280.         alway≤á default≤ t∩ A║á anΣ othe≥ drive≤ havσ t∩ bσá specificall∙ ì
  281.         referenced¼á NortΦ Sta≥ fashion« Fo≥ example¼ t∩ loaΣ C:TEST.2BZ¼ ì
  282.         yo⌡á havσá t∩ typσ "LOA─ TEST,3ó eveε thougΦ CP/═ ma∙á bσá loggeΣ ì
  283.         into drive C:
  284.  
  285.         4«   ZBA╙ caε bσ re-executeΣ witΦ thσ ZCP╥ "GOó commanΣ o≥ witΦ ß ì
  286.         filσ "GO.COMó oµ sizσ 0k«á Thσ loadeΣ program¼á iµ any¼á wil∞á bσ ì
  287.         preserved.
  288.  
  289.         5«á   ZBA╙á caε bσ madσ t∩ auto-ruε ß filσ iε thσ samσ fashioε a≤ ì
  290.         NortΦá Sta≥á BASIC«á Thesσá arσá thσá step≤á t∩á accomplisΦá thi≤ ì
  291.         (knowledge of CP/M utilities is assumed.)
  292.              Determine the size of ZBAS in 256-byte pages.
  293.              Now¼ executσ ZBA╙ anΣ loaΣ thσ prograφ t∩ bσ autostarted« D∩ ì
  294.         NO╘ ruε thσ programíá Executσ PSIZ┼ t∩ finΣ thσ prograφ size« AdΣ ì
  295.         the number to the size of ZBAS.
  296.              No≈á se⌠ thσ AUTO╙ flaτ t∩ ░ b∙ executinτ FIL╠ 261,0«á Also¼ ì
  297.         disable the WARMSTART flag with FILL 260,0.
  298.              Leavσ ZBA╙ witΦ BY┼ anΣ d∩ ß SAV┼ x° FILENAME.COM¼á wherσ x° ì
  299.         is the total size of ZBAS plus the program, as obtained above.
  300.  
  301.  
  302.  
  303.  
  304.  
  305.                                         5
  306.          
  307.  
  308.  
  309.         6«á   ZBA╙ wil∞ no≈ "understandó lowe≥ casσ input« Al∞ lowe≥ casσ ì
  310.         character≤á typeΣá iεá eithe≥ a≤ ß commanΣá o≥á wheεá enterinτá ß ì
  311.         prograφá wil∞á bσá capitalizeΣ beforσá the∙á arσá executed«á Tex⌠ ì
  312.         encloseΣ iε quote≤ (strinτ literals⌐ wil∞ bσ lef⌠ unchanged«á Thσ ì
  313.         capitalization does not affect text typed at an INPUT prompt.
  314.  
  315.         7«á   Iµá yo⌡á d∩ no⌠ usσ NortΦ Sta≥ hardware¼á yo⌡ mustà se⌠á thσ ì
  316.         CONT╥á bytσ t∩ 0¼á o≥ yo⌡ wil∞ bσ forceΣ t∩ cold-boo⌠ ever∙á timσ ì
  317.         yo⌡á executσ ß prograφ whicΦ use≤ ß "RND(-1)ó statement«á Iµá yo⌡ ì
  318.         usσá NortΦá Sta≥á hardware¼á thi≤ bytσ mus⌠ bσ se⌠á t∩á thσá nos⌠ ì
  319.         significan⌠ bytσ oµ you≥ controlle≥ address« Notσ tha⌠ thi≤ auto-ì
  320.         seeding feature will not work in non-North Star hardware.
  321.  
  322.         8«á   Therσá arσá tw∩ morσ features║á Thσ commanΣá linσá (o≥á an∙ ì
  323.         prograφá line¼á fo≥ tha⌠ matter¼á ma∙ no≈ bσ u≡ t∩ 25╡ character≤ ì
  324.         long«á I⌠ default≤ t∩ 8░ characters/line¼ bu⌠ caε bσ changeΣ witΦ ì
  325.         thσá LIN┼ command«á Wheε printinτ ß prograφ listinτ witΦ LIS╘á #▒ ì
  326.         (t∩á thσá LST║á device,⌐á thσá outpu⌠á wil∞á bσá paged«á Thi≤á i≤ ì
  327.         accomplisheΣ b∙ sendinτ ß Forφ FeeΣ characte≥ a⌠ thσ star⌠ oµ thσ ì
  328.         listinτá anΣá afte≥ ever∙ 6░ lines«á Thσ printe≥ pagσá lengtΦá iε ì
  329.         lines is changeable (see the customization notes.)
  330.  
  331.         9«   Revisioε 1.│ introduce≤ thσ ne≈ ALOA─ commanΣ fo≥ ASCI╔ filσ ì
  332.         loading« ╔ aφ workinτ oε ASAVE¼ bu⌠ ma∙ no⌠ implemen⌠ i⌠ fo≥ somσ ì
  333.         time« ╔ havσ thereforσ includeΣ TOASCII.2Z┬ iε thσ package¼ whicΦ ì
  334.         is an un-tokenizing program for ZBAS.
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.                                         6
  367.          
  368.  
  369.  
  370.                               CUSTOMIZING ADDRESSES
  371.  
  372.              Thσ followinτ i≤ ß shor⌠ lis⌠ oµ importan⌠ addresse≤ iε ZBA╙ ì
  373.         and their function.
  374.  
  375.                        ORG  100H
  376.  
  377.         ZBASENTRY:     JMP  START
  378.  
  379.         LINES:         DB   80             ;console line length
  380.         COLDFLAG:      DB   0              ;this flag will be set to 1
  381.                                            ;by ZBAS when started. MUST be
  382.                                            ;reset to 0 for AUTOS!
  383.         AUTOS:         DB   1              ;auto start flag
  384.                                            ;set to 0 for auto start
  385.         BOOTPROM:      DB   0FCH           ;set to YOUR controller addr
  386.                                            ;or 0 for non-N* hdwr
  387.                        DW   PRTHEAD        ;points to the line index
  388.                                            ;pointer for console
  389.         PAGES:         DB   24             ;number of lines on console
  390.         BSPC:          DB   8              ;backspace character
  391.         PPAGE:         DB   60             ;number of lines on printer,
  392.                                            ;FF sent after reaching it.
  393.         CONTCON:       DB   0              ;set to 1 to inhibit ^C
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.                                         7
  428.