home *** CD-ROM | disk | FTP | other *** search
/ Transactor / Transactor_27_1988_Transactor_Publishing.d64 / shellram.sda / SHELLRAM.EDME < prev    next >
Text File  |  2023-02-26  |  5KB  |  182 lines

  1.  
  2.    shellram: A shell for POWER C
  3.      designed to work with the
  4.           1764 RAM disk
  5.  
  6.  The files in this archive allow you
  7. to assemble, using c/assm, and link,
  8. using the POWER C linker, a shell which
  9. can be used on the Commodore 64 in
  10. conjunction with the Commodore 1764
  11. 256K Ram Expander, since it leaves
  12. a page of memory free for use as the
  13. "RAM Disk Interface Page", as required
  14. by the RAM Disk Software as provided
  15. with the cartridge.
  16.  
  17. To assemble it will require the c/assm
  18. program, from Mark Rinfret and Ray
  19. Zarling.  Each ".a" file from this
  20. archive should be assembled to produce
  21. the corresponding ".o".
  22.  
  23. Linking will require the POWER C (or C
  24. Power) linker, as follows:
  25.  
  26. $ link -s $0801
  27.  
  28. > shellmain.o
  29. > c$getchar.o
  30. > dprintf.o
  31. > doload.o
  32. > srchcmd.o
  33. > shellstr.o
  34. > shellcenv.o
  35. > c64kernal.o
  36. > shellvar.o
  37. >
  38.  
  39. output file name: shellram
  40.  
  41. $
  42.  
  43. To run it, using the RAM disk, the RAM
  44. disk should first be initialized,
  45. using page 22 (hex $16) as the 
  46. interface page.  The small basic program
  47. on the disk, 'cstart', actually does
  48. this for you.  It requires a copy of the
  49. RAM disk binary image, ramdos??????.bas,
  50. to be copied onto the disk.  This
  51. program should have come with your 1764
  52. RAM expander.  'cstart' also arranges to
  53. use the 'exec' utility (which you may or
  54. may not have), to set up your RAM disk
  55. for use.
  56.  
  57. The C program 'twincopy' is a relatively
  58. convenient way of copying files from a
  59. real disk to the RAM disk, or vice
  60. versa.  'twincopy' will copy files from
  61. the current 'sys' device to the current
  62. 'work' device.
  63.  
  64. Therefore:
  65.  
  66. % sys 8 0
  67. % work 9 0
  68. % twincopy xxx
  69.  
  70. will copy file 'xxx' from a device 8 to
  71. device 9.  Usually this will copy from
  72. a real disk to the RAM disk.
  73.  
  74. % sys 9 0
  75. % work 8 0
  76. % twincopy xxx
  77.  
  78. would copy the other way.
  79.  
  80. Note that 'twincopy' must be linked
  81. with the object file 'shellcenv.o' to
  82. resolve some of its references.
  83.  
  84.  
  85. Extra features in 'shellram':
  86.  
  87. 1) a 'col' command can be optionally
  88. assembled in (the source is distributed
  89. to provide it), compatible with the
  90. 'col' command of the POWER C 128 shell:
  91.  
  92. col <char> <background> <dummy> <border>
  93.  
  94. 2) Since leading non-alphabetics are
  95. always ignored on each command line,
  96. lines can easily be re-entered by
  97. cursoring up to them and pressing
  98. <return>.  Some people might not like
  99. this if they have taken to saying things
  100. like ">> print ...", but "print ... >>"
  101. is equivalent.
  102.  
  103. 3) Better management is done of the
  104. file units used for command channels.
  105. This is primarily of significance to
  106. users of dual disk drives, such as the
  107. MSD SD-2.  It allows "ls >", and,
  108. means that programs loaded from the
  109. sys drive of the dual drive can do
  110. file redirection the first time they
  111. are loaded.  If you have a dual drive,
  112. you might know what I mean.  Otherwise,
  113. don't worry about it.
  114.  
  115. 4) prompt is '%' rather than '$' to
  116. remind you it's different.  Of course,
  117. you can modify the source to use
  118. whatever character you like.
  119.  
  120. The file 'newcc.a' is a c/assm source
  121. to produce a of version of the 'cc.sh'
  122. program which will work with both 'sys'
  123. and 'work' devices set to be the RAM
  124. disk.  The 'compiler' and 'translator'
  125. programs from the POWER C 64
  126. distribution disk should be copied to
  127. the RAM disk, as well as the C source
  128. to be compiled for this version to work.
  129. (It will also work with real disk
  130. drives, however).  In addition to
  131. supporting the RAM disk, 'newcc' also
  132. allows more than one C program to be
  133. compiled with a single command line.
  134.  
  135. Note that both 'twincopy' and 'newcc'
  136. must be linked with the object file
  137. 'shellcenv.o' to resolve some of their
  138. references.
  139.  
  140.  
  141.  
  142.  
  143. PROBLEMS with the 1764 Interface, and
  144. the RAMDOS software in particula
  145. (In addition to those noted in the
  146. Commodore documentation):
  147.  
  148. 1) A simple
  149.  
  150. chkin,chrin,clrchn,chkout,chrout,clrchn
  151.  
  152. loop to attempt to copy from one file
  153. on the RAM disk to another also on the
  154. RAM disk
  155.    
  156.    a) is VERY slow
  157.    b) generates erroneous output
  158.       characters (at 256 byte intervals)
  159.  
  160. A multiple character buffer must be
  161. used, which is generally better
  162. programming practice, anyway.  See
  163. twincopy.c, for example.
  164.  
  165.  
  166. 2) (Possibly related)
  167. While preparing the shell source
  168. itself for distribution, I discovered
  169. that assm.sh generated erroneous output
  170. when assembling a file on/to the RAM
  171. disk.  But this was only in one case:
  172. The file srchcmd.a, when the symbol
  173. colcmd is set to zero, will generate
  174. one erroneous output byte.  I don't know
  175. whether this is because of the nature
  176. of the conditional compile, because it
  177. uses a .dseg, or some other problem.
  178.  
  179.  
  180.            -- Adrian Pepper
  181.               March, 1988
  182.