From e0b6137de701ce4e96b8740262871a2f110fc22c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 7 Nov 2014 15:03:03 -0600 Subject: [PATCH] BAS: Rename examples/bas to examples/bastest. Hook into build and configuration system. Finish ROMFS logic --- examples/Kconfig | 1 + examples/Makefile | 2 +- examples/README.txt | 16 +++ examples/bastest/.gitignore | 11 ++ examples/bastest/Kconfig | 31 +++++ examples/bastest/Makefile | 153 +++++++++++++++++++++ examples/{bas => bastest}/README.txt | 52 +++++++ examples/bastest/bastest_main.c | 121 ++++++++++++++++ examples/{bas => bastest}/tests/test01.bas | 0 examples/{bas => bastest}/tests/test02.bas | 0 examples/{bas => bastest}/tests/test03.bas | 0 examples/{bas => bastest}/tests/test04.bas | 0 examples/{bas => bastest}/tests/test05.bas | 0 examples/{bas => bastest}/tests/test06.bas | 0 examples/{bas => bastest}/tests/test07.bas | 0 examples/{bas => bastest}/tests/test08.bas | 0 examples/{bas => bastest}/tests/test09.bas | 0 examples/{bas => bastest}/tests/test10.bas | 0 examples/{bas => bastest}/tests/test11.bas | 0 examples/{bas => bastest}/tests/test12.bas | 0 examples/{bas => bastest}/tests/test13.bas | 0 examples/{bas => bastest}/tests/test14.bas | 0 examples/{bas => bastest}/tests/test15.bas | 0 examples/{bas => bastest}/tests/test16.bas | 0 examples/{bas => bastest}/tests/test17.bas | 0 examples/{bas => bastest}/tests/test18.bas | 0 examples/{bas => bastest}/tests/test19.bas | 0 examples/{bas => bastest}/tests/test20.bas | 0 examples/{bas => bastest}/tests/test21.bas | 0 examples/{bas => bastest}/tests/test22.bas | 0 examples/{bas => bastest}/tests/test23.bas | 0 examples/{bas => bastest}/tests/test24.bas | 0 examples/{bas => bastest}/tests/test25.bas | 0 examples/{bas => bastest}/tests/test26.bas | 0 examples/{bas => bastest}/tests/test27.bas | 0 examples/{bas => bastest}/tests/test28.bas | 0 examples/{bas => bastest}/tests/test29.bas | 0 examples/{bas => bastest}/tests/test30.bas | 0 examples/{bas => bastest}/tests/test31.bas | 0 examples/{bas => bastest}/tests/test32.bas | 0 examples/{bas => bastest}/tests/test33.bas | 0 examples/{bas => bastest}/tests/test34.bas | 0 examples/{bas => bastest}/tests/test35.bas | 0 examples/{bas => bastest}/tests/test36.bas | 0 examples/{bas => bastest}/tests/test37.bas | 0 examples/{bas => bastest}/tests/test38.bas | 0 examples/{bas => bastest}/tests/test39.bas | 0 examples/{bas => bastest}/tests/test40.bas | 0 examples/{bas => bastest}/tests/test41.bas | 0 examples/{bas => bastest}/tests/test42.bas | 0 examples/{bas => bastest}/tests/test43.bas | 0 examples/{bas => bastest}/tests/test44.bas | 0 examples/{bas => bastest}/tests/test45.bas | 0 examples/{bas => bastest}/tests/test46.bas | 0 examples/{bas => bastest}/tests/test47.bas | 0 examples/{bas => bastest}/tests/test48.bas | 0 examples/{bas => bastest}/tests/test49.bas | 0 examples/{bas => bastest}/tests/test50.bas | 0 examples/{bas => bastest}/tests/test51.bas | 0 examples/{bas => bastest}/tests/test52.bas | 0 interpreters/bas/README.txt | 7 +- 61 files changed, 388 insertions(+), 6 deletions(-) create mode 100644 examples/bastest/.gitignore create mode 100644 examples/bastest/Kconfig create mode 100644 examples/bastest/Makefile rename examples/{bas => bastest}/README.txt (90%) create mode 100644 examples/bastest/bastest_main.c rename examples/{bas => bastest}/tests/test01.bas (100%) rename examples/{bas => bastest}/tests/test02.bas (100%) rename examples/{bas => bastest}/tests/test03.bas (100%) rename examples/{bas => bastest}/tests/test04.bas (100%) rename examples/{bas => bastest}/tests/test05.bas (100%) rename examples/{bas => bastest}/tests/test06.bas (100%) rename examples/{bas => bastest}/tests/test07.bas (100%) rename examples/{bas => bastest}/tests/test08.bas (100%) rename examples/{bas => bastest}/tests/test09.bas (100%) rename examples/{bas => bastest}/tests/test10.bas (100%) rename examples/{bas => bastest}/tests/test11.bas (100%) rename examples/{bas => bastest}/tests/test12.bas (100%) rename examples/{bas => bastest}/tests/test13.bas (100%) rename examples/{bas => bastest}/tests/test14.bas (100%) rename examples/{bas => bastest}/tests/test15.bas (100%) rename examples/{bas => bastest}/tests/test16.bas (100%) rename examples/{bas => bastest}/tests/test17.bas (100%) rename examples/{bas => bastest}/tests/test18.bas (100%) rename examples/{bas => bastest}/tests/test19.bas (100%) rename examples/{bas => bastest}/tests/test20.bas (100%) rename examples/{bas => bastest}/tests/test21.bas (100%) rename examples/{bas => bastest}/tests/test22.bas (100%) rename examples/{bas => bastest}/tests/test23.bas (100%) rename examples/{bas => bastest}/tests/test24.bas (100%) rename examples/{bas => bastest}/tests/test25.bas (100%) rename examples/{bas => bastest}/tests/test26.bas (100%) rename examples/{bas => bastest}/tests/test27.bas (100%) rename examples/{bas => bastest}/tests/test28.bas (100%) rename examples/{bas => bastest}/tests/test29.bas (100%) rename examples/{bas => bastest}/tests/test30.bas (100%) rename examples/{bas => bastest}/tests/test31.bas (100%) rename examples/{bas => bastest}/tests/test32.bas (100%) rename examples/{bas => bastest}/tests/test33.bas (100%) rename examples/{bas => bastest}/tests/test34.bas (100%) rename examples/{bas => bastest}/tests/test35.bas (100%) rename examples/{bas => bastest}/tests/test36.bas (100%) rename examples/{bas => bastest}/tests/test37.bas (100%) rename examples/{bas => bastest}/tests/test38.bas (100%) rename examples/{bas => bastest}/tests/test39.bas (100%) rename examples/{bas => bastest}/tests/test40.bas (100%) rename examples/{bas => bastest}/tests/test41.bas (100%) rename examples/{bas => bastest}/tests/test42.bas (100%) rename examples/{bas => bastest}/tests/test43.bas (100%) rename examples/{bas => bastest}/tests/test44.bas (100%) rename examples/{bas => bastest}/tests/test45.bas (100%) rename examples/{bas => bastest}/tests/test46.bas (100%) rename examples/{bas => bastest}/tests/test47.bas (100%) rename examples/{bas => bastest}/tests/test48.bas (100%) rename examples/{bas => bastest}/tests/test49.bas (100%) rename examples/{bas => bastest}/tests/test50.bas (100%) rename examples/{bas => bastest}/tests/test51.bas (100%) rename examples/{bas => bastest}/tests/test52.bas (100%) diff --git a/examples/Kconfig b/examples/Kconfig index 3c1639923..9b14a5bca 100644 --- a/examples/Kconfig +++ b/examples/Kconfig @@ -4,6 +4,7 @@ # source "$APPSDIR/examples/adc/Kconfig" +source "$APPSDIR/examples/bastest/Kconfig" source "$APPSDIR/examples/buttons/Kconfig" source "$APPSDIR/examples/can/Kconfig" source "$APPSDIR/examples/cc3000/Kconfig" diff --git a/examples/Makefile b/examples/Makefile index 815b410a3..b2e04be81 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -37,7 +37,7 @@ # Sub-directories -SUBDIRS = adc buttons can cc3000 cpuhog cxxtest dhcpd discover elf +SUBDIRS = adc bastest buttons can cc3000 cpuhog cxxtest dhcpd discover elf SUBDIRS += flash_test ftpc ftpd hello helloxx hidkbd igmp i2schar json SUBDIRS += keypadtest lcdrw mm modbus mount mtdpart mtdrwb netpkt nettest SUBDIRS += nrf24l01_term nsh null nx nxterm nxffs nxflat nxhello nximage diff --git a/examples/README.txt b/examples/README.txt index a1d754ae1..caac77e4a 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -48,6 +48,22 @@ examples/adc CONFIG_EXAMPLES_ADC_GROUPSIZE - The number of samples to read at once. Default: 4 +examples/bastest +^^^^^^^^^^^^^^^^ + This directory contains a small program that will mount a ROMFS file system + containing the BASIC test files extracted from the BAS 2.4 release. See + examples/bastest/README.txt for licensing and usage information. + + CONFIG_EXAMPLES_BASTEST_DEVMINOR - The minor device number of the ROMFS block + driver. For example, the N in /dev/ramN. Used for registering the RAM + block driver that will hold the ROMFS file system containing the BASIC + files to be tested. Default: 0 + + CONFIG_EXAMPLES_BASTEST_DEVPATH - The path to the ROMFS block driver device. This + must match EXAMPLES_BASTEST_DEVMINOR. Used for registering the RAM block driver + that will hold the ROMFS file system containing the BASIC files to be + tested. Default: "/dev/ram0" + examples/buttons ^^^^^^^^^^^^^^^^ diff --git a/examples/bastest/.gitignore b/examples/bastest/.gitignore new file mode 100644 index 000000000..fa1ec7579 --- /dev/null +++ b/examples/bastest/.gitignore @@ -0,0 +1,11 @@ +/Make.dep +/.depend +/.built +/*.asm +/*.obj +/*.rel +/*.lst +/*.sym +/*.adb +/*.lib +/*.src diff --git a/examples/bastest/Kconfig b/examples/bastest/Kconfig new file mode 100644 index 000000000..3c56df48d --- /dev/null +++ b/examples/bastest/Kconfig @@ -0,0 +1,31 @@ +# +# For a description of the syntax of this configuration file, +# see misc/tools/kconfig-language.txt. +# + +config EXAMPLES_BASTEST + bool "Setup Test Files for BAS" + default n + depends on INTERPRETERS_BAS + ---help--- + Mount the ROMFS file system containing the BAS test files. + +if EXAMPLES_BASTEST + +config EXAMPLES_BASTEST_DEVMINOR + int "ROMFS Minor Device Number" + default 0 + ---help--- + The minor device number of the ROMFS block. For example, the N in /dev/ramN. + Used for registering the RAM block driver that will hold the ROMFS file system + containing the BASIC files to be tested. Default: 0 + +config EXAMPLES_BASTEST_DEVPATH + string "ROMFS Device Path" + default "/dev/ram0" + ---help--- + The path to the ROMFS block driver device. This must match EXAMPLES_BASTEST_DEVMINOR. + Used for registering the RAM block driver that will hold the ROMFS file system + containing the BASIC files to be tested. Default: "/dev/ram0" + +endif diff --git a/examples/bastest/Makefile b/examples/bastest/Makefile new file mode 100644 index 000000000..144a9cfd6 --- /dev/null +++ b/examples/bastest/Makefile @@ -0,0 +1,153 @@ +############################################################################ +# apps/examples/bastest/Makefile +# +# Copyright (C) 2014 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)/Make.defs +include $(APPDIR)/Make.defs + +# BAS test volume mounter + +APPNAME = bastest +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 + +# Hello, World! Example + +ASRCS = +CSRCS = +MAINSRC = bastest_main.c + +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) +MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) + +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) + +ifneq ($(CONFIG_BUILD_KERNEL),y) + OBJS += $(MAINOBJ) +endif + +ifeq ($(CONFIG_WINDOWS_NATIVE),y) + BIN = ..\..\libapps$(LIBEXT) +else +ifeq ($(WINTOOL),y) + BIN = ..\\..\\libapps$(LIBEXT) +else + BIN = ../../libapps$(LIBEXT) +endif +endif + +ifeq ($(WINTOOL),y) + INSTALL_DIR = "${shell cygpath -w $(BIN_DIR)}" +else + INSTALL_DIR = $(BIN_DIR) +endif + +BASTEST_DIR = $(APPDIR)$(DELIM)examples$(DELIM)bastest +TESTS_DIR = $(BASTEST_DIR)$(DELIM)tests +ROMFS_IMG = $(BASTEST_DIR)$(DELIM)romfs.img +ROMFS_HDR = $(BASTEST_DIR)$(DELIM)romfs.h + +PROGNAME = bastest$(EXEEXT) + +ROOTDEPPATH = --dep-path . + +# Common build + +VPATH = + +all: .built +.PHONY: clean depend distclean + +$(AOBJS): %$(OBJEXT): %.S + $(call ASSEMBLE, $<, $@) + +$(COBJS) $(MAINOBJ): %$(OBJEXT): %.c + $(call COMPILE, $<, $@) + +.built: $(OBJS) + $(call ARCHIVE, $(BIN), $(OBJS)) + @touch .built + +# Create the romfs.h header file from the tests/ directory + +$(ROMFS_HDR) : $(ROMFS_IMG) + $(Q) genromfs -f $@ -d $(TESTS_DIR) -V "BASTEST" + $(Q) (xxd -i romfs.img | sed -e "s/^unsigned/static const unsigned/g" >$@) + +# Link and install the program binary + +ifeq ($(CONFIG_BUILD_KERNEL),y) +$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ) + @echo "LD: $(PROGNAME)" + $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS) + $(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME) + +install: $(BIN_DIR)$(DELIM)$(PROGNAME) + +else +install: + +endif + +# Register the NSH builtin appliation + +ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) +$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile + $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) + +context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat +else +context: +endif + +# Housekeeping stuff + +.depend: Makefile $(SRCS) + @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + @touch $@ + +depend: .depend + +clean: + $(call DELFILE, .built) + $(call CLEAN) + +distclean: clean + $(call DELFILE, Make.dep) + $(call DELFILE, .depend) + +-include Make.dep diff --git a/examples/bas/README.txt b/examples/bastest/README.txt similarity index 90% rename from examples/bas/README.txt rename to examples/bastest/README.txt index c1a47429d..846fad0e0 100644 --- a/examples/bas/README.txt +++ b/examples/bastest/README.txt @@ -1,3 +1,55 @@ +README +====== + + This directory contains a small program that will mount a ROMFS file system + containing the BASIC test files extracted from the BAS 2.4 release. + +Background +========== + Bas is an interpreter for the classic dialect of the programming language + BASIC. It is pretty compatible to typical BASIC interpreters of the 1980s, + unlike some other UNIX BASIC interpreters, that implement a different + syntax, breaking compatibility to existing programs. Bas offers many ANSI + BASIC statements for structured programming, such as procedures, local + variables and various loop types. Further there are matrix operations, + automatic LIST indentation and many statements and functions found in + specific classic dialects. Line numbers are not required. + + The interpreter tokenises the source and resolves references to variables + and jump targets before running the program. This compilation pass + increases efficiency and catches syntax errors, type errors and references + to variables that are never initialised. Bas is written in ANSI C for + UNIX systems. + +License +======= + BAS 2.4 is released as part of NuttX under the standard 3-clause BSD license + use by all components of NuttX. This is not incompatible with the original + BAS 2.4 licensing + + Copyright (c) 1999-2014 Michael Haardt + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +TEST OVERVIEW +============= + test01.bas ========== Scalar variable assignment diff --git a/examples/bastest/bastest_main.c b/examples/bastest/bastest_main.c new file mode 100644 index 000000000..3cf70c681 --- /dev/null +++ b/examples/bastest/bastest_main.c @@ -0,0 +1,121 @@ +/**************************************************************************** + * examples/bastest/bastest_main.c + * + * Copyright (C) 2014 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 "romfs.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ +/* Check configuration. This is not all of the configuration settings that + * are required -- only the more obvious. + */ + +#if CONFIG_NFILE_DESCRIPTORS < 1 +# error "You must provide file descriptors via CONFIG_NFILE_DESCRIPTORS in your configuration file" +#endif + +#ifndef CONFIG_FS_ROMFS +# error "You must select CONFIG_FS_ROMFS in your configuration file" +#endif + +#ifdef CONFIG_DISABLE_MOUNTPOINT +# error "You must not disable mountpoints via CONFIG_DISABLE_MOUNTPOINT in your configuration file" +#endif + +/* Describe the ROMFS file system */ + +#define SECTORSIZE 512 +#define NSECTORS(b) (((b)+SECTORSIZE-1)/SECTORSIZE) +#define MOUNTPT "/mnt/romfs" + +#ifndef CONFIG_EXAMPLES_BASTEST_DEVMINOR +# define CONFIG_EXAMPLES_BASTEST_DEVMINOR 0 +#endif + +#ifndef CONFIG_EXAMPLES_BASTEST_DEVPATH +# define CONFIG_EXAMPLES_BASTEST_DEVPATH "/dev/ram0" +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * bastest_main + ****************************************************************************/ + +#ifdef CONFIG_BUILD_KERNEL +int main(int argc, FAR char *argv[]) +#else +int bastest_main(int argc, char *argv[]) +#endif +{ + /* Create a ROM disk for the ROMFS filesystem */ + + printf("Registering romdisk at /dev/ram%d\n", CONFIG_EXAMPLES_BASTEST_DEVMINOR); + ret = romdisk_register(CONFIG_EXAMPLES_BASTEST_DEVMINOR, (FAR uint8_t *)romfs_img, + NSECTORS(romfs_img_len), SECTORSIZE); + if (ret < 0) + { + err("ERROR: romdisk_register failed: %d\n", ret); + return 1; + } + + /* Mount the file system */ + + message("Mounting ROMFS filesystem at target=%s with source=%s\n", + MOUNTPT, CONFIG_EXAMPLES_BASTEST_DEVPATH); + + ret = mount(CONFIG_EXAMPLES_BASTEST_DEVPATH, MOUNTPT, "romfs", MS_RDONLY, NULL); + if (ret < 0) + { + err("ERROR: mount(%s,%s,romfs) failed: %s\n", + CONFIG_EXAMPLES_BASTEST_DEVPATH, MOUNTPT, errno); + return 1; + } + + return 0; +} diff --git a/examples/bas/tests/test01.bas b/examples/bastest/tests/test01.bas similarity index 100% rename from examples/bas/tests/test01.bas rename to examples/bastest/tests/test01.bas diff --git a/examples/bas/tests/test02.bas b/examples/bastest/tests/test02.bas similarity index 100% rename from examples/bas/tests/test02.bas rename to examples/bastest/tests/test02.bas diff --git a/examples/bas/tests/test03.bas b/examples/bastest/tests/test03.bas similarity index 100% rename from examples/bas/tests/test03.bas rename to examples/bastest/tests/test03.bas diff --git a/examples/bas/tests/test04.bas b/examples/bastest/tests/test04.bas similarity index 100% rename from examples/bas/tests/test04.bas rename to examples/bastest/tests/test04.bas diff --git a/examples/bas/tests/test05.bas b/examples/bastest/tests/test05.bas similarity index 100% rename from examples/bas/tests/test05.bas rename to examples/bastest/tests/test05.bas diff --git a/examples/bas/tests/test06.bas b/examples/bastest/tests/test06.bas similarity index 100% rename from examples/bas/tests/test06.bas rename to examples/bastest/tests/test06.bas diff --git a/examples/bas/tests/test07.bas b/examples/bastest/tests/test07.bas similarity index 100% rename from examples/bas/tests/test07.bas rename to examples/bastest/tests/test07.bas diff --git a/examples/bas/tests/test08.bas b/examples/bastest/tests/test08.bas similarity index 100% rename from examples/bas/tests/test08.bas rename to examples/bastest/tests/test08.bas diff --git a/examples/bas/tests/test09.bas b/examples/bastest/tests/test09.bas similarity index 100% rename from examples/bas/tests/test09.bas rename to examples/bastest/tests/test09.bas diff --git a/examples/bas/tests/test10.bas b/examples/bastest/tests/test10.bas similarity index 100% rename from examples/bas/tests/test10.bas rename to examples/bastest/tests/test10.bas diff --git a/examples/bas/tests/test11.bas b/examples/bastest/tests/test11.bas similarity index 100% rename from examples/bas/tests/test11.bas rename to examples/bastest/tests/test11.bas diff --git a/examples/bas/tests/test12.bas b/examples/bastest/tests/test12.bas similarity index 100% rename from examples/bas/tests/test12.bas rename to examples/bastest/tests/test12.bas diff --git a/examples/bas/tests/test13.bas b/examples/bastest/tests/test13.bas similarity index 100% rename from examples/bas/tests/test13.bas rename to examples/bastest/tests/test13.bas diff --git a/examples/bas/tests/test14.bas b/examples/bastest/tests/test14.bas similarity index 100% rename from examples/bas/tests/test14.bas rename to examples/bastest/tests/test14.bas diff --git a/examples/bas/tests/test15.bas b/examples/bastest/tests/test15.bas similarity index 100% rename from examples/bas/tests/test15.bas rename to examples/bastest/tests/test15.bas diff --git a/examples/bas/tests/test16.bas b/examples/bastest/tests/test16.bas similarity index 100% rename from examples/bas/tests/test16.bas rename to examples/bastest/tests/test16.bas diff --git a/examples/bas/tests/test17.bas b/examples/bastest/tests/test17.bas similarity index 100% rename from examples/bas/tests/test17.bas rename to examples/bastest/tests/test17.bas diff --git a/examples/bas/tests/test18.bas b/examples/bastest/tests/test18.bas similarity index 100% rename from examples/bas/tests/test18.bas rename to examples/bastest/tests/test18.bas diff --git a/examples/bas/tests/test19.bas b/examples/bastest/tests/test19.bas similarity index 100% rename from examples/bas/tests/test19.bas rename to examples/bastest/tests/test19.bas diff --git a/examples/bas/tests/test20.bas b/examples/bastest/tests/test20.bas similarity index 100% rename from examples/bas/tests/test20.bas rename to examples/bastest/tests/test20.bas diff --git a/examples/bas/tests/test21.bas b/examples/bastest/tests/test21.bas similarity index 100% rename from examples/bas/tests/test21.bas rename to examples/bastest/tests/test21.bas diff --git a/examples/bas/tests/test22.bas b/examples/bastest/tests/test22.bas similarity index 100% rename from examples/bas/tests/test22.bas rename to examples/bastest/tests/test22.bas diff --git a/examples/bas/tests/test23.bas b/examples/bastest/tests/test23.bas similarity index 100% rename from examples/bas/tests/test23.bas rename to examples/bastest/tests/test23.bas diff --git a/examples/bas/tests/test24.bas b/examples/bastest/tests/test24.bas similarity index 100% rename from examples/bas/tests/test24.bas rename to examples/bastest/tests/test24.bas diff --git a/examples/bas/tests/test25.bas b/examples/bastest/tests/test25.bas similarity index 100% rename from examples/bas/tests/test25.bas rename to examples/bastest/tests/test25.bas diff --git a/examples/bas/tests/test26.bas b/examples/bastest/tests/test26.bas similarity index 100% rename from examples/bas/tests/test26.bas rename to examples/bastest/tests/test26.bas diff --git a/examples/bas/tests/test27.bas b/examples/bastest/tests/test27.bas similarity index 100% rename from examples/bas/tests/test27.bas rename to examples/bastest/tests/test27.bas diff --git a/examples/bas/tests/test28.bas b/examples/bastest/tests/test28.bas similarity index 100% rename from examples/bas/tests/test28.bas rename to examples/bastest/tests/test28.bas diff --git a/examples/bas/tests/test29.bas b/examples/bastest/tests/test29.bas similarity index 100% rename from examples/bas/tests/test29.bas rename to examples/bastest/tests/test29.bas diff --git a/examples/bas/tests/test30.bas b/examples/bastest/tests/test30.bas similarity index 100% rename from examples/bas/tests/test30.bas rename to examples/bastest/tests/test30.bas diff --git a/examples/bas/tests/test31.bas b/examples/bastest/tests/test31.bas similarity index 100% rename from examples/bas/tests/test31.bas rename to examples/bastest/tests/test31.bas diff --git a/examples/bas/tests/test32.bas b/examples/bastest/tests/test32.bas similarity index 100% rename from examples/bas/tests/test32.bas rename to examples/bastest/tests/test32.bas diff --git a/examples/bas/tests/test33.bas b/examples/bastest/tests/test33.bas similarity index 100% rename from examples/bas/tests/test33.bas rename to examples/bastest/tests/test33.bas diff --git a/examples/bas/tests/test34.bas b/examples/bastest/tests/test34.bas similarity index 100% rename from examples/bas/tests/test34.bas rename to examples/bastest/tests/test34.bas diff --git a/examples/bas/tests/test35.bas b/examples/bastest/tests/test35.bas similarity index 100% rename from examples/bas/tests/test35.bas rename to examples/bastest/tests/test35.bas diff --git a/examples/bas/tests/test36.bas b/examples/bastest/tests/test36.bas similarity index 100% rename from examples/bas/tests/test36.bas rename to examples/bastest/tests/test36.bas diff --git a/examples/bas/tests/test37.bas b/examples/bastest/tests/test37.bas similarity index 100% rename from examples/bas/tests/test37.bas rename to examples/bastest/tests/test37.bas diff --git a/examples/bas/tests/test38.bas b/examples/bastest/tests/test38.bas similarity index 100% rename from examples/bas/tests/test38.bas rename to examples/bastest/tests/test38.bas diff --git a/examples/bas/tests/test39.bas b/examples/bastest/tests/test39.bas similarity index 100% rename from examples/bas/tests/test39.bas rename to examples/bastest/tests/test39.bas diff --git a/examples/bas/tests/test40.bas b/examples/bastest/tests/test40.bas similarity index 100% rename from examples/bas/tests/test40.bas rename to examples/bastest/tests/test40.bas diff --git a/examples/bas/tests/test41.bas b/examples/bastest/tests/test41.bas similarity index 100% rename from examples/bas/tests/test41.bas rename to examples/bastest/tests/test41.bas diff --git a/examples/bas/tests/test42.bas b/examples/bastest/tests/test42.bas similarity index 100% rename from examples/bas/tests/test42.bas rename to examples/bastest/tests/test42.bas diff --git a/examples/bas/tests/test43.bas b/examples/bastest/tests/test43.bas similarity index 100% rename from examples/bas/tests/test43.bas rename to examples/bastest/tests/test43.bas diff --git a/examples/bas/tests/test44.bas b/examples/bastest/tests/test44.bas similarity index 100% rename from examples/bas/tests/test44.bas rename to examples/bastest/tests/test44.bas diff --git a/examples/bas/tests/test45.bas b/examples/bastest/tests/test45.bas similarity index 100% rename from examples/bas/tests/test45.bas rename to examples/bastest/tests/test45.bas diff --git a/examples/bas/tests/test46.bas b/examples/bastest/tests/test46.bas similarity index 100% rename from examples/bas/tests/test46.bas rename to examples/bastest/tests/test46.bas diff --git a/examples/bas/tests/test47.bas b/examples/bastest/tests/test47.bas similarity index 100% rename from examples/bas/tests/test47.bas rename to examples/bastest/tests/test47.bas diff --git a/examples/bas/tests/test48.bas b/examples/bastest/tests/test48.bas similarity index 100% rename from examples/bas/tests/test48.bas rename to examples/bastest/tests/test48.bas diff --git a/examples/bas/tests/test49.bas b/examples/bastest/tests/test49.bas similarity index 100% rename from examples/bas/tests/test49.bas rename to examples/bastest/tests/test49.bas diff --git a/examples/bas/tests/test50.bas b/examples/bastest/tests/test50.bas similarity index 100% rename from examples/bas/tests/test50.bas rename to examples/bastest/tests/test50.bas diff --git a/examples/bas/tests/test51.bas b/examples/bastest/tests/test51.bas similarity index 100% rename from examples/bas/tests/test51.bas rename to examples/bastest/tests/test51.bas diff --git a/examples/bas/tests/test52.bas b/examples/bastest/tests/test52.bas similarity index 100% rename from examples/bas/tests/test52.bas rename to examples/bastest/tests/test52.bas diff --git a/interpreters/bas/README.txt b/interpreters/bas/README.txt index d9d9425f9..d8435930e 100644 --- a/interpreters/bas/README.txt +++ b/interpreters/bas/README.txt @@ -1,8 +1,8 @@ README ====== -Introductions -============= +Introduction +============ Bas is an interpreter for the classic dialect of the programming language BASIC. It is pretty compatible to typical BASIC interpreters of the 1980s, unlike some other UNIX BASIC interpreters, that implement a different @@ -18,9 +18,6 @@ Introductions to variables that are never initialised. Bas is written in ANSI C for UNIX systems. - Please do "make check" after compiling bas to run a couple regression - tests. - License ======= BAS 2.4 is released as part of NuttX under the standard 3-clause BSD license