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 / CPM / NSTAR / NSBAS59.DOC < prev    next >
Text File  |  2000-06-30  |  9KB  |  255 lines

  1. 1.0 INTRODUCTION
  2.  
  3. A special interface between North Star BASIC (Rel 4) and CPM (V1.4 and V2.0)
  4. has been implemented.  This interface allows almost all of the North Star
  5. BASIC functions and capabilities to be used on any CPM system.  With suitable
  6. patching, the interface will run on Cromemco CDOS (V1.07).  The following
  7. two sections describe the interface and its use.
  8.  
  9. 1.1 INTRODUCTION TO VERSION 5.9
  10.  
  11. Version 5.9 has been upgraded to work in conjunction with NORTH STAR
  12. BASIC Rel. 5.2. The "5" stands for Release 5.2, and the "9" stands
  13. for version 9 of this interface.
  14.  
  15. 1.2 CHANGES IN VERSION 5.9
  16.  
  17. 1.2.1 All addresses pointing into BASIC have been changed to reflect
  18.       the correct addresses.
  19. 1.2.2 Label "DESDWR" was not used in 4.8 and has been removed.
  20. 1.2.3 Line length has been changed back to default to 80 char/line.
  21. 1.2.4 The jump table at the start of the interface has been changed
  22.       to look exactly like DOS. That way, no modifications have to
  23.       be made to BASIC.
  24. 1.2.5 BASIC is expected to ORG at 0E00H, therefore, it needs not
  25.       be relocated.
  26. 1.2.6 In DCOM: between MOV A,C and STA DISKNO, an ANI 7FH has been
  27.       added to strip off the double density flag.
  28.  
  29. Please report all improvements, bugs etc. to:
  30. S. Kluger, 11025 Vista Del Sol #250-II, El Paso, TX 79935
  31. Tel. (915) 598-6274 --> RCPM Ringback, 6PM to 6AM, all day SAT.
  32.  
  33.  
  34. 2.0 NORTH STAR DOS TO CPM COMMAND MAPPING
  35.  
  36. Assuming you are familiar with North Star DOS and CPM, the following commands
  37. are used in conjunction with the North Star BASIC (Rel 4) which runs on CPM:
  38.  
  39.                North Star DOS         CPM
  40.  
  41. A. List directory     LI<Unit #>       DIR (use Ctl-P
  42.                        toggle print)
  43.  
  44. B. Create file         CR
  45.  
  46.    (1) Type 2                   None; creates &
  47.                        allocates disk
  48.                        space automatic-
  49.                        ally when you
  50.                        NSAVE in BASIC.
  51.                        Name will appear
  52.                        in directory as
  53.                        AAAAAAAA.2
  54.  
  55.    (2) Type <>2                   In CPM, save a
  56.                        dummy file to
  57.                        create file lengths
  58.                        of NNN blocks by
  59.                        using SAVE NNN 
  60.                        AAAAAAAA.T where
  61.                        T=type.  It's better
  62.                        to use CREATE in BASIC.
  63.  
  64. C. Delete         DE           Use CPM's ERA
  65.                        command
  66.  
  67. D. Compact         CO           Not required.
  68.                        CPM takes care of
  69.                        this.  Automatical-
  70.                        ly allocates & de-
  71.                        allocates type 2
  72.                        file space.
  73.  
  74. E. Type             TY           Not required.  See
  75.                        B. above.
  76.  
  77. F. Load & execute     GO           None.  All .COM
  78.       program                   programs load &
  79.                        execute at 100H in
  80.                        CPM.
  81.  
  82. G. Jump to address     JP           Not available in
  83.                        CPM
  84.  
  85. H. Copy file         CF           Use PIP program.
  86.                        Use SYSGEN program
  87.                        for CPM
  88.  
  89. I. Copy disk         CD           Use PIP & SYSGEN
  90.                        programs
  91.  
  92. J. Read & write         RD, WR           Not available
  93.       disk sectors
  94.  
  95. K. Load & save file     LF, SF           Not completely
  96.                        available.  Can do
  97.                        using DDT and SAVE
  98.                        in CPM.  All SAVEs
  99.                        assume RAM address
  100.                        is at 100H; e.g., use .2
  101.                        & .3 extensions for
  102.                        type 2 & 3 files,
  103.                        respectively.
  104.  
  105. L. Initialize disk     IN           Use a format program.
  106.                        Be careful; will
  107.                        destroy programs.
  108.  
  109. M. Diagnostic         DT           Use disk test
  110.                        program.  Be care-
  111.                        ful; will destroy
  112.                        all programs.
  113.  
  114.  
  115. 3.0 NORTH STAR BASIC COMMANDS (REL 4)
  116.  
  117. The following is a list of capabilities of the interface with BASIC:
  118.  
  119. A. CREATE - Will create files by reserving disk space by saving dummy
  120. files of the size and type specified.  This function will be slower than
  121. with North Star since in order to reserve disk space in CPM, you must actually
  122. save a file of the size specified.  See item L. in the next section for the
  123. situation where the disk becomes full during a CREATE.  BASIC has been patched
  124. to remove the file size limit of 350 blocks.  The current limit is 4095 blocks
  125. which should suffice for 8" quad density.  This allows up to a 1 Megabyte
  126. file to be created.  -4096 (F000H) has been patched into location DF7H.
  127.  
  128. B. DESTROY - No change
  129.  
  130. C. OPEN - No change
  131.  
  132. D. CLOSE - No change
  133.  
  134. E. READ - No change
  135.  
  136. F. WRITE - No change
  137.  
  138. G. FILE - No change
  139.  
  140. H. SAVE - No change; file must already exist in the directory
  141.  
  142. I. NSAVE - No change; use if file does not exist in directory
  143.  
  144. J. LOAD - No change
  145.  
  146. K. APPEND - No change
  147.  
  148. L. RND(-1) - Will not generate a random number
  149.  
  150. M. MEMSET and End of BASIC's Memory - MEMSET will give an ARGUMENT ERROR when
  151. you try to set the address at BDOS or above.  The end address of memory is set
  152. to the beginning of BDOS-1 when BASIC is first loaded and executed.
  153.  
  154. N. BSPC - BASIC has been patched at 817H to echo the Backspace character
  155. (Ctl-H = 8H).
  156.  
  157. O. LINECT - BASIC has been patched at 80EH to a line length of 132.
  158.  
  159.  
  160. 4.0 SPECIAL FEATURES AND NOTES
  161.  
  162. A. Drives 1 and 2 in North Star DOS/BASIC are synonomous with drives A and B
  163. in CPM.
  164.  
  165. B. CPM does not allow you to SAVE a file larger that available memory.  Thus
  166. if you have large data files to create, you must create several small files
  167. using the save technique above and concatentate them using the PIP concatena-
  168. tion feature.  The size of the large file should equal the sum of the sizes of
  169. the small files.  It is recommended that you create a file in BASIC using
  170. CREATE; it is easier to do.  
  171.  
  172. C. The interface has an added feature which allow you to freeze and unfreeze
  173. the screen using the Control-S toggle as in CPM while listing on the console
  174. device.
  175.  
  176. D. Your CPM or CPM derivative must have a standard BIOS jump table up to the
  177. PUNCH device jump address and standard CPM BDOS calls.
  178.  
  179. E. The CPM CONSOLE IN and OUT device is device number 0 in BASIC.
  180.  
  181. F. The CPM LIST device is device number 1 in BASIC.
  182.  
  183. G. The CPM PUNCH device is device number 2 in BASIC.  One suggested use is
  184. as a list device with paging.
  185.  
  186. H. Make sure you do not have files in the directory with the same name and one
  187. character type.  Except for LOAD, APPEND, SAVE and NSAVE, BASIC disk commands
  188. will work with the first directory entry with a matching name and ambiguous
  189. one character type.  Types with more than one character will be ignored.
  190.  
  191. I. The base or start address of BASIC is 800H (2048D).  The interface starts
  192. at 100H.  A jump table equivalent to that in North Star DOS starting at 200DH
  193. is at 103H.
  194.  
  195. J. Data file directories are kept in a buffer which holds 10 open files.  These
  196. files are purged on a FIFO basis.  If new files are opened and the buffer is
  197. full, the oldest one is purged.  Be careful that your program does not keep a
  198. file open any longer than is necessary.
  199.  
  200. K. A disk full, directory full, or file extension error gives an ARGUMENT
  201. ERROR.
  202.  
  203. L. When using CREATE and disk becomes full, the normal BASIC error message
  204. or error number will not be generated.  This is because of the way the
  205. interface had to be implemented.  When this occurs, the message 'DISK/DIR FULL'
  206. will be printed on the console, and the program will abort and return to CPM.
  207.  
  208. M. The program RETURNP.COM can be used (e.g., in L. above) to return to BASIC
  209. without scratching the program.  Just type RETURNP(cr).
  210.  
  211. N. The program RETURNV.COM can be used (e.g., in L. above) to return to BASIC
  212. without scratching the program or the variables.  Just type RETURNV(cr).
  213.  
  214. O. The programs in M. and N. above put the appropriate jump (i.e., 804H and
  215. 814H) into location 139H in the interface.
  216.  
  217. P. To incorporate the turnkey start up of BASIC,
  218.  
  219.     1. Load and execute BASIC by typing NSBASIC(cr)
  220.     2. Type  1000 CHAIN "program name"(cr)
  221.     3. Type  BYE(cr)
  222.     4. Type  SAVE 60 NSBAS4.COM(cr) [or any program name.COM]
  223.     5. Type  DDT NSBAS4.COM(cr)
  224.     6. Type  S80F(cr)
  225.     7. Type  0(cr)
  226.     8. Type  .(cr)
  227.     9. Type  Ctl-C(cr)
  228.     10.Type  SAVE 60 NSBAS4.COM(cr)
  229.  
  230. The program will now load and execute after loading and executing BASIC.
  231.  
  232. Q. For those using CDOS V1.07, the following patches are required for
  233. compatibility; use DDT or DEBUG to patch; then SAVE 60 NSBAS4.COM:
  234.  
  235.     ADDRESS        CURRENT CODE        PATCH
  236.  
  237.      23DH        21H,89H,0,CDH,D4H,4    11H,9,0,19H,0,0
  238.      3A4H        CDH,D1H,4        0,0,0
  239.      3ADH        CDH,D1H,4        0,0,0
  240.      4B5H        21H,8FH,0,CDH,D4H,4    11H,0FH,0,19H,0,0
  241.  
  242. These patches only apply to Revision 8 of the interface.
  243.  
  244. RETURNP.COM and RETURNV.COM need to be changed also.  The easiest way is to
  245. use DDT or DEBUG after the above patches are applied and BASIC resaved.  Load
  246. in BASIC using DDT; patch location 139H with JMP 804H or JMP 814H for
  247. RETURNP.COM or RETURNV.COM, respectively; exit DDT with a Control-C; then
  248. SAVE 1 RETURNP.COM or RETURV.COM.
  249.  
  250. R. Revision 8 is identified by a period (.) preceeding the file type when
  251. doing a CAT.  All previous versions used a blank.
  252.  
  253.  
  254. 11/20/79
  255.