howerd / colorforth Goto Github PK
View Code? Open in Web Editor NEWcolorForth running in Bochs for Windows
License: GNU General Public License v3.0
colorForth running in Bochs for Windows
License: GNU General Public License v3.0
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]
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!
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 ❤️
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 !
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:
bochs.exe
, BIOS-bochs-latest
, and VGABIOS-lgpl-latest
files with the ones from Bochs v2.7.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.
Hello
How I coud insert (with colors) in colorforth cf2019 version 2021 aug 15, a fibonacci word from disccution :
http://www.strangegizmo.com/forth/ColorForth/msg00809.html or http://www.strangegizmo.com/forth/ColorForth/msg00022.html
: fib push 1 dup pop -2 +
: f -if drop nip ; then push swap over + pop -1 + f ;
Thanks,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.