Jump to content

Search the Community

Showing results for tags 'Forth'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Atari Systems
    • Atari 2600
    • Atari 5200
    • Atari 7800
    • Atari Lynx
    • Atari Jaguar
    • Dedicated Systems
    • Atari 8-Bit Computers
    • Atari ST/TT/Falcon Computers
  • Gaming General
    • Classic Gaming General
    • Classic Computing
    • Modern Gaming
    • Prototypes
    • Arcade and Pinball
    • Emulation
    • Hardware
    • Gaming Publications and Websites
    • International
  • Marketplace
  • Community
  • Game Programming
  • Site
  • Classic Gaming News
  • The Club of Clubs's Discussion
  • I Hate Sauron's Topics
  • 1088 XEL/XLD Owners and Builders's Topics
  • Atari BBS Gurus's Community Chat
  • Atari BBS Gurus's BBS Callers
  • Atari BBS Gurus's BBS SysOps
  • Atari BBS Gurus's Resources
  • Atari Lynx Programmer Club's CC65
  • Atari Lynx Programmer Club's ASM
  • Atari Lynx Programmer Club's Lynx Programming
  • Atari Lynx Programmer Club's Music/Sound
  • Atari Lynx Programmer Club's Graphics
  • The Official AtariAge Shitpost Club's Shitty meme repository
  • The Official AtariAge Shitpost Club's Read this before you enter too deep
  • Tesla's Vehicles
  • Tesla's Solar
  • Tesla's PowerWall
  • Tesla's General
  • Harmony/Melody's General
  • ZeroPage Homebrew's Discussion
  • Furry Club's Chat/RP
  • PSPMinis.com's General PSP Minis Discussion and Questions
  • PSPMinis.com's Reviews

Blogs

There are no results to display.

There are no results to display.

Calendars

  • AtariAge Calendar
  • The Club of Clubs's Events
  • Atari BBS Gurus's Calendar
  • ZeroPage Homebrew's Schedule

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website


Facebook


Twitter


Instagram


YouTube


eBay


GitHub


Custom Status


Location


Interests


Currently Playing


Playing Next

