home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / Information / ACE-R11.DOC.ARC / ACE-R11.DOC
Encoding:
Text File  |  2019-04-13  |  62.7 KB  |  1,243 lines

  1. ACE-128/64 USER'S GUIDE  for Release #11   [September 9, 1994]
  2. ------------------------------------------------------------------------------
  3. 1. INTRODUCTION
  4.  
  5. ACE is an operating system for the Commodore 128 and Commodore 64 that
  6. provides a Unix-like command shell environment.  It is still in the
  7. development stage, but enough of it is complete to be useful.  BTW, "ACE"
  8. means "Advanced Computing Environment" (well, advanced for the 128/64).
  9.  
  10. This release contains a few new features over the previous release:
  11.  
  12.  - High performance built-in ramdisk (up to 1 meg/sec file reading) that you
  13.    can use just like a regular disk device (file reading and writing).
  14.  - Bitmap-implemented software 80-column screen for the C-64.
  15.  - Scroll-back buffer for keyboard input line editing, allowing you to edit
  16.    or re-execute previous commands.
  17.  - Still even faster printing to screen (a la optional partially-implemented
  18.    "pre-scrolling").
  19.  - And, of course, some minor bug fixes.
  20.  
  21. This distribution consists of a boatload of files.  System files:
  22.  
  23. ace         - the kernel bootstrapper; can be run from either 64 or 128 mode
  24. ace128      - the kernel for the 128
  25. ace64       - the kernel for the 64
  26. config      - the configuration initializer
  27. sh          - the command shell
  28. config.sys  - the system configuration - this is data not an executable
  29. config.edit - configuration editor program (written in BASIC)
  30. ace-charset      - character set - you can replace it with your own IYW
  31. ace-charset-4bit - character set - you can replace it with your own IYW
  32.  
  33. Application programs (explained in Section 6.3):
  34.  
  35. cp          - copy files
  36. rm          - remove files (scratch)
  37. mv          - rename files (named for Unix "mv"=="move")
  38. mkdir       - create a new directory (flat name)
  39. rmdir       - remove an existing empty directory (flat name)
  40. xls         - directory lister, displays dates
  41. uuencode    - encode files into uuencoded format
  42. uudecode    - decode files from uuencoded format
  43. bcode       - encode files into BCODE format
  44. unbcode     - decode files from BCODE format
  45. crc32       - display CRC-32 *B* values for files (new standard)
  46. crc32a      - display CRC-32 *A* values for files (old standard)
  47. wc          - count words, lines, characters of files
  48. grep        - search for a substring in files (from Unix "grep")
  49. tr          - translate from one character set to another
  50. sort        - sort files
  51. wrap        - wrap lines longer than 75 characters
  52. date        - display current date and time
  53. forty       - switch to 40-col screen, slow mode
  54. eighty      - switch to 80-col screen, fast mode on 128
  55. read        - read files
  56. mem         - display available dynamic and transient program area memory
  57. as          - DEMO assembler: only tokenizer implemented
  58. vi          - DEMO "Zed" text editor: displays screen, loads and prints file
  59. hello       - dumb little "hello world" example program
  60. window      - set the current window dimensions
  61. more        - full-screen file displayer
  62. unkar       - KAR (Kevin's ARchiver) file dearchiver
  63.  
  64. These binary programs available in a uuencoded archive format.  The uudecode
  65. program included here will decode this format of archive, but that is probably
  66. of no use to you unless you are able to Catch 22.  You may have to use the
  67. uudecoder on your Unix system or use "uuxfer" for the C64.  You may have to
  68. split the uuarchive up into separate files for uudecoding.
  69.  
  70. Note that the "ace128" and "ace64" programs are functionally identical, except
  71. that one is set up for the 128 and the other for the 64.  Thus, all of the
  72. appication binary programs will work with either "ace128" or "ace64".  LOAD
  73. and RUN the "ace" program and it will load the correct "kernel" for your
  74. computer.
  75.  
  76. The Buddy assembler source code files are not included here, but I will e-mail
  77. them to anyone who asks for them.  They are getting a bit bulky, over 23,000
  78. lines.  For people wanting a little technical information, here is the memory
  79. map of ACE; it is subject to change at my whim:
  80.  
  81. $0002-$007f = application zero-page storage (0.12K)
  82. $0080-$00ff = system zero-page storage (0.13K)
  83. $0100-$01ff = processor stack (0.25K)
  84. $0200-$0eff = system storage (3.25K)
  85. $0f00-$0fff = kernel interface variables (0.25K)
  86. $1000-$12ff = system storage (0.75K)
  87. $1300-$1fff = shell program (3.25K)
  88. $2000-$27ff = character set (2K)
  89. $2800-$6fff = ACE kernel and device drivers (18K) - unused space free
  90. $7000-$bfff = application area & stack (20K)
  91. $c000-$feff = ROM and I/O, RAM (15.75K) - free
  92. $ff00-$ffff = reserved for system (0.25K)
  93.  
  94. or with a C64 with the soft-80 bitmap screen, high RAM usage:
  95.  
  96. $d800-$dbff = soft-80 character set (1K)
  97. $dc00-$dfff = bitmap color matrix (1K)
  98. $e000-$ffbf = bitmap screen (7.81K)
  99. $ffc0-$ffff = reserved for system (0.19K)
  100. ------------------------------------------------------------------------------
  101. 2. USING THE SYSTEM
  102.  
  103. When ACE starts, it loads and executes the command shell (among other things),
  104. gives you a prompt and waits for you to give it a command.  A command has the
  105. following format:
  106.  
  107. programname arg1 arg2 ... argN
  108.  
  109. The programname can be any of the following built-in commands (covered in
  110. Section 6.1):
  111.  
  112. echo       - print the given arguments to stdout
  113. clear      - clear the screen
  114. cls        - same as "clear"
  115. dir        - clear the screen and give a long-form directory listing
  116. d          - same as "directory", but no clear screen
  117. ls         - give a multi-column short-form directory listing
  118. clsl       - combination of "cls" and "ls"
  119. cd         - change the current device/directory
  120. cat        - display the named files to stdout
  121. exit       - exit from the command shell back to BASIC
  122. x          - same as "exit"
  123. dos        - give a Commodore dos command to the current device (OPEN1,dv,15..)
  124. @          - same as "dos"
  125. path       - set the path to search for external programs
  126. sh         - invoke the shell again as a sub-shell
  127.  
  128. or programname can be for any of the external programs provided with this
  129. distribution.  You'll have to forgive my personal taste in command names and
  130. abbreviations (until the "alias" shell feature is finally implemented).
  131.  
  132. 2.1. INPUT/OUTPUT REDIRECTION
  133.  
  134. The three Unix standard files are supported:
  135.  
  136. stdin    - where the default input comes from (usually the keyboard)
  137. stdout   - where the default output goes to (usually the screen)
  138. stderr   - where error messages are sent to (usually the screen)
  139.  
  140. To temporarally redirect these standard file streams for the execution of a
  141. command, you can use the following incantations on a command line:
  142.  
  143. <infile     - redirect stdin - input taken from "infile"
  144. >outfile    - redirect stdout - output put into file "outfile"
  145. >>outfile   - redirect stdout - same as ">" but the output is appended to file
  146. >&errfile   - redirect stderr - error output is put into "errfile"
  147. >>&errfile  - redirect stderr - error output is appended to file "errfile"
  148.  
  149. Do not put a space between the redirection symbol(s) and the file name.
  150.  
  151. 2.2. PATHNAMES
  152.  
  153. Whenever you specify a file, you use a "pathname".  Pathnames have the
  154. following optional parts:
  155.  
  156. [device:][ramlink-directory:][filename]
  157.  
  158. Device names are set by the user in the configuration file, but the factory
  159. defaults are:
  160.  
  161. "k:"  - Custom device driver: the keyboard
  162. "s:"  - Custom device driver: the screen ("k:" and "s:" are exactly synonymous)
  163. "p:"  - Commodore device #4 - the printer, with SecAddr 7 - output only
  164. "q:"  - Commodore device #4 - the printer, with SecAddr 5 - transparent mode
  165. "n:"  - Custom device driver: "null" device
  166. "a:"  - Commodore device #8 - a disk drive - input/output
  167. "b:"  - Commodore device #9 - a disk drive - if you have >1 drive
  168. ...
  169. "j:"  - Commodore device #17 - a disk drive
  170. ".:"  - the "current" disk device
  171.  
  172. CMD RAMLink (or CMD HardDrive) directory names have the following formats:
  173.  
  174. "//dir/:"                - a subdirectory of the root directory
  175. "/dir/:"                 - a subdirectory of the current directory
  176. "4//dir/dir/ ... /dir/:" - a sub-path of the root directory of partition #4
  177. "/dir/dir/ ... /dir/:"   - a sub-path of the current directory
  178.  
  179. And filenames have the usual Commodore format of 1 to 16 characters.
  180.  
  181. Thus, the following are valid pathnames for files:
  182.  
  183. k:                    - the keyboard for input
  184. p:                    - the printer for output
  185. b:file1               - "file1" on disk device #9
  186. .:file1               - "file1" on the current disk device
  187. file1                 - "file1" on the current disk device
  188. /dir1/file1           - "file1" in the RamLink subdirectory "dir1"
  189. a://dir1/dir2/:file1  - "file1" in the RamLink subdir "//dir1/dir2", device #8
  190.  
  191. And the following are valid pathnames for directories:
  192.  
  193. a:               - disk device #8 current directory
  194. .:               - current disk device's current directory      
  195. .://dir1/:       - "dir1" off the root directory of the current RamLink device
  196. /dir1/dir2/:     - subdirectory "/dir1/dir2" of the current RamLink device
  197.  
  198. Note that a directory name always ends with a ":".
  199.  
  200. You may append a ",p" or ",s" or ",u" to a filename to specify whether a PRG,
  201. SEQ, or USR file should be accessed/created.  By default, ACE will create SEQ
  202. files.
  203.  
  204. BTW, to generate an EOF for keyboard input, simply press Control-D.  Only do
  205. this at the beginning of a blank line.
  206.  
  207. 2.3. COMMAND SHELL ARGUMENTS
  208.  
  209. Arguments that contain spaces must be put into quotes.  Multiple quoted
  210. strings can be placed side-by-side to produce a longer string.  The following
  211. are examples of valid command shell arguments:
  212.  
  213. hello                                  -  hello
  214. 'hello'                                -  hello
  215. "hello there"                          -  hello there
  216. 'hello there'                          -  hello there
  217. 'she said, "how'"'s that"'"'' to me.'  -  she said, "how's that" to me.
  218.  
  219. Command shell arguments are separated by spaces or tab characters.
  220.  
  221. 2.4. EXTERNAL COMMAND SEARCH PATH
  222.  
  223. The "path" command sets or displays the current search pathnames for external
  224. programs.  By default the paths to search are "a:" and ".:".  The path consists
  225. of multiple directory names to be checked, in order, for each binary executable
  226. or shell script that you give that does not have a pathname prefix.
  227.  
  228. 2.5. WILDCARDS
  229.  
  230. Unix-style wildcard expansion is supported.  When you enter an argument with
  231. an asterisk in the filename component of the pathname, the command shell will
  232. automatically expand that name into an argument for each file in the specified
  233. directory that matches that pattern.  The expanded arguments are then passed
  234. onto the command you are invoking as if you had typed them all in yourself.
  235. For example:
  236.  
  237. ARGUMENT            EXPANSION
  238. --------            ---------
  239. *                   file1 prog1,p prog2,p
  240. ch*                 chess,p chinese_checkers,p
  241. *.bin               main.bin,p data.bin anagram.bin
  242. a*n                 anagram.bin an another_plan
  243. b:a*.bin            b:main.bin,p b:data.bin b:anagram.bin
  244. c://games/:a*.bin   c://games/:acrobat.bin,p c://games/:acrodata.bin
  245.  
  246. You'll note that program files are expanded to include a ",p".  If a pattern
  247. does not expand to anything, an error message is displayed and the shell
  248. command is not executed.  You'll have to cursor-up and change the command.
  249. Your filename pattern can include only one asterisk (anywhere in the name).
  250.  
  251. Some example uses of wildcard expansion with the provided utilities follow:
  252.  
  253. cp b:* a:
  254. cp //games/c64/:chess*.bin somefile b://games/:
  255. wc *.asm *.c
  256. ------------------------------------------------------------------------------
  257. 3. SYSTEM CONFIGURATION
  258.  
  259. The program entitled "config.edit" is used for editing the system
  260. configuration.  The system will be configured according to the data in the
  261. file "config.sys" every time it starts up.  Note that "config.sys" is a
  262. loadable binary PRG file; it is not in text format and is not meant to be
  263. edited with a text editor.
  264.  
  265. The following data are included in the "config.sys" file:
  266.  
  267. OFF  SIZ  DESC
  268. ---  ---  ----
  269. $00  128  device descriptors, 32 entries of four bytes each.
  270.           [For each entry, offsets: 0=device driver type, 1=device address,
  271.            2=secondary address, 3=flags.  Described further below.]
  272. $80    1  ramlink device number
  273.           [The kernel device number of your RAMLink.  The default RL device
  274.            number is 16.]
  275. $81    1  ramlink last logical bank allowed to use plus one (norm 255)
  276.           [For the RAMLink memory partition (next section), the maximum
  277.            number of 64K chunks that can be used for dynamic memory.]
  278. $82    4  real-time clock devices to check [4], $FF=unused
  279.           [These are the kernel device numbers of CMD disk drive units that
  280.            have a built-in real-time clock to check for the current time.  If
  281.            the first entry fails, then the second will be tried, etc., until
  282.            the fourth entry is tried.  If all devices fail to return a time,
  283.            then the default date is used (next).  A value of $FF in an entry
  284.            means to try the next entry.  ACE uses the TOD clock of CIA#1 to
  285.            keep time.  The date is stored in a regular memory field and is not
  286.            rolled on a 24-hour TOD clock wrap-around.]
  287. $86    8  default date YY:YY:MM:DD:HH:MM:SS:TW
  288.           [The default date to use if attempts to access the current time from
  289.            CMD disk devices fail.  Format is 24-hour BCD.  All four digits of
  290.            the year are given.  The "TW" field means tenths of seconds in the
  291.            high nybble and the day-of-week in the low nybble.  For days of the
  292.            week, 0 means "unknown", 1 means "Sunday", etc., and 7 means
  293.            "Saturday".  The factory-set value of this field is 12am, Friday,
  294.            Jan 1, 1993.]
  295. $8E    1  screen saver activation time, in minutes (norm 10)
  296.           [The screen will go black when the screen saver is activated, after
  297.            a period where you have not pressed any key for the specified time,
  298.            until you press a key (including the any of the shift keys).  If
  299.            you press any character key, that key will appear in your input.
  300.            Normal processing will continue in the background, while the screen
  301.            saver is active, including printing to the screen.  This time is in
  302.            minutes.  A value of zero means to disable the screen saver.  The
  303.            screen saver is now active for the 40-column and 80-column
  304.            displays.]
  305. $90   16  initial current directory string (default "a:")
  306.           [Immediately after booting and before calling the shell, the kernel
  307.            will do a change directory to the null-terminated string given
  308.            here.]
  309. $A0    1  C128 bank1 start free page (norm $04)
  310.           [This field and the next define the pages of RAM1 that ACE is allowed
  311.            to use.  This must include at least one page.]
  312. $A1    1  C128 bank1 last free page plus one (norm $ff)
  313. $A3    1  C128 bank0 last allowed free page plus one (norm $ff)
  314.           [This is the highest page, plus one, on RAM0 that ACE is allowed to
  315.            use.  You can set this to protect a program that you wish to
  316.            attempt to use with ACE (good luck).  There is no minimum page that
  317.            ACE is allowed to use; it takes whatever it wants below $6000.]
  318. $A5    1  C128 last internal bank allowed to use above 2, plus one (norm 8)
  319.           [For expanded internal memory (a la TwinCities-128), this sets the
  320.            high limit on the banks that ACE is allowed to use.  A value of 2
  321.            means that ACE is not allowed to use it at all.  There is no low
  322.            limit on this because it caused too many programming problems.]
  323. $A6    1  C128 first REU bank allowed to use (norm 0)
  324.           [This and the next field define the minimum and maximum (plus one)
  325.            REU bank numbers that ACE is allowed to use.  I included a minumum
  326.            because of pleas about Zed having a minimum.  If you set both min
  327.            and max to $00, then ACE will leave the REU memory alone.
  328.            Otherwise, ACE will auto-detect how much you have and will make use
  329.            of as much REU memory as it can (note the default max is 255).]
  330. $A7    1  C128 last REU bank allowed to use plus one (norm 255)
  331. $A8    1  C128 top page of TPA (stack) (norm $c0)
  332.           [This defines that page (plus one) of the top of the application
  333.            program area (TPA).  The bottom is $6000, so a top of $C000 gives
  334.            apps 24K to play around in.  $C0 is the maximum value this field
  335.            can have, since the Commodore Kernal must (for this release) stay
  336.            in context whenever ACE is in use.  The top of this space is also
  337.            used as the "argument stack" for applications.]
  338. $A9    1  C128 VDC default number of rows (norm 25)
  339.           [Not currently supported]
  340. $AA    1  C128 VDC number of Kbytes of video RAM (norm 16)
  341.           [Not currently supported]
  342. $AB    1  C64 soft-80 screen maximum prescroll for REU-supported scrolling
  343.           [Currently, the number of rows to scroll the screen every time the
  344.            screen needs to be scrolled.]
  345. $AC    1  C128 80-col screen maximum prescroll
  346.           [Currently, the number of rows to scroll the screen every time the
  347.            screen needs to be scrolled.]
  348. $AD    1  C128 40-col screen maximum prescroll
  349.           [Currently, the number of rows to scroll the screen every time the
  350.            screen needs to be scrolled.]
  351. $AE    1  C64 soft-80 screen maximum prescroll for software scrolling
  352.           [Currently, the number of rows to scroll the screen every time the
  353.            screen needs to be scrolled.]
  354. $AF    1  C64 40-col screen maximum prescroll
  355.           [Currently, the number of rows to scroll the screen every time the
  356.            screen needs to be scrolled.]
  357. $B0    8  C128 80-col screen color palette: table of eight RGBI codes.
  358.           [This table gives the palette of colors to be used by C128 80-col
  359.            applications.  The meanings of the values stored at the offsets
  360.            are: 0=char, 1=cursor, 2=status, 3=separator, 4=highlight, 5=alert,
  361.            6=border, 7=screen.  The char, border, and screen colors are used
  362.            when the screen driver is initialized.  The border value for the
  363.            80-col screen is currently ignored.  Note that RGBI codes are used,
  364.            even for the VIC chip (for consistency).  The factory defaults for
  365.            char, screen, and border are light grey on black for 80 and light
  366.            green on dark grey with a medium grey border for the 40 (perhaps a
  367.            bit icky).  The other values are chosen accordingly.  The palettes
  368.            for the other displays have the same structure as this one.]
  369. $B8    8  C128 40-col color palette
  370. $C0    1  C64 soft-80 enable mask (norm %10100000)
  371.           [The 128-bit allows the soft-80 screen to be used.  Allowing the
  372.            soft-80 screen costs 10K of RAM0 memory on the C64.  This software-
  373.            implemented bitmap 80-column screen is supported only on the C64.
  374.            On a C128, use the real 80-column screen.  If the soft-80 screen is
  375.            not allowed, then the 10K of memory is made available for far
  376.            memory use (e.g., for ramdisks).  The 64-bit specifies that the
  377.            soft-80 screen is to be entered by default when ACE starts up,
  378.            rather than the 40-col screen.  You can switch between the two
  379.            screens by using the "forty" and "eighty" programs.  The 32-bit
  380.            specifies that the REU is to be used to assist in scrolling the
  381.            bitmap screen if an REU is present.  The cost of doing this is 7.5K
  382.            of REU memory.  The benefit is that the screen will scroll several
  383.            times faster than it will by just using the main processor, which
  384.            is used otherwise.]
  385. $C1    1  C64 last allowed page free plus one (norm $ff)
  386.           [This gives the top page, plus one, that ACE is allowed to use on
  387.            the 64.  Don't set this lower than the top of the TPA area.]
  388. $C2    1  C64 first REU bank allowed to use (norm $00)
  389.           [Like the C128 settings, you can set the usage for the REU memory.]
  390. $C3    1  C64 last REU bank allowed to use (norm $ff)
  391. $C5    1  C64 end expanded internal memory banks plus one (norm $04)
  392.           [This field is currently ignored.]
  393. $C6    1  C64 top page of TPA (stack) (norm $c0)
  394.           [Top of the TPA for the 64.  You can set this between $61 and $D0.]
  395. $C8    1  key repeat delay (norm 20)
  396.           [The number of jiffies between when you press a key the first time
  397.            and when it starts repeating.]
  398. $C9    1  key repeat rate (norm 3)
  399.           [The number of jiffies between each repeat of a key while you are
  400.            holding it down.]
  401. $CA    1  console color enable default (norm $80)
  402.           [This is used to enable what is normally printed on the console
  403.            screen: characters, colors, and/or attributes.  This feature is
  404.            not currently fully implemented.  The default is for only
  405.            characters because this allows it to operate twice as quickly
  406.            as when both colors and characters are enabled.]
  407. $CB    1  input line scrollback buffer line count (norm 5)
  408.           [The number of previous lines to save so that you can scroll back
  409.            through previous input lines in order to edit them.  Each line
  410.            of buffer space requires 256 bytes of far memory to store.
  411.            Specifying a value of zero disables the scrollback feature.]
  412. $CC    1  controller port 1 device
  413.           [Not currently implemented.]
  414. $CD    1  controller port 2 device
  415.           [Not currently implemented.]
  416. $D0    8  C64 80-col color palette
  417.           [For the bitmapped hi-res 80-col screen, which is not yet
  418.            implemented.]
  419. $D8    8  C64 40-col color palette
  420. $E0   32  initial shell path string (default "a:", ".:")
  421.           [The paths to use to search for executable programs.  Each directory
  422.            name is a null-terminated string, and the list of paths is
  423.            terminated by an empty string.]
  424.  
  425. The offsets from $00 to $7F contain 32 four-byte fields, which are used to
  426. define the devices in the system.  These fields will correspond to device
  427. names "@:", "A:", "B:", ..., "Z:", "[:", "\:", "]:", "^:", and "_:" (forgive
  428. the non-letter device names).  The four fields will be defined as follows:
  429.  
  430. 0 device driver type (0=Kernal non-disk, 1=Kernal disk, 2=console, 3=null)
  431. 1 device primary address / whatever
  432. 2 device secondary address / whatever
  433. 3 flags / whatever ($80 for a disk will means that it has a CMD Real-Time clock)
  434.  
  435. The factory defaults are: devices "a" to "j" are Commodore disk devices 8 to
  436. 17, respectively, "p" is device number 4 with secondary address 7, "q" is
  437. device number 4 with secondary address 5 (which is transparent mode with
  438. many printer interfaces, with which you'd use the "tr" utility to translate
  439. files into Ascii-CrLf format), and devices "k" and "s" refer to the custom
  440. console (screen and keyboard) driver.
  441.  
  442. To spare you the agony of editing this binary configuration manually, the
  443. BASIC program "config.edit" can be used instead.  Run it from BASIC, not from
  444. inside of ACE.  In fact, you should run this before running ACE the first time
  445. to set up the configuration.
  446.  
  447. The program provides a full-screen interface.  Move the cursor among the
  448. fields on each page and among the pages (10 of them) to set the values.  All
  449. values are in decimal (except the strings).  Then save the new configuration,
  450. exit, and run ACE.  If you screw up the new "config.sys", the previous one
  451. will be available in "config.sys.bak".
  452. ------------------------------------------------------------------------------
  453. 4. DYNAMIC MEMORY
  454.  
  455. After you have configured ACE for your system, if you have a RAMLink, you will
  456. have to configure it for ACE if you want to use RAMLink RAM or indirect REU
  457. access.  The way that ACE detects these types of memory is via the RL-DOS
  458. partition table.  For RAMLink RAM, ACE will check for partition number 31
  459. being a Foreign Mode (Direct Access) partition with the name "rl-ram".  If it
  460. is, then ACE will get the information for that partition to determine the size
  461. and start address (in RL memory).  It will then check the limit for usage of
  462. RL-RAM in the "config.sys" file, and adjust the size it can use accordingly,
  463. before initializing the memory.  To set up this partition on your RAMLink in
  464. the first place, refer to your RAMLink documentation and use the tools program
  465. provided with it.
  466.  
  467. Using REU (Ram Expansion Unit) memory with ACE is pretty easy; you just make
  468. sure it is plugged into the computer when ACE is started.  ACE will auto-
  469. detect the size of the REU and then check the configuration for limitiations
  470. on REU usage.
  471.  
  472. If you have your REU plugged into your RAMLink in the memory port (rather than
  473. the pass-through port), and you have the Normal/Direct switch thrown to the
  474. Normal position, then your machine cannot access REU memory in the usual way.
  475. The only way to access it is to go through the RAMLink.  ACE will look for
  476. partition number 30 being Direct Access and named "indirect-reu" for this
  477. purpose.  If your Normal/Direct switch is in the Direct position, then ACE
  478. will use the REU directly and will ignore the "indirect-reu" partition.  Do
  479. not change the position of the Normal/Direct switch while ACE is in action.
  480.  
  481. The tricky part here is in configuring your RAMLink.  You have to make sure
  482. that the memory allocated to the "indirect-reu" partiton is the memory of the
  483. REU.  RAMLink memory starts from $000000 and goes up to $FFFFFF.  REU memory
  484. will be at the very front of this memory (from address $000000), and the
  485. internal RAMLink memory will follow immediately after this.  For example, I
  486. have a 512K REU and an 8 Meg RAMLink, so my REU memory covers at RL addresses
  487. $000000-$07FFFF, and my internal RL memory covers RL addresses
  488. $080000-$87FFFF.  When partitioning the device, partitions are assigned memory
  489. from lower addresses to higher addresses.  So, starting with an empty RL (no
  490. partitions), you must create the "indirect-reu" partition first, followed by
  491. any RL-DOS partitions and the "rl-ram" partition.  You must also make sure
  492. that the "indirect-reu" partition is the same size as your REU.  512K is 2048
  493. blocks.  A note for deleting RL partitions: delete the ones that were last
  494. allocated first.
  495.  
  496. You have the option of installing or not installing either of these
  497. partitions.  If either is missing, ACE will simply work without it.  You'll
  498. want to be careful about throwing the Direct switch if you don't have your REU
  499. "protected" with an "indirect-reu" partition.  (with other REU applications
  500. also).  One note about using RAMLink memory: ACE can transfer data from it at
  501. a rate of 16 microseconds/byte (63,920 bytes/sec), but the cost of starting
  502. each transfer is 1 millisecond (which is absolutely terrible).  Comparatively,
  503. an REU will transfer at a rate of 1 microsecond/byte (1 Meg/sec), with a setup
  504. cost of about 60 microseconds.  So, you'll get the best performance out of
  505. your REU by accessing it directly, rather than indirectly through a RAMLink.
  506.  
  507. For internal memory, the 64 has only one 64K internal bank, whereas your 128
  508. can have either 2, 4, or 8 (128K, 256K, or 512K).  The internal 128 memory
  509. above 128K are accessed according to the articles in TwinCities-128 Magazine.
  510. Since I don't have expanded internal memory for my 128, I haven't been able to
  511. test the expanded internal memory code.  Hopefully, someone will let me know
  512. if it doesn't work.  If it doesn't, then set your configuration to disallow
  513. the use of the expanded internal memory.
  514.  
  515. When ACE starts, it determines the size of internal and REU memory by writing
  516. special values in the same locations of each bank and looking for readback
  517. failures or wrap-arounds.  However, after testing a bank, the original
  518. contents of the test locations are restored.  So, the testing process is
  519. completely non-destructive.
  520. ------------------------------------------------------------------------------
  521. 5. DEVICES
  522.  
  523. 5.1. COMMODORE CHARACTER DEVICES
  524.  
  525. These are regular Commodore character-oriented devices, which really only
  526. includes the printer right now.  The standard Kernal calls are made for
  527. all I/O.  These devices will behave the same way they always have.
  528.  
  529. 5.2. DISK DEVICES
  530.  
  531. 5.2.1. COMMODORE DISK DEVICES
  532.  
  533. Regular Commodore disk units are accessed in the same way as character-
  534. oriented Commodore devices, except that disk devices also support special
  535. operations such as directory listings.  The standard Kernal calls are
  536. used and so are the standard Commodore-DOS incantations for operations
  537. such as deleting (scratching) a file.  You can use the "dos" command of
  538. the command shell to send special Commodore-DOS commands directly to these
  539. devices.
  540.  
  541. 5.2.2. CMD DISK DEVICES
  542.  
  543. For CMD disk devices, support has been added to the kernel to request a
  544. "long-form" directory listing, including the date and time of last
  545. modification of all files.  This allows ACE to pass this information onto
  546. application programs that request a directory listing from the CMD device.
  547. Special support is also included for interpreting directory and pathnames.
  548. The rest of accessing CMD disk devices is handled exactly the same as for
  549. regular Commodore disk devices.
  550.  
  551. 5.2.2. RAMDISK DEVICE
  552.  
  553. The Ramdisk, as currently implemented, has one major restriction: flat
  554. filenames.  I.e., subdirectories are not currently supported.  To make
  555. up for this deficiency, you can have as many ramdisks active in the system
  556. as you like.  Setting a device to be a ramdisk in the system configuration
  557. is very easy: just change the device type code to the ramdisk type (code 4).
  558. When the system initializes, the kernel will scan the device configuration
  559. and initialize every ramdisk that you specify.  Each initialized empty ramdisk
  560. costs 512 bytes of far memory storage.
  561.  
  562. All of the standard disk device operations are supported for ramdisks, except,
  563. of course for "mkdir" and "rmdir", since subdirectories are not implemented.
  564. The operations include: open for read/write/append, read, write, binary-load
  565. (for loading programs), remove, rename, directory open & read, change
  566. directory (to device), "devinfo", and "isdir" (see the ACE-128/64 Programmer's
  567. Reference Guide for further descriptions of these operations).
  568.  
  569. The factory-default configuration for ramdisks is to have two of them: devices
  570. "m:" and "z:".  The intention is that you will use device "z:" for storing
  571. your often-used programs and "m:" for your general storage.  You can store
  572. executables on a ramdisk and they will load very quickly.  For this reason,
  573. the factory-default executable search path is "z:,a:", meaning that device
  574. "z:" will be checked before device "a:".
  575.  
  576. To get good use out of the ramdisks, it is recommended that if you have a 64
  577. then you also have an REU or some other memory expander.  Without any memory
  578. expansion, if you have disabled the soft-80 screen you will have 16K of far
  579. memory for storing ramdisk data and if the soft-80 screen is enabled, you will
  580. only have 6K.  With an REU, you can use all of the REU memory for a ramdisk if
  581. you wish.  On an unexpanded 128 you will have 70K or so for ramdisks.  Note
  582. that because of the "far memory" organization of ACE, the far memory can be
  583. used to store ramdisk data and any other type of far memory storage.  Memory
  584. utilization is dynamic so you don't have to reserve large chunks of far memory
  585. exclusively for a particular purpose.
  586.  
  587. As advertised at the top of this document, the ramdisk driver is capable of
  588. delivering a peak reading speed of about 1 megabyte per second.  This is for
  589. reading a big file that was written to the ramdisk in large chunks, where the
  590. file is stored completely in REU memory.  For a similar file stored completely
  591. in RAMLink memory, the reading speed will be around 56K/sec.  The writing
  592. speed of files will be approximately the same as for reading files, because of
  593. the way the data is organized: the limiting factor is the data transfer speed
  594. rather than system overhead.  The above figures are for a Fast-mode C128.  You
  595. should get comparable REU performace from Slow-mode or a 64 and about half
  596. the performance in Slow mode from a RAMLink.
  597.  
  598. I don't want to go into too many details, but to get such high performance,
  599. the ramdisk driver uses variable-sized disk blocks.  Each block can be between
  600. 256 bytes and 64K in size and includes 6 bytes of control information.  When
  601. you perform a write operation, the kernel will write the data out in the
  602. largest blocks possible without wasting space.  This way, when the data is
  603. read back in using a large "read" operation, very little control overhead is
  604. needed and the data can be transferred to internal memory in large chunks, and
  605. the aggregrated per-byte accessing cost is minimized, almost to the raw
  606. hardware-accessing speed.
  607.  
  608. Future expansion possibilites for this device include implementing
  609. subdirectories and implementing new types of memory which retain their
  610. contents between runs of ACE (but not power interruptions) so that you can
  611. have a "permanent" ramdisk similar to the way that RAMLink partitions work.
  612. As it is now, all ramdisks are erased when the system starts, so you have
  613. to copy necessary files to the ramdisks every time you reboot.
  614.  
  615. 5.3. SCREEN
  616.  
  617. 5.3.1. NORMAL SCREENS
  618.  
  619. The screen has a custom device driver for the 40-column (VIC) screen of both
  620. the C128 and C64 and the 80-column (VDC) screen of the C128.  Plans also call
  621. for a bitmap-eumulated 80-column screen for the C-64.  Because of the way
  622. that the system has been designed, new screen drivers just easily slip into
  623. place.
  624.  
  625. The custom screen driver includes support for the basic text output
  626. operation, as well as special full-screen accessing calls to allow for
  627. the simplified and standard implementation of full-screen programs, such as
  628. a text editor.  Such a program would be able to work on the 40-column C64
  629. screen as well as the 80-column C128 screen, with no modification.  The
  630. Commodore Kernal includes very little support for full-screen applications
  631. (only numerous control character codes).
  632.  
  633. For the regular output, only the screen characters and not the colors are
  634. used (normally), which allows scrolling to be twice as fast.  Outputing
  635. characters is also faster because fewer control characters are supported,
  636. no translations between PETSCII and screen codes needs to take place, and
  637. operations are optimized for speed (rather than ROM size).  The display
  638. character set has been rearranged to correspond to the PETSCII character
  639. codes, except for the "Commodore" characters.  The graphics characters have
  640. been re-thought for applications.  The screen driver also includes basic
  641. support for user-windows, which will be taken advantage of in future
  642. applications.
  643.  
  644. A prescrolling feature will be implemented later that will cut down on the
  645. number of times that the screen needs to be scrolled in order to display text
  646. on the screen if the text is printed in one big system call.  But, currently,
  647. this feature is not implemented.  Instead, the screen will be scrolled by a
  648. fixed number of lines every time that characters are printed to it (by the
  649. "write" system call).  For all screens but the soft-80 screen on the 64 with
  650. non-reu scrolling, the default for this is to scroll one line at a time.  For
  651. that screen, the default is to scroll eight lines at a time, to make up for
  652. its slow scrolling speed.
  653.  
  654. 5.3.2. BITMAPPED 80-COLUMN SCREEN FOR THE 64
  655.  
  656. This screen is implemented with a VIC bitmap and 4x8 pixel characters.  The
  657. screen maps into memory under the Commodore Kernal ROM.  The attribute bits of
  658. color values act as background color for color cells, and the color cells
  659. cover two character spaces, because of the VIC hardware.  Also, to cut
  660. corners, the window-resizing feature is not implemented for the soft-80
  661. screen.  You can only use the entire 80x25 display as a window.  There's not a
  662. whole lot else to say since it works pretty much like any other ACE screen.
  663.  
  664. Er, I should mention about the character set.  The one I have I came up with
  665. for a VIC-20 40-col screen program a long time ago but it may not be ideal for
  666. the smaller pixels of the 64.  I have selected the default screen colors
  667. (black on gray) to display the characters clearly.  It works best if you turn
  668. the brightness up on your monitor, to cut down on the pixel distortion of the
  669. 64 display.  If you come up with a better character set or screen color
  670. combination, please let me know.  The format of the character set in memory is
  671. a bit unusual.  Each character takes four consecutive bytes and there are, of
  672. course 256 characters.  The characters are in PETSCII order rather than
  673. screen-code order like on the regular 64 (the other character sets are in
  674. PETSCII order too).  The first byte of the four used to represent a character
  675. includes the first and second pixel rows of the character in the high and low
  676. nybble, respectively.  The other three bytes contain the pixel rows in a
  677. similar format.  If you use a standard 8-bit-wide character set editor, you
  678. may wish to write a program to convert from a normal format into my format
  679. for your custom character set.  I may change the format if I can find a
  680. different format that allows better performance.
  681.  
  682. 5.4. KEYBOARD
  683.  
  684. A custom keyboard scanner has been added also.  It supports a three-key
  685. rollover as discussed in C= Hacking NetMagazine Issue #6.  The key
  686. matricies will be extended to include a number of standard control characters
  687. for things like "page up," etc.  Key scanning has been completely taken over
  688. to implement the three-key rollover, and to avoid interference with the
  689. joystick in port #1.
  690.  
  691. There are a few new keyboard controls.  To temporarily pause a listing going
  692. to the screen, press the CONTROL key.  Output will resume when you release
  693. the key.  For the C128, the NO SCROLL key is supported in the normal way.
  694. On the 64, to achieve the same effect, press the RUN/STOP key while holding
  695. down the CONTROL key to pause output until you explicitly re-enable it.  To
  696. do this, just press NO SCROLL (128) or CONTROL-STOP (64) again.  On the 128,
  697. the CAPS key is supported in the normal way (with CAPS-Q fixed), and to
  698. activate caps lock mode on the 64, press COMMODORE-STOP, and press it again
  699. to release caps lock mode.  The key delay and repeat rates are not user-
  700. definable right now, but they will be.  Also, function keys will be
  701. application-definable (where the command shell can be considered an
  702. application).  Something that you may find odd is that the cursor color can
  703. be different from the character color.  Deal with it.
  704.  
  705. Full input line editing is supported.  Lines may be up to 248 characters long,
  706. including the carriage return.  You can delete the character before the cursor
  707. by typing DEL.  You can use the cursor LEFT and RIGHT keys to move the cursor
  708. on the current input line and any characters you type will be inserted before
  709. the character that the cursor is on.  CO-LEFT and CO-RIGHT (on the 128 with
  710. the upper cursor keys) move the cursor to the beginning and end of the current
  711. line.  CT-J and CT-K do the same thing.  When you wish to generate an EOF
  712. (end-of-file) signal from the keyboard, press CONTROL-D.  This will only work
  713. on an empty line; otherwise, you will get the CT-D character.
  714.  
  715. If you wish to edit and re-enter a previous line, press the cursor-UP key
  716. when the system prompts you for an input line.  This will recall the previous
  717. line.  You can press cursor-UP and DOWN to scan through all of the scroll
  718. buffer lines you have allocated in the configuration.  Buffering each line
  719. will cost you 256 bytes of far memory.
  720.  
  721. When you have selected a previous input line, you can edit it or re-enter it
  722. just like normal.  The instant that you change or enter the line, it becomes
  723. the current line.  Otherwise, if you don't change a previous line, then you
  724. can scroll back down to the current line you were working on before.  This is
  725. useful for checking some item on a previous line and then continuing with the
  726. current line.  When you scroll back to the end of the history buffer, the bell
  727. will ring if you try to scroll back any farther.  Blank lines are not entered
  728. in the scrollback buffer.  Also, all lines rather than just the command lines
  729. are saved (although I may reconsider this later).
  730. ------------------------------------------------------------------------------
  731. 6. COMMANDS
  732.  
  733. 6.1. BUILT-IN COMMANDS
  734.  
  735. The following subsections give the low down on all of the executable programs
  736. provided with ACE, including the system programs and external user programs.
  737. For each command, a synopsis is given, followed by the description.
  738. --------
  739. echo [arg ...]
  740.  
  741. Print the given arguments to stdout, with a space between each and a carriage
  742. return at the end of the line.
  743. --------
  744. clear
  745. cls
  746.  
  747. Clear the screen.  "cls" is the MS-DOS name and "clear" is the Unix name.
  748. This command simply emits a "form-feed" character to stdout.
  749. --------
  750. dir       [dirname]
  751. d         [dirname]
  752. ls        [dirname]
  753. clsl      [dirname]
  754.  
  755. Display a directory listing of the given directory or of the current directory
  756. if no "dirname" is given.  This command has so many varients because it is
  757. so useful.  "directory" and "dir" are synonymous and clear the screen before
  758. giving a long-form directory listing.  "d" gives a long-form directory listing
  759. without clearing the screen.  "ls" gives a short-form directory listing without
  760. clearing the screen, and "clsl" gives a short-form listing after clearing the
  761. screen.
  762.  
  763. Short-form listings include only the filenames of the files in the directory,
  764. whereas long-form listings include directory name, file permissions, date and
  765. time of last modification, length (in blocks*254 bytes), file type, and
  766. filename.  On 40-col displays, the date and time fields are omitted.  For
  767. technical reasons (because they are built-in and space is limited), these 
  768. commands will not actually display a real data and time.  You must use the
  769. external program "xls" to see real dates and times.
  770. --------
  771. cd [dirname]
  772.  
  773. Change the current working device and directory to the given directory name.
  774. If no directory name is given, change to the "home" (initial) directory.
  775. --------
  776. cat   [file ...]
  777.  
  778. Display the contents of the named files to stdout.  If no files are named,
  779. then input is taken from stdin (normally the keyboard).
  780. --------
  781. exit
  782. x
  783.  
  784. Exit from the command shell.  EOF on stdin (normally Control-D from the
  785. keyboard) has the same effect.  If the current command shell is the initial
  786. one started by the system (process #2), then ACE will exit back to BASIC.
  787. Otherwise, the command shell will exit back to the program that invoked it.
  788. --------
  789. dos command
  790. @   command
  791.  
  792. Give a Commodore-DOS command to the current device (OPEN1,dv,15..).  Both
  793. "dos" and "@" are exactly synonymous.
  794. --------
  795. path
  796. path dirname ...
  797.  
  798. Display or set the path to search for searching for external programs.  "path"
  799. alone on a command line displays the current search path, and "path" followed
  800. by arguments will set the search path to the following arguments.
  801. --------
  802. sh
  803.  
  804. Invoke a sub-shell.  Currently, arguments are not accepted.  The subshell will
  805. accept its commands only from stdin.
  806. ------------------------------------------------------------------------------
  807. 6.2. SYSTEM PROGRAMS
  808.  
  809. ace
  810.  
  811. This is the main loader.  It determines whether it is running on a 128 or a 64
  812. and then loads and runs either "ace128" or "ace64" below.
  813. --------
  814. ace128
  815. ace64
  816.  
  817. These are the kernel programs.
  818. --------
  819. config
  820.  
  821. The system configuration program.  This is not a user-executable program; it
  822. is loaded and executed while the system is bootstrapping.  This program loads
  823. the "config.sys" and "ace-charset" files, initializes the dynamically
  824. allocated memory, and sets the date.
  825. --------
  826. config.edit
  827.  
  828. The configuration editor written in BASIC.  LOAD and RUN it directly from
  829. BASIC.  Full-screen interface.  Same program runs on either a 128 or 64.
  830. --------
  831. sh
  832.  
  833. The command shell.
  834. ------------------------------------------------------------------------------
  835. 6.3. EXTERNAL PROGRAMS
  836.  
  837. cp [-f] file destfile
  838. cp [-f] file ... directory
  839.  
  840. A file copier.  Operates like the Unix file-copier program.  If you give two
  841. filenames, will copy the first file to the second name.  If a number of file
  842. names are given and the last argument is a directory name is given, will copy
  843. all of the files, retaining their names, into the given directory.
  844.  
  845. If a file that you want to copy to already exists, then you will be prompted
  846. for whether you want to overwrite the file: yes, no, all, or quit.  Answering
  847. Yes will overwrite the file, and continue onto the next file.  Answering No
  848. will abort copying the current file and continue onto the next file.
  849. Answering All will have the same action as Yes, except that it will never ask
  850. your permission again; it will always assume Yes.  Answering Quit will abort
  851. the entire copy operation without disturbing any more files.
  852.  
  853. If, on the other hand, you use the "-f" option (force), then the command will
  854. overwrite existing files without pestering you for permission.  Or, if the
  855. stdin file stream is not connected to the console, then the "force" option
  856. will be presumed.  I would really like to get a "-r" (recursive) option
  857. working.  Maybe in an "xcp" variant.
  858. --------
  859. rm file ...
  860.  
  861. File remover (scratcher).  All named files will be deleted.
  862. --------
  863. mv oldfile1 newfile1 ... oldfileN newfileN
  864.  
  865. File renamer.  For each pair of names, the old name will be changed to the
  866. new name.  If the new name already exists, then the program will report an
  867. error.  This uses the crufty Commodore rename DOS command, so don't even
  868. think about renaming a file that is not in the current directory or "moving"
  869. a file between directories.
  870. --------
  871. mkdir flatDirName
  872.  
  873. Create a new subdirectory in the current directory.  The given name must be
  874. "flat", i.e., it is just the name like "dirname", without any "/"s or ":"s.
  875. --------
  876. rmdir flatDirName
  877.  
  878. Remove an existing empty subdirectory in the current directory.
  879. --------
  880. xls [-[c][l]] dirname ...
  881.  
  882. Same as the built-in directory and ls commands, except this one will actually
  883. display real dates and times.  Also, this will display the number of files,
  884. number of file bytes, and number of bytes free at the end of a long-form
  885. listing.  The "-l" flag means to give a long-form listing; otherwise, a 
  886. short-form listing will be given.  The "-c" flag means to clear the screen
  887. before giving the listing.
  888.  
  889. The built-in directory listing commands will be removed from the command shell
  890. and be replaced with this one after I do more fiddling with the command
  891. shell.  Note that you can get a crude directory listing with "echo *".
  892. --------
  893. uuencode file ...
  894.  
  895. A uuencoder.  The uuencode program sends its output to stdout, so you will
  896. usually want to redirect stdout to a disk file.  This output will be in
  897. Petscii characters, to work with the other text utilities.  If you wish to
  898. have the output in Ascii, then you must run it through the "tr" program
  899. (below).
  900. --------
  901. uudecode file ...
  902.  
  903. A uudecoder.  The uudecode program will accept either Petscii or Ascii files
  904. and is able to extract multiple files from one input file.  Extracted files
  905. are put into PRG files.
  906. --------
  907. bcode [-help] [-v] [-u] [-m] [-l max_line_count] [filename ...]
  908.  
  909. Encode the given files into BCODE format.  This format, like uuencoded format,
  910. is used for transmitting binary information through a text-only medium.
  911. The "-help" flag is used to display "usage" information to stderr.  The command
  912. will exit after encountering the flag, before doing any work.
  913.  
  914. The "-v" flag means to give "verbose" information about what is going on.
  915. The "-u" and "-m" flags instruct bcode to output in either Unix (Ascii-Lf)
  916. or MESS-DOS (Ascii-CrLf) format.  The default is good ole Petscii.
  917.  
  918. The "-l" flag and value allows you to specify the maximum number of bcoded
  919. lines to include in each segment of the bcoded data.  When this flag is used,
  920. output is sent to special output files rather than to stdout (where it is
  921. usually sent).  One segment is sent to each special output file.  These special
  922. output files are named after the file being encoded, appended with a ".b"
  923. followed by the at-least-two digit segment number.  If the full name would
  924. exceed 16 characters, the "basename" is truncated.  If the source file
  925. includes a path, the path is ignored and the special file is put in the current
  926. directory.  For example,
  927.  
  928. bcode -l 800 b:junkfile
  929.  
  930. would put the bcoded segment data into "junkfile.b01", "junkfile.b02", ...,
  931. "junkfile.b99", "junkfile.b100", etc., in the current directory.  Each line of
  932. bcoded data contains 72 characters (which represent 54 raw data bytes), so 800
  933. lines will produce 59200 bytes of output (counting CR and LF at the end of
  934. each line), which is a good size for posting or for mailing to brain-damaged
  935. mailers (under 64K).  The max_line_count does not include the two control
  936. lines in the bcode format.
  937.  
  938. If you include filenames on the command line, then input will be taken from
  939. them in turn.  Otherwise, input will NOT be taken from stdin and no work will
  940. be done.  You may include many filenames (and associated aliases) on a command
  941. line to create a BCODE archive (which should be suffixed ".bca").
  942.  
  943. If you specify that a file is to be broken into multiple segments for encoding,
  944. then last segment may be of zero length.  This is not an error and will be
  945. decoded correctly, although it may be a bit of a pain.
  946. --------
  947. unbcode [-help] [-i] [-v] [-d] [filename ...]
  948.  
  949. This is a full-blown BCODE decoder.  It will read BCODE data from files named
  950. in any order and reconstruct the original binary files that were encoded using
  951. the BCODE program above.  If the "-help" flag is specified, usage information
  952. will be given and the program will exit.
  953.  
  954. The three other flags are used to request different levels of operational
  955. information: informative, verbose, and debugging.  Informative messages
  956. include when a file is completely pieced back together, verbose information
  957. includes when a file is opened or closed, and debugging information includes
  958. a dump of the internal "have" table that keeps track of which segments of
  959. which files the decoder currently has.  Currently, informative and verbose
  960. information is hard-wired on.
  961.  
  962. Intermediate segments are decoded immediately and placed into temporary files
  963. in the current directory with names like "0BC00001", with different numbers.  
  964. These files are created and deleted as needed.  Between runs, if there are
  965. any files that have not yet been completely pieced together, the "have"
  966. information is saved into "0BC-STAT", which can be listed to see what is in
  967. the temporary files and which segments of the files are missing.  An example
  968. of its contents would be:
  969.  
  970. 00001-00001  beg  0000001223  0BC00002  filea
  971. 00001-00001  beg  0000540122  0BC00004  fileb
  972. 00003-00003  mid  0000002832  0BC00001  fileb
  973. 00005-00005  end  0000000023  0BC00003  fileb
  974.  
  975. The first two columns with the dash between indicate the range of segment
  976. numbers that are contained in the temporary file.  The next column gives the
  977. interpretation of the temporary file, indicating if it is the beginning,
  978. middle, or the end of the complete file being decoded.  The next column gives
  979. the length of the temporary data (used for error recovery).  The next column
  980. gives the name of the temporary file, and the final column gives the name of
  981. the file that the "fragment" belongs to.
  982.  
  983. The fact that the status of decoding is kept between runs means that you don't
  984. have to have all of the segments of the final file(s) present at any one run.
  985. Error checking is performed on each segment as it is being decoded, and if an
  986. error is encoutered, the segment will be ignored.  Because of the "incremental
  987. decode" feature, you can obtain correct copies of the segments that were
  988. found to be in error before and run them through again.
  989.  
  990. This program will recover from all errors in the input data, including one
  991. tricky case that the C unbcode program released earlier before could not.
  992. The only ways that things can get fowled up are if unbcode has access
  993. problems to the temporary files, or if you STOP the program at an inopportune
  994. time.  To recover from all errors, you just have to delete all of the "0BC"
  995. temporary files, including "0BC-STAT".
  996.  
  997. During decoding, this program will overwrite existing "0BC" files or files
  998. being decoded.
  999. --------
  1000. crc32 file ...
  1001.  
  1002. CRC32 *B* generator.  The numbers generated by this program match CRC32 value
  1003. generated by other programs, such as PKZIP and ZMODEM.  This program is used
  1004. to verify that files have been transported from place to place correctly.
  1005.  
  1006. The program uses a table-driven byte-oriented algorithm, so it executes faster
  1007. than the older (crc32a) program.
  1008. --------
  1009. crc32a file ...
  1010.  
  1011. CRC32 *A* generator.  The numbers generated by this program DON'T match the
  1012. CRC32 generated by other programs, such as PKZIP.  However, it will always
  1013. match itself.  The program uses a brute-force bitwise algorithm, so it is
  1014. relatively slow.  The program is included for hysterical (er... historical)
  1015. reasons.
  1016. --------
  1017. wc file ...
  1018.  
  1019. Word counter.  Counts the lines, words, and characters in a file.  To count
  1020. lines, the program simply counts carriage returns (code 13 decimal).  A word
  1021. is any non-whitespace character(s) between whitespace characters.  Whitespace
  1022. is defined as the characters SPACE, TAB, and RETURN (codes 32, 9, and 13
  1023. decimal, respectively).  If multiple files are specified, totals will be
  1024. reported.
  1025. --------
  1026. grep [-[i][v]] [^]substr[$] file ...
  1027.  
  1028. The "i" and "v" flags are optional.  "i" means to ignore the case of letters
  1029. in comparisons and the "v" means to invert the search - display lines that
  1030. do not match the pattern.
  1031.  
  1032. The substring may begin with "^" which means only to check for the string
  1033. at the beginning of a line, and may end with "$" which means only to check
  1034. for the string at the end of a line.  Both "^" and "$" may be used at the
  1035. same time.  There is no escape character, so you'll have problems trying to
  1036. seach for the two anchor characters in the files.
  1037.  
  1038. One or more files may be specified to be searched.  If more than one file,
  1039. then the name of the file will preceed each line printed that matches.
  1040. Output goes to stdout.  Some examples follow:
  1041.  
  1042. grep hello hello_world.c
  1043. grep -v '^$' file1 >file1.noblank
  1044. grep -i crAiG Hack*
  1045. grep -iv 'the$' file2
  1046.  
  1047. The first example simply searches for the string "hello".  The second example
  1048. removes all blank lines from the input file.  The third example searches the
  1049. Hack1, Hack2, Hack3, Hack4, and Hack5 files (for example) for the word "craig"
  1050. which can be in any case (eg. "Craig" would match).  The fourth example
  1051. displays all lines that do not end with the word "the" in any case (eg. the
  1052. second line of this paragraph would be omitted).
  1053.  
  1054. Some limitations of the program are: only the first 2048 characters of a
  1055. (really long) line will be considered, lines may not contain the character
  1056. code $00, and the last line of the file must end with a RETURN (or it will be
  1057. ignored).
  1058. --------
  1059. tr [-fromset2toset] file ...
  1060.  
  1061. Translate files from one character set to another.  Character sets supported
  1062. are: Petscii, Ascii-CrLf (MS-DOS), Ascii-Lf (Unix), Ascii-Cr, and SpeedScript.
  1063. "fromset" and "toset" in the synopsis above may be any of: "p" (Petscii), "a"
  1064. (Ascii-CrLf), "al" (Ascii-Lf), "ac" (Ascii-Cr), "s" (SpeedScript), "c"
  1065. (Commodore == Petscii), "u" (Unix == Ascii-Lf), or "m" (MS-DOS == Ascii-CrLf).
  1066.  
  1067. The the character set specifiers are separated by the character "2" (meaning
  1068. "translate to").  If the translation specification argument is missing, the
  1069. default of translating from Ascii-CrLf to Petscii is used.  Input is taken
  1070. from the files and all output goes to stdout in order.
  1071.  
  1072. Example:
  1073.  
  1074. tr -s2u file1 >file1.unix
  1075.  
  1076. Translate from SpeedScript format to Ascii-Lf (Unix) format the contents of
  1077. "file1" and put into file "file1.unix".
  1078.  
  1079. The name "tr" is used (a Unix utility) because the functionality of this
  1080. program will grow to include that of the Unix "tr" utilitiy.
  1081. --------
  1082. sort [-[i][v]] [+column] file ...
  1083.  
  1084. Sort utility.  Currently uses a sucked-out insertion sort algorithm.  Will be
  1085. extended to use the "Approximation Sort" algorithm, which has between O(N) and
  1086. O(N^2) performance (close to O(N) for random data).  Makes use of dynamically
  1087. allocated memory to store large files internally.
  1088.  
  1089. The "i" and "v" flags are optional.  "i" means to ignore case of letter
  1090. characters in comparisons to determine order.  The "v" flag means to inverse
  1091. the order of sorting (put into descending order rather then the usual
  1092. ascending order).  The +col field is optional, and if present, gives the
  1093. character position of the start of the sorting key.  The default starting
  1094. position is 1 (the beginning of the line).  A TAB character will be
  1095. interpreted as any other character.
  1096.  
  1097. If multiple files are specified, they will all be merged together and then
  1098. sorted as a group.  Sorted output goes to stdout.  If the program dies in the
  1099. middle of its operation (eg. out of memory), all files owned by the program
  1100. (process) will be closed and all memory allocated to the program will be
  1101. reclaimed.  This is also true for all other external programs, since this is
  1102. implemented in the kernel.
  1103. --------
  1104. wrap file ...
  1105.  
  1106. This is like the cat command, except that lines longer than 75 characters
  1107. will be word-wrapped into multiple lines.
  1108. --------
  1109. date
  1110.  
  1111. Display the current date.  The format is: "YYYY/MM/DD-HH:MM:SS.T", in 24-hour
  1112. time format.  This command will be extended to display in "human mode"
  1113. (eg. "Tue-13-Jul-1993  05:49:53 pm") and to allow you to set the date.
  1114. Currently, the date will only be set when the system starts up.
  1115. --------
  1116. forty
  1117.  
  1118. Switch to the 40-column (VIC) screen on the 128.  This also switches the
  1119. processor into slow mode.
  1120. --------
  1121. eighty
  1122.  
  1123. Switch to the 80-column (VDC) screen on the 128.  This also switches the
  1124. processor into fast mode.  This command will also be used to switch to the
  1125. soft 80-col screen of the 64 when that feature is implemented.
  1126. --------
  1127. read file ...
  1128.  
  1129. File reader.  Useful only for testing how long it takes to read a file.
  1130. No output is generated.
  1131. --------
  1132. mem
  1133.  
  1134. Display bytes of dynamically allocated memory that are still free.  Also
  1135. displays a map of the pages allocated on the most recently used bank and
  1136. the process number of the mem program.
  1137. --------
  1138. as file
  1139.  
  1140. DEMO assembler still under development.  Only the tokenizer is implemented.
  1141. It will scan through the given file and spit out reams of tokens in the example
  1142. formats:
  1143.  
  1144. i:hello,=
  1145. c:=
  1146. n:87125
  1147. s:Now is the time
  1148.  
  1149. where the "i" line gives an identifier and the character following it, the "c"
  1150. line gives an uninterpreted character, the "n" line gives an interpreted
  1151. number (it accepts 32-bit numbers in decimal, hexadecimal, and binary), and
  1152. the "s" line gives a character string that was enclosed in quotes.  The
  1153. tokenizer is designed to be very efficient (although it currently can only
  1154. operate as fast as the Commodore Kernal CHRIN function).
  1155.  
  1156. Plans for this project include a one-pass assembler that will use dynamic
  1157. memory to be able to do very large assembles, with full support for 32-bit
  1158. quantities, conditional assembly, macros, and eventually linkable code.
  1159. --------
  1160. vi [file ...]
  1161.  
  1162. DEMO of ZED: displays the main screen, reads the named file into memory,
  1163. and prints it, soft-wrapped to the screen length, to stdout.  It is called "vi"
  1164. here (to use a grotesque misnomer) to avoid name conflicts since you may
  1165. already have a file named "zed" in your ACE directory (like I do).  The new
  1166. ACE-Zed will have more fundamental features than the original Zed-128 program,
  1167. including auto-wrap lines, unlimited line length, horizontal scrolling to 240
  1168. characters, character-oriented commands rather than line-oriented, and
  1169. multiple file buffers with split-screen disply.  Plus, it will also work on
  1170. the 40-col screen of the 128 and on the C-64.  Big plans.
  1171. --------
  1172. hello
  1173.  
  1174. This is just a dippy little program that prints out a "hello world" message.
  1175. It is included so programmers may examine it and its source file to see how
  1176. simple ACE programs are organized.
  1177. --------
  1178. window [columns [rows [startColumn [startRow]]]]
  1179.  
  1180. Sets the window size.  If no arguments are give, it will report the current
  1181. window dimensions.  If one or more arguments are given, they will be used as
  1182. window arguments as above.  Missing arguments will be taken from the current
  1183. window's settings.  Screen coordinates start at column 0 of row 0 and go to
  1184. the full size of the screen.  You will get an error message if you try to set
  1185. up an illegally sized window and the current window will remain unchanged.
  1186. After successfully setting a window, it will be filled with a checkerboard
  1187. pattern to indicate the size of the window.  Just clear the screen to get rid
  1188. of this.
  1189. --------
  1190. more file ...
  1191.  
  1192. Full-screen file viewer.  At the prompt, press SPACE to view the next
  1193. screenful of a file, RETURN or cursor-DOWN to view the next line, N to go onto
  1194. the next file to be viewed, or STOP or Q to exit the viewer.  Future expansion
  1195. possibilities include a "go back" command and an ASCII-translation mode.
  1196. --------
  1197. unkar file ...
  1198.  
  1199. KAR (Kevin's ARchiver) dearchiver, intended to be used for extracting the ACE
  1200. source code, although you may find this archiver format useful for your own
  1201. purposes.  Gotta put together a "kar" encoder.  Unfortunately, encoding will
  1202. be a two-pass operation.
  1203. ------------------------------------------------------------------------------
  1204. 7. LATER, DUDE
  1205.  
  1206. To-Do List:
  1207.  
  1208. - Get the ACE version of Zed going.
  1209. - Re-organize the RAM0 memory to make more free for applications.
  1210. - Fix up the shell-script features of the command shell, autoexec feature.
  1211. - Allow optional "permanent" ramdisk data with specially reserved REU and
  1212.   expanded-internal memory and RAMLink partition.
  1213. - Add hierarchical directories to the ramdisk and complete its implementation.
  1214. - Add windowing to the soft-80 screen.
  1215. - Complete the prescrolling feature.
  1216. - Incorporate limited 128-mode burst support & adapt Little Red Reader for ACE.
  1217. - Put limited graphics support into the kernel & adapt VBM bitmap viewer.
  1218. - More work on the assembler ("aceSembler ?").
  1219. - Trim down the kernel size.  It has acquired a bit of "software bloat".
  1220.  
  1221. This system is Public Domain Software.  It is not required, but it would be
  1222. appreciated if people who use this software regularly would send a postcard
  1223. featuring a picture of some local attraction/scene to the following snail-mail
  1224. address.  You only have to do this once.  You can send me money too, if you
  1225. want, but this is strictly optional.  My new semi-permanent address is:
  1226.  
  1227. Craig Bruce
  1228. 4-249 Cedarbrae Ave.
  1229. Waterloo, Ontario
  1230. Canada, N2L 4S8
  1231.  
  1232. If you have questions, comments, suggestions, or bug reports, you can contact
  1233. me at the following e-mail address.
  1234.  
  1235. Keep on Hackin'!
  1236.  
  1237. -Craig Bruce
  1238. csbruce@ccnga.uwaterloo.ca
  1239. "Mental Inertia: A mind in motion will tend to stay in motion, and a mind at
  1240.  rest will tend to stay at rest, unless acted upon by some outside kick in
  1241.  the ass."
  1242. ------------------------------------------------------------------------END---
  1243.