refactor_121106

Rename Environment.hs to CmdEnvironment.hs, because it makes more sense.
Move Main.hs to its own directory, keep the library source clean(er).
Make this a proper shell script with the hash-bang. Works better this
way under mingw.
checkpoint_121106
checkpoint_121107

Refactored how emulator-specific command dispatch is done, because the
original approach did not work.

Note that if the Machine.EmulatedProcessor record ever changes, the
destructuring in Main.hs has to be updated. But this'll be really
obvious... but dynamic dispatch does appear to work.

Also added Machine.NullProcessor just for testing purposes, which is how
I discovered that the type class way of doing emulator-specific command
line dispatching didn't work.

Converted files over to Unix line termination...
checkpoint_121108

Initial disassembler capability.
checkpoint_121114

Made disassembler output look more like a disassembly, rather than
spewed Haskell types.

- Heavily polymorphic types in Machine.DisassemblerTypes to implement a
  reasonably generic interface to disassemblers.

- Started support for pseudo-ops, e.g., assember directives, for more
  robust data-driven disassembly.
hack_121116

Giving fclabels (lenses) a shot to see how that makes things easier, as a
lot of people claim.
checkpoint_121116

Interim commit.
Merge branch 'master' of https://github.com/bscottm/emuwork

Conflicts:
	src/Machine/DisassemblerTypes.hs
checkpoint_121116

Added symbolic labels for DJNZ and JR (relative jumps), plus an initial
symbol table for the TRS-80 ROM disassembly.
checkpoint_121120

More cool TRS-80 level II ROM disassembly hacks. Outputs strings, byte
sequences, ...
checkpoint_121121

A littel frobbing to unify how Z80 operands are represented, prefer
Data.ByteString.Lazy.Char8 and more 0xed-prefixed instructions.
checkpoint_121122

More frobbing.
checkpoint_121126

DD and FD prefix instructions can disassemble, except for DDCB and FDCB,
which are a little weird. Implemented a few more pseudo instructions.
high_bit_char

Added a Z80 disassembler primitive that outputs a byte expression for
characters with the high bit set. Useful for reading the BASIC
interpreter's verb table, where the first character of each verb has the
high bit set.

Also added a jump table generator, which requires a lot less typing for
diassembler guidance.
type_family_disassembler

Use type families to provide better abstraction for disassemblers.
clean up LANGUAGE directives

Ensure that each source file has only the GHC LANGAUGE directives
needed. emuwork.cabal no longer has any default-extensions.
cabal uses library

Avoid recompiling the world+dog, use the library to link the executables
from within the same cabal file. This requires that all of the code
required to link is actually present in the library...

More touching up Control.Lens.

Also, disassembly output uses foldr', which reduces memory pressure and
avoids using Data.Sequence's ViewL.
checkpoint_121129

Make life more symmetric by converting the disassembly sequence into a
ByteString sequence for output. Then traverse_ in the IO monad to send
the result to a file handle. Much less GC pressure than converting the
disassembly sequence into a really large ByteString, althgouh, this
could still be done.

Each line in the output is a single element in the Seq ByteString.

Also discovered a few new pieces of TRS-80 ROM functionality, including
single precision floating point constants. Separated out the known
symbols and disassembler guidance code to simplify structure.
checkpoint_121203

- Add more files to ignore (VIM swp files)
- Add more known symbols based on Ira Goldklang's TRS-80 pages.
- Be more Haskell-idiomatic in highbitTable, use existing functions and
  combinators for better data flow.