diff --git a/ChangeLog b/ChangeLog
index aca800c8cf63730fa7d1834d53a49f923821a915..289460c7ca08da5f75d0ad2e42a85c5a97d73da4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -341,5 +341,8 @@
 	* Fix broken 'clean' target on z80sim configurations
 	* Re-structure arch/z80 to provide support for all ZiLOG 8-bit microcontrollers (ez8
 	  in particular for now).
+	* Add support for TRS80-Model 3 based on the xtrs emulation (http://www.tim-mann.org/xtrs.html)
+	  Per patch from Jacques Pelletier.
+
 
 
diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html
index 90d8dd1a0c506d5464db268cf225ac707e903454..a2a4803a38d190b40e538a402f4d95e0b6a5b826 100644
--- a/Documentation/NuttX.html
+++ b/Documentation/NuttX.html
@@ -995,6 +995,8 @@ nuttx-0.3.9 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
 	* Fix broken 'clean' target on z80sim configurations
 	* Re-structure arch/z80 to provide support for all ZiLOG 8-bit microcontrollers (ez8
 	  in particular for now).
+	* Add support for TRS80-Model 3 based on the xtrs emulation (http://www.tim-mann.org/xtrs.html)
+	  Per patch from Jacques Pelletier.
 
 pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
 
diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html
index fcf74416c5692189c3f8646979a4ca7db3be5d54..c84fa4fe105cc70980afc9c930885947ebc50966 100644
--- a/Documentation/NuttxPortingGuide.html
+++ b/Documentation/NuttxPortingGuide.html
@@ -16,7 +16,7 @@
   </b></big></h1>
   <p><small>by</small></p>
   <p>Gregory Nutt</p>
-  <p><small>Last Update: February 11, 2008</small></p>
+  <p><small>Last Update: February 15, 2008</small></p>
 </center>
 
 <center><h1>Table of Contents</h1></center>
@@ -442,7 +442,7 @@
         z80 instruction simulator.
         The set simulator  can be found in the NuttX CVS at
         http://nuttx.cvs.sourceforge.net/nuttx/misc/sims/z80sim.
-        This port also the SDCC toolchain (http://sdcc.sourceforge.net/")
+        This port also uses the SDCC toolchain (http://sdcc.sourceforge.net/")
         (verified with version 2.6.0 and 2.7.0).
       </li>
 
@@ -590,7 +590,7 @@
 <h3><a name="supportedboards">2.3.3 Supported Boards</a></h3>
 <p>
   All of the specific boards supported by NuttX are identified below.
-  These the the specific <i>&lt;board-name&gt;</i>'s that may be used to configure NuttX
+  These are the specific <i>&lt;board-name&gt;</i>'s that may be used to configure NuttX
   as described <a href="#configuringnuttx">below</a>.
 </p>
 <ul>
@@ -637,15 +637,21 @@
     This port is not quite ready for prime time.
   </li>
 
+  <li><code>configs/xtrs</code>
+    TRS80 Model 3.  This port uses a vintage computer based on the Z80.
+    An emulator for this computer is available to run TRS80 programs on a 
+    linux platform (http://www.tim-mann.org/xtrs.html).
+  </li>
+
   <li><code>configs/z16f2800100zcog</code>
-    z16f Microncontroller.
+    z16f Microcontroller.
     This port use the Zilog z16f2800100zcog development kit and the
     Zilog ZDS-II Windows command line tools.
     The development environment is Cygwin under WinXP.
   </li>
 
   <li><code>configs/z8encore000zco</code>
-    z8Encore! Microncontroller.  This port use the Zilog z8encore000zco
+    z8Encore! Microcontroller.  This port use the Zilog z8encore000zco
     development kit, Z8F6403 part, and the Zilog ZDS-II Windows command line
     tools.  The development environment is Cygwin under WinXP.
   </li>
@@ -994,7 +1000,7 @@ The system can be re-made subsequently by just typing <code>make</code>.
 <p><b>Inputs:</b></p>
 <ul>
   <li><code>tcb</code>: Refers to a task in the ready-to-run list (normally
-    the task at the the head of the list).  It most be
+    the task at the head of the list).  It most be
     stopped, its context saved and moved into one of the
     waiting task lists.  It it was the task at the head
     of the ready-to-run list, then a context to the new
@@ -1293,7 +1299,7 @@ The system can be re-made subsequently by just typing <code>make</code>.
 </ul>
 
 <p>
-  Some architectures require a description of the the RAM configuration:
+  Some architectures require a description of the RAM configuration:
 </p>
 <ul>
   <li><code>CONFIG_DRAM_SIZE</code>:
@@ -1301,7 +1307,7 @@ The system can be re-made subsequently by just typing <code>make</code>.
   <li><code>CONFIG_DRAM_START</code>:
     The start address of DRAM (physical)</li>
   <li><code>CONFIG_DRAM_VSTART</code>:
-    The startaddress of DRAM (virtual)</li>
+    The start address of DRAM (virtual)</li>
 </ul>
 
 <p>
diff --git a/arch/z80/include/io.h b/arch/z80/include/io.h
new file mode 100644
index 0000000000000000000000000000000000000000..ce6a90ab5b94f373b2b460c115dac2f320b2f7f6
--- /dev/null
+++ b/arch/z80/include/io.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+ * arch/z80/include/io.h
+ * arch/chip/io.h
+ *
+ *   Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ *   Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ *    used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+#ifndef __ARCH_IO_H
+#define __ARCH_IO_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <arch/chip/io.h>
+
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Variables
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C" {
+#else
+#define EXTERN extern
+#endif
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif /* __ARCH_IO_H */
diff --git a/arch/z80/include/z80/io.h b/arch/z80/include/z80/io.h
new file mode 100644
index 0000000000000000000000000000000000000000..dc74d047e97a371100dbb176ff7c02e13b16c25c
--- /dev/null
+++ b/arch/z80/include/z80/io.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+ * arch/z80/include/z80/io.h
+ * arch/chip/io.h
+ *
+ *   Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ *   Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ *    used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+/* This file should never be included directed but, rather, only indirectly
+ * through arch/io.h
+ */
+
+#ifndef __ARCH_Z80_IO_H
+#define __ARCH_Z80_IO_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+/****************************************************************************
+ * Inline functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Variables
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C" {
+#else
+#define EXTERN extern
+#endif
+
+EXTERN void outp(char p, char c);
+EXTERN char inp(char p);
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif /* __ARCH_Z80_IO_H */
diff --git a/arch/z80/src/Makefile.sdcc b/arch/z80/src/Makefile.sdcc
index 89278d894a7559354428d8f4f3d72f323530d4ee..51751be8514f600241225e3c0a24bd0b5bf0d8d0 100644
--- a/arch/z80/src/Makefile.sdcc
+++ b/arch/z80/src/Makefile.sdcc
@@ -153,8 +153,16 @@ pass1.ihx: up_mem.h asm_mem.h $(SDCCLIBDIR)/myz80.lib $(HEAD_AOBJ) board/libboar
 		echo "-l $(TOPDIR)/$$LIB" >> pass1.lnk ;\
 	done
 	@echo "-l myz80.lib" >>pass1.lnk		# Name of SDCC z80 library
+ifneq ($(CONFIG_LINKER_START_AREA),)
+	@echo "-b START=$(CONFIG_LINKER_START_AREA)" >>pass1.lnk		# Start of START area
+else
 	@echo "-b START=0" >>pass1.lnk			# Start of START area
+endif
+ifneq ($(CONFIG_LINKER_CODE_AREA),)
+	@echo "-b _CODE=$(CONFIG_LINKER_CODE_AREA)" >>pass1.lnk		# Start of _CODE area
+else
 	@echo "-b _CODE=256" >>pass1.lnk		# Start of _CODE area
+endif
 	@echo "-i" >>pass1.lnk				# Intel hex format
 	@echo "-x" >>pass1.lnk				# Hexadecimal
 	@echo "-m" >>pass1.lnk				# Generate a map file
@@ -178,8 +186,16 @@ nuttx.ihx: up_mem.h asm_mem.h $(SDCCLIBDIR)/myz80.lib $(HEAD_AOBJ) board/libboar
 		echo "-l $(TOPDIR)/$$LIB" >> nuttx.lnk ;\
 	done
 	@echo "-l myz80.lib" >>nuttx.lnk		# Name of SDCC z80 library
+ifneq ($(CONFIG_LINKER_START_AREA),)
+	@echo "-b START=$(CONFIG_LINKER_START_AREA)" >>nuttx.lnk		# Start of START area
+else
 	@echo "-b START=0" >>nuttx.lnk			# Start of START area
+endif
+ifneq ($(CONFIG_LINKER_CODE_AREA),)
+	@echo "-b _CODE=$(CONFIG_LINKER_CODE_AREA)" >>nuttx.lnk		# Start of _CODE area
+else
 	@echo "-b _CODE=256" >>nuttx.lnk		# Start of _CODE area
+endif
 	@echo "-i" >>nuttx.lnk				# Intel hex format
 	@echo "-x" >>nuttx.lnk				# Hexadecimal
 	@echo "-m" >>nuttx.lnk				# Generate a map file
diff --git a/arch/z80/src/z80/Make.defs b/arch/z80/src/z80/Make.defs
index fb1be00e20806940bc659f1ea223b56e2eea1d51..b48a4660ff1aab23110f184e8eec512f070cbb8d 100644
--- a/arch/z80/src/z80/Make.defs
+++ b/arch/z80/src/z80/Make.defs
@@ -43,7 +43,7 @@ CMN_CSRCS	= up_initialize.c up_allocateheap.c up_createstack.c \
 		  up_mdelay.c up_udelay.c up_usestack.c
 
 CHIP_ASRCS	= z80_saveusercontext.asm z80_restoreusercontext.asm
-CHIP_CSRCS	= z80_initialstate.c z80_irq.c z80_copystate.c \
+CHIP_CSRCS	= z80_initialstate.c z80_io.c z80_irq.c z80_copystate.c \
 		  z80_schedulesigaction.c z80_sigdeliver.c \
 		  z80_registerdump.c
 
diff --git a/arch/z80/src/z80/z80_io.c b/arch/z80/src/z80/z80_io.c
new file mode 100644
index 0000000000000000000000000000000000000000..fdd72f1255dacbb6a701d68d7a36c77835dcb555
--- /dev/null
+++ b/arch/z80/src/z80/z80_io.c
@@ -0,0 +1,97 @@
+/****************************************************************************
+ * arch/z80/src/z80/z80_io.c
+ *
+ *   Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ *   Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ *    used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <sys/types.h>
+
+#include <nuttx/arch.h>
+/* #include <nuttx/irq.h> */
+
+#include "up_internal.h"
+
+/****************************************************************************
+ * Private Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: outb
+ *
+ * Description:
+ *   Output byte c on port p
+ *
+ ****************************************************************************/
+
+void outp(char p, char c)
+{
+  _asm
+	ld      c, 4(ix)	; port
+	ld      a, 5(ix)	; value
+	out     (c), a
+  _endasm;
+}
+
+
+/****************************************************************************
+ * Name: inpb
+ *
+ * Description:
+ *   Input byte from port p
+ *
+ ****************************************************************************/
+
+char inp(char p)
+{
+  _asm
+	ld      c, 4(ix)	;port
+	in      l, (c)
+  _endasm;
+}
diff --git a/configs/README.txt b/configs/README.txt
index ea9dedaf8da1e998789d7920f9c12ca3e6d59f6e..c5ce860f0ff2b1afc6b8b37b5be6ba24a1f07f4c 100644
--- a/configs/README.txt
+++ b/configs/README.txt
@@ -127,11 +127,11 @@ defconfig -- This is a configuration file similar to the Linux
                 CONFIG_ENDIAN_BIG - define if big endian (default is little
                    endian)
 
-	Some architectures require a description of the the RAM configuration:
+	Some architectures require a description of the RAM configuration:
 
 		CONFIG_DRAM_SIZE - Describes the installed DRAM.
 		CONFIG_DRAM_START - The start address of DRAM (physical)
-		CONFIG_DRAM_VSTART - The startaddress of DRAM (virtual)
+		CONFIG_DRAM_VSTART - The start address of DRAM (virtual)
 
 
 	General build options
@@ -305,12 +305,12 @@ configs/c5471evm
     This is a port to the Spectrum Digital C5471 evaluation board.  The
     TMS320C5471 is a dual core processor from TI with an ARM7TDMI general
     purpose processor and a c54 DSP.  It is also known as TMS320DA180 or just DA180. 
-    NuttX runs on the ARM core and is built with with a GNU arm-elf toolchain*.
+    NuttX runs on the ARM core and is built with a GNU arm-elf toolchain*.
     This port is complete, verified, and included in the NuttX release.
 
 configs/mcu123-lpc214x
     This is a port to the mcu123.com lpc214x development board.
-    This OS is also built with the the arm-elf toolchain*
+    This OS is also built with the arm-elf toolchain*
 
 configs/ntosd-dm320
     This port uses the Neuros OSD with a GNU arm-elf toolchain*:
@@ -327,27 +327,32 @@ configs/mcu123-lpc214x
 
 configs/m68322evb
     This is a work in progress for the venerable m68322evb board from
-    Motorola. This OS is also built with the the arm-elf toolchain*.
+    Motorola. This OS is also built with the arm-elf toolchain*.
 
 configs/pjrc-8051
     8051 Microcontroller.  This port uses the PJRC 87C52 development system
     and the SDCC toolchain.   This port is not quite ready for prime time.
 
+configs/xtrs
+    TRS80 Model 3.  This port uses a vintage computer based on the Z80.
+    An emulator for this computer is available to run TRS80 programs on a 
+    linux platform (http://www.tim-mann.org/xtrs.html).
+
 configs/z16f2800100zcog
-    z16f Microncontroller.  This port use the Zilog z16f2800100zcog
+    z16f Microcontroller.  This port use the Zilog z16f2800100zcog
     development kit and the Zilog ZDS-II Windows command line tools.  The
     development environment is Cygwin under WinXP.
 
 configs/z8encore000zco
-    z8Encore! Microncontroller.  This port use the Zilog z8encore000zco
+    z8Encore! Microcontroller.  This port use the Zilog z8encore000zco
     development kit, Z8F6403 part, and the Zilog ZDS-II Windows command line
     tools.  The development environment is Cygwin under WinXP.
 
-configs/z80zim
+configs/z80sim
     z80 Microcontroller.  This port uses a Z80 instruction set simulator.
     That simulator can be found in the NuttX CVS at
     http://nuttx.cvs.sourceforge.net/nuttx/misc/sims/z80sim.
-    This port also the SDCC toolchain (http://sdcc.sourceforge.net/")
+    This port also uses the SDCC toolchain (http://sdcc.sourceforge.net/")
     (verified with version 2.6.0).
 
 Other ports for the for the TI TMS320DM270, M683222 and for MIPS are in various
@@ -368,5 +373,3 @@ tools/configure.sh
 
   cd tools
   ./configure.sh <board-name>/<config-dir>
-
-
diff --git a/configs/z80sim/src/z80_serial.c b/configs/z80sim/src/z80_serial.c
index 8bc1b02b4858853589d122cf81aec522ec323605..b5a0c686320a0d48ada6e26dcda69cefe0eca446 100644
--- a/configs/z80sim/src/z80_serial.c
+++ b/configs/z80sim/src/z80_serial.c
@@ -346,7 +346,7 @@ void up_serialinit(void)
 {
 #if defined(CONFIG_DEV_LOWCONSOLE)
   (void)lowconsole_init();
-#elif defiened(CONFIG_DEV_CONSOLE)
+#elif defined(CONFIG_DEV_CONSOLE)
   (void)uart_register("/dev/console", &g_uartport);
   (void)uart_register("/dev/ttyS0", &g_uartport);
 #endif
@@ -368,6 +368,3 @@ int up_putc(int ch)
   return 0;
 }
 
-
-
-