diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html
index f4f506deff1..d2cec6badf8 100644
--- a/Documentation/NuttX.html
+++ b/Documentation/NuttX.html
@@ -8,7 +8,7 @@
NuttX RTOS
- Last Updated: October 28, 2017
+ Last Updated: November 24, 2017
|
@@ -5936,10 +5936,16 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
STATUS:
- Basically the same as for the Z80 instruction set simulator.
- This port was contributed by Jacques Pelletier.
- Refer to the NuttX board README file for further information.
+ Basically the same as for the Z80 instruction set simulator.
+ This port was contributed by Jacques Pelletier.
+ Refer to the NuttX board README file for further information.
+
+ NOTE:
+ This port was removed from the NuttX source tree on 2017-11-24.
+ It was removed because (1) it is unfinished, unverified, and unsupported, and (2) the TRS-80 simulation is a sub-optimal platform.i
+ That platform includes a 16-bit ROM image and only a 48Kb RAM space for NuttX.
+ The removed board support is still available in the Obsoleted repository if anyone would ever like to resurrect it.
diff --git a/Documentation/README.html b/Documentation/README.html
index 48c9831a67e..276b928a12f 100644
--- a/Documentation/README.html
+++ b/Documentation/README.html
@@ -328,12 +328,10 @@ nuttx/
| | `- README.txt
| |- xmc4500-relax/
| | `- README.txt
- | |- xtrs/
- | | `- README.txt
| |- z16f2800100zcog/
- | | |- ostest/README.txt
- | | |- pashello/README.txt
- | | `- README.txt
+ | | |- ostest/README.txt
+ | | |- pashello/README.txt
+ | | `- README.txt
| |- z80sim/
| | `- README.txt
| |- z8encore000zco/
diff --git a/README.txt b/README.txt
index 4b1ad1db0d4..e740e3c76a0 100644
--- a/README.txt
+++ b/README.txt
@@ -1870,8 +1870,6 @@ nuttx/
| | `- README.txt
| |- xmc5400-relax/
| | `- README.txt
- | |- xtrs/
- | | `- README.txt
| |- z16f2800100zcog/
| | |- ostest/README.txt
| | |- pashello/README.txt
diff --git a/configs/Kconfig b/configs/Kconfig
index d5ca0e5efb1..4b82efc8da5 100644
--- a/configs/Kconfig
+++ b/configs/Kconfig
@@ -1427,15 +1427,6 @@ config ARCH_BOARD_XMC4500RELAX
---help---
Infineon XMC4000 Relax Lite v1
-config ARCH_BOARD_XTRS
- bool "XTRS TRS80 Model 3 emulation"
- depends on ARCH_CHIP_Z80
- select UART_SERIALDRIVER
- ---help---
- 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).
-
config ARCH_BOARD_Z16F2800100ZCOG
bool "Zilog Z16F2800100ZCOG Development Kit"
depends on ARCH_CHIP_Z16F2811
@@ -1702,7 +1693,6 @@ config ARCH_BOARD
default "us7032evb1" if ARCH_BOARD_US7032EVB1
default "viewtool-stm32f107" if ARCH_BOARD_VIEWTOOL_STM32F107
default "xmc4500-relax" if ARCH_BOARD_XMC4500RELAX
- default "xtrs" if ARCH_BOARD_XTRS
default "z16f2800100zcog" if ARCH_BOARD_Z16F2800100ZCOG
default "z80sim" if ARCH_BOARD_Z80SIM
default "z8encore000zco" if ARCH_BOARD_Z8ENCORE000ZCO
@@ -2149,9 +2139,6 @@ endif
if ARCH_BOARD_XMC4500RELAX
source "configs/xmc4500-relax/Kconfig"
endif
-if ARCH_BOARD_XTRS
-source "configs/xtrs/Kconfig"
-endif
if ARCH_BOARD_Z16F2800100ZCOG
source "configs/z16f2800100zcog/Kconfig"
endif
diff --git a/configs/README.txt b/configs/README.txt
index 476a003d373..6de807ff13f 100644
--- a/configs/README.txt
+++ b/configs/README.txt
@@ -780,11 +780,6 @@ configs/viewtool-stm32f107
config/xmc4500-relax
Infineon XMC4000 Relax Lite v1
-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 Microcontroller. This port use the Zilog z16f2800100zcog
development kit and the Zilog ZDS-II Windows command line tools. The
diff --git a/configs/xtrs/Kconfig b/configs/xtrs/Kconfig
deleted file mode 100644
index f72f3c094ce..00000000000
--- a/configs/xtrs/Kconfig
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see the file kconfig-language.txt in the NuttX tools repository.
-#
diff --git a/configs/xtrs/README.txt b/configs/xtrs/README.txt
deleted file mode 100644
index c8f87699874..00000000000
--- a/configs/xtrs/README.txt
+++ /dev/null
@@ -1,242 +0,0 @@
-xtrs README
-^^^^^^^^^^^^^
-
-Current status
-^^^^^^^^^^^^^^
-
-The xtrs port is not operational yet; some work still needs to be done.
-
-Contents
-^^^^^^^^
-
- o Getting a TRS80 emulator and DOS disks
- o Loading an executable into xtrs
- o Configuring NuttX
- o Reconfiguring NuttX
- o Reconfiguring for Linux, OSX, or Cygwin
- o SDCC
- o Building the SDCC toolchain
-
-Getting a TRS80 emulator and DOS disks
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-This port uses a vintage computer based on the Z80, the TRS80.
-There's a main page describing the different models of TRS80.
-See: http://www.trs-80.com
-
-An emulator for this computer is available to run TRS80 programs on a
-linux platform (http://www.tim-mann.org/xtrs.html).
-
-Other emulators are available for other platforms.
-See http://www.trs-80.com, click on the link Emulators.
-
-TRSDOS, LDOS and other softwares are available at:
-http://discover-net.net/~dmkeil/trs80/software/trs-dos.htm
-
-Or you can get TRSDOS 1.3 and 6.1 from this site; it's included with the emulator.
-http://discover-net.net/~dmkeil/trs80/model4.htm
-
-The SDCC toolchain is available from http://sdcc.sourceforge.net/. All
-testing has been performed using version 2.7.0 of the SDCC toolchain.
-
-Loading an executable into xtrs
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-At http://www.trs-80.com click on the link: Getting a Software Onto an Emulator.
-
-Configuring NuttX
-^^^^^^^^^^^^^^^^^
-
- ostest
-
- This configuration performs a simple, minimal OS test using
- examples/ostest. This can be configurated as follows:
-
- 1) From a POSIX window:
- cd tools
- ./configure.sh xtrs/ostest
- 2) Modify your PATH environment variable to include the path to the
- SDCC toolchain.
- 3) From a CMD.exe window
- make
-
- If this is a Windows native build, then configure.bat should be used
- in step 1) instead of configure.sh:
-
- configure.bat xtrs\ostest
-
- NOTES:
-
- 1. This configuration uses the mconf-based configuration tool. See the
- "Reconfiguring" section below for information about changing this
- configuration.
-
- 2. The default setup for this configuration uses a windows native build.
- See the section entitled "Reconfiguring for Linux, OSX, or Cygwin"
- which will give you the steps you would need to do to convert this
- configuration to build in other, Unix-like environments.
-
- 3. The current build requires ca. 3.2.1 SDCC.
-
- nsh
-
- This configuration file builds NSH (examples/nsh). This
- configuration is not functional due to issues with use of the
- simulated serial driver (see the TODO list).
-
- This configuration can be selected by:
-
- 1) From a POSIX window:
- cd tools
- ./configure.sh xtrs/nsh
- 2) Modify your PATH environment variable to include the path to the
- SDCC toolchain.
- 3) From a CMD.exe window
- make
-
- If this is a Windows native build, then configure.bat should be used
- in step 1) instead of configure.sh:
-
- configure.bat xtrs\nsh
-
- NOTES:
-
- 1. This configuration uses the mconf-based configuration tool. See the
- "Reconfiguring" section below for information about changing this
- configuration.
-
- 2. The default setup for this configuration uses a windows native build.
- See the section entitled "Reconfiguring for Linux, OSX, or Cygwin"
- which will give you the steps you would need to do to convert this
- configuration to build in other, Unix-like environments.
-
- 3. The current build requires ca. 3.2.1 SDCC.
-
- 4. This configuration depends on configs/xtrs/src/xtrs_serial.c which
- is incomplete. At compile time, the following symbols are undefined:
-
- ctrl, baud, rs232_xmtisr, rs232_recvisr, ch
-
- pashello
-
- Configures to use examples/pashello for execution from FLASH
- See examples/README.txt for information about pashello.
-
- This configuration is not usable because the resulting binary
- is too large for the z80 address space.
-
- This configuration can be selected by:
-
- 1) From a POSIX window:
- cd tools
- ./configure.sh xtrs/pashello
- 2) Modify your PATH environment variable to include the path to the
- SDCC toolchain.
- 3) From a CMD.exe window
- make
-
- If this is a Windows native build, then configure.bat should be used
- in step 1) instead of configure.sh:
-
- configure.bat xtrs\pashello
-
- NOTES:
-
- 1. This configuration uses the mconf-based configuration tool. See the
- "Reconfiguring" section below for information about changing this
- configuration.
-
- 2. The default setup for this configuration uses a windows native build.
- See the section entitled "Reconfiguring for Linux, OSX, or Cygwin"
- which will give you the steps you would need to do to convert this
- configuration to build in other, Unix-like environments.
-
- 3. The current build requires ca. 3.2.1 SDCC.
-
-Reconfiguring NuttX
-^^^^^^^^^^^^^^^^^^^
-
-These configurations all use the kconfig-frontends, mconf-based configuration
-tool. To change this configuration using that tool, you should:
-
- a. Build and install the kconfig-mconf tool. See nuttx/README.txt and
- additional README.txt files in the NuttX tools repository.
-
- b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration
- process.
-
-Reconfiguring for Linux, OSX, or Cygwin
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-All of the z80 configurations in this this directory are set up to build in a
-Windows CMD.exe shell. This configuration requires the MinGW host compiler
-and severl GNUWin32 tools (see discussion in the top-level NuttX/README.txt
-file).
-
-These configurations can be converted to run under Linux (or Cygwin or OSX),
-by modifying the configuration file as follows:
-
- -CONFIG_HOST_WINDOWS=y
- -CONFIG_WINDOWS_NATIVE=y
- +CONFIG_HOST_LINUX=y
-
- -CONFIG_Z80_TOOLCHAIN_SDCCW=y
- +CONFIG_Z80_TOOLCHAIN_SDCCL=y
-
-You may need to first manually change the CONFIG_APPS_DIR="..\apps" definition
-in the .config file because the backslash may upset some Unix-based tools.
-
-This configuration will require a recent version of SDCC (ca. 3.2.1) for Linux
-or custom built for Cygwin (see below).
-
-SDCC
-^^^^
-
-These z80 configurations all use the SDCC toolchain (http://sdcc.sourceforge.net/).
-Source and pre-built SDCC binaries can be downloaded from the SDCC SourceForge
-site: http://sourceforge.net/projects/sdcc/files/ . Pre-built binaries are
-available for Linux, MAC OSX, and for Win32. Various SDCC options can be
-selected with:
-
- CONFIG_Z80_TOOLCHAIN_SDCCL=y : SDCC for Linux, MAC OSX or Cygwin (see below)
- CONFIG_Z80_TOOLCHAIN_SDCCW=y : SDCC for Win32
-
-SDCC versions 3.2.0 or higher are recommended.
-
-Building the SDCC toolchain
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-You may also want to build your own SDCC toolchain. You might want to do this,
-for example, if you are running under Cygwin and want a Cygwin compatible
-SDCC toolchain.
-
-The SDCC toolchain is built with the standard configure/make/make install
-sequence. However, some special actions are required to generate libraries
-compatible with this build. First start with the usual steps
-
- download
- unpack
- cd sdcc
- ./configure
-
-Note if you do not have the gputils packet installed, newer version of the
-SDCC configure will fail. You will have to either install the gputils
-package or if you don't need PIC14 or PIC16 support:
-
- ./configure --disable-pic14-port --disable-pic16-port
-
-But before making, we need to apply a patch to the SDCC 2.6.0 source
-so that the z80 assembler can handle long symbol names. This is not
-needed with later versions.
-
- Apply sdcc-2.6.0-asz80-symlen.patch
- cd sdcc/device/lib
-
-Then make the SDCC binaries
-
- make
-
-and install SDCC:
-
- sudo make install
-
diff --git a/configs/xtrs/include/board.h b/configs/xtrs/include/board.h
deleted file mode 100644
index 2e7f04daeab..00000000000
--- a/configs/xtrs/include/board.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
- * configs/xtrs/include/board.h
- *
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
- *
- * 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_BOARD_BOARD_H
-#define __ARCH_BOARD_BOARD_H
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-/* Adresses of BIOS routines */
-
-#include "trs80-m3.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-#undef EXTERN
-#if defined(__cplusplus)
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
-#endif
-
-EXTERN void z80_lowputc(char ch) __naked;
-EXTERN char z80_lowgetc(void) __naked;
-
-#undef EXTERN
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* __ARCH_BOARD_BOARD_H */
diff --git a/configs/xtrs/include/trs80-m3.h b/configs/xtrs/include/trs80-m3.h
deleted file mode 100644
index 889c209f339..00000000000
--- a/configs/xtrs/include/trs80-m3.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/****************************************************************************
- * configs/xtrs/include/trs80-m3.h
- *
- * Copyright (C) 2008 Jacques Pelletier. All rights reserved.
- * Author: Jacques Pelletier
- *
- * This file is a part of NuttX and hence
- *
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
- *
- * 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.
- *
- ****************************************************************************/
-
-/* Information from http://www.trs-80.com */
-
-#ifndef __TRS80_M3_H
-#define __TRS80_M3_H
-
-/* Outputs a byte to a logical device or FCB. DE = FCB and A = byte.
- * Don't confuse with CTL at 0023.
- */
-
-#define _TRS80_M3_PUT 0x001B
-
-/* Outputs a control byte to a logical device or FCB. DE = FCB and A = control byte. */
-
-#define _TRS80_M3_CTL 0x0023
-
-/* Scan keyboard and return with accumulator containing result. DE is used. */
-
-#define _TRS80_M3_KBDSCN 0x002B
-
-/* Displays a character at current cursor location. */
-
-#define _TRS80_M3_VDCHAR 0x0033
-
-/* "Waits until printer is ready then prints character. A = ASCII character.
- * If BREAK is pressed, a return to caller is made."
- */
-
-#define _TRS80_M3_PRCHAR 0x003B
-
-/* Call Input a line from the keyboard. B = max length of line. HL points at buffer.
- * Buffer should be the length of B plus 1. To terminate, hit BREAK or ENTER.
- * On exit, HL points at buffer and B = number of characters entered.
- * Carry will be set if BREAK was pressed.
- */
-
-#define _TRS80_M3_KBLINE 0x0040
-
-/* "Scans the keyboard until a key is pressed. If BREAK is pressed, it is returned
- * like other keys."
- */
-
-#define _TRS80_M3_KBWAIT 0x0049
-
-/* "Receive a character from RS-232. No entry conditions. On exit, memory location
- * 16872 contains character received. DE is altered. This routine honors wait status."
- */
-
-#define _TRS80_M3_RSRCV 0x0050
-
-/* "Transmit character to RS-232. On entry, Accumulator or memory location 16880
- * contains character. On exit, 16880 = 0 if no character sent. Wait status honored."
- */
-
-#define _TRS80_M3_RSTX 0x0055
-
-/* Initialize RS-232 interface. On entry, memory location 16888 = send/receive baud
- * rate code, location 16890 = wait/don't wait switch, location 16889 = RS-232
- * characteristics switch. On exit, DE is altered. For more detail, consult Model 3
- * reference manual.
- */
-
-#define _TRS80_M3_RSINIT 0x005A
-
-/* This is the routine that is Basic's SET, RESET, and POINT functions. Here's how
- * to use it. Load HL with return address and push. Load register A with one of the
- * following: 00H = POINT, 01H = RESET, and 80H = SET. Push AF onto stack. Load A with
- * X coordinate and push onto stack. Load A with Y coordinate and JP GRAPH.
- */
-
-#define _TRS80_M3_GRAPH 0x0150
-
-/* Clear screen. */
-
-#define _TRS80_M3_CLS 0x01C9
-
-/* Randomize. */
-
-#define _TRS80_M3_RANDOM 0x01D3
-
-/* This routine turns off the cassette drive. */
-
-#define _TRS80_M3_CSOFF 0x01F8
-
-#ifdef TRS80_MODEL1
-
-/* A register contains a 0 or 1 which is the cassette number. This routine defines
- * cassette number and turns on cassette. Model I only.
- */
-
-#define _TRS80_M3_DEFCAS 0x0212
-
-#endif /* TRS80_MODEL1 */
-
-/* Inputs data one byte at a time from cassette after you use CSHIN. A = the data
- * byte.
- */
-
-#define _TRS80_M3_CSIN 0x0235
-
-/* Outputs data one byte at a time to cassette after you use CSHWR. A = the
- * output byte.
- */
-
-#define _TRS80_M3_CSOUT 0x0264
-
-/* Turns on the cassette and writes the header. */
-
-#define _TRS80_M3_CSHWR 0x0287
-
-/* Finds the cassette header info at the beggining of cassette file. */
-
-#define _TRS80_M3_CSHIN 0x0296
-
-/* Ouput character in register A; OUTSEL (409CH) selects device. See OUTSEL for
- * device values.
- */
-
-#define _TRS80_M3_OUTCHR 0x032A
-
-/* Displays character in A on screen at next print position. Uses AF. */
-
-#define _TRS80_M3_DISPA 0x033A
-
-/* Calls keyboard scan routine. */
-
-#define _TRS80_M3_keyb_scan 0x0358
-
-/* Reads keyboard into buffer until a carriage return is entered. 40A7H contains
- * the address of the buffer.
- */
-
-#define _TRS80_M3_KIBUFF 0x0361
-
-/* Same as KBLINE. See 0040. */
-
-#define _TRS80_M3_KLINE 0x05D9
-
-/* "Get date in ASCII format. Mod III TRSDOS, LDOS, & MULTIDOS." */
-
-#define _TRS80_M3_GETDAT 0x3033
-
-/* "Get time in ASCII format. Mod III TRSDOS, LDOS, & MULTIDOS." */
-
-#define _TRS80_M3_GETTIM 0x3036
-
-#endif /* __TRS80_M3_H */
diff --git a/configs/xtrs/nsh/defconfig b/configs/xtrs/nsh/defconfig
deleted file mode 100644
index 57c2b3c6292..00000000000
--- a/configs/xtrs/nsh/defconfig
+++ /dev/null
@@ -1,55 +0,0 @@
-# CONFIG_NSH_DISABLE_DD is not set
-# CONFIG_NSH_DISABLE_EXEC is not set
-# CONFIG_NSH_DISABLE_EXIT is not set
-# CONFIG_NSH_DISABLE_GET is not set
-# CONFIG_NSH_DISABLE_HEXDUMP is not set
-# CONFIG_NSH_DISABLE_IFCONFIG is not set
-# CONFIG_NSH_DISABLE_LOSETUP is not set
-# CONFIG_NSH_DISABLE_MKRD is not set
-# CONFIG_NSH_DISABLE_PS is not set
-# CONFIG_NSH_DISABLE_PUT is not set
-# CONFIG_NSH_DISABLE_WGET is not set
-# CONFIG_NSH_DISABLE_XD is not set
-# CONFIG_NSH_DISABLEBG is not set
-# CONFIG_NSH_DISABLESCRIPT is not set
-CONFIG_ARCH_BOARD_XTRS=y
-CONFIG_ARCH_BOARD="xtrs"
-CONFIG_ARCH_CHIP_Z80=y
-CONFIG_ARCH_Z80=y
-CONFIG_ARCH="z80"
-CONFIG_BOARD_LOOPSPERMSEC=100
-CONFIG_DEFAULT_SMALL=y
-CONFIG_DISABLE_MOUNTPOINT=y
-CONFIG_DISABLE_MQUEUE=y
-CONFIG_DISABLE_POLL=y
-CONFIG_DISABLE_PTHREAD=y
-CONFIG_EXAMPLES_NSH=y
-CONFIG_HOST_WINDOWS=y
-CONFIG_LINKER_CODE_AREA=0x5300
-CONFIG_LINKER_HOME_AREA=0x5200
-CONFIG_LINKER_ROM_AT_0000=y
-CONFIG_MAX_TASKS=8
-CONFIG_MAX_WDOGPARMS=2
-CONFIG_NFILE_DESCRIPTORS=6
-CONFIG_NFILE_STREAMS=6
-CONFIG_NOPRINTF_FIELDWIDTH=y
-CONFIG_NSH_FILEIOSIZE=1024
-CONFIG_NSH_LINELEN=40
-CONFIG_NUNGET_CHARS=0
-CONFIG_PREALLOC_TIMERS=0
-CONFIG_PREALLOC_WDOGS=4
-CONFIG_PTHREAD_STACK_DEFAULT=1024
-CONFIG_RAM_SIZE=65536
-CONFIG_RAM_START=0x0000
-CONFIG_SDCLONE_DISABLE=y
-CONFIG_START_DAY=9
-CONFIG_START_MONTH=12
-CONFIG_START_YEAR=2012
-CONFIG_STDIO_DISABLE_BUFFERING=y
-CONFIG_TASK_NAME_SIZE=0
-CONFIG_UART_RXBUFSIZE=64
-CONFIG_UART_TXBUFSIZE=64
-CONFIG_USER_ENTRYPOINT="nsh_main"
-CONFIG_USERMAIN_STACKSIZE=1024
-CONFIG_WDOG_INTRESERVE=0
-CONFIG_WINDOWS_NATIVE=y
diff --git a/configs/xtrs/ostest/defconfig b/configs/xtrs/ostest/defconfig
deleted file mode 100644
index 8a4c66f3e0d..00000000000
--- a/configs/xtrs/ostest/defconfig
+++ /dev/null
@@ -1,43 +0,0 @@
-# CONFIG_DEV_CONSOLE is not set
-CONFIG_ARCH_BOARD_XTRS=y
-CONFIG_ARCH_BOARD="xtrs"
-CONFIG_ARCH_CHIP_Z80=y
-CONFIG_ARCH_Z80=y
-CONFIG_ARCH="z80"
-CONFIG_BOARD_LOOPSPERMSEC=100
-CONFIG_DEFAULT_SMALL=y
-CONFIG_DISABLE_MOUNTPOINT=y
-CONFIG_DISABLE_MQUEUE=y
-CONFIG_DISABLE_POLL=y
-CONFIG_DISABLE_PTHREAD=y
-CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=4
-CONFIG_EXAMPLES_OSTEST_STACKSIZE=1024
-CONFIG_EXAMPLES_OSTEST=y
-CONFIG_HOST_WINDOWS=y
-CONFIG_LINKER_CODE_AREA=0x5300
-CONFIG_LINKER_HOME_AREA=0x5200
-CONFIG_LINKER_ROM_AT_0000=y
-CONFIG_MAX_TASKS=8
-CONFIG_MAX_WDOGPARMS=2
-CONFIG_NFILE_DESCRIPTORS=0
-CONFIG_NFILE_STREAMS=0
-CONFIG_NOPRINTF_FIELDWIDTH=y
-CONFIG_NUNGET_CHARS=0
-CONFIG_PREALLOC_TIMERS=0
-CONFIG_PREALLOC_WDOGS=4
-CONFIG_PTHREAD_STACK_DEFAULT=1024
-CONFIG_RAM_SIZE=65536
-CONFIG_RAM_START=0x0000
-CONFIG_SDCLONE_DISABLE=y
-CONFIG_START_DAY=21
-CONFIG_START_MONTH=2
-CONFIG_START_YEAR=2008
-CONFIG_STDIO_DISABLE_BUFFERING=y
-CONFIG_TASK_NAME_SIZE=0
-CONFIG_UART_RXBUFSIZE=64
-CONFIG_UART_SERIAL_CONSOLE=y
-CONFIG_UART_TXBUFSIZE=64
-CONFIG_USER_ENTRYPOINT="ostest_main"
-CONFIG_USERMAIN_STACKSIZE=1024
-CONFIG_WDOG_INTRESERVE=0
-CONFIG_WINDOWS_NATIVE=y
diff --git a/configs/xtrs/pashello/defconfig b/configs/xtrs/pashello/defconfig
deleted file mode 100644
index fb66a951718..00000000000
--- a/configs/xtrs/pashello/defconfig
+++ /dev/null
@@ -1,45 +0,0 @@
-# CONFIG_DISABLE_ENVIRON is not set
-CONFIG_ARCH_BOARD_XTRS=y
-CONFIG_ARCH_BOARD="xtrs"
-CONFIG_ARCH_CHIP_Z80=y
-CONFIG_ARCH_Z80=y
-CONFIG_ARCH="z80"
-CONFIG_BOARD_LOOPSPERMSEC=100
-CONFIG_DEFAULT_SMALL=y
-CONFIG_DEV_LOWCONSOLE=y
-CONFIG_DISABLE_MOUNTPOINT=y
-CONFIG_DISABLE_MQUEUE=y
-CONFIG_DISABLE_POLL=y
-CONFIG_DISABLE_PTHREAD=y
-CONFIG_DISABLE_SIGNALS=y
-CONFIG_EXAMPLES_PASHELLO=y
-CONFIG_HOST_WINDOWS=y
-CONFIG_INTERPRETERS_PCODE=y
-CONFIG_LINKER_CODE_AREA=0x5300
-CONFIG_LINKER_HOME_AREA=0x5200
-CONFIG_LINKER_ROM_AT_0000=y
-CONFIG_MAX_TASKS=8
-CONFIG_MAX_WDOGPARMS=2
-CONFIG_NFILE_DESCRIPTORS=4
-CONFIG_NFILE_STREAMS=4
-CONFIG_NOPRINTF_FIELDWIDTH=y
-CONFIG_NUNGET_CHARS=0
-CONFIG_PREALLOC_TIMERS=0
-CONFIG_PREALLOC_WDOGS=4
-CONFIG_PTHREAD_STACK_DEFAULT=1024
-CONFIG_RAM_SIZE=65536
-CONFIG_RAM_START=0x0000
-CONFIG_SDCLONE_DISABLE=y
-CONFIG_START_DAY=9
-CONFIG_START_MONTH=12
-CONFIG_START_YEAR=2012
-CONFIG_STDIO_DISABLE_BUFFERING=y
-CONFIG_SYSTEM_PRUN=y
-CONFIG_TASK_NAME_SIZE=0
-CONFIG_UART_RXBUFSIZE=64
-CONFIG_UART_SERIAL_CONSOLE=y
-CONFIG_UART_TXBUFSIZE=64
-CONFIG_USER_ENTRYPOINT="pashello_main"
-CONFIG_USERMAIN_STACKSIZE=1024
-CONFIG_WDOG_INTRESERVE=0
-CONFIG_WINDOWS_NATIVE=y
diff --git a/configs/xtrs/scripts/Make.defs b/configs/xtrs/scripts/Make.defs
deleted file mode 100644
index b61a8b3b65c..00000000000
--- a/configs/xtrs/scripts/Make.defs
+++ /dev/null
@@ -1,171 +0,0 @@
-############################################################################
-# configs/xtrs/scripts/Make.defs
-#
-# Copyright (C) 2007, 2008, 2012, 2017 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
-#
-# 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.
-#
-############################################################################
-
-include ${TOPDIR}/.config
-include ${TOPDIR}/tools/Config.mk
-
-# These are the directories where the SDCC toolchain is installed. NOTE
-# that short 8.3 path names are used in order to avoid spaces. On my machine
-# I have:
-#
-# C:\PROGRA~1\ = C:\Profram Files\
-# C:\PROGRA~2\ = C:\Program Files (x86)\
-#
-# Your PC may be configured differently.
-
-ifeq ($(CONFIG_WINDOWS_NATIVE),y)
- SDCC_INSTALLDIR = C:\PROGRA~2\SDCC
- SDCC_BINDIR = $(SDCC_INSTALLDIR)\bin
- SDCC_LIBDIR = $(SDCC_INSTALLDIR)\lib\z80
-else
- SDCC_INSTALLDIR = /usr/local
- SDCC_BINDIR = $(SDCC_INSTALLDIR)/bin
- SDCC_LIBDIR = $(SDCC_INSTALLDIR)/share/sdcc/lib/z80
-endif
-
-CROSSDEV =
-CC = sdcc
-CPP = sdcpp
-LD = sdldz80
-AS = sdasz80
-AR = sdar -r
-ARCHCPUFLAGS = -mz80
-
-ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
- ARCHOPTIMIZATION = --debug
-else
- ARCHOPTIMIZATION =
-endif
-
-ARCHPICFLAGS =
-ARCHWARNINGS =
-ARCHDEFINES =
-ARCHINCLUDES = -I. -I$(TOPDIR)$(DELIM)include
-
-CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
-CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
-AFLAGS = -x -a -l -o -s -g
-
-SDCCLIB = z80.lib
-
-ASMEXT = .asm
-OBJEXT = .rel
-LIBEXT = .lib
-EXEEXT = .cmd
-
-# Custom ASSEMBLE definition. The most common toolchain, GCC, uses the
-# compiler to assemble files because this has the advantage of running the C
-# Pre-Processor against. This is not possible with other SDCC; we need to
-# define AS and over-ride the common definition in order to use the assembler
-# directly.
-
-define ASSEMBLE
- @echo "AS: $1"
- $(Q) $(AS) $(AFLAGS) $2 $1
-endef
-
-# Custom CLEAN definition
-
-ifeq ($(CONFIG_WINDOWS_NATIVE),y)
-define CLEAN
- $(Q) if exist *.o (del /f /q *.o)
- $(Q) if exist *.asm (del /f /q *.asm)
- $(Q) if exist *.rel (del /f /q *.rel)
- $(Q) if exist *.lst (del /f /q *.lst)
- $(Q) if exist *.rst (del /f /q *.rst)
- $(Q) if exist *.sym (del /f /q *.sym)
- $(Q) if exist *.adb (del /f /q *.adb)
- $(Q) if exist *.lnk (del /f /q *.lnk)
- $(Q) if exist *.map (del /f /q *.map)
- $(Q) if exist *.mem (del /f /q *.mem)
- $(Q) if exist *.hex (del /f /q *.hex)
- $(Q) if exist *.cmd (del /f /q *.cmd)
-endef
-else
-define CLEAN
- $(Q) rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex *.cmd
-endef
-endif
-
-# Windows native host tool definitions
-
-ifeq ($(CONFIG_WINDOWS_NATIVE),y)
- HOSTCC = mingw32-gcc.exe
- HOSTINCLUDES = -I.
- HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
- HOSTLDFLAGS =
- HOSTEXEEXT = .exe
-
- # Windows-native host tools
-
- MKDEP = $(TOPDIR)\tools\mkdeps$(HOSTEXEEXT) --winnative
-
- # Use NTFS links or directory copies
-
-ifeq ($(CONFIG_WINDOWS_MKLINK),y)
- DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)link.bat
-else
- DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)copydir.bat
-endif
-DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.bat
-
-else
-
-# Linux/Cygwin host tool definitions
-
- HOSTCC = gcc
- HOSTINCLUDES = -I.
- HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
- HOSTLDFLAGS =
-
- # This is the tool to use for dependencies
-
- ifeq ($(WINTOOL),y)
- MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mkwindeps.sh
- else
- MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT)
- endif
-
- # SDCC for Linux, OSX, or Cygwin understands symbolic links. Windows SDCC
- # running under Cygwin does not
-
-ifeq ($(WINTOOL),y)
- DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)copydir.sh
-else
- DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)link.sh
-endif
-DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
-
-endif
diff --git a/configs/xtrs/src/.gitignore b/configs/xtrs/src/.gitignore
deleted file mode 100644
index 91e29681eea..00000000000
--- a/configs/xtrs/src/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-/Make.dep
-/.depend
-/*.sym
-/*.rel
-/*.lst
-/*.adb
-/*.rst
-/*.lib
-/*.lnk
-/*.map
-/*.mem
-/*.ihx
-/*.hex
diff --git a/configs/xtrs/src/Make.defs b/configs/xtrs/src/Make.defs
deleted file mode 100644
index e20f03a4e56..00000000000
--- a/configs/xtrs/src/Make.defs
+++ /dev/null
@@ -1,37 +0,0 @@
-############################################################################
-# configs/xtrs/src/Make.defs
-#
-# Copyright (C) 2008 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
-#
-# 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.
-#
-############################################################################
-
-HEAD_ASRC = xtrs_head.asm
-
diff --git a/configs/xtrs/src/Makefile b/configs/xtrs/src/Makefile
deleted file mode 100644
index 4398bf214a7..00000000000
--- a/configs/xtrs/src/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-############################################################################
-# configs/xtrs/src/Makefile
-#
-# Copyright (C) 2008, 2012 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
-#
-# 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.
-#
-############################################################################
-
--include $(TOPDIR)/Make.defs
-
-ASRCS =
-CSRCS = xtr_irq.c xtr_serial.c xtr_timerisr.c xtr_lowputc.c
-
-include $(TOPDIR)/configs/Board.mk
diff --git a/configs/xtrs/src/xtr_irq.c b/configs/xtrs/src/xtr_irq.c
deleted file mode 100644
index 5cc00da9503..00000000000
--- a/configs/xtrs/src/xtr_irq.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
- * configs/xtrs/src/xtr_irq.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
- *
- * 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
-
-#include
-
-#include "up_arch.h"
-#include "up_internal.h"
-
-/****************************************************************************
- * Public Function Prototypes
- ****************************************************************************/
-
-int xtrs_timerisr(int irq, FAR chipreg_t *regs);
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: up_irqinitialize
- ****************************************************************************/
-
-void up_irqinitialize(void)
-{
- /* Attach the timer interrupt -- There is no special timer interrupt
- * enable in the simulation so it must be enabled here before interrupts
- * are enabled.
- *
- * NOTE: Normally, there are seperate enables for "global" interrupts
- * and specific device interrupts. In such a "normal" case, the timer
- * interrupt should be attached and enabled in the function
- * xtrs_timer_initialize()
- */
-
- irq_attach(Z80_IRQ_SYSTIMER, (xcpt_t)xtrs_timerisr, NULL);
-
- /* And finally, enable interrupts (including the timer) */
-
-#ifndef CONFIG_SUPPRESS_INTERRUPTS
- up_irq_restore(Z80_C_FLAG);
-#endif
-}
diff --git a/configs/xtrs/src/xtr_lowputc.c b/configs/xtrs/src/xtr_lowputc.c
deleted file mode 100644
index 67237730a03..00000000000
--- a/configs/xtrs/src/xtr_lowputc.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/********************************************************************************
- * configs/xtrs/src//xtr_lowputc.c
- *
- * Copyright (C) 2008 Jacques Pelletier. All rights reserved.
- * Author: Jacques Pelletier
- *
- * This file is a part of NuttX and hence
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- *
- * 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
-
-#include
-#include
-#include
-#include
-
-#include "up_internal.h"
-
-/* Includes trs80-m3.h for assembler call addresses */
-
-#include
-
-/********************************************************************************
- * Pre-processor Definitions
- ********************************************************************************/
-
-/********************************************************************************
- * Public Data
- ********************************************************************************/
-
-/********************************************************************************
- * Private Data
- ********************************************************************************/
-
-/********************************************************************************
- * Private Functions
- ********************************************************************************/
-
-/********************************************************************************
- * Public Functions
- ********************************************************************************/
-
-/********************************************************************************
- * Name: z80_lowputc
- ********************************************************************************/
-
-void z80_lowputc(char ch) __naked
-{
- __asm
- ld hl, #2
- add hl, sp
- ld a, (hl)
- call _TRS80_M3_VDCHAR ;0x0033
- ret
- __endasm;
-}
-
-/********************************************************************************
- * Name: z80_lowgetc
- ********************************************************************************/
-
-char z80_lowgetc(void) __naked
-{
- __asm
- call _TRS80_M3_KBDSCN ;0x002b
- ld l, a
- ld h, #0
- ret
- __endasm;
-}
diff --git a/configs/xtrs/src/xtr_serial.c b/configs/xtrs/src/xtr_serial.c
deleted file mode 100644
index ed2ef03fa80..00000000000
--- a/configs/xtrs/src/xtr_serial.c
+++ /dev/null
@@ -1,413 +0,0 @@
-/****************************************************************************
- * config/xtrs/src/xtr_serial.c
- *
- * Copyright (C) 2008 Jacques Pelletier. All rights reserved.
- * Author: Jacques Pelletier
- *
- * This file is a part of NuttX and hence
- *
- * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
- *
- * 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
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-
-#include "up_arch.h"
-#include "up_internal.h"
-
-#ifdef USE_SERIALDRIVER
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-#define TRSDOS 0 /* TRSDOS 1.3 */
-#define LDOS 1 /* LDOS 5.3.1 */
-
-#define MODEM_STATUS 0xe8
-#define RESET 0xe8
-#define BAUD 0xe9
-#define STATUS 0xea
-#define CONTROL 0xea
-#define RECV_REG 0xeb
-#define XMIT_REG 0xeb
-
-#define XMIT_REG_EMPTY 0x40
-
-#define WRINTMASK 0xe0
-
-#define MASK_XMIT_INT 0x10
-#define MASK_RECV_INT 0x20
-#define MASK_ERR_INT 0x40
-
-#if TRSDOS
-#define WRINTMASK_SHADOW 0x4213
-#define XMIT_INT_VECTOR 0x4207
-#define RECV_INT_VECTOR 0x420a
-#endif
-
-#if LDOS
-#define WRINTMASK_SHADOW 0x4474
-#define XMIT_INT_VECTOR 0x447D
-#define RECV_INT_VECTOR 0x447F
-#endif
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Function Prototypes
- ****************************************************************************/
-
-static int up_setup(FAR struct uart_dev_s *dev);
-static void up_shutdown(FAR struct uart_dev_s *dev);
-static int up_attach(FAR struct uart_dev_s *dev);
-static void up_detach(FAR struct uart_dev_s *dev);
-static int up_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
-static int up_receive(FAR struct uart_dev_s *dev, unsigned int *status);
-static void up_rxint(FAR struct uart_dev_s *dev, bool enable);
-static bool up_rxavailable(FAR struct uart_dev_s *dev);
-static void up_send(FAR struct uart_dev_s *dev, int ch);
-static void up_txint(FAR struct uart_dev_s *dev, bool enable);
-static bool up_txready(FAR struct uart_dev_s *dev);
-static bool up_txempty(FAR struct uart_dev_s *dev);
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static const struct uart_ops_s g_uart_ops =
-{
- up_setup, /* setup */
- up_shutdown, /* shutdown */
- up_attach, /* attach */
- up_detach, /* detach */
- up_ioctl, /* ioctl */
- up_receive, /* receive */
- up_rxint, /* rxint */
- up_rxavailable, /* rxavailable */
-#ifdef CONFIG_SERIAL_IFLOWCONTROL
- NULL, /* rxflowcontrol */
-#endif
- up_send, /* send */
- up_txint, /* txint */
- up_txready, /* txready */
- up_txempty, /* txempty */
-};
-
-/* I/O buffers */
-
-static char g_uartrxbuffer[CONFIG_UART_RXBUFSIZE];
-static char g_uarttxbuffer[CONFIG_UART_TXBUFSIZE];
-
-/* This describes the state of the fake UART port. */
-
-static uart_dev_t g_uartport =
-{
- 0, /* open_count */
- false, /* xmitwaiting */
- false, /* recvwaiting */
- false, /* isconsole */
- { 1 }, /* closesem */
- { 0 }, /* xmitsem */
- { 0 }, /* recvsem */
- { /* xmit */
- { 1 }, /* sem */
- 0, /* head */
- 0, /* tail */
- CONFIG_UART_TXBUFSIZE, /* size */
- g_uarttxbuffer, /* buffer */
- },
- { /* recv */
- { 1 }, /* sem */
- 0, /* head */
- 0, /* tail */
- CONFIG_UART_RXBUFSIZE, /* size */
- g_uartrxbuffer, /* buffer */
- },
- &g_uart_ops, /* ops */
- NULL, /* priv */
-};
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: up_setup
- *
- * Description:
- * Configure the UART baud, bits, parity, fifos, etc. This
- * method is called the first time that the serial port is
- * opened.
- *
- ****************************************************************************/
-
-static int up_setup(FAR struct uart_dev_s *dev)
-{
- outp(RESET, 0);
- outp(CONTROL, ctrl);
- outp(BAUD, baud);
-
- return OK;
-}
-
-/****************************************************************************
- * Name: up_shutdown
- *
- * Description:
- * Disable the UART. This method is called when the serial
- * port is closed
- *
- ****************************************************************************/
-
-static void up_shutdown(FAR struct uart_dev_s *dev)
-{
-}
-
-/****************************************************************************
- * Name: up_attach
- *
- * Description:
- * Configure the UART to operation in interrupt driven mode. This method is
- * called when the serial port is opened. Normally, this is just after the
- * setup() method is called, however, the serial console may operate in a
- * non-interrupt driven mode during the boot phase.
- *
- * RX and TX interrupts are not enabled by the attach method (unless the
- * hardware supports multiple levels of interrupt enabling). The RX and TX
- * interrupts are not enabled until the txint() and rxint() methods are called.
- *
- ****************************************************************************/
-
-static int up_attach(FAR struct uart_dev_s *dev)
-{
-// SDCC complains here
-// *((void (*)()) XMIT_INT_VECTOR) = rs232_xmitisr;
-// *((void (*)()) RECV_INT_VECTOR) = rs232_recvisr;
- *((int *) XMIT_INT_VECTOR) = (int) rs232_xmitisr;
- *((int *) RECV_INT_VECTOR) = (int) rs232_recvisr;
-
- *(char *)WRINTMASK_SHADOW &= ~(MASK_ERR_INT | MASK_XMIT_INT);
- outp(WRINTMASK, *(char *)WRINTMASK_SHADOW |= MASK_RECV_INT);
-
- return OK;
-}
-
-/****************************************************************************
- * Name: up_detach
- *
- * Description:
- * Detach UART interrupts. This method is called when the serial port is
- * closed normally just before the shutdown method is called. The exception is
- * the serial console which is never shutdown.
- *
- ****************************************************************************/
-
-static void up_detach(FAR struct uart_dev_s *dev)
-{
- outp(WRINTMASK, *(char *)WRINTMASK_SHADOW &= ~(MASK_ERR_INT | MASK_RECV_INT | MASK_XMIT_INT));
- *((int *) XMIT_INT_VECTOR) = 0x35fa;
- *((int *) RECV_INT_VECTOR) = 0x35fa;
-}
-
-/****************************************************************************
- * Name: up_ioctl
- *
- * Description:
- * All ioctl calls will be routed through this method
- *
- ****************************************************************************/
-
-static int up_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
-{
- return -ENOTTY;
-}
-
-/****************************************************************************
- * Name: up_receive
- *
- * Description:
- * Called (usually) from the interrupt level to receive one
- * character from the UART. Error bits associated with the
- * receipt are provided in the return 'status'.
- *
- ****************************************************************************/
-
-static int up_receive(FAR struct uart_dev_s *dev, unsigned int *status)
-{
-// uint8_t ch = z80_lowputc();
-
- *status = 0;
- return ch;
-}
-
-/****************************************************************************
- * Name: up_rxint
- *
- * Description:
- * Call to enable or disable RX interrupts
- *
- ****************************************************************************/
-
-static void up_rxint(FAR struct uart_dev_s *dev, bool enable)
-{
-}
-
-/****************************************************************************
- * Name: up_rxavailable
- *
- * Description:
- * Return true if the receive fifo is not empty
- *
- ****************************************************************************/
-
-static bool up_rxavailable(FAR struct uart_dev_s *dev)
-{
- return true;
-}
-
-/****************************************************************************
- * Name: up_send
- *
- * Description:
- * This method will send one byte on the UART
- *
- ****************************************************************************/
-
-static void up_send(FAR struct uart_dev_s *dev, int ch)
-{
- z80_lowputc(ch);
-}
-
-/****************************************************************************
- * Name: up_txint
- *
- * Description:
- * Call to enable or disable TX interrupts
- *
- ****************************************************************************/
-
-static void up_txint(FAR struct uart_dev_s *dev, bool enable)
-{
-}
-
-/****************************************************************************
- * Name: up_txready
- *
- * Description:
- * Return true if the transmit fifo is not full
- *
- ****************************************************************************/
-
-static bool up_txready(FAR struct uart_dev_s *dev)
-{
- return true;
-}
-
-/****************************************************************************
- * Name: up_txempty
- *
- * Description:
- * Return true if the transmit fifo is empty
- *
- ****************************************************************************/
-
-static bool up_txempty(FAR struct uart_dev_s *dev)
-{
- return true;
-}
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: up_serialinit
- *
- * Description:
- * Performs the low level UART initialization early in
- * debug so that the serial console will be available
- * during bootup. This must be called before up_serialinit.
- *
- ****************************************************************************/
-
-void up_earlyserialinit(void)
-{
-}
-
-/****************************************************************************
- * Name: up_serialinit
- *
- * Description:
- * Register serial ports. This assumes
- * that up_earlyserialinit was called previously.
- *
- ****************************************************************************/
-
-void up_serialinit(void)
-{
- (void)uart_register("/dev/console", &g_uartport);
- (void)uart_register("/dev/ttyS0", &g_uartport);
-}
-#endif /* USE_SERIALDRIVER */
-
-/****************************************************************************
- * Name: up_putc
- *
- * Description:
- * Provide priority, low-level access to support OS debug
- * writes
- *
- ****************************************************************************/
-
-int up_putc(int ch)
-{
- z80_lowputc(ch);
- return 0;
-}
diff --git a/configs/xtrs/src/xtr_timerisr.c b/configs/xtrs/src/xtr_timerisr.c
deleted file mode 100644
index c05c661b35e..00000000000
--- a/configs/xtrs/src/xtr_timerisr.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
- * configs/xtrs/src/xtr_timerisr.c
- *
- * Copyright (C) 2008-2009, 2017 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
- *
- * 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
-
-#include
-
-#include
-
-#include "clock/clock.h"
-#include "up_internal.h"
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: xtrs_timerisr
- *
- * Description:
- * The timer ISR will perform a variety of services for various portions of
- * the system.
- *
- ****************************************************************************/
-
-int xtrs_timerisr(int irq, FAR chipreg_t *regs, FAR void *arg)
-{
- /* Process timer interrupt */
-
- sched_process_timer();
- return 0;
-}
-
-/****************************************************************************
- * Function: xtrs_timer_initialize
- *
- * Description:
- * This function is called during start-up to initialize the timer
- * interrupt.
- *
- ****************************************************************************/
-
-void xtrs_timer_initialize(void)
-{
- /* The timer interrupt was attached in up_irqinitialize -- see comments there */
-}
diff --git a/configs/xtrs/src/xtrs_head.asm b/configs/xtrs/src/xtrs_head.asm
deleted file mode 100644
index db717ef097b..00000000000
--- a/configs/xtrs/src/xtrs_head.asm
+++ /dev/null
@@ -1,296 +0,0 @@
-;**************************************************************************
-; configs/xtrs/src/xtrs_head.asm
-;
-; Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
-; Author: Gregory Nutt
-;
-; 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.
-;
-;**************************************************************************
-
- .title NuttX for the Z80
- .module xtrs_head
-
-;**************************************************************************
-; Constants
-;**************************************************************************
-
- ; Register save area layout
-
- XCPT_I == 0 ; Offset 0: Saved I w/interrupt state in parity
- XCPT_BC == 2 ; Offset 1: Saved BC register
- XCPT_DE == 4 ; Offset 2: Saved DE register
- XCPT_IX == 6 ; Offset 3: Saved IX register
- XCPT_IY == 8 ; Offset 4: Saved IY register
- XCPT_SP == 10 ; Offset 5: Offset to SP at time of interrupt
- XCPT_HL == 12 ; Offset 6: Saved HL register
- XCPT_AF == 14 ; Offset 7: Saved AF register
- XCPT_PC == 16 ; Offset 8: Offset to PC at time of interrupt
-
- ; Default stack base (needs to be fixed)
-
- .include "asm_mem.h"
-
-;**************************************************************************
-; Global symbols used
-;**************************************************************************
-
- .globl _os_start ; OS entry point
- .globl _up_doirq ; Interrupt decoding logic
-
-;**************************************************************************
-; System start logic
-;**************************************************************************
-
-_up_reset:
- ; Set up the stack pointer at the location determined the Makefile
- ; and stored in asm_mem.h
-
- ld SP, #CONFIG_STACK_END ; Set stack pointer
-
- ; Performed initialization unique to the SDCC toolchain
-
- call gsinit ; Initialize the data section
-
- ; Copy the reset vectors
-
- ld hl, #_up_rstvectors ; code for RAM
- ld de, #0x4000 ; move it here
- ld bc, #3*7 ; 7 vectors / 3 bytes each
- ldir
-
- ; Then start NuttX
-
- call _os_start ; jump to the OS entry point
-
- ; NuttX will never return, but just in case...
-
-_up_halt::
- halt ; We should never get here
- jp _up_halt
-
- ; Data to copy to address 0x4000
-
-_up_rstvectors:
- jp _up_rst1 ; 0x4000 : RST 1
- jp _up_rst2 ; 0x4003 : RST 2
- jp _up_rst3 ; 0x4006 : RST 3
- jp _up_rst4 ; 0x4009 : RST 4
- jp _up_rst5 ; 0x400c : RST 5
- jp _up_rst6 ; 0x400f : RST 6
- jp _up_rst7 ; 0x4012 : RST 7
-
-;**************************************************************************
-; Other reset handlers
-;
-; Interrupt mode 1 behavior:
-;
-; 1. M1 cycle: 7 ticks
-; Acknowledge interrupt and decrements SP
-; 2. M2 cycle: 3 ticks
-; Writes the MS byte of the PC onto the stack and decrements SP
-; 3. M3 cycle: 3 ticks
-; Writes the LS byte of the PC onto the stack and sets the PC to 0x0038.
-;
-;**************************************************************************
-
-_up_rst1: ; RST 1
- ; Save AF on the stack, set the interrupt number and jump to the
- ; common reset handling logic.
- ; Offset 8: Return PC is already on the stack
- push af ; Offset 7: AF (retaining flags)
- ld a, #1 ; 1 = Z80_RST1
- jr _up_rstcommon ; Remaining RST handling is common
-
-_up_rst2: ; RST 2
- ; Save AF on the stack, set the interrupt number and jump to the
- ; common reset handling logic.
- ; Offset 8: Return PC is already on the stack
- push af ; Offset 7: AF (retaining flags)
- ld a, #2 ; 2 = Z80_RST2
- jr _up_rstcommon ; Remaining RST handling is common
-
-_up_rst3: ; RST 3
- ; Save AF on the stack, set the interrupt number and jump to the
- ; common reset handling logic.
- ; Offset 8: Return PC is already on the stack
- push af ; Offset 7: AF (retaining flags)
- ld a, #3 ; 1 = Z80_RST3
- jr _up_rstcommon ; Remaining RST handling is common
-
-_up_rst4: ; RST 4
- ; Save AF on the stack, set the interrupt number and jump to the
- ; common reset handling logic.
- ; Offset 8: Return PC is already on the stack
- push af ; Offset 7: AF (retaining flags)
- ld a, #4 ; 1 = Z80_RST4
- jr _up_rstcommon ; Remaining RST handling is common
-
-_up_rst5: ; RST 5
- ; Save AF on the stack, set the interrupt number and jump to the
- ; common reset handling logic.
- ; Offset 8: Return PC is already on the stack
- push af ; Offset 7: AF (retaining flags)
- ld a, #5 ; 1 = Z80_RST5
- jr _up_rstcommon ; Remaining RST handling is common
-
-_up_rst6: ; RST 6
- ; Save AF on the stack, set the interrupt number and jump to the
- ; common reset handling logic.
- ; Offset 8: Return PC is already on the stack
- push af ; Offset 7: AF (retaining flags)
- ld a, #6 ; 1 = Z80_RST6
- jr _up_rstcommon ; Remaining RST handling is common
-
-_up_rst7: ; RST 7
- ; Save AF on the stack, set the interrupt number and jump to the
- ; common reset handling logic.
- ; Offset 8: Return PC is already on the stack
- push af ; Offset 7: AF (retaining flags)
- ld a, #7 ; 7 = Z80_RST7
- jr _up_rstcommon ; Remaining RST handling is common
-
-;**************************************************************************
-; Common Interrupt handler
-;**************************************************************************
-
-_up_rstcommon:
- ; Create a register frame. SP points to top of frame + 4, pushes
- ; decrement the stack pointer. Already have
- ;
- ; Offset 8: Return PC is already on the stack
- ; Offset 7: AF (retaining flags)
- ;
- ; IRQ number is in A
-
- push hl ; Offset 6: HL
- ld hl, #(3*2) ; HL is the value of the stack pointer before
- add hl, sp ; the interrupt occurred
- push hl ; Offset 5: Stack pointer
- push iy ; Offset 4: IY
- push ix ; Offset 3: IX
- push de ; Offset 2: DE
- push bc ; Offset 1: BC
-
- ld b, a ; Save the reset number in B
- ld a, i ; Parity bit holds interrupt state
- push af ; Offset 0: I with interrupt state in parity
- di
-
- ; Call the interrupt decode logic. SP points to the beggining of the reg structure
-
- ld hl, #0 ; Argument #2 is the beginning of the reg structure
- add hl, sp ;
- push hl ; Place argument #2 at the top of stack
- push bc ; Argument #1 is the Reset number
- inc sp ; (make byte sized)
- call _up_doirq ; Decode the IRQ
-
- ; On return, HL points to the beginning of the reg structure to restore
- ; Note that (1) the arguments pushed on the stack are not popped, and (2) the
- ; original stack pointer is lost. In the normal case (no context switch),
- ; HL will contain the value of the SP before the arguments wer pushed.
-
- ld sp, hl ; Use the new stack pointer
-
- ; Restore registers. HL points to the beginning of the reg structure to restore
-
- ex af, af' ; Select alternate AF
- pop af ; Offset 0: AF' = I with interrupt state in parity
- ex af, af' ; Restore original AF
- pop bc ; Offset 1: BC
- pop de ; Offset 2: DE
- pop ix ; Offset 3: IX
- pop iy ; Offset 4: IY
- exx ; Use alternate BC/DE/HL
- ld hl, #-2 ; Offset of SP to account for ret addr on stack
- pop de ; Offset 5: HL' = Stack pointer after return
- add hl, de ; HL = Stack pointer value before return
- exx ; Restore original BC/DE/HL
- pop hl ; Offset 6: HL
- pop af ; Offset 7: AF
-
- ; Restore the stack pointer
-
- exx ; Use alternate BC/DE/HL
- ld sp, hl ; Set SP = saved stack pointer value before return
- exx ; Restore original BC/DE/HL
-
- ; Restore interrupt state
-
- ex af, af' ; Recover interrupt state
- jp po, nointenable ; Odd parity, IFF2=0, means disabled
- ex af, af' ; Restore AF (before enabling interrupts)
- ei ; yes
- reti
-nointenable::
- ex af, af' ; Restore AF
- reti
-
-;**************************************************************************
-; Ordering of segments for the linker (SDCC only)
-;**************************************************************************
-
- .area _HOME
- .area _CODE
- .area _INITIALIZER
- .area _GSINIT
- .area _GSFINAL
-
- .area _DATA
- .area _INITIALIZED
- .area _BSEG
- .area _BSS
- .area _HEAP
-
-;**************************************************************************
-; Global data initialization logic (SDCC only)
-;**************************************************************************
-
- .area _GSINIT
-gsinit::
- ld bc, #l__INITIALIZER
- ld a, b
- or a, c
- jr Z, gsinit_next
- ld de, #s__INITIALIZED
- ld hl, #s__INITIALIZER
- ldir
-gsinit_next:
-
- .area _GSFINAL
- ret
-
-;**************************************************************************
-; The start of the heap (SDCC only). Note that is actually resides in
-; the _CODE area (which may be FLASH or ROM)
-;**************************************************************************
-
- .area _CODE
-_g_heapbase::
- .dw #s__HEAP