Giter Club home page Giter Club logo

colorforth's Introduction

colorForth cf2023 2023 Apr 04

colorForth is a simple dialect of Forth created by the inventor of Forth, Chuck Moore.
cf2023 is a distribution that runs on a Windows PC in bochs, or natively from a USB drive.

Double left click ( run ) go.bat to run the cf2023.img image in the bochs PC emulator. 
bochs is available from http://bochs.sourceforge.net/

It is better to copy the file cf2023.img to a USB drive, from sector 0, and boot the PC from the USB drive.
On Windows you can use Rufus.exe to do this.

Files in this archive :
c.bat       	create cf2023.img from  cf2023.nasm  and  cf2023Ref.img
cf2023.img  	the resulting executable image file
cf2023Ref.img   the latest version of cf2023.img, used to merge the font and colorForth source into the new cf2023.img
dasm.bat        disassemble a section of cf2023.img, for test only
go.bat          run the cf2023.img image in bochs
goc.bat         create cf2023.img from cf2023.nasm then run the resulting image in bochs
nasm.exe        the Netwide ASeMbler ( NASM ) program : http://www.nasm.us/
ndisasm.exe     the NASM disassembler  : http://www.nasm.us/doc/nasmdoca.html
new.bat         copies the current cf2023.img file to cf2023Ref.img. Run new.bat when you have made changes to the
                colorForth source (by typing "save" or "sa" in colorForth) and want these changes to be included when the
                system is re-created.
readme.txt      this readme file.

Short "how to" guide : the best way to use cf2023 is to open a Windows command window (cmd.exe) in the 
    directory where cf2023 is located.
    If you make changes to cf2023.nasm, run  c.bat  to create a new cf2023.img (using cf2023Ref.img, 
    a saved reference image).
    If you make changes in the colorForth editor and type "save" or "sa" you must run  new.bat  before 
    re-creating cf2023, otherwise your changes will be lost. 
    This is because  c.bat  and  goc.bat  take the colorForth source and font from the cf2023Ref.imf 
    reference image to create the new cf2023.img image.

Online help is available on comp.lang.forth newsgroup and on https://groups.google.com/forum/?hl=en-GB#!forum/color-forth.

Enjoy!

Howerd Oakford  www.inventio.co.uk  [email protected]

colorforth's People

Contributors

howerd avatar asmodehn avatar

Stargazers

Clyde Willis Phillips Jr. avatar  avatar Benjamin Conlan avatar Satoshi.Ye avatar Skopych avatar Chenxuan Huang avatar Spatz avatar Miroslav Popov avatar  avatar  avatar Vasya Poteryaiko avatar Marco Nicola avatar  avatar  avatar  avatar  avatar rgc avatar Martin Sandiford avatar Ivan Firsov avatar  avatar james avatar  avatar

Watchers

 avatar zgroska avatar  avatar  avatar

colorforth's Issues

Replace `keyboard` keyword with `keypad`.

The word keyboard can be found in several places in the code, but it doesn't work.
It must be replaced with keypad.

Here is where we can find it in cf2023Ref.img_2023Mar09_143001.f

Line 1410: : ok show black screen relay traffic keyboard ;
Line 1411: : k show black screen relay keyboard ;
Line 1842: : ok show blue screen text regs keyboard ;
Line 1922: : ok show black screen text green return r r. blue r. r. white r. r. green r. r. drop stack keyboard ; reset ok
Line 2158: : ok show red screen text regs keyboard ;
Line 2976: #296 box #0 #0 at lines keyboard ;
Line 3003: : ok c cls act #0 pos ! show ch act $00 #650 at $00202020 color #1024 #768 box keyboard ;
Line 3190: : ok c show keyboard ;

Thank you for developing colorForth!

"drop" is missing

I found strange drop doesn't work in colorForth.
It response with drop? when I try it in "interpretation" mode.

When I add it in page 72 and load it works well.
We can probably fix this in next release.

drop

"2drop" incorrectly encoded in "ForthNamesROM" asm data

Hi,

I think there is an error regarding the Shannon-Fano encoding of the word 2drop (i.e. two_drop_), in the data defined under ForthNamesROM from the assembly code.

Here's the affected line of code:

    dd 0xD5833620   ; 2drop     two_drop_

Among others, see line 6584 from cf2019.nasm.

That should be the encoding for 2dup, which incidentally is defined on the line right above.

I believe the correct encoding for 2drop should be 0xD5804F10.

I could notice the problem in nasm source files, and PDF listings, from versions cf2019 and cf2022_Issue_2022Apr08. While I didn't look at the content from other archives, I suspect it might affect all versions.

I hope I got this right!

Thanks for the amazing work ❤️

for loops and - word

Hello,

I tried, in colorForth cf2019, to implement the words for loops, from forth group but it doesn't work:

100 FOR I . NEXT
counts down to one.

100 FOR I . -NEXT

Counts down to zero.

100 - DUP - FOR I OVER + - . NEXT DROP

counts up from 0 to 99

100 - DUP - FOR I OVER + - . -NEXT DROP

includes 100

100 - DUP - FOR I OVER + NEGATE . NEXT DROP

starts with 1 to 100

: TEST 100 FOR I . NEXT ;

but finnally these words works :

: - negate ;
: countup dup for i - over + swap next ;
: countdown for i next ;
: contdown0 for i -next ;


Thanks in advance !

Running ColorForth 2023 on the latest **Bochs-2.7**

I managed to run your latest cf2023 from 27, March 2023 on the latest version of Bochs 2.7.

Here is a downloads link: https://forexsb.com/downloads/cf2023-bochs27.zip

Changes:

  • replaced bochs.exe, BIOS-bochs-latest , and VGABIOS-lgpl-latest files with the ones from Bochs v2.7.
  • modified cf2023.bxrc - cpu, cpuid, and keyboard parameters as follows:
cpu: model=p4_willamette, count=1, ips=50000000, reset_on_triple_fault=1, ignore_bad_msrs=1, msrs="msrs.def", cpuid_limit_winnt=0
cpuid: x86_64=1, mmx=1, sep=1, simd=sse4_2, apic=xapic, aes=1, movbe=1, xsave=1
cpuid: family=6, model=0x1a, stepping=5
keyboard: type=mf, serial_delay=250, paste_delay=100000, keymap=, user_shortcut=

This configuration runs well on my Windows10 machine.

ColorForth 2023

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.