VIC Word Processing, Disks, And Machine Language
I am presently trying to learn machine language (ML); to this end, I bought the HES MON ML monitor. The problem is that I have been unable to use labels with it, and was wondering if it is possible to do so. (I have been unable to find a VICMON anywhere, so I have no means of comparing the two - does the latter allow the use of labels?) I would also really appreciate an explanation of precisely what zero-page memory is, and which sections of it can be used by an ML program without affecting the operating system. (Leventhal's 6502 Assembly Language Programming doesn't deal with such particulars, and it's hard to get an understanding of them by simply perusing the memory maps.)
I also want to use the VIC as a word processor. I will, of course, need a disk drive and a printer, but I'm not sure that I want to use the Commodore products in either case. In regard to the drive, it probably would be wisest to get the 1541, but I was wondering if I could get more for my money if I were to buy a bare Tandon or Pertec, or a used Apple drive for $200 or so and do the rest myself. In other words, would the task of interfacing and writing a DOS be excessively difficult, considering that the 1541 goes for only $340?
As for the printer, this is more difficult: I would obviously like to get a letter-quality printer, but my budget can't go much beyond $350. So I've been thinking about getting a used I/O Selectric and interfacing it to the VIC. An article in the April and May 1981 issues of Radio-Electronics described the general process, and it doesn't seem too difficult - besides, it looks like fun!
Jim Butterfield replies...
1. Most monitor systems are composites of utilities: assembler, disassembler, fill, hunt, display, etc. HES MON, VICMON, SUPERMON, and similar packages contain "nonsymbolic" assemblers; that is, you cannot use labels. These are not sold as assembler packages.
These assemblers, I should point out, are effective in reducing transcription and lookup errors; for small programs they can be quick and useful; backward branches can be entered by inspection; forward branches can be guessed, then reentered when the actual address is established; they make no special demands for memory space or disk facilities.
But a big assembler is a whole other thing, and worth the cost when you start writing programs that are over, say, 30 instructions long. In my opinion, their major advantage is this: since you keep source code, you can make program changes without the need to type in all the coding once again. A big program will probably need several rewrites; a full (symbolic) assembler is very valuable at that time. However, I like to keep beginners closer to the machine code and encourage nonsymbolic assemblers for early learning programs.
2. Zero-page memory is memory that extends from hex addresses 0000 to 00FF (the first two digits represent the "page"). It's important for three reasons:
a. (minor reason) There's an addressing mode that allows faster and more compact access to zero page than to other parts of memory. Not too important; time and space are seldom urgent machine language program considerations.
b. (major reason) A major method of "reaching" information anywhere in memory is indirect addressing, more specifically, indirect indexed addressing. This addressing mode needs to hold its indirect address in zero page. Zero page is in short supply; many users like to "conserve" the area for indirect address usage.
c. (pragmatic reason) The operating system uses zero page a good deal for BASIC and for interrupt processing. To keep the operating system healthy, you need to respect the important usage areas. Many users (who want lots of zero page) "swap out" little-used memory for their ML programs, and put it back before returning to BASIC.
Most 6502 reference books deal with the chip "in a vacuum" - not connected to a real system. Thus, you get no hint as to where programs should be placed, how to invoke input and output, and how the monitor systems work. This makes it very difficult for the beginner - that first step is a big one.
A recent book, Machine Language for Beginners, by Richard Mansfield (COMPUTE! Books), does deal with these problems on a variety of machines and may offer more help in this area. This is not said as a review or as an endorsement, but the book does approach the microprocessor as seen within its computer environment to a greater extent than previous publications 1 have seen.
3. I have a strong bias towards the manufacturer's product line on disk systems. You can go other ways; but commercial products, and club distributions, are likely to heavily favor these format disks. Building your own interface and writing your own DOS is not a trivial task; if it's a challenge you would enjoy, go for it. If your objective is to get a system up and running in reasonable time, reconsider.
Many computer hobbyists have adapted Selectric. devices; some have complained that the machines are not durable, having been designed for a lighter duty cycle than is found on computer word processors. Check with user groups for their reaction.