4Th, the Friendly Forth Compiler

Total Page:16

File Type:pdf, Size:1020Kb

4Th, the Friendly Forth Compiler 4tH, the friendly Forth compiler J.L. Bezemer May 3, 2012 Contents 1 What's new 16 1.1 What's new in version 3.61.5 . 16 1.2 What's new in version 3.61.4 . 17 1.3 What's new in version 3.61.3 . 19 1.4 What's new in version 3.61.2 . 21 1.5 What's new in version 3.61.1 . 24 1.6 What's new in version 3.61.0 . 25 1.7 What's new in version 3.60.1 . 28 1.8 What's new in version 3.60.0 . 29 1.9 What's new in version 3.5d, release 3 . 31 1.10 What's new in version 3.5d, release 2 . 33 1.11 What's new in version 3.5d . 34 1.12 What's new in version 3.5c, release 3 . 35 1.13 What's new in version 3.5c, release 2 . 36 1.14 What's new in version 3.5c . 38 1.15 What's new in version 3.5b, release 2 . 39 1.16 What's new in version 3.5b . 40 1.17 What's new in version 3.5a, release 2 . 40 1.18 What's new in version 3.5a . 41 1.19 What's new in version 3.3d, release 2 . 46 1.20 What's new in version 3.3d . 47 1.21 What's new in version 3.3c . 49 1.22 What's new in version 3.3a . 51 1.23 What's new in version 3.2e . 52 1.24 What's new in version 3.1d . 55 1 CONTENTS 2 I Getting Started 58 2 Overview 59 2.1 Introduction . 59 2.2 History . 59 2.3 Applications . 60 2.4 Architecture . 60 2.4.1 The 4tH language . 62 2.4.2 H-code . 62 2.4.3 H-code compiler . 64 2.4.4 Error handling . 64 2.4.5 Interfacing with C . 65 3 Installation Guide 66 3.1 About this package . 66 3.1.1 Example code . 66 3.1.2 Main program . 66 3.1.3 Unix package . 67 3.1.4 Linux package . 68 3.1.5 Android package . 71 3.1.6 MS-DOS package . 73 3.1.7 MS-Windows package . 73 3.2 Setting up your working directory . 74 3.3 Now what? . 74 3.4 Pedigree . 75 3.5 Contributors . 75 3.6 Questions . 76 3.6.1 4tH Website . 76 3.6.2 4tH Google group . 76 3.6.3 Newsgroup . 76 4 A guided tour 77 4.1 4tH interactive . 77 4.2 Starting up 4tH . 77 4.3 Running a program . 77 4.4 Starting an editing session . 78 4.5 Writing your first 4tH program . 79 4.6 A more complex program . 82 CONTENTS 3 4.7 Advanced features . 86 4.8 Suspending a program . 93 4.9 Calculator mode . 95 4.10 Epilogue . 95 5 Frequently asked questions 96 II Primer 98 6 Introduction 99 7 4tH fundamentals 100 7.1 Making calculations without parentheses . 100 7.2 Manipulating the stack . 101 7.3 Deep stack manipulators . 102 7.4 Passing arguments to functions . 102 7.5 Making your own words . 103 7.6 Adding comment . 104 7.7 Text-format of 4tH source . 104 7.8 Displaying string literals . 104 7.9 Creating variables . 105 7.10 Using variables . 105 7.11 Built-in variables . 105 7.12 What is a cell? . 106 7.13 What is a literal expression? . 106 7.14 Declaring arrays of numbers . 106 7.15 Using arrays of numbers . 106 7.16 Declaring and using constants . 107 7.17 Built-in constants . 108 7.18 Using booleans . 108 7.19 IF-ELSE constructs . 108 7.20 FOR-NEXT constructs . 109 7.21 WHILE-DO constructs . 110 7.22 REPEAT-UNTIL constructs . 110 7.23 Infinite loops . 110 7.24 Including source files . 111 7.25 Getting a number from the keyboard . 111 CONTENTS 4 8 4tH arrays 112 8.1 Aligning numbers . 112 8.2 Creating arrays of constants . 112 8.3 Using arrays of constants . 112 8.4 Using values . 113 8.5 Creating string variables . 114 8.6 What is an address? . 114 8.7 String literals . 115 8.8 String constants . 115 8.9 Initializing string variables . 116 8.10 Initializing a NULL string variable . 116 8.11 Getting the length of a string variable . 116 8.12 Printing a string variable . 117 8.13 Copying a string variable . 117 8.14 The string terminator . 117 8.15 Slicing strings . 118 8.16 Appending strings . 119 8.17 Comparing strings . 119 8.18 Finding a substring . 120 8.19 Replacing substrings . 121 8.20 Deleting substrings . 121 8.21 Removing trailing spaces . 122 8.22 Removing leading spaces . 122 8.23 Upper and lower case . ..
Recommended publications
  • Embedded Systems Building and Programming Embedded Devices
    Embedded Systems Building and Programming Embedded Devices PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Tue, 29 May 2012 01:04:04 UTC Contents Articles Wikibooks:Collections Preface 1 Embedded Systems/Embedded Systems Introduction 3 Embedded Systems/Terminology 7 Microprocessor Basics 10 Embedded Systems/Microprocessor Introduction 10 Embedded Systems/Embedded System Basics 11 Embedded Systems/Microprocessor Architectures 13 Embedded Systems/Programmable Controllers 16 Embedded Systems/Floating Point Unit 18 Embedded Systems/Parity 20 Embedded Systems/Memory 21 Embedded Systems/Memory Units 24 Programming Embedded Systems 25 Embedded Systems/C Programming 25 Embedded Systems/Assembly Language 31 Embedded Systems/Mixed C and Assembly Programming 34 Embedded Systems/IO Programming 42 Embedded Systems/Serial and Parallel IO 43 Embedded Systems/Super Loop Architecture 44 Embedded Systems/Protected Mode and Real Mode 46 Embedded Systems/Bootloaders and Bootsectors 47 Embedded Systems/Terminate and Stay Resident 48 Real Time Operating Systems 49 Embedded Systems/Real-Time Operating Systems 49 Embedded Systems/Threading and Synchronization 51 Embedded Systems/Interrupts 54 Embedded Systems/RTOS Implementation 55 Embedded Systems/Locks and Critical Sections 57 Embedded Systems/Common RTOS 60 Embedded Systems/Common RTOS/Palm OS 63 Embedded Systems/Common RTOS/Windows CE 64 Embedded Systems/Common RTOS/DOS 64 Embedded Systems/Linux 65 Interfacing 68 Embedded Systems/Interfacing
    [Show full text]
  • Optimisation Des Performances Et De La Consommation De Puissance Électrique Pour Architecture Intel Ltanium/EPIC
    Université de Valenciennes et du Hainaut-Cambrésis Numéro d'ordre : 08/40 Optimisation des performances et de la consommation de puissance électrique pour architecture Intel ltanium/EPIC THÈSE Présentée et soutenue publiquement le : 25 novembre 2008 pour l'obtention du Doctorat de l'université de Valenciennes et du Hainaut-Cambrésis Spécialité Automatique et Informatique des Systèmes Industriels et Humains Discipline : Informatique par JamelTAYEB Rapporteurs : Dr. Albert COHEN, INRlA, École Polytechnique de Paris Pr. William JALBY, Université de Versailles-Saint-Quentin-en­ Yvelines Examinateurs : Pr. Jean-Luc DEKEYSER, Laboratoire d'Informatique Fondamentale à Lille Pr. Pierre MANNEBACK Faculté Polytechnique de Mons, Belgique Invité : M. Gwenolé BEAUCHESNE, Ingénieur, Mandriva S.A. Paris Directeur: Pr. Sm ail N IAR, LAMIH, Université de Valenciennes Laboratoire d'Automatique, de Mécanique et d'Informatique Industrielles et Humaines - UMR 8530 i Remerciements Merci tout d'abord à Smail Niar qui il y a tous juste quatre ans m 'a offert, en plus de son amitié, l'opportunité d'effectuer ma thèse au sein du laboratoire LAMll-1. Je le remercie pour cette chance inespérée, de la confiance et de son soutien de tous les moments, les plus heureux comme les plus difficiles. Son aide et ses conseils rn 'ont aidé à garder le cap. J'exprime ma profonde gratitude à Albert Cohen et William Jalby qui m'ont fait l'honneur d'être rapporteurs de cette thèse et pour avoir pris le temps de rédiger un rapport sur celle-ci. Je les remercie pour 1' intérêt sincère qu ' ils ont porté à mon travail. Je tiens à remercier ici les examinateurs : Jean-Luc Dekeyser et Pierre Manneback qui m'ont fait le plaisir d'examiner ce travail et de faire partie du Jury.
    [Show full text]
  • Ubuntu: Unleashed 2017 Edition
    Matthew Helmke with Andrew Hudson and Paul Hudson Ubuntu UNLEASHED 2017 Edition 800 East 96th Street, Indianapolis, Indiana 46240 USA Ubuntu Unleashed 2017 Edition Editor-in-Chief Copyright © 2017 by Pearson Education, Inc. Mark Taub All rights reserved. Printed in the United States of America. This publication is protected Acquisitions Editor by copyright, and permission must be obtained from the publisher prior to any prohib- Debra Williams ited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information Cauley regarding permissions, request forms and the appropriate contacts within the Pearson Managing Editor Education Global Rights & Permissions Department, please visit www.pearsoned.com/ permissions/. Sandra Schroeder Many of the designations used by manufacturers and sellers to distinguish their Project Editor products are claimed as trademarks. Where those designations appear in this book, and Lori Lyons the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. Production Manager The author and publisher have taken care in the preparation of this book, but make Dhayanidhi no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in Proofreader connection with or arising out of the use of the information or programs contained Sasirekha herein. Technical Editor For information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content José Antonio Rey particular to your business, training goals, marketing focus, or branding interests), Editorial Assistant please contact our corporate sales department at [email protected] or (800) 382-3419.
    [Show full text]
  • Linux Assembly HOWTO Linux Assembly HOWTO
    Linux Assembly HOWTO Linux Assembly HOWTO Table of Contents Linux Assembly HOWTO..................................................................................................................................1 Konstantin Boldyshev and François−René Rideau................................................................................1 1.INTRODUCTION................................................................................................................................1 2.DO YOU NEED ASSEMBLY?...........................................................................................................1 3.ASSEMBLERS.....................................................................................................................................1 4.METAPROGRAMMING/MACROPROCESSING............................................................................2 5.CALLING CONVENTIONS................................................................................................................2 6.QUICK START....................................................................................................................................2 7.RESOURCES.......................................................................................................................................2 1. INTRODUCTION...............................................................................................................................2 1.1 Legal Blurb........................................................................................................................................2
    [Show full text]
  • Latexsample-Thesis
    INTEGRAL ESTIMATION IN QUANTUM PHYSICS by Jane Doe A dissertation submitted to the faculty of The University of Utah in partial fulfillment of the requirements for the degree of Doctor of Philosophy Department of Mathematics The University of Utah May 2016 Copyright c Jane Doe 2016 All Rights Reserved The University of Utah Graduate School STATEMENT OF DISSERTATION APPROVAL The dissertation of Jane Doe has been approved by the following supervisory committee members: Cornelius L´anczos , Chair(s) 17 Feb 2016 Date Approved Hans Bethe , Member 17 Feb 2016 Date Approved Niels Bohr , Member 17 Feb 2016 Date Approved Max Born , Member 17 Feb 2016 Date Approved Paul A. M. Dirac , Member 17 Feb 2016 Date Approved by Petrus Marcus Aurelius Featherstone-Hough , Chair/Dean of the Department/College/School of Mathematics and by Alice B. Toklas , Dean of The Graduate School. ABSTRACT Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.
    [Show full text]
  • NIC-Based Offload of Dynamic User-Defined Modules for Myrinet
    NIC-Based Offload of Dynamic User-Defined Modules for Myrinet Clusters Adam Wagner, Hyun-Wook Jin and Dhabaleswar K. Panda Rolf Riesen Network-Based Computing Laboratory Scalable Computing Systems Dept. Dept. of Computer Science and Engineering Sandia National Laboratories The Ohio State University [email protected] ¡ wagnera, jinhy, panda ¢ @cse.ohio-state.edu Abstract The common approach to NIC-based offload is to hard- code an optimization into the control program which runs Many of the modern networks used to interconnect nodes on the NIC in order to achieve the highest possible perfor- in cluster-based computing systems provide network inter- mance gain. While such approaches have proved successful face cards (NICs) that offer programmable processors. Sub- in improving performance, they suffer from several draw- stantial research has been done with the focus of offloading backs. First, NIC-based coding is quite complex and error processing from the host to the NIC processor. However, the prone due to the specialized nature of the NIC firmware research has primarily focused on the static offload of spe- and the difficulty of validating and debugging code on the cific features to the NIC, mainly to support the optimization NIC. Because of the level of difficulty involved in making of common collective and synchronization-based communi- such changes and the potential consequences of erroneous cations. In this paper, we describe the design and implemen- code, these sorts of optimizations may only be performed by tation of a new framework based on MPICH-GM to sup- system experts. Second, hard-coding features into the NIC port the dynamic NIC-based offload of user-defined mod- firmware is inflexible.
    [Show full text]
  • 26Th Euroforth Conference
    26th EuroForth Conference September 24-26, 2010 Haus Rissen Hamburg Germany Preface EuroForth is an annual conference on the Forth programming language, stack machines, and related topics, and has been held since 1985. The 26th Euro- Forth finds us in Hamburg for the first time. The three previous EuroForths were held in Schloss Dagstuhl, Germany (2007), in Vienna, Austria (2008) and in Exeter, England (2009). Information on earlier conferences can be found at the EuroForth home page (http://www.euroforth.org/). Since 1994, EuroForth has a refereed and a non-refereed track. For the refereed track, two papers were submitted, and both were ac- cepted (100% acceptance rate). For more meaningful statistics, I include the numbers since 2006: 11 submissions, 7 accepts, 64% acceptance rate. Each paper was sent to at least three program committee members for review, and they all produced reviews. One refereed paper was co-authored by me (the primary program committee chair); Ulrich Hoffmann served as acting program chair for this paper, and these reviews are anonymous for me. The other paper was co-authored by a program committee member, and the re- views of that paper are anonymous to him as well. I thank the authors for their papers, the reviewers for their reviews, and Ulrich Hoffmann for serving as secondary chair. Several papers were submitted to the non-refereed track in time to be included in the printed proceedings. In addition, the printed proceedings include slides for talks that will be presented at the conference without being accompanied by a paper and that were submitted in time.
    [Show full text]
  • 4Th, the Friendly Forth Compiler
    4tH, the friendly Forth compiler J.L. Bezemer July 14, 2021 Contents 1 What’s new 19 I Getting Started 24 2 Overview 25 2.1 Introduction . 25 2.2 History . 25 2.3 Applications . 26 2.4 Architecture . 26 2.4.1 The 4tH language . 28 2.4.2 H-code . 28 2.4.3 H-code compiler . 29 2.4.4 Error handling . 30 2.4.5 Interfacing with C . 30 3 Installation Guide 32 3.1 About this package . 32 3.1.1 Example code . 32 3.1.2 Main program . 32 3.1.3 Unix package . 33 3.1.4 Linux package . 34 3.1.5 Android package . 38 3.1.6 MS-DOS package . 40 3.1.7 MS-Windows package . 41 3.2 Setting up your working directory . 43 3.3 Now what? . 43 3.4 Pedigree . 43 3.5 Contributors . 44 1 CONTENTS 2 3.6 Questions . 44 3.6.1 4tH website . 44 3.6.2 4tH Google group . 45 3.6.3 Newsgroup . 45 4 A guided tour 46 4.1 4tH interactive . 46 4.2 Starting up 4tH . 46 4.3 Running a program . 47 4.4 Starting an editing session . 47 4.5 Writing your first 4tH program . 48 4.6 A more complex program . 52 4.7 Advanced features . 56 4.8 Suspending a program . 63 4.9 Calculator mode . 65 4.10 Epilogue . 65 5 Frequently asked questions 66 II Primer 69 6 Introduction 70 7 4tH fundamentals 71 7.1 Making calculations without parentheses . 71 7.2 Manipulating the stack .
    [Show full text]
  • Pipenightdreams Osgcal-Doc Mumudvb Mpg123-Alsa Tbb
    pipenightdreams osgcal-doc mumudvb mpg123-alsa tbb-examples libgammu4-dbg gcc-4.1-doc snort-rules-default davical cutmp3 libevolution5.0-cil aspell-am python-gobject-doc openoffice.org-l10n-mn libc6-xen xserver-xorg trophy-data t38modem pioneers-console libnb-platform10-java libgtkglext1-ruby libboost-wave1.39-dev drgenius bfbtester libchromexvmcpro1 isdnutils-xtools ubuntuone-client openoffice.org2-math openoffice.org-l10n-lt lsb-cxx-ia32 kdeartwork-emoticons-kde4 wmpuzzle trafshow python-plplot lx-gdb link-monitor-applet libscm-dev liblog-agent-logger-perl libccrtp-doc libclass-throwable-perl kde-i18n-csb jack-jconv hamradio-menus coinor-libvol-doc msx-emulator bitbake nabi language-pack-gnome-zh libpaperg popularity-contest xracer-tools xfont-nexus opendrim-lmp-baseserver libvorbisfile-ruby liblinebreak-doc libgfcui-2.0-0c2a-dbg libblacs-mpi-dev dict-freedict-spa-eng blender-ogrexml aspell-da x11-apps openoffice.org-l10n-lv openoffice.org-l10n-nl pnmtopng libodbcinstq1 libhsqldb-java-doc libmono-addins-gui0.2-cil sg3-utils linux-backports-modules-alsa-2.6.31-19-generic yorick-yeti-gsl python-pymssql plasma-widget-cpuload mcpp gpsim-lcd cl-csv libhtml-clean-perl asterisk-dbg apt-dater-dbg libgnome-mag1-dev language-pack-gnome-yo python-crypto svn-autoreleasedeb sugar-terminal-activity mii-diag maria-doc libplexus-component-api-java-doc libhugs-hgl-bundled libchipcard-libgwenhywfar47-plugins libghc6-random-dev freefem3d ezmlm cakephp-scripts aspell-ar ara-byte not+sparc openoffice.org-l10n-nn linux-backports-modules-karmic-generic-pae
    [Show full text]
  • Index Images Download 2006 News Crack Serial Warez Full 12 Contact
    index images download 2006 news crack serial warez full 12 contact about search spacer privacy 11 logo blog new 10 cgi-bin faq rss home img default 2005 products sitemap archives 1 09 links 01 08 06 2 07 login articles support 05 keygen article 04 03 help events archive 02 register en forum software downloads 3 security 13 category 4 content 14 main 15 press media templates services icons resources info profile 16 2004 18 docs contactus files features html 20 21 5 22 page 6 misc 19 partners 24 terms 2007 23 17 i 27 top 26 9 legal 30 banners xml 29 28 7 tools projects 25 0 user feed themes linux forums jobs business 8 video email books banner reviews view graphics research feedback pdf print ads modules 2003 company blank pub games copyright common site comments people aboutus product sports logos buttons english story image uploads 31 subscribe blogs atom gallery newsletter stats careers music pages publications technology calendar stories photos papers community data history arrow submit www s web library wiki header education go internet b in advertise spam a nav mail users Images members topics disclaimer store clear feeds c awards 2002 Default general pics dir signup solutions map News public doc de weblog index2 shop contacts fr homepage travel button pixel list viewtopic documents overview tips adclick contact_us movies wp-content catalog us p staff hardware wireless global screenshots apps online version directory mobile other advertising tech welcome admin t policy faqs link 2001 training releases space member static join health
    [Show full text]
  • On This DVD: on This
    LINUX MAGAZINE On this DVD: Debian GNU/Linux 3.1 ‘sarge’ The latest Debian DVD image, built with the new Jigdo tool. Hundreds of applications including: Internet Mozilla Web browser Konqueror File manager Lynx Text web browser Nautilus File manager ISSUE 43 Exim 4 Mail Transfer agent Pan News group reader Sylpheed Email client Multimedia Thousands of top developers from Debian GNU/Linux makes it easy to Gimp Image manipulation all over the world make Debian install packages with the apt-get gPhoto Camera connection GNU/Linux a unique, modern, safe, tool, which handles library depen- xmms, noatun Audio players SANE Scanning tool community driven operating dency issues and package decom- k3b CD burner system. Debian GNU/Linux – like the pression. The main core benefit of Debian GNU/Linux 3.1 ‘sarge’ Xine Movie player xawtv TV viewer Linux kernel itself – is maintained in the packaging system is the ease Grip Audio ripper an open manner by a team of volun- with which you can update a run- Office teer developers. ning system. This is the reason why OpenOffice Popular Office suite Debian GNU/Linux is usually only KOffice KDE Office suite This Linux Magazine DVD version installed once and then only up- KDEpim Personal Information contains the latest ‘sarge’ release and manager dated while it remains running. TeTeX/LaTeX Desktop publishing includes the new Debian installer Emacs, Vim Text editors system to make it easier to set up The DVD is packed with hundreds of Gnumerics Spreadsheet Abiword Word processing and get running on your computer. applications to cater for every taste Databases Debian GNU/Linux supports soft- and offers a chance to install Postgresql Database ware applications that are developed without the expense and time MySQL Database for the Linux Standard Base (LSB) and required to download.
    [Show full text]
  • Integral Estimation in Quantum Physics
    INTEGRAL ESTIMATION IN QUANTUM PHYSICS by Jane Doe A dissertation submitted to the faculty of The University of Utah in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Mathematical Physics Department of Mathematics The University of Utah May 2016 Copyright c Jane Doe 2016 All Rights Reserved The University of Utah Graduate School STATEMENT OF DISSERTATION APPROVAL The dissertation of Jane Doe has been approved by the following supervisory committee members: Cornelius L´anczos , Chair(s) 17 Feb 2016 Date Approved Hans Bethe , Member 17 Feb 2016 Date Approved Niels Bohr , Member 17 Feb 2016 Date Approved Max Born , Member 17 Feb 2016 Date Approved Paul A. M. Dirac , Member 17 Feb 2016 Date Approved by Petrus Marcus Aurelius Featherstone-Hough , Chair/Dean of the Department/College/School of Mathematics and by Alice B. Toklas , Dean of The Graduate School. ABSTRACT Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.
    [Show full text]