This is an attempt to document the Berkeley changes to SPIMSAL as used in the EECS Instructional environment. Please amend as necessary, and whenever you make new changes. Originally written 21 August 1999 by Brian Gaeke . Last revised: $Date: 2001/06/04 23:43:47 $ * Bison will appear to successfully compile the SPIM parser.y, but the resulting parser will not work (loops infinitely at the end of each file.) You *must* use Berkeley or AT&T YACC to compile the SPIM parser.y, not Bison. * Jeremy Lin added "clear console" and "reload" options to xspim. * Makefile changes to work on Solaris/SPARC. * 'dumpnative' command dumps in the local byte order of the host you're on. 'dump' dumps in big-endian (network) byte order. Both commands now take an optional argument, which is the filename to dump to if the default "spim.dump" is not desired. * Phil Buonadonna's changes to make it compile under Cygwin b20 have been checked in. * A couple of changes to spim.h in prototypes, to allow for compilation under Linux (it already compiles fine under Solaris/x86, and with some warnings under HP-UX.) * Fixed a bug in the interface between spim and the flex scanner where if you tried to load a file (e.g., trap.handler) and then read from stdin it would use the wrong file descriptor and abort with "input in flex scanner failed". This involved adding some calls, as described in the flex man page, to destroy and re-create buffers when new filehandles are passed to scanner.l:initialize_scanner(). This was necessary to use flex 2.5.4 to compile the scanner (the scanner we were using dated from 1990!) * 'dump' command dumps text segment in network byte order to file 'spim.dump' in current working directory. * Changes to Makefile/build process to look in /usr/sww for things and to put the trap handler under ~cs61c, and generally to help build under the Instructional environment(s). * Changes to buttons.c to allow 'set value' to use chars as values, in xspim. Use 'a' (incl. single quotes) to set a register to 97, for example. * inst.c includes assert.h, and next_text_pc is made global for use by 'dump'. * In inst.c:print_inst(), the buffer size for printing instructions has been increased from 128 bytes to 3 Kbytes. This is a partial workaround for a very common spim core dump caused by a buffer overflow. * In mem.h, the memory-mapped IO region has been moved from 0xbfff0000 to 0xffff0000. (IO_BOT and IO_TOP functions changed.) * In memio.c, the READY and INTER bits have been moved to the least-significant and second-to-least-significant bits, respectively; also the resetting of the status bits has been changed to only modify the appropriate bits, when necessary (instead of clearing the entire control register when some device becomes unready.) Also, the keyboards now do not become unready when written to. * In memio.c, the BUF_ADDRs (memory-mapped data registers) for all memory-mapped I/O devices have been moved BEFORE the STAT_ADDRs (memory-mapped control registers), as opposed to their original configuration. The new mapping is: Keyboard 1 data register 0xffff0004 Keyboard 1 control register 0xffff0000 Display 1 data register 0xffff000c Display 1 control register 0xffff0008 Keyboard 2 data register 0xffff0014 Keyboard 2 control register 0xffff0010 Display 2 data register 0xffff001c Display 2 control register 0xffff0018 Clock control register 0xffff0020 * A futile attempt to update Tests/tt.memio.s was made. * In parser.y, support for explicitly specifying the starting text and kernel-text segment starting addresses (.text ADDR and .ktext ADDR) has been added. * In run.c, we look for "EXIT_SYSCALL" (10) instead of "EXIT_NOW_SYSCALL" (13) when processing the "done" macro. $Id: CHANGES.UCB,v 1.9 2001/06/04 23:43:47 spim Exp $