home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 65 / 065.d81 / basic4.docs < prev    next >
Text File  |  2022-08-26  |  56KB  |  3,966 lines

  1. 1{SHIFT-+}1z{SHIFT-+}1z
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.                             PREFACE 
  19.        -------------------------------------------------- 
  20.  
  21.      There are several BASIC extension programs available, and in
  22. my opinion, they all share a common problem.   Once  your program
  23. is written,  it will only work if the extension program is loaded
  24. first.  Worse, you can't SHARE your programs unless everyone owns
  25. the same  BASIC extension  that you own.  It was this shortcoming
  26. that prompted me to write BASIC 4.  What makes  BASIC 4 different
  27. is  that   it  attaches   itself  to  your  BASIC  program,  thus
  28. eliminating the problems mentioned  above.   Now you  can use the
  29. full  power  of  BASIC  4  in  all  of  your programs, and freely
  30. distribute them to anyone.    By  the  way,  you  won't  find any
  31. programmer helper (i.e. RENUMBER, AUTO etc.) routines in BASIC 4.
  32. Every function and command is designed to help  you write faster,
  33. more efficient code.  I am especially proud of the array handling
  34. features.   Now you  can quickly  search and  sort string arrays,
  35. insert  and  delete  array  elements, and instantly sum an entire
  36. numeric array!
  37.  
  38.      Several new  commands allow  greater control  over your text
  39. screens.  The SCREEN command will let you save or load screens to
  40. and from disk, or to and  from  several  buffers  located  in RAM
  41. under  ROM.    The  COPY,  MOVE  and  ERASE  commands offer a new
  42. dimension in screen manipulation.
  43.  
  44.      I could go on raving about BASIC 4,  but I  think you should
  45. turn the page and discover the power for yourself.
  46.  
  47.  
  48.  
  49.                                                    ...Rick Nash  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. {SHIFT-+}1z
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.        -------------------------------------------------- 
  83.                    U S I N G   B A S I C   4 
  84.        -------------------------------------------------- 
  85.  
  86.      A very important concept to grasp early on is how BASIC 4
  87. uses memory, and how it attaches itself to your program.  A
  88. typical session will be as follows: 
  89.  
  90.      1.    Load BASIC 4 with LOAD "BASIC 4",8 and type RUN.  Once
  91. you do, you're in the development mode.
  92.  
  93.      2.   You will see a title screen and  copyright notice.   At
  94. this point you can write your code as usual, except that you have
  95. access to all of the new features of BASIC 4. 
  96.  
  97.      3.   When you are satisfied with  your code,  issue a normal
  98. SAVE command to save your SOURCE code.  This is more compact than
  99. the CSAVE which saves BASIC 4 along with your program.  You MIGHT
  100. find it  convenient to  use the CSAVE option because then you can
  101. just LOAD your program  and RUN  it and  you've booted  both your
  102. program AND BASIC!
  103.  
  104.  
  105.      When you load A file that you've CSAVED and type list, you
  106. will only see the BASIC 4 title screen.  If you type RUN however,
  107. your program will run.  You'll have to break your program in
  108. order to edit it.
  109.  
  110.      Steps 1-3 can be repeated as many times as necessary so that
  111. you can develop your code at different sittings (as normal BASIC
  112. allows). 
  113.  
  114.      See appendix A for a memory map showing actual memory used
  115. by BASIC 4. 
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.                               -ii-
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133. {SHIFT-+}1z
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.        -------------------------------------------------- 
  155.                 U S E R   G U I D E   F O R M A T
  156.        -------------------------------------------------- 
  157.  
  158.      Each new command is listed on a separate page, and includes
  159. the following information: 
  160.  
  161.  
  162.  
  163.      1.  The token for each command.  Advanced programmers will
  164. find this information useful. 
  165.  
  166.      2.  The command type.  Either Function or Statement. 
  167.  
  168.      3.  The action.  A general description of the command. 
  169.  
  170.      4.  The syntax.  This section shows the syntax for proper
  171. operation.  Note that parameters are enclosed in <> for clarity. 
  172. Do not type these characters in your program. 
  173.  
  174.      5) An example.  A short demonstration of the command at
  175. work.
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.                               -iii-
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199. {SHIFT-+}1z
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.             BASIC 4 USER'S GUIDE  TABLE OF CONTENTS 
  217.  
  218. --------------------------------------------------
  219. STATEMENTS         PAGE            FUNCTIONS         PAGE
  220.  
  221. ' (REM)             3              ASC()               3 
  222. @ (AT)              2              BPEEK()             4 
  223. BPOKE               5              CTRL                10 
  224. CLS                 6              CVF()               11 
  225. COLOR               7              CVI()               12 
  226. COPY                8              DEC()               13 
  227. CSAVE               9              DEEK()              14 
  228. DEFUSR              15             EXEC()              21 
  229. DELETE              16             HEX$()              23 
  230. DOKE                17             INLINE$()           26 
  231. DUP()               18             INSCR$()            27 
  232. ELSE                19             INSTR()             29    
  233. ERASE               20             KEY                 30 
  234. FILL                22             MKF$()              31 
  235. HOME                24             MKI$()              32 
  236. IF                  25             MOD()               33 
  237. INSERT()            28             PROMPT()            38 
  238. MOVE                34             QUOT()              39 
  239. ON                  35             SEARCH()            46 
  240. PAUSE               36             STRING$()           48 
  241. PDELAY              37             SUM()               49 
  242. RESTORE             40             VARPTR()            50 
  243. RVS                 41             XOR()               51 
  244. SCRATCH()           42             SCREEN()            43 
  245. SCROFF              44             SCRON               45 
  246. SORT()              47             MEMORY MAP          49
  247. SCAN CODES          53
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.                               -iv-
  260.  
  261.  
  262.  
  263.  
  264.  
  265. {SHIFT-+}1z
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.        BASIC 4 USER'S GUIDE                       ' (REM) 
  284.        -------------------------------------------------- 
  285.  
  286. Token:
  287.  
  288.  $CF - 207 
  289.  
  290. Type: 
  291.  
  292.      Statement. 
  293.  
  294. Action:  
  295.  
  296.      Shorthand notation for REMark. 
  297.  
  298. Syntax: 
  299.  
  300.      '  
  301. Example:  
  302.  
  303.  10 REM this is an old-fashioned remark.
  304.  20 'here is the new style!
  305.  30 'which do you prefer?
  306.  40 {SHIFT-+}... program continues here ...{SHIFT--} 
  307.  
  308. See Also:
  309.  REM (In your BASIC manual). 
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.                                -1-
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331. {SHIFT-+}1z
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344. BASIC 4 USER'S GUIDE                  @ (PRINT AT) 
  345. -------------------------------------------------- 
  346.  
  347. Token:
  348.  $EF - 239 
  349.  
  350. Type:
  351.  Statement. 
  352.  
  353. Action:
  354.  
  355.      Moves cursor  to desired  screen location.  This function is
  356. used with the PRINT command like the TAB or SPC  commands. Screen
  357. locations can  be expressed  as ROW,COL or as a screen location 0
  358. to 999.  Like  TAB and  SPC, more  than one  @ can  be used  in a
  359. single print command. Multiple @'s in a single print command must
  360. be separated by a comma or semicolon. 
  361.  
  362. Syntax:
  363.  
  364.   PRINT@<screen pos>,<variable-list>
  365.   PRINT@(<row>, <col>),<variable-list> screen
  366.   pos = 0-999
  367.   row = 0-24
  368.   col = 0-39
  369.   var-list = normal PRINT command parameters. 
  370.  
  371. Example:
  372.  
  373.  10 CLS 20 PRINT@0,"THIS IS AT LOCATION 0"
  374.  30 PRINT@(10,10),"THIS IS 10,10"
  375.  40 P=780
  376.  50 PRINT@P,"780",@P+40,"820" 
  377.  
  378. See Also:
  379.  
  380.  PRINT, TAB and SPC in your BASIC manual. 
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.                                -2-
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397. {SHIFT-+}1z
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413. BASIC 4 USER'S GUIDE                           ASC 
  414. -------------------------------------------------- 
  415.  
  416. Token: 
  417.  
  418.      $F8 - 248 
  419.  
  420. Type:
  421.  
  422.  Function. 
  423.  
  424. Action:
  425.  
  426.      This function works  exactly  like  the  ASC  in  your BASIC
  427. manual except that it fixes a bug in the original.  This ASC will
  428. return a 0 for a null character whereas the old  version produced
  429. an error message. 
  430.  
  431. Syntax:
  432.  
  433.  ASC(<string>)
  434.  string = ascii character 
  435.  
  436. Example:
  437.  
  438.  10 A$=""
  439.  20 A = ASC(A$)
  440.  30 PRINT "THE ASCII VALUE OF A$ IS:";A 
  441.  
  442. See Also:
  443.  
  444.  ASC in your BASIC manual. 
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.                                -3-
  458.  
  459.  
  460.  
  461.  
  462.  
  463. {SHIFT-+}1z
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474. BASIC 4 USER'S GUIDE                         BPEEK 
  475. -------------------------------------------------- 
  476.  
  477. Token:
  478.  $EE - 238 
  479.  
  480. Type:
  481.  Function. 
  482.  
  483. Action:
  484.  
  485.      BPEEK (BANK  PEEK) returns  the value from RAM under any ROM
  486. or I/O  location.   This area  is   located from  $A000 to $FFFF.
  487. BPEEK  will  also    return  the  correct  value  from  any other
  488. location, but will b