Found 24 results

  1. Don't forget to visit Ninerpedia; our wiki about the TI-99/4A. Check here. If you are the owner of one of the programs or sites and do not want it posted, please let me know and it will be removed immediately. Also if you think a reference to an important development resource is missing, then please let me know and I'll be happy to add to the list. If you are new to the TI-99/4A or returning after a long time, then you might want to check out the TI-FAQ page here. Also make sure to visit the TI-99/4A Home Computer Book Archive by @airernie, now hosted by @acadiel. It's a great collection of excellent technical books about programming the TI-99/4A. Latest update: May 5th 2019 1. Emulators classic99 win Windows-based emulator including TI-99 ROMs under license from Texas Instruments. Debugger, memory heatmap, OS file support, support for 128K bank-switch carts, can create ROM/GROM cartridges, possibility to record AVI movies. User manual is included. Check the classic99 Updates thead for the latest news on classic99. Click here to watch Tursi's classic99 tips and tricks video tutorial. (Author: @Tursi) MAME win+linux Multiple system emulator that supports the TI-99/4, TI-99/4A, TI-99/8, and Geneve. Emulates more than 400 systems. Requires ROMs from the original systems. Features a powerful Debugger, most accurate emulation, support for 64K bank-switch carts / Gram Kracker / UCSD p-code expansion card. Possibility to record AVI movies. Also see the MAME section in ninerpedia. (Author: @mizapf) Js99'er All major browsers TI-99/4A emulator written in javascript. Has support for TMS9918A VDP & supports most of the F18A functionality, TMS9919 sound. Virtual disk drives using google drive. Some preloaded games, demos and applications included. Js99'er development thread on Atariage can be found here. Js99'er source code repository on Github can be found here. (Author: @Asmusr) V9t9 win+linux TI-99/4A emulator written in java. Has support for TMS9918A VDP, TMS9919 sound & TMS5220 speech. Debugger included. V9t9 also supports the UCSD P-Code system. Some of the advanced V9t9 features include: ability to save/restore emulator state, record & playback, support for V9938 VDP. Requires ROMs from the original systems. This emulator needs the Java Runtime Environment available for free at Oracle. V9t9 discussion thread can be found here. (Author: @eswartz) Win994a win Windows-based emulator of the TI-99/4a Good TMS9900 cross-assembler included. No debugger. Ti994w win Windows based emulator. Offers 80 column support, SAMS card 1Mb of RAM, V9938 support, built-in debugger, ... (Author: @F.G. Kaal) TI-99/Sim linux Linux-based software simulation of the TI-99/4A. PC99 DOS Commercial DOS-based emulator licensed by Texas Instruments to sell ROMs. 2. Programming languages Assembly language - Software Winasm99 win Windows based TMS9900 cross assembler with GUI and ability to build 8K cartridge roms. Is part of the Win994a emulator. asm990 linux Linux based cross Assembler for the TI 990 by Dave Pitts. You'll also need lnk990 a separate linker which can be found on the same page. TIasm win TMS9900 cross assembler TIasm will build 8K console (>0000) or cartridge (>6000) rom. Is part of the old V9T9 emulator package. Source is included. Editor/Assembler IV TI-99/4A Editor/Assembler IV is a module for the TI99/4A home computer. The software this cartridge contains is the in TMS9900 assembler rewritten Editor and Assembler loader, Program loader and an implementation of my own written Linking Loader and a simple debugger. The editor and debugger are running completely in the module space (>6000 - >7FFF). The assembler is copied from EPROM to CPU RAM before it is started. (Author: @F.G. Kaal) XA99 - Cross Assembler 99 win XA99 (Cross Assembler 99) is a program for assembling TMS9900 assembler code on the PC. (Author: @F.G. Kaal) L99 - Linker 99 win L99 is a tagged object file linker by Fred Kaal for creating program files for the TI99 and Geneve home computer. (Author: @F.G. Kaal) xdt99 - TI 99 Cross-Development Tools win, linux, OS X The TI 99 Cross-Development Tools (xdt99) are a small suite of programs that facilitate the development of programs for the TI 99 family of home computers on modern computer systems. All programs are written in Python and thus run on any platform that Python supports, including Linux, Windows, and Mac OS X. Includes xas99 (TMS9900 cross-assembler), xga99 (GPL cross-assembler!) and some command line tools for handling disk images and nanoPEB/CF7A+ volumes. The development thread on atariage can be found here. (Author: @ralphb) Assembly language - Manuals Editor/Assembler reference manual PDF The official Editor/Assembler reference manual. Note that this is not a tutorial for beginners. Still, it's an essential manual when writing assembler for the TI-99/4A. The online version can be found here. COMPUTE!'s beginner's guide to assembly language on the TI-99/4A PDF The Lottrup book. The only manual available today focusing on programming games in TMS9900 assembler. The examples in the book are for the Mini Memory line-by-line assembler which is rather limited. The manual also contains a few errors. Check here for the corrections. Nonetheless this book is a must-read for everyone seriously interested in writing assembler games for the TI-99/4A. The online version can be found here. Introduction to Assembly Language for the TI Home Computer PDF The Molesworth assembly language introduction book. Covers VDP communication, keyboard reading, file access and a lot more. The Art of Assembly series PDF The full series of articles by the late Bruce Harrison compiled as PDF. Over 600 pages, very well written and thorough. Assembly on the 99/4A WEB Excellent thread on Assembly language programming for the TI-99/4A, focussing on game loops, etc. (Author: @matthew180) SPECTRA2 zip Library for programming games in TMS9900 assembly language. Has routines for handling tiles, sprites, sound & task scheduler. Documentation manual PDF is included. (Author: @retroclouds) BASIC - Software Power BASIC TI-99/4A This is a port of the 'Power BASIC' interpreter used with the TMS9995-based Powertran Cortex machine. It is written in pure assembly. Graphic commands, sprites and saving to disk are supported. Currently no sound and speech supported. Power BASIC instruction manual available. Playground TI-99/4A Playground is a package making it possible to create assembly language programs that run from TI BASIC on an unexpanded console using only a cassette player to load the program(!) Although primarily intended for use in TI BASIC, programs written for playground can be run from XB, saved in E/A 5 format, loaded into a supercart, and even made into an actual cartridge. The manual describes in detail the differences in style necessary when programming for an environment that runs in only 256 bytes of memory. There is a library of subroutines for printing text, printing a number, shifting blocks in VDP, generating random numbers, using the line editor from BASIC, HCHAR, VCHAR,GPLLNK, a bit reversal routine, and a fast scroll routine. Source code is included for three different programs that should help you get started. Check here for the development thread on Atariage. Check this related thread for some clever work based on Playground. (Author: @senior_falcon) Extended BASIC - Software Extended Basic Game Developers Package "ISABELLA" TI-99/4A This package has been extensively updated to be faster, more versatile, and much simpler to use. It consists of two applications that make it possible to produce arcade quality games with XB. Although they are designed to complement each other, each is a stand alone utility. This is meant to be used with the Classic99 emulator, but the resulting programs are fully compatible with a real TI99 with nothing more than XB, 32K and a disk drive. Note that the included XBGDP package has an option to use the older TI BASIC only runtime routines if desired. It replaces for the older "Harry Wilhelm's BASIC COMPILER" and as a bonus, it's much easier and faster to use. (Author: @senior_falcon) 1) XB256 XB256 lets you toggle between two independent screens as desired. Screen2 lets you define all 256 characters and have up to 28 double sized sprites using the character definitions available to Screen1. Scrolling routines let you scroll characters left, right, up, or down or scroll using single pixels. There is a text crawl that gives an effect similar to the STAR WARS title screen. You can highlight text, set the sprite early clock, print in any direction on the screen using 32 columns, read/write to VDP ram, write compressed strings or sound tables to VDP ram, play a sound list, and catalog a disk. A utility lets you save selected areas of VDP memory as compressed strings that cn be merged with your program. With this, character definitions, sound tables, screen images, etc. can be saved in a more compact form that can be loaded virtually instantaneously, even in XB There are two utilities that convert the CALL SOUNDs in an XB program into a sound table containing music and sound effects. Sound tables can be loaded directly into VDP memory and played automatically while your XB program does other things. Also, a second player can play a different sound list simultaneously with the first, so you can have backgroundmusic playing and add sound effects on top of the background music. 2) XB COMPILER COMPILER lets you compile an XB program into an equivalent assembly language program that will run about 30 times faster. All the XB256 subprograms are supported by the compiler and in general, all the major features of XB are supported, including XB style IF/THEN/ELSE and named subprograms. About the only XB features that are not supported are DEF and the trig functions. T80XB TI-99/4A T80XB is a collection of assembly language subroutines that give the Extended BASIC programmer easy access to the 80 column screen mode offered by the F18A and other 80 column upgrades. Lets you select from two independent screens. G32 is the default screen when a program starts running.. This is the 32 column graphics mode screen normally used by Extended BASIC. It is accessed using the usual XB graphics statements. T80 is the 80 column text screen which offers 24 rows of 80 columns.. You can toggle between the two screens as desired, preserving the graphics on each screen. When using the T80 screen there are assembly equivalents that replace PRINT, CLEAR, COLOR, INPUT, CHAR, HCHAR, VCHAR plus routines that will scroll the screen and invert text on the screen. (Author: @senior_falcon) RXB 2015E TI-99/4A RXB 2015E is an updated version of TI Extended Basic. Most bugs in XB have been fixed in RXB and GKXB is in the main core of RXB. RXB has features no other XB has such as Batch processing or Hard Drive Access or updated CALL routines. The below RXB tutorials on Youtube give a good overview of RXB's power: RXB DEMO 1 video RXB DEMO 2 video RXB DEMO 3 video RXB DEMO 4 video RXB DEMO 5 video RXB DEMO 6 video RXB DEMO 7 video RXB DEMO 8 video RXB DEMO 9 video RXB DEMO A video RXB DEMO B video RXB DEMO C video Full documentation, examples and GPL source code included in the ZIP package. Cartridge image for classic99 emulator also included. Requires a GRAM device such as a GRAM Kracker for running RXB on the TI-99/4A. (Author: @RXB) My Little Compiler (MLC) TI-99/4A Library for using assembler-like language & routines from Extended Basic. Great for putting more power in Extended Basic programs. Now includes a precompiler for high-level language syntax. Demo Pong game and documentation included. The MLC development thread can be found here. Check out the video by @rocky007 on his MLC based TI-99/4A port of Kaboom! (Author: @moulinaie) The Missing Link 2.0 (TML) TI-99/4A The zip archive contains "The Missing Link 2.0" and its documentation. This was published by Texaments in 1990. It gives the XB programmer easy access to the bit mapped features of the 9918 VDP. Full color cartesian graphics, turtle graphics, sprite graphics (32 sprites with auto motion) are supported. Text can be displayed on screen with fonts having sizes ranging from 4x6 pixels to 8x8 pixels. The manual is updated with many previously undocumented features. A tutorial called "Potatohead" is included. There is a loader that embeds A/L programs in high memory - they can be saved as an XB program and run directly out of high memory. (Author: @senior_falcon) TidBiT - BASIC/XB Translator win, linux, OS X A translator program that reads a program written in a custom, structured form of BASIC and translates it to a BASIC / Extended BASIC program. PHP required when doing a local installation. Check here for the latest revision, installation instructions included. (Author: @matthew180) Kull KXBII Extensions TI-99/4A Kull Extended BASIC II programming package. High resolution graphics and clock support in Extended Basic. Documentation by @hloberg. Extended BASIC - Manuals COMPUTE!'s Programmer's Reference Guide to the TI-99/4A PDF TI-Basic programming manual touching graphics and sound. COMPUTE!'s TI Collection volume One PDF The online version can be found here. Best of TI-Basic programming by C. Regena Texas Instruments TI-99/4A user reference guide PDF The official user reference guide with details how to setup and connect your TI-99/4A. Includes an introduction on the TI-BASIC programming language. Extended Basic reference manual PDF The official extended basic manual, explaining the 40 new or expanded commands, sprites, etc. Check here for the online version with command lookup functionality. MG Night Mission PDF Advanced tutorial on how to program an arcade game in Extended Basic. MG Smart Programming Guide for Sprites PDF Advanced tutorial on how to efficiently use sprites in Extended Basic. C - Software C99 v4 TI-99/4A C99 is a small C compiler for the TI-99/4A written by the famous C. Pulley. Documentation included. C99C - C99 cross compiler and optimizers win C99C is the enhanced PC version of the C99 compiler for the TI99/4A home computer. Also included are multiple optimizers for compacting the generated assembly source (C Optimizer, Function Call Optimizer, ...) (Author: @F.G. Kaal) GNU C Compiler (GCC) win + linux + osx GCC for the TMS9900 allows you to cross-compile C programs on your PC (Linux, OSX or Windows) for the TI. Insomnia's release contains a set of patches against GCC 4.4. Just check out the code from the GCC project, apply the patches and build according to the build instructions for your platform and you're on your way to write programs and games for the TI in a high level language that rival the speed of assembly. And if you need just that little bit extra in terms of speed, you can always inline TMS9900 assembly for the critical sections of your code and compile everything with the same toolchain. For access to the VDP, the SN76489, etc... you can use Tursi's ti99 library, which you can find in the GCC thread. Hop over to the INSOMNIA LABS blog for background information on this port. Check the "Setting up the GCC compiler for the TI-99/4A" video by @Tursi for detailed steps on how to build and install GCC on your Windows PC. You can now download the cygwin binary port of the older TI GCC 1.10 for Windows here. (Thanks @lucien2). (Author: @insomnia) Fortran - Software 99-9640 Fortran TI-99/4A & Geneve The zip archive contains LGMA Products' FORTRAN v4.4 in both a version for the TI-99/4A and the Geneve 9640 computer. Documentation in PDF format included. The discussion thread on Atariage can be found here. Special thanks to: dano Forth - Software Turboforth TI-99/4A A brand new implementation of the Forth langugage for the TI-99/4A. The Forth system itself is written in assembler and is optimized for speed. It runs from the cartridge space so there's plenty of space for your program in the 32K memory expansion. Check TurboForth.net the companion web site for the TurboForth system. Click here for seeing some Turboforth video tutorials. (Author: @Willsy) TI Forth Instruction Manual "2nd Edition 2013" PDF 2012 enhanced version of the original TI Forth Instruction Manual in PDF format by @Lee Stewart. Look here for details on manual improvements, etc. The updated TI-Forth system disk can be found here. (Author: @Lee Stewart) fbForth TI Forth with File-based Block I/O zip fbForth uses Level 3 file I/O for I/O of Forth blocks. It also implements 80-column text mode if you have a system with that facility. fbForth 32KB 2.0.X ROM cartridge available. (Author: @Lee Stewart) CAMEL99 V2 Forth TI-99/4A Multi-tasking Forth for the TI-99/4a. CAMEL99 Forth has been built as an educational tool for those who are interested in how you could cross-compile Forth to a different CPU using an existing Forth system. Camel99 Forth Development thread on Atariage can be found here. (Author: @TheBF) GPL - Manuals/Tutorials GPL Programmers Guide PDF The original GPL programming reference manual from Texas Instruments. Covers all opcodes and advanced stuff like coincidence detection, I/O routines, etc. GPL HOW 2 Series video A complete series on how to program GPL (Graphics Progroamming Language) on the TI-99/4A. Each tutorial has its own support package with example code, GPL assembler, etc. Video tutorials done by Rich, the programmer of Rich Extended Basic. (Author: @RXB) GPLHOW2A - Introduction video / zip GPLHOW2B - Sprite demo video / zip GPLHOW2C - How to make a Screen Editor like TI Writer or Editor Assembler video / zip GPLHOW2D - Editor Assembler TI BASIC support.video / zip GPLHOW2E - DMII cartridge upgrades and how GPL works video / zip GPLHOW2F - TI Basic to GPL. Converting a TI Basic program to GPL video / zip GPLHOW2G - TI Basic CALL SOUND to GPL video / zip GPLHOW2H - Simultaneous sound lists and interrupt timer in GPL video / zip GPLHOW2I - XB2GPL demo of a XB game Baloons converted into a GPL program video / zip GPLHOW2J - Update to GPLHOW2I and adds a automatic music to the game from the last demo video / zip GPLHOW2K - How to make XB Program Image files into I/V 254 files video / zip TI-Intern PDF Details on "Monitor", the OS of the TI-99/4A. Disassembly of console ROM/GROMS and GPL interpreter. Has details on interrupt routine, utility subprograms, basic interpreter, etc. The thread "The TI-99/4A Operating System" is an ongoing community project for commenting the source code of the TI-99/4A ROM and allowing it to be assembled with todays' assemblers. LOGO - Manuals TI-LOGO programming manual PDF The official TI-LOGO programming manual. The online version can be found here. Pascal - Software Turbo Pasc'99 TI-99/4A The zip archive has the patched version of Wiposofts Turbo Pasc'99 which you can run on your favorite emulator or on the TI-99/4A itself. While Turbo Pasc'99 is not as complete an implementation of Pascal as the UCSD Pascal system, it does have the advantage of not requiring any special hardware other than 32K RAM and a disk drive, and will likely meet the programming needs of most TIers. Check here for an english translation of the german documentation. This version is started by running the Editor Assembler #EA5 program image DSK1.TP99A Special thanks to: @Vorticon, @apersson850, @retroclouds and @lucien2 Pascal - Manuals UCSD Pascal ZIP + PDF The official UCSD Pascal programming manuals and disks. The zip file (70 megabytes) contains all manuals in PDF format. Here are the PDF manuals for online viewing: Compiler, Editor, Filer, Utilities, Assembler, Linker, p-code card The UCSD system disk images in v9t9/MESS format can be found here. Note that you need the UCSD P-code expansion card for running UCSD Pascal on the TI-99/4A. Thierry Nouspikel has lots of information on the technical implementation of UCSD Pascal on the TI-99/4A. Check here for details on the P-Code card and here for details on the P-Code system software. Also a lot of details on UCSD Pascal in general (p-system vm, documentation, cross compiler, ...) can be found here. 3. Technical Documentation Hardware TMS9900 Microprocessor Data Manual PDF Data Manual on the TMS9900 16-bit processor. The TMS9900 is the CPU used in the Texas Instruments TI-99/4A Home Computer. Contains instruction execution times, opcode size, etc. TMS9901 Programmable Systems Interface Data Manual PDF Data Manual for the TMS9901, Interrupt and I/O interface controller VDP Programmer's guide PDF The official programmer'a guide for the TMS9918A and its variants. The 9918A is the Video Display Processor chip used in the TI-99/4A and several other home computers + game consoles of that era. SN76489 sound chip datasheet PDF Data sheet for the SN76489 sound generator. The TMS9919 in the TI-99/4A is close to being identical with the SN76489. TMS5220 Speech Synthesizer Data manual PDF Data manual for the TMS5220 chip used in the TI-99/4A speech synthesizer device. Interface standard & Design Guide for TI 99/4A peripherals PDF The purpose of this manual was to consolidate all information available in the public domain on the design and development of peripherals for the TI 99/4A computer into one reference. Also covers the software aspects such as DSR architecture, PABs, etc. ROM Command Module Guide 2.0 PDF This manual provides a complete description of how Assembly Language User Programs need to be written so that the object code can be downloaded into (EP)ROM's which canthen be used in the "(EP)ROM module", a module designed to be used with the TI 99/4A Home Computer. TI Hardware Manual txt Compilation of valuable hardware & programming info on Myarc memory cards, Disk Controllers, Hard Drives, CPU identification (TMS9900, TMS9995, TMS99000) in assembly language, etc. DSR (Device Service Routine) / Disk & File Management Device Service Routine Specification for the TI-99/4(A) Personal Computer PDF Functional Specification for the 99/4 Disk Peripheral PDF Software Specification for the 99/4 Disk Peripheral PDF GPL Interface Specification for the 99/4 Disk Peripheral PDF File Management Specification for the TI-99/4 Home Computer PDF File Operations in assembly language 4. Homebrew Hardware Graphics & Sound F18A Video Display Processor The F18A is a FPGA based hardware and pin compatible replacement for the TMS9918A/TMS9928/TMS9929 VDP's (Video Display Processor). Besides VGA output it offers enhanced functionalities such as 80-column mode, additional video resolutions, hardware register scrolling, an embedded TMS9900 compatible GPU, etc. The development thread on Atariage, which includes the F18A programming documentation can be found here. The store on code|hack|create has the details on F18A availability, costs, etc. (Author: @matthew180) SID Master 99 sound synthesizer card The SID Master 99 is a new sound synthesizer expansion card for the Peripheral Expansion Box. It integrates the famous MOS 6581 or 8580 SID chip (as used in the Commodore 64 home computer). SIDPLAY99 sound player software available for use with this expansion card. The store on DSAPC has the details on Sid Master 99 availability, costs, etc. (Author: @marc.hull) Homebrew cartridge boards There are a number of Homebrew cartridge boards available to the users of the TI-99/4A now. Each has its own advantages and disadvantages from a usability standpoint, and some earlier types are only available by having your own made. To read the PCB layout files mentioned below, you need the ExpressPCB software which is available for free. Check here. The files are currently not released in Gerber/Excellon format, but can be converted to it using the RobotRoom Copper Connection software, available here. Note that to convert files to Gerber format you have to have the licensed version of the software ($50). 16K board PCB file The first of the new cartridge boards is the 16K board designed by @acadiel and @Stuart. This board used an inverted output from a 74LS379 to select between two 8K banks at >6000 in the TI memory map. The banks are selected by writing to >6000. This board allows most of the third-party cartridges designed for the 99/4A to be replicated. Further details on this board (components, EPROMS, software, etc.) can be found in: 16k_board_details.rtf FlashROM 99 PCB file, firmware source code The TI 99/4A Flash ROM Cartridge, or FlashROM 99 for short, is a cartridge for the TI 99/4A home computer that allows for running ROM cartridge images stored on an SD card. The FlashROM 99 supports ROM-only images of up to 32K that use the write-to->60xx bank switching scheme. It will not work with programs using GROMs or CRU-based bank switching. The cartridge does not require the Peripheral Expansion Box and runs on both PAL and NTSC consoles. Discussion thread on Atariage can be found here. (Author: @ralphb) FinalGROM99 PCB file, firmware source code The TI 99/4A FinalGROM Cartridge, or FinalGROM 99 for short, is a cartridge for the TI 99/4A home computer that allows you to run ROM and GROM cartridge images from an SD card. It succeeds the FlashROM 99 released in 2016. The FinalGROM 99 supports ROM images, GROM images, and mixed images of up to 1 MB in size that use the write-to-ROM bank switching scheme. The cartridge does not require the Peripheral Expansion Box and runs on both PAL and NTSC consoles, including modified consoles with an F18A. It will also run on v2.2 consoles and enables those to run ROM-only programs. The development thread on Atariage can be found here. (Author: @ralphb) 5. Utilities (file transfer, graphics, sound, ...) File Transfer TIImageTool win + linux TIImageTool is a tool that allows you to open disk image files as used with many emulators, and to work on them with common disk operations (like cut/copy/paste of files). It is particularly tailored for use with MESS but can also be used with other emulators. Has support for v9t9 format, PC99 format, CHD format, working with files & directories, Archiver support (can process Archiver files on the images), ... This utility needs the Java Runtime Environment available for free at Oracle. Supports Cf7a+ card images. (Author: @mizapf) TI99Dir win TI99 filemanager for windows. Great for transferring disk images to the TI-99/4A. Supports Cf7a+ cards and Cf7a+ card images. (Author: @F.G. Kaal) TiDisk-Manager OS X The TiDisk-Manager is a disk tool for disk images from floppy disks used by a TI-99/4A home computer. You will need an Apple Macintosh or Hackintosh running with Mac OS X 10.9 or newer. Has many features including file preview, export, etc. and even an interactive editor to disassemble program files and create good readable source code. The development thread on atariage can be found here (Author: @HackMac) Cf2k - Compact Flash 2000 TI-99/4A Cf2k (Compact Flash 2000) is a file manager for the TI99/4a with a CF7A+ compact flash adapter. With CF2k it is possible to protect/unprotect files, rename files/volumes, format volume, mount volume, copy/move/delete files, execute program files, ... Supports Cf7a+ cards. (Author: @F.G. Kaal) Graphics Convert9918 win Windows program for converting images into TMS9918A Graphics II (bitmap) mode. Output is in TI-Artist format or raw image/pattern dump. The article Modern Graphics on the 9918APDF gives an interesting overview on the techniques used in Convert9918. (Author: @Tursi) GraphiCV win/linux/osx Sprite Editor written in java. Draw your sprites on the PC and export them for use in Extended Basic and Assembler. Also supports export to Colecovision C format. Work with multiple sprite "layers" for creating multi-colored sprites. Click here for the GraphiCV development thread on atariage. Source code is also available at github. Check here. This utility needs the Java Runtime Environment available for free at Oracle. (Author: @unhuman) Magellan win/linux/osx TI-99/4A map editor written in java. This is the latest, updated, unofficial version. Draw your maps/screens on the PC and export them for use in Extended Basic and Assembler. Has a rich feature set: Import character set from '.PNG' or '.GIF' file, copy & paste, drawing functions, support for half-bitmap mode, Export in XB display merge format, etc. Possibility to export maps as data statements for Extended Basic and Assembler, binary export also possible. Click here for the Magellan development thread on Atariage This utility needs the Java Runtime Environment available for free at Oracle. (Author: @The Codex). Enhanced by @retroclouds, @sometimes99er, @Asmusr. Sprite Editor TI-99/4A TI-99/4A sprite editor written in C99. Runs from Editor/Assembler #EA5. Draw your sprites in an emulator or on the TI-99/4A machine. The zip file contains both the files for use in emulator and a TI disk image for easy transfer to the TI-99/4A. README file with detailed instructions included. You can see the Sprite Editor at work building some sprites: Jet Set Willyvideo and Parsecvideo. (Author: @Willsy) Sound VGM player Compresses VGM files into a format that can be played back on the TI using the included player from C and assembly. (Author: @Tursi) Mod2PSG2 Fully featured PC tracker for arranging music for the SN76489 and compatible sound chips. Can export to VGM and other formats. (Author: KonTechs/Martin) Sound List Ripper PC tool for ripping and playing back sound lists from TI files. Supports basic editing of sounds lists. (Author: @Asmusr) Sound list player Plays back sound lists from XB and assembly. (Author: @matthew180) Advanced Sound List Player TI tools for editing and playing back advanced sounds lists. (Author: @marc.hull) Speech QBOX Pro win QBOX Pro is the windows software that converts WAV files to LPC speech data for playback on the TI-99/4A speech synsthesizer. This is a 16bit windows application but it still runs in Windows 2000/XP/Vista. It requires the BWCC.DLL library which can be found here. BlueWizard osx LPC analysis tool for the Texas Instruments TMS5220 chip. Replacement for QBOX Pro. Has very good speech quality. Source code and pre-built install image for OS X can be found on gitHub here. Discussion thread on Atariage available here. (Author: @patrick99e99) Python Wizard unix/win This project is a python port (command line version and GUI) of the great macOS tool BlueWizard. It is intended to convert (voice) audio streams into LPC bitstreams used in the TMS 5220 chip or e.g. in the Arduino library Talkie. Now you can generate your own LPC streams and make your chips say the things you want them to. (Author: @deladriere) TI Synth Editor win TI LPC speech pattern exploration and editing app in the spirit of the venerable Speecoder. Watch the "How To" video to create custom speech synth here (Author: @pixelpedant) Editors Notepad++ win Notepad++ is a free source code editor that supports several languages. Runs in Windows environment. Notepad++ syntax highlighting file win Syntax highlighting file for Assembler and Extended Basic to be used with the Notepad++ text editor. 6. Tutorials Assembly language Building a multi-bank ROM image PDF Tutorial on compiling a 32K bank-switched cartridge ROM image starting from assembly source code (deref utility included). How to implement an assembly sound player for XB web Very well written tutorial on how to implement an assembly sound player for Extended Basic. It covers the tools needed and steps involved. Commented assembly source code Not a tutorial in the classical sense, but the commented source codes of the below games should help you get the idea. Pitfall! source code ZIP Munchman source code PDF TI invaders source code PDF TI Invaders source code TXT PARSEC source code PDF Moon Mine source code PDF Hopper source code PDF Thank you @Ksarul for your OCR work on the PARSEC source code. Thank you @Stuart for your OCR work on the TI-Invaders source code and tweaking it for assembly with Winasm99. Thank you @dphirschler for pointing me to Hopper and Moonmine source code. TMS9918/TMS9928 Video Display Processor TMS9918/9928 video modes video Video tutorial explaining the supported graphic modes of the video processor used in the TI-99/4A. TMS9918/TMS9928 Sprites and Characters video Video tutorial about the use of sprites and character patterns in the different video modes. TMS9918/TMS9928 How to create a bitmap title screens video Video tutorial on how to create a bitmap screen for games. Speech Synthesizer Convert WAV file for playback using speech synthesizer video Video tutorial on how to use QBOX Pro to convert a 8kHz mono WAV file to LPC speech data for playback on the TI-99/4A with the speech synthesizer device. It shows how to embed the LPC byte stream into your own assembly language program. Compilers The Wilhelm Basic compiler video Video tutorial on how to compile a basic program to assembly language. (Author: @Opry99er) File transfer (TI99->PC) RS232 File Transfer video Video tutorial on file transfer from the TI-99/4A to the PC using a serial connection cable. (Author: @Opry99er) (PC->TI99) RS232 File Transfer VIEW PART 1 / VIEW PART 2 video Video tutorial split in 2 parts dealing with file transfer from the PC to the TI-99/4A using a serial connection cable. In detail: DL a game from TI Gameshelf, Use ARC303G to unarchive it, Test in Classic99, Transfer using QModem and MFM, Running game on TI. (Author: @Opry99er) 7. TI-99/4A related websites TI-99/4A @ wikipedia Introduction and basics of Texas Instruments TI-99/4A Home Computer. ninerpedia Wiki with information on MESS and its multicart format (RPK). Home of the TI-FAQ. Thierry Nouspikel's Tech Pages Probably the best TI hardware and software tech page. It has a wealth of technical details on all things TI-99/4A. This includes GPL, GROM, keyboard scanning, speech, etc. You can also download the full site as a zip file for offline viewing. Mainbyte's home of the TI-99/4A Very good tech site with many detailed pictures and reference area. Includes various projects for upgrading your TI-99/4A, e.g. build a supercart cartridge. Jon's hexbus page Several hardware projects including pictures. Home of the 64K bank-switched cartridge project. (Author: @acadiel) [code|Hack|Create] New website run by Matthew of the Atariage group. The site covers many new hardware projects as the F18A FPGA based VDP and Bank-switch mini 256K. There's also a store where you can buy cartridge PCB's and other funky stuff. (Author: @matthew180) The nanoPEB & CF7+ Website The official website. Has the documentation, tools and some source code of the popular TI-99/4A Compact Flash device. TurboForth.net TurboForth.net is the companion web site for the TurboForth system written in TMS9900 Assembly Language by Mark Wills for the Texas Instruments TI-99/4A computer. TI projects page Several hardware and software projects for the TI-99/4A. Home of TI-99Dir, TI99HDX and several other must-see projects. (Author: @F.G. Kaal) TI-99/4A Home Computer Book Archive Site where you find many books about the TI-99/4A not seen elsewhere, all collected by @airernie and now hosted by @acadiel (Author: @airernie) TI-99/4A Game Shelf Provides a gallery of interesting games with images of the opening screen as well as an in-play snapshot, along with a brief review tested on a real TI 99/4A system. Hardware requirements are also listed. Has many good Extended Basic games. (Author: @Vorticon) WHTech WHTech is the primary archive - though it's a bit overwhelming. But pretty much all software, hardware docs, etc, are available there. 99er.net Site with useful file archive and forum functionality. comp.sys.ti Covers all TI devices, including calculators.
  2. I thought it was about time that I create a goto place (no pun intended) for all things Camel99. So from now on I will put updates here. This update is my first Pong Game. It's a little quirky but it uses sound and sprites with no interrupts or multi-tasking. It's not that easy to win. The computer player is very crude but it make enough mistakes so that you can win. :-) Since I never spent much time writing games this has been educational for me. I have added a new simple word to CAMEL99 to create named character patterns. It's called PATTERN: "PATTERN:" words return the address (ie: a pointer) to the data that loads into VDP very fast using VWRITE. If you wanted to add PATTERN: to another Forth the code is: \ PATTERN: lets us define named character patterns \ usage: \ HEX 3C42 A581 A599 423C PATTERN: HAPPY_FACE \ 3C42 A581 99A5 423C PATTERN: SAD_FACE \ DECIMAL \ SAD_FACE 159 CHARDEF : PATTERN: ( u u u u -- ) CREATE >R >R >R \ push 3 values so we can reverse order , R> , R> , R> , \ compile 4 ints in VDP useable order ; The PONG code is in the spoiler. You have to load CAMEL99 with EA5 option and then paste PONG it into the emulator. When the codes finishes compiling type RUN. Latest version of CAMEL99 is on GitHub at the URL in the signature.
  3. In post #1 of fbForth—TI Forth with File-based Block I/O , I have updated the fbForth 2.0 Manual (a PDF with today’s date) and the blocks file, FBLOCKS (in a ZIP file with today’s date). The ZIP file also contains two disk images (90KiB and 400KiB) with the updated FBLOCKS file. The cartridge binaries for EPROM, Classic99 and MESS are still current except for FBLOCKS, which you can update from the above ZIP file. ...lee
  4. This thread is a discussion of the evolution of fbForth, my file-based implementation of TI Forth. Though I have replaced the sector-based block I/O of TI Forth with a file-based version for fbForth, I have written utilities to browse TI Forth disks and to copy TI Forth blocks to fbForth blocks files (see latest FBLOCKS file far below). Several obvious advantages to using file I/O over sector I/O: It is simple to make a system disk of any larger size and density by just copying the system files to the new (usually larger) disk. If there is filespace on the system disk, you can save other useful programs there, such as CorComp's Disk Manager, without fear of corrupting the system disk. There is no danger of corrupting a disk by saving Forth blocks---they are only stored to the current blocks file. One can use disks of different sizes with impunity. The only significant disadvantage I can think of is not being able to use the new system with the old. The viewer/copier utilities, which I mentioned above and included in the latest FBLOCKS file posted far below, render that merely an inconvenience. There is also a slight performance penalty to reading 8 records one at a time instead of 4 sectors all at once for each block read. This is somewhat mitigated by saving 896 bytes of VRAM. I am certainly open to any and all suggestions. ...lee ---------------------------------------------------------------------- fbForth 2.0: A File-Based Cartridge Implementation of TI Forth is now published as a book available for $14.99 on Amazon.com. It is also on Amazon Europe for various similar prices: fbForth now has a website of its own: fbforth.stewkitt.com fbForth downloads & cartridge (fbForth 2.0)— fbForth 1.0 (E/A3 executable): Executable and FBLOCKS—fbForth100b.zip Manual—fbForth_1.0_Manual_a.pdf fbForth 2.0:11 (32KB ROM cartridge) [NOTE: Contains new Font Editor]: 80-Column option on TI-startup screen. Bug fixes and the handful of words added to the resident dictionary are listed in posts #1067, #1116, #1170, #1173, #1426 and #1441 among others. The following additonal words have also been added to the resident dictionary: BYE SD0 CMOVE> ABORT" ​DATA[ ]DATA DCHAR SPDCHAR CODE: ;CODE WRAP PANEL SCROLL TALKING? SAY STREAM SOUND PLAY PLAYING? S0&TIB! SAMS? SAMS! >MAP \ N>S DOES>CODE: S|F SM/REM FM/MOD ■■■CARTRIDGE available■■■ ($30 + S&H)—PM me if you want me to build you one. ​ fbForth 2.0 labels (as on the above cartridge image) at $0.50 each + S&H (1st class stamp)—PM me if interested. Four 8KiB Inverted Bank Binaries + Batch File (packs binaries, inverted or normal, into 32KiB, 64KiB, 128KiB, 256KiB and 512KiB images)— fbForth 2.0:7—fbForthBinPack.zip fbForth 2.0:8—fbForthBinPack_20160529.zip fbForth 2.0:9—fbForthBinPack_20160924.zip fbForth 2.0:10—fbForthBinPack_20171019.zip fbForth 2.0:11—fbForthBinPack_20181212.zip Classic99 & Real Iron 32KiB Inverted Binary (contains latest FBLOCKS and fbForthBinPack ZIPs) [ NOTE: In Classic99.ini, the rom0 line should be: rom0=3|0000|8000|MODS\fbForth200_9.bin ]— fbForth 2.0:3—fbForth200_20151026.zip fbForth 2.0:4—fbForth200_20151109.zip fbForth 2.0:5—fbForth200_20151208.zip fbForth 2.0:7—fbForth2.0-7_Cartridge_20160412.zip fbForth 2.0:8—fbForth200_20160529.zip fbForth 2.0:9—fbForth200_20160924.zip fbForth 2.0:10—fbForth200_20171019.zip fbForth 2.0:11—fbForth200_20181212.zip MESS 32KiB Inverted Binary in RPK file (contains latest FBLOCKS and fbForthBinPack ZIPs)— fbForth 2.0:3—fbForth200_MESS_20151026.zip fbForth 2.0:4—fbForth200_MESS_20151109.zip fbForth 2.0:5—fbForth200_MESS_20151208.zip fbForth 2.0:7—fbForth2.0-7_Cartridge_MESS_20160412.zip fbForth 2.0:8—fbForth200_MESS_20160529.zip fbForth 2.0:9—fbForth200_MESS_20160924.zip fbForth 2.0:10—fbForth200_MESS_20171019.zip fbForth 2.0:11—fbForth200_MESS_20181212.zip Manual—fbForth 2.0: A File-Based Cartridge Implementation of TI Forth— [August 18, 2017 Book Publication]—​See top of post for more information [April 28, 2017 Update]—fbForth_2.0_Manual_20170428.pdf ​[June 20, 2015 Update]—fbForth_2.0_Manual_20150620.pdf Addendum 2.0:8— ​fbForth_2.0_Manual_Addendum.pdf fbForth_2.0_Manual_Addendum_20160620.pdf Previous FBLOCKS files— FBLOCKS_20151102.zip FBLOCKS_20151109.zip FBLOCKS_20151117.zip FBLOCKS_20151130.zip FBLOCKS_20151204.zip FBLOCKS_20151208.zip FBLOCKS_20160406.zip FBLOCKS_20160412.zip FBLOCKS_20160529.zip FBLOCKS_20160617.zip FBLOCKS_20160620.zip FBLOCKS_20160924.zip FBLOCKS_20170419.zip FBLOCKS_20171019.zip FBLOCKS_20171110.zip Latest FBLOCKS file—(FIAD file; 90KiB, 360KiB and 400KiB (CF7+/nanoPEB) images; as well as a few font files)—FBLOCKS_20181212.zip, which includes CFPMOUNT—This addition to the Compact Flash Utilities persists the mounted volume even after system reset Block #1 (Welcome Screen) modifications: Allows changing text colors to White on Blue Displays SAMS availability Bytes of free Low Memory (Return Stack grows down in this space from R0 ) Bytes of free High Memory (Dictionary grows up from HERE ; Stack grows down from S0) BLK>FILE—Current Blocks File to DV80 File export utility—ported from TurboForth with permission from Mark Wills FILE>BLK—DV80 File to Current Blocks File import utility—ported from TurboForth with permission from Mark Wills Compact Flash Utilities—Allow mounting of CF virtual disks in nanoPEB/CF7+ devices CF?—Leaves TRUE flag if CF&+/nanoPEB present; FALSE otherwise CFVOLS—Leaves volume #s associated with DSK1, DSK2 and DSK3 CFMOUNT—Temporarily (until system reset) mounts a volume in DSK1, DSK2 or DSK3 ASM>CODE—Outputs Machine Code in CODE: ... ;CODE format to a file in Append mode CPYBLK—Block Copying Utility—[fixed bug that would copy blocks from wrong file if they were already in block buffers and had corresponding block numbers] CRU Words—rewritten with CODE: ... ;CODE 64-Column Editor Memory Dump Utility [Note: VLIST is now part of the resident dictionary] TRACE—Colon Definition Tracing Printing Routines TMS9900 Assembler Disk Catalog Utility, DIR (ported from TurboForth code with @Willsy’s permission Disk Catalog Utility, CAT (reads VIB, FDIR and FDRs to extract information) More Useful Stack Words etc. (most required by the String Library) Portable String Library (ported by @Willsy and slightly modified by Yours Truly) TI Forth Block Utilities (includes a windowed viewer/copier)—fixed EMIT8 bug Compact Flash Utilities for mounting virtual disks in the nanoPEB/CF7+ In addition to the above, there are much-faster-loading binary images of the 64-Column Editor TMS9900 Assembler Portable String Library Note: The binary images in the last 3 menu options will only work with the revision of fbForth with which they were BSAVEd. The current revision is fbForth 2.0:11 and will work with the binary images in FBLOCKS_20171205.zip and later (until the next revision).
  5. Those of us who have loved TI BASIC and TI Extended BASIC for these many years we have grown to love the unique way that we use the various sub-programs in the TI-99 system. How could we survive without CALL CLEAR, CALL SCREEN, CALL HCHAR and how about CALL MYSUBROUTINE like we do in XB? Awesome! It isn't bad enough that you have to do your math backwards in Forth but for some reason, implementations of the Forth programing language like TI-Forth, Turbo Forth and FBForth have completely failed to respect this noble tradition. Well I say "No More!" In my new CAMEL99 Forth I have added this staple TI-99 feature to the language. Here is how it works. Forth contains a large list of functions that for some reason are called WORDs. Not a lot of computer language savvy in that community I guess. I mean what's wrong with SUB-PROGRAM, FUNCTIONS, METHODS or MONADS? Some people just don't have the gift of creating good jargon. Everybody knows what "WORDS" are. Now if we want to CALL those so-called "WORDS" we need a way to find them. Fortunately FORTH has a SUB-PROGRAM called FIND. (See what I mean?) FIND takes a string argument and returns a true or false number and the actual string where the SUB-PROGRAM resides in the forth "DICTIONARY" or words. So that sounds like a good place to start. Now using a string in ANS/ISO Forth can be complicated because the people on the language committee could never agree on how to do strings one way. So there are byte counted strings, stack strings, text bytes in raw memory and if you want to you can even make strings like 'C' with a zero on the end. Make up my mind... please. Fortunately there is a FUNCTION called WORD that lets us parse out a word from what we type into the console, delimited by any character. Thank goodness it returns a simple string that we understand. We can pass that string from WORD to FIND and check the flag to see if we found the SUB-PROGRAM. That's great. But the string that it returns does not get us a way to CALL the Forth SUB-PROGRAM. It just gives us another string. Useless! Even worse it's actually not a REAL string. It's the ACTUAL address in memory where the string starts. They call it the "NAME FIELD ADDRESS". (NFA) Of course they do. So inside each Forth SUB-PROGRAM, right after the string, is a pointer to the machine code that needs to run to make the SUB-PROGRAM start. So we have to get that. This ADDRESS is called the "CODE FIELD ADDRESS" (CFA) and we can use a Forth FUNCTION to convert the NFA string to a CFA. So that is solved. But the CODE FIELD ADDRESS is not the address of the code we need. It is just the place where the CODE's address is stored. So now we need another CAMEL Forth sub-program ... I mean "WORD". The word we need is EXECUTE. EXECUTE calls a SUB-PROGRAM called FETCH which gets the contents of a memory location. Why Forth could not call it PEEK is more than I will ever understand. Once EXECUTE calls "FETCH" then and only then can EXECUTE run the SUB-PROGRAM. Of course in typical Forth "take the easy way" fashion, EXECUTE just uses one pathetic little assembly language instruction to run the SUB-PROGRAM. So it looks like we have all the things we need to make a "CALL" keyword for Forth and yet NOBODY in that world got off their butts to make it happen. Here is how it looks when we put it all together as a new definition. : CALL ( <TEXT> ) 32 WORD ( read the program text until char 32 ie: space char) ( pass output to FIND no variables in between Huh?) FIND ( FIND returns a string and a true/false flag) ( if the flag is zero stop with a useful message) 0= ABORT" * BAD NAME" NFA>CFA ( from the name string get the code field address) EXECUTE ( EXECUTE the code held in the CFA) ; So after all that coding we finally bring Forth into the TI-99 universe where we can write code that is a little more normal. (even though the parameters are still backwards) : MYPROGRAM CALL CLEAR 6 CALL SCREEN 9 9 102 12 CALL HCHAR ; CALL MYPROGRAM theBF PS After showing this to Lee Stewart he has "optimized" my CALL code to this. : CALL ; Looks to me like it defines a SUB-PROGRAM that does nothing... What? Like sub-programs are going to call themselves? These Forth people are REALLY weird. Happy April 1st
  6. LOL, did they repurpose that cover art from Heavy Metal magazine? Did they want to make sure only adults (with ID) could program in Forth? No really, zoom into that picture!
  7. OK...Here is @Willsy's “Hunt the Wumpus” ported to fbForth 2.0: As you can see, it took a bit more than “a few (very minor) changes”! The changes are all documented in the comments at the beginning, which you do not need to load for a working game. [EDIT: Bug fixes in GETROOM , DOMOVE , DOSHOOT and GAMELOOP .] ...lee
  8. I thought the forthies in the group would appreciate this http://xkcd.com/645/ made me laugh anyway :-)
  9. Hello everyone, i found a book named "Forth on the Atari " Learning by using Forth edit by E.Floegel. This book is writed by Winfried Hofacker.. I need found a dump image of forth language for learn reading this book.. If correct i read at end of book that i need this type of forth program: Learn-Forth – Subset of FigForth from HOFACKER (Order No.7053), disk-block based (without DOS) as well on cassette Power-Forth – Extended FigForth from HOFACKER (Order No.7055), disk-block based (without DOS) Maybe is possible found it? The book for me that in Forth laguage i am a novice seem good.. had more example also how use with atari 800 a electronic component by Forth language.. Thanks for all help that give me thanks! Herm
  10. I decided to move my explorations into TurboForth Assembler to a different thread (this one) rather than hijacking another thread. My post here (http://www.atariage....ost__p__2415039) alludes to my current project, viz., implementing Tursi's TMS9900-Assembler-coded 14-bit countdown timer (http://www.atariage....ost__p__2021341) using the TMS9901 Programmable Systems Interface and based on Thierry Nouspikel's code ("TMS9901" link at http://www.nouspikel...titechpages.htm). My two Forth words have the same name as Tursi's TMS9900 Assembler code: INIT01 to start the timer and READ01 to get its current value. My TurboForth Assembler code follows: ASM: INIT01 ( --- ) R12 R2 MOV, \ Save return address R12 CLR, \ CRU base of the TMS9901 0 SBO, \ Enter timer mode R1 $3FFF LI, \ Maximum value R12 INCT, \ Address of bit 1 R1 14 LDCR, \ Load value R12 DECT, 0 SBZ, \ Exit clock mode, start decrementer R2 R12 MOV, \ Restore return address ;ASM ASM: READ01 ( --- n ) R12 R2 MOV, \ Save return address R12 CLR, \ CRU base of the TMS9901 0 SBO, \ Enter timer mode SP INCT, \ Make space on stack to leave timer value *SP 15 STCR, \ Read current value (plus mode bit) and put on stack *SP 1 SRL, \ Get rid of mode bit 0 SBZ, \ Exit clock mode, decrementer continues R2 R12 MOV, \ Restore return address ;ASM Both words seem to compile OK. INIT01 appears to work, but I cannot tell for sure because executing READ01 causes a stack underflow, which baffles me. Any ideas as to what is wrong? ...lee
  11. All... I have a first draft (attached) of my updated version of the (now finished---see later or click link-->) TI Forth Instruction Manual in PDF format. I am working on it in Open Office Writer (ODT format), but it won't look right if someone reading it does not have the fonts I used. I think the PDF will work better. I have elaborated parts of the manual, but I have not started an index, yet. One problem with the indexing in OOO Writer is that I have not yet figured out how to sort the index by ASCII codes. Writer wants to put non-alphabetics at the end and I want them as the TI FORTH Glossary has them, i.e., in ASCII order. Anyway, I am very interested in any feedback on this draft, particularly where I have added or changed information and whether you think an index would be useful. ...lee
  12. In this lesson we will learn a few new arithmetic words, several words for stack manipulation and how to use them all in programming, i.e., defining new words. Before we do much more Forth arithmetic, let’s exercise our brains with some infix-to-postfix and postfix-to-infix conversions. Remember that infix notation is the same as algebraic notation and postfix is the same as RPN. Many of these exercises are based on or taken directly from Brodie’s Starting FORTH. Convert the following infix expressions to their postfix counterparts. Each answer is in the spoiler following the infix expression: 1. a + bc 2. a(b + c) 3. (a - 10b)/3 + c 4. 2a + 5b + (c + d)/3 5. 0.5ab/100 6. (a - b)/c Convert the following postfix expressions to their corresponding infix expressions: 1. a b - a b + / 2. a b 10 * / Now, let’s try to define some words that do calculations, using only the arithmetic operators we have learned to this point. Let’s define words that convert liquid measure in gallons, quarts, pints and fluid ounces to fluid ounces. We want to write out a phrase such as 2 GALLONS 3 QUARTS + 5 CUPS + 25 FLUID OUNCES + to put on the stack the result in fluid ounces. Starting with pints, we can define the next higher volume in terms of the next lower as follows: : FLUID ( -- ) ; a no-op, i.e., do-nothing visual place-holder word. : OUNCES ( floz -- floz ) ; a no-op visual place-holder word that indicates a value in fluid ounces is on the stack and unchanged by OUNCES . : PINTS ( pt -- floz ) 16 * ; converts pints to fluid ounces. : QUARTS ( qt -- floz ) PINTS 2 * ; converts quarts to fluid ounces. : GALLONS ( gal -- floz ) QUARTS 4 * ; converts gallons to fluid ounces. Note that the stack effects are comments in the above definitions for reminding us of each word’s function. You do not need to type them to have a functional definition. We can define the singular forms of the above words, with identical stack effects, in terms of the plural word names above as follows: : OUNCE OUNCES ; : PINT PINTS ; : QUART QUARTS ; : GALLON GALLONS ; These are now synonyms of the words included in each definition. Now we can write such phrases as the following: You can verify with a calculator that each result printed by . is the total liquid measure in fluid ounces of the quantities added before printing. Now, let’s define words to perform the arithmetic in the above six infix-to-postfix exercises. We will name each word as Exn , where n is the exercise number: 1. 2. 3. 4. 5. 6. We can only do integer arithmetic with the Forth we have learned thus far. Two more division operators can help us manage this a little better, viz., MOD (pronounced “mod”) and /MOD (pronounced “slash-mod”): MOD ( n1 n2 — rem ) leaves on the stack the remainder rem from n1/n2. /MOD ( n1 n2 — rem quot ) leaves on the stack the remainder rem and the quotient quot from n1/n2. As we discovered in the exercise definitions above, #4 is very difficult and #6 is impossible without some stack manipulation we haven’t yet learned. Here are some words that will help us to manipulate the stack: DUP ( n — n n ) duplicates the top stack cell. SWAP ( n1 n2 — n2 n1 ) reverses the top two stack cells. OVER ( n1 n2 — n1 n2 n1 ) copies the second cell to the top of the stack. ROT ( n1 n2 n3 — n2 n3 n1 ) rotates the third cell to the top of the stack. DROP ( n — ) drops the top cell from the stack. EX4 can now be defined as Here is a commented version of EX4 to explain a little better how it works. The running contents of the stack are shown in comments as “stack:...” when the stack is changed by a line of code: and EX6 is now tractable as and the commented version to monitor the stack: Let’s try our hand at defining words for these two formulas for converting between Fahrenheit (°F) and Celsius (°C) temperatures: F = 9C/5 + 32 C = 5(F - 32)/9 Let’s define TC>TF to do the Fahrenheit-to-Celsius conversion (formula #1) and TF>TC for the opposite conversion (formula #2). Try it yourself before opening the spoiler below to see one way to do it: : TC>TF : TF>TC Now let’s improve these words to round to the nearest degree using /MOD instead of / so we can work with the remainder of the integer division. We also need to expand the factors 9/5 and 5/9 to 18/10 and 10/18, respectively, so we can halve the divisor and still get an integer: : TC>TF : TF>TC Here are commented versions for clarity: : TC>TF : TF>TC Be sure to try some negative temperatures. Compare the results with a calculator. Anything wrong? The following fbForth 2.0 word will help us craft a better rounding solution: SGN ( n — -1|0|1 ) leaves on the stack the sign (-1 or 1) of n or 0 for n = 0. The symbol ‘|’ in the stack effects means “or” and separates possible results, only one of which will be left on the stack. To get the above temperature-conversion words to round properly in both the positive and negative directions, we need to change the sign of the half-divisor term to match the remainder given by /MOD . Because SGN consumes the number it is testing, we need to DUP it before we hand it off to SGN . All we need to do now is to multiply the half-divisor term by the sign, add the result to the remainder term and divide again. This time we don’t care about the remainder. This quotient will be our rounding term of 1, -1 or 0, which, when added to the previous integer result, will give us our correctly rounded conversion: : TC>TF : TF>TC And commented versions for clarity: : TC>TF : TF>TC That’s all for this session. Please, feel free to ask questions and make suggestions; and certainly, let me know of any mistakes you find.
  13. This is the first of several tutorials to help those new to Forth, fbForth 2.0 in particular, to understand the language and its programming environment, as well as to gain some facility with it. fbForth is based on TI Forth, which was derived mostly from FIG-Forth with some influence from Forth-79. There are more recent Forth standards; but, compatibility with TI Forth was the prime concern. The biggest difference between TI Forth and fbForth is that fbForth is a file-based system, whereas TI Forth reads/writes directly from/to disk sectors without regard to any file structure. This is dangerous for the health of the disk and the user, especially, if you were to inadvertently use a disk with files on it for other systems. It also makes it difficult to exchange programs. Not only does fbForth coexist with as many unrelated files as will fit on a disk, you can create many different blocks files on the same disk as long as there is room. A TI Forth disk cannot contain anything but Forth blocks. I suppose that is more than sufficient for preamble. Let’s get on with learning fbForth. To operate the fbForth 2.0 System, you must have the following equipment or equivalent: TI-99/4A Console Monitor fbForth 2.0 Module (see this forum thread’s post #1 to get yours: fbForth—TI Forth with File-based Block I/O ) Peripheral Expansion Box (PEB) with 32 KiB Memory Expansion Disk Controller with 1 or more Disk Drives RS232 Interface (optional) [*]Printer (optional) If you wish to work through these tutorials but do not have this equipment or equivalent (CF7+ or nanoPEB, which substitutes for a PEB with the first three PEB items above), all of the software and firmware are available in the above-referenced thread for the Classic99 and MESS emulators. I also can supply the same for CaDD Electronics’ PC99 emulator, if you need it. It is a good idea to have a copy of fbForth 2.0: A File-Based Cartridge Implementation of TI Forth (the manual—available in the above forum thread) for reference, especially for looking up commands (Forth words—more below) in the glossary (Appendix D). Please note that the glossary is in ASCII order, which is listed at the bottom of every glossary page. Also, if you have a copy of the first edition of Leo Brodie’s excellent beginner’s book on Forth: Starting FORTH, Appendix C of the manual cross-references conflicts with fbForth 2.0. After powering up and selecting “fbForth 2.0”, you will be presented with one of these screens: The system blocks file is FBLOCKS and must be in DSK1 for the first screen to display. If fbForth does not find it there, the second screen displays. fbForth will still work just fine. You just won’t be able to display the menu of loadable utilities with MENU until you make FBLOCKS the current blocks file, which you can do by typing the following at the console’s flashing cursor if FBLOCKS is in DSK2, say: USEBFL DSK2.FBLOCKS1 LOAD Notes about the welcome screen: The first two lines and the last line of the welcome screen appear regardless of the presence of FBLOCKS. The version number of the cartridge includes the revision number after the ‘:’. The line beginning with “FBLOCKS mod:” comes from block #1 of FBLOCKS and will always reflect the current date of the system blocks file, FBLOCKS, which is always kept up to date in the above forum thread. Commands in Forth are called “words”. You will note that Forth words included in the normal text of these tutorials appear in boldface and are surrounded by spaces. This may look awkward when the space after a word precedes a comma, period or similar punctuation mark; but, since those punctuation marks are also Forth words, this practice avoids ambiguity. Speaking of spaces around words, that is how the Forth text interpreter ( INTERPRET ) knows it has the next word to look up in its dictionary (linked list of already defined words). It searches the dictionary from the most recently defined word to the very first word defined. In fbForth, that word is EXECUTE . See what I did there? EXECUTE has a space after it and it’s before a period. You are in the hands of the Forth text interpreter in two places, viz., at the console’s blinking cursor and when a block is loaded by the word LOAD . The input stream is viewed by the interpreter as a series of tokens separated by one or more spaces. If the interpreter finds the word, it executes the word and gets the next token. If the interpreter cannot find the token as a word in the dictionary, it checks to see if the token can be converted to a number in the current radix (number base). If it can, it pushes that number onto the parameter stack, which is often termed the data stack or, simply, the stack. The parameter stack, by the way, consists of a stack of cells, much as a stack of plates in a cafeteria, with the same restriction: You can only readily remove (pop) the top plate, i.e., the last cell on the stack is the most accessible and thus the first one popped off. This Last_In_First_Out situation is known as LIFO. Furthermore, in fbForth, a cell is 16 bits or 2 bytes wide. In computer parlance, 2 bytes constitutes a word; but, to avoid confusion with talking about Forth commands as words, we will generally avoid using “word” to mean “2 bytes”. Finally, if the token is not a word in the dictionary and it cannot be converted to a number, the interpreter gives up and issues an error message that repeats the word it could not find followed by a question mark. It also clears the stacks (parameter stack and return stack, about which more later) and leaves two numbers on the parameter stack to aid in finding where in the input stream the error occurred. These numbers are the contents of user variables IN (the position in the input stream immediately following the token causing the error) and BLK (the block number being interpreted—0 for console input). These are mostly just irritating when you are typing; but, when loading a block that aborts with the error report just described, it is very handy because you can type WHERE to put you into the editor with the cursor at the error. We will talk more about the editor in another lesson. Otherwise, you may just want to type SP! (stack pointer store) to clear the parameter stack. After you finish entering one or more successfully interpreted words and/or converted numbers with <ENTER>, the interpreter will display “ ok:n” to let you know its success. The ‘n’ after the colon is the depth of the parameter stack, i.e., how many numbers are currently on the stack. Here are a few lines typed at the console: The first line is from just tapping <ENTER>. Everything is OK with nothing on the stack. The second line pushes ‘4’ onto the stack and indicates all is well with one number on the stack. The third line pops and prints ( . ) the number, showing the stack as now empty. The last line obviously was not understood by the interpreter, hence the error message. Let’s wind this lesson up with showing you the most common way to define a new word in Forth. The defining word we speak of is : . : starts a high-level Forth definition, which is terminated with ; . The first token that must follow : is the name for the new word. fbForth is case-sensitive. “HELLO” is different from “hello”. We will use in our definition the word that means “print string”, namely, ." . ." accepts any characters into the string except for " , which is the terminator. As soon as it sees the " , it prints the string: We will define the word HELLO and add CR to the definition before and after the print-string code. This will put the cursor at the beginning of the next line each time it is executed. Typing the newly defined word, HELLO , will execute its contents: That’s all for now.
  14. I think we need a thread like the development thread for just the software we make. I have found it a 'hit or miss' when trying to keep up with the various games, apps, virtual-cartridges people are coming up with on this board. We could put the beta and completed versions on the thread. Be glad to monitor it. Just a thought.
  15. TheBF

    Camel Forth V.5 Demo

    From the album: CAMEL99 Forth

    Video showing 2 different ways to fill the screen with numbers 0 to 9.

    © Brian Fox Markham Canada, 2017

  16. Mark (or anyone)... I cannot find any documentation about using the TurboForth word JOYST except in the TF v1.1 Release Notes: JOYST ( jstick# -- value) modified to invert the returned value, making decoding much simpler. JOYST also resets the screen blanking counter in the console interrupt routine to prevent screen blanking. Unfortunately, this is not very helpful to me. In TI Forth, three values are left on the stack (ASCII, xpos, ypos). I have no idea how to use TF's word. I cannot even get it to respond with a value other than 0 when I use it in a loop in the emulators for joystick #1, i.e., 1 JOYST . I am trying to use the keyboard emulation of joystick #1 (Q,W,E,R,S,D,Z,X,C). ...lee
  17. I am starting this thread to collect various examples of bitmap graphics programming in fbForth 2.0. This first example is a quick-and-dirty joystick drawing program, JDRAW , ported from the program of the same name I wrote four years ago for TI Forth in post #48 of thread, TI FORTH Version 3.0 dated October 20 1982. As I stated then, it is a pretty useless program except as a demo and proof of concept. It uses the CRU mode of JOYST for joystick-only use. There is a three-choice menu accessed with the fire button. The choices are P—Toggle pen up/down [blue pen = pen down; white pen = pen up] D—Toggle draw/erase [ solid pen = draw mode; hollow pen = erase mode] Q—Quit program The joystick moves the pen around the display screen. There is much that could be done to make it more useful. One such thing would be to provide finer control over the pen—reaction to joystick movement is too fast for any useful drawing. Another would probably be to dispense with the menu and use the fire button for pen-up/pen-down. But, that leaves managing draw/erase mode, which would probably require using the JOYST word in keyboard (KSCAN) mode. Anyway, here is the fbForth 2.0 source code for JDRAW : I will add a blocks file, later. For now, you can paste this in Classic99 at the command line of fbForth 2.0. Start the program by typing: JDRAW ...lee
  18. After 30 years of wondering I finally got around to creating a Forth compiler for the TI-99 where the top of stack (TOS) is maintained in a register. The literature said this would speed it up by about 10%. I used a DOS Forth system to create the cross-compiler to the build the TI-99 compiler so it was painful debugging both ends at the same time. (old brain hurts) I cross-compiled Brad Rodriguez's Camel Forth for the high level Forth words and wrote 105 Assembler primitives with hints here and there to the hard stuff from TI MSP430 Camel Forth and I had to look at Turbo Forth to help find a couple of gotchas with the 9900 instruction set. Sincere thanks to Willsy and Brad. Anyway the answer is in.,, kind of sort of. Using Willys's excellent and highly optimized Turbo Forth as the benchmark for excellence I did a little comparison. Turboforth uses the PAD RAM at >8300 to hold many simple code routines so they run very fast in that zero wait state memory. To even begin to come close to Turbo Forth I found out I also had to put the Forth thread interpreter there along with branching and I stuck the literal run-time routine there as well. After that the only optimizing approach I used was this TOS thing The TOS caching is a mixed blessing. For routines that take one input on the stack and produce one output like 1+ 2+ 2/ 2* @ [email protected] etc... it is about 40% faster. Very cool. For operations that take two inputs and generate one output or no output on the stack, ( ! C! + - * etc.) refilling the TOS can eat up all of the benefit on the 9900. And for operators that need to make extra space on the stack for an output, the TMS9900 needs 2 instructions so they are actually slower because you have to push the TOS register onto the stack to make room for the new thing. (DUP OVER etc.) FYI: - my empty DO/LOOP structure runs the same speed as Turbo Forth so the test is truly comparing the math operations. - Tests were run on Classi99 emulator under Windows 10 64bits (my real iron is in a box with a defective 32K memory card) Test 1 tests all the routines Turbo Forth has in PAD Ram and the others as well, so it's mixed. Test 2 is head to head TOS vs PAD RAM optimization. Test 3 is TOS vs Forth operators that have no PAD RAM optimization. We can see in test 3 the we get about 8% improvement not 10%. The surprise for me was test 2 because the speedup was not suppose to be as fast as zero wait state ram but it seems the combination of everything netted out to the same result. Weird. In many other ways Turbo Forth is still faster by virtue of hand coding so much of the internals, but this demonstrates the TOS on math operations. Now I have to stop doing this for a while. (addictions are hard to kick) PS. I noticed I did not include NIP and TUCK but that's for another day. PSS This means Turbo Forth 3.0 can be 8% faster. Just one more re-write Willsy :-) theBF HEX : OPTEST \ mixed 1000 0 \ *OPTIMIZATION METHOD* DO \ CAMEL99 Turbo Forth \ ---------------------- AAAA ( lit) \ HSRAM HSRAM DUP \ TOS HSRAM SWAP \ TOS HSRAM OVER \ TOS HSRAM ROT \ TOS -- DROP \ TOS HSRAM DUP AND \ TOS -- DUP OR \ TOS -- DUP XOR \ TOS -- 1+ \ TOS HSRAM 1- \ TOS HSRAM 2+ \ TOS HSRAM 2- \ TOS HSRAM 2* \ TOS -- 2/ \ TOS -- NEGATE \ TOS -- ABS \ TOS -- + \ TOS HSRAM 2 * \ TOS HSRAM DROP LOOP ; \ CAMEL99: 4 5 secs \ TurboForth 4.7 secs \ (Empty DO/LOOP are same speed) : OPTEST2 \ only HSRAM VS TOS 2000 0 \ *OPTIMIZATION METHOD* DO \ CAMEL99 Turbo Forth \ ---------------------- AAAA ( lit) \ HSRAM HSRAM DUP \ TOS HSRAM SWAP \ TOS HSRAM OVER \ TOS HSRAM DUP AND \ TOS HSRAM DUP OR \ TOS HSRAM 1+ \ TOS HSRAM 1- \ TOS HSRAM 2+ \ TOS HSRAM 2- \ TOS HSRAM + \ TOS HSRAM 2 * \ TOS HSRAM DROP \ TOS HSRAM DROP \ TOS HSRAM LOOP ; \ CAMEL99: 6.4 secs \ TurboForth 6.4 secs HEX : OPTEST3 \ TOS versus conventional Parameter stack 3000 0 \ *OPTIMIZATION METHOD* DO \ CAMEL99 Turbo Forth \ ---------------------- AAAA \ HSRAM HSRAM BBBB \ HSRAM HSRAM CCCC \ HSRAM HSRAM ROT \ TOS -- AND \ TOS -- OR \ TOS -- DUP XOR \ TOS -- 2* \ TOS -- 2/ \ TOS -- NEGATE \ TOS -- ABS \ TOS -- DROP \ TOS -- LOOP ; \ CAMEL99: 7.5 secs \ TurboForth 8.13 secs
  19. This lesson will discuss more of the details of RAM organization, working with the stack and some minimal Forth programming. The 32 KiB expansion RAM on the TI-99/4A is organized as follows in fbForth 2.0: The 8 KiB lower RAM (2000h – 3FFFh) contains four fbForth block buffers, low-level Assembly Language support, system global variables (termed “user variables”) and the return stack. You will notice here that hexadecimal numbers in this discussion (not in actual Forth code!) have a trailing ‘h’. The return stack starts at the top of this space at 3FFEh and grows downward toward the low-level support code, which currently ends at 3A03h. This allows 766 cells for address storage for deeply nested code. Colon ( : ), introduced in the last lesson, makes extensive use of the return stack. Your code can make use of the return stack as well; but, you must be very, very careful when you do, that you do not interfere with the return scheme of fbForth. In a later lesson we will discuss how to safely use the return stack because it certainly can be useful. The 24 KiB upper RAM (A000h – FFFFh) is almost entirely free for your Forth programming pleasure. This is due to the fact that the entire resident dictionary of fbForth 2.0 resides in the 32 KiB ROM of the cartridge. The last word of the resident dictionary is TASK and resides at A000h for reasons that will be explained in a later lesson. The next available address is A00Ch. This is the beginning of the user-definable dictionary. Any words defined after this point are still part of the dictionary and, as a result, become part of the language. This is what makes Forth extensible. The top of memory in the upper 24 KiB area contains the Terminal Input Buffer (TIB) and the base of the parameter stack at FFA0h. This means that all but 108 bytes of the upper 24 KiB area is available for your programming. This, of course, includes the parameter stack, which grows downward toward the dictionary, which grows upward toward the stack. Now is a good time to elaborate on a comment Owen left on the last lesson, viz., verbalizing or pronouncing Forth words. Forth was intended to be a language you could speak. That is pretty much why Forth functions, routines, constants and variables are called “words”. I will try to remember to include the usual pronunciation of standard Forth words as we discuss them. A very good source for such pronunciations is Derick and Becker’s FORTH Encyclopedia: The Complete FORTH Programmer’s Manual, 2nd Edition. The words appear in ASCII order, so they are easy to find. Each of the entries includes the word’s pronunciation. An example from the last lesson is SP! , which is usually pronounced “S-P-store”. The “SP” part happens to refer to the stack pointer, which is why I had said “stack pointer store”. Another example, as Owen mentioned, is “dot-quote” for ." and “quote” for " . Most words’ pronunciations are not difficult to figure out; but, there are a couple of heavily used words that are not obvious. One is @ , which is pronounced “fetch” because it pops an address from the stack and fetches its contents to the stack. Another is ! , which is pronounced “store”. It requires two numbers on the stack: the number to store and the address in which to store it. We will discuss these in greater detail ere long. We turn our attention, now, to working with the stack. As mentioned last time, it operates in a LIFO mode. To show you how it works, we will use . and a new word, .S (pronounced “dot-S” and means “print stack”). .S will non-destructively print the stack contents from the bottom up (left to right), with ‘|’ representing the bottom of the stack. Recall that . pops the top number off the stack and prints it: You will see that the system response of “ok:5” displayed after .S is executed shows the stack to have the same depth as before it was executed. Notice that the last of the five numbers entered is on top of the stack, that it is the first one popped and printed by . and that the system response shows the depth to be one less after each . . The last line demonstrates what happens when you execute a word requiring a number on the stack but with nothing on the stack. The number 11776 (2E00h) printed is significant because the bottom edge of the stack is the start of the TIB and the last thing entered at the terminal (console) was ‘ . ’, which has an ASCII code of 2Eh. A Forth convention when defining or listing words is to show the state of the stack before and after the word executes. The stack effects (also, stack signature) are indicated by showing within parentheses what the word expects on top of the stack before it executes to the left of an em-dash (—) (or two or three dashes [--]) and what it leaves on the stack to the right. Also, the most accessible number is always on the right on either side of ‘—’, which represents execution of the word. For example: ! ( n addr — ) shows that the stack effects of ! , which requires the storage address addr to be on top of the stack and the number n, which will be stored at addr, below it. The absence of anything to the right of the execution indicator (—) shows that ! leaves nothing on the stack. Let's do a little math with the stack. We will start with the basic four: addition, subtraction, multiplication and division. Here are those definitions with their stack effects: + ( n1 n2 — sum ) pronounced “plus” - ( n1 n2 — diff ) pronounced “subtract” * ( n1 n2 — prod ) pronounced “times” / ( n1 n2 — quot ) pronounced “divide” Each of these operators requires two numbers on the stack and leaves the result on the stack when it is done. Below are examples of each operation, showing the result printed with . : As you type the above at the terminal, you will see that the operator is after the numbers it operates on. This is an example of postfix notation or RPN (Reverse Polish Notation). You are probably more familiar with infix (algebraic) notation: 1 + 2 = 3 where the operator is between the two numbers it operates on. The postfix nature of Forth is the highest hurdle you will likely need to get over. Words in Forth can certainly be defined in an infix way; but, postfix is more efficient and easier to implement. An interesting bit of history regarding RPN: Reverse Polish Notation implies that there is a Polish Notation, which, of course, there is. Polish logician Jan Łukasiewic (yahn woo-kah-SHEH-vitch) invented prefix notation to simplify a branch of mathematical logic. The operator precedes its two operands in prefix notation. It became known as Polish Notation (PN) due to the nationality of Łukasiewic. Quite naturally, when postfix notation arrived on the scene with the exact opposite form, it became known as Reverse Polish Notation (RPN). At the top of this lesson, we discussed memory organization, stating that virtually all of the available programming memory is one chunk between the top of the parameter stack and the most recently defined word in the dictionary. Each of these locations is readily available with resident fbForth 2.0 words: [email protected] ( — addr ) pronounced “S-P-fetch”; leaves on the stack the address of top of stack HERE ( — addr ) pronounced “here”; leaves on the stack the address of next available dictionary location The available RAM is the difference between these two addresses. Since the stack is at the higher address, we want to subtract HERE from the top-of-stack address: We can make a couple of useful definitions from this: : SIZE ( -- n ) [email protected] HERE - ; : .SIZE ( -- ) SIZE . ." bytes free" ; The first one leaves the size in bytes of free RAM between the top of the stack and HERE. The second prints that number followed by “bytes free”. You may have noticed that I slipped in another word in the definitions above, viz., ( . Pronounced “left paren”, it begins a comment, which is terminated by ‘)’. Comments are ignored by the text interpreter. Obviously, the comments above are not necessary for the definitions to work. You can enter the above definitions without them. They help us to remember what the words do. We will make it a habit to include the stack effects in this way when we actually begin storing our new words in a blocks file a lesson or two hence. We will conclude this lesson by defining one more useful word. CLS is a resident fbForth word that clears the screen but does not move the cursor. To also move the cursor to the top of the display screen, we will define PAGE for which we need another fbForth word that sets the cursor: GOTOXY ( x y — ) sets the cursor to the x-y coordinates on the stack. The upper left corner of the display screen is at x = 0, y = 0. To show GOTOXY in action, we will place the cursor somewhere in the middle of the screen and print an ‘X’ there: And, now, our definition of PAGE : : PAGE ( -- ) CLS 0 0 GOTOXY ; clears the screen and sets the cursor to the top left corner of the display screen. Here is the screen after the definition and just before execution: and after execution: That’s it for this session. We will do more stack manipulation and programming next time.
  20. All... We have had quite a discussion on the YaHoo! TurboForth forum regarding floating point math and transcendental functions using it. I want to bring some of it over here, particularly because I am having trouble posting there. Rob Van Orden, Willsy and I have been going at the TF code pretty hot and heavy. In a bit, I will post the TF BLOCKS file we have been working on. Right now, a glass of wine and my Love beckon! Feel free to jump in anytime! ...lee
  21. Wow! It's been a really long time since I've done much of any significance with the TI99-4A! I have nearly 80 cartridges, many of which are used by my grandkids on a regular basis when they come over. The productivity software/cartridges (TI BASIC, TI Extended BASIC, TI Writer, TI Multiplan, Editor/Assembler, Terminal Emulator II, TI Logo II and TI FORTH) have seen little use except for TI BASIC until very recently. I have often used TI BASIC for simple math problems like figuring trigonometric solutions for various projects around the house because I could fire up the TI quicker than going upstairs to boot up one of the PCs. I might need the hypotenuse of a right triangle to lay out the paint lines on the grass of the volleyball court. Recently, however, after noticing to my delight an unexpected presence on the Internet of TI99ers, I was inspired to pick up a couple of projects I had long ago allowed to languish for 20 odd years! They both had to do with TI FORTH. One was to clean up and make easier to use with an index and anything else I could use to make it better, the TI FORTH Instruction Manual. The other was to finish a FORTH program I had started that was to solve a problem with a unique Social Security Number (SSN), viz., using the digits 1-9 only once (no 0, of course), construct a SSN with the growing number evenly divisible by the position number of the last digit. For example, 123 needs to be evenly divisible by 3 (it is) and 1234 needs to be divisible by 4 (it is not, but 1236 is), etc. I have finished the FORTH problem and am well on my way to polishing up the TI FORTH Instruction Manual. If there is any interest, I will post the FORTH solution (I may do it anyway!). When I am finished with the TI FORTH Instruction Manual, I will post it, as well. Also, I am certainly interested in whether anyone else is doing anything with the original TI FORTH on the 99-4A. Later... lee
  22. Pardon my naiveté, but I have a question about the transfer block for the diskette level 1 formatting subprogram (11h). The docs (GPL Interface Specs for 99/4 Disk Peripheral) say the MSN of 834Ch for the DSR version should be 1 for double-sided formatting, but are a little confusing for when 2 should be used, in particular, for density. Is that any density greater than single? More generally, does anyone from experience reading this have detailed advice about exactly what diskette formats can be written with which DSR version numbers in this nybble (presuming, of course, an appropriate version of the DSR is in place)? For example, what happens if the transfer block has DSR version = 0, Density = 2 and No. of Sides = 2? ...lee
  23. This was the forth that was used to build the game Universe from Omnitrend I won a manual, copy of starting forth, disk and quick reference card
  24. http://toddbot.blogspot.com/2012/04/why-forth-still-matters-in-this.html
×
×
  • Create New...