Difference: McForth (5 vs. 6)

Revision 62019-01-16 - PeterSchmid

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
%DASHBOARD{ section="banner"
Line: 20 to 20
 
Changed:
<
<

rcforth and IDIOT Monitor for RaspiElf (Membership Card)

>
>

Rc/Forth and IDIOT Monitor for RaspiElf (Membership Card)

  Mark Abene made FORTH work on the Membership Card.
Changed:
<
<
forth.hex
Modified version of Mike Riley's rcforth, ROM version. Changed to work with my modified version of IDIOT. Loads in at 0500h. You can get it from the COSMAC ELF yahoo group.
>
>
forth.hex
Modified version of Mike Riley's Rc/Forth, ROM version. Changed to work with my modified version of IDIOT. Loads in at 0500h. You can get it from the COSMAC ELF yahoo group.
 
idiot_new.hex
New version of IDIOT with SCRT routines, along with TYPE, MSG, READ, and INPUT routines for basic console I/O. Loads in at 0000h. You can get it from the COSMAC ELF yahoo group. For details see http://www.retrotechnology.com/memship/mship_idiot.html

Concatenated this two files as mc-forth.hex and convert it to a binary file:

Line: 51 to 51
 -rw-r--r-- 1 pi pi 15022 Jan 13 12:36 mc-forth.hex
Changed:
<
<
Now upload and start mc-forth:
>
>
Now upload and start Rc/Forth (mc-forth.bin):
 
pi@cosmac:~/elf/forth $ bin2elf -w -r mc-forth.bin
0x1634 bytes written

Line: 66 to 66
 connected to /dev/ttyS0 Escape character: Ctrl-Type the escape character followed by c to get to the menu or q to quit
Changed:
<
<
>
>
[CR]
 IDIOT/4 *$P500 Rc/Forth 0.1
Line: 77 to 77
 IDIOT/4 *
Added:
>
>

Rc/Forth and Chuck's Super Monitor for RaspiElf (Membership Card)

Mark Abene made Rc/Forth also work with Chuck's Super Monitor. I prefer this monitor because of its ability to communicate with 9600 baud.

mcsmp_rcforth.hex
Mike Riley's Rc/Forth, modified to work with Chuck Yakym's MCSMP20 firmware. You can get it from the COSMAC ELF yahoo group.
MCSMP20B.bin
Chuck's Super monitor. Loads in at 0000h. You can get it from the Lee A. Hart's website The COSMAC ELF Membership Card .

Create binary file and load it at 0x8000:

pi@cosmac:~/elf/forth $ hex2bin mcsmp_rcforth.hex
hex2bin v2.5, Copyright (C) 2017 Jacques Pelletier & contributors

Allocate_Memory_and_Rewind:
Lowest address:   00008000
Highest address:  000091DB
Starting address: 00008000
Max Length:       4572

Binary file start = 00008000
Records start     = 00008000
Highest address   = 000091DB
Pad Byte          = FF
pi@cosmac:~/elf/forth $ bin2elf -s 8000 mcsmp_rcforth.bin
0x11dc bytes written
Now upload and start the monitor, start the terminal program with 9600 baud:
pi@cosmac:~/elf/forth $ bin2elf -w -r MCSMP20B.bin
0x8000 bytes written
pi@cosmac:~/elf/forth $ microcom -s 9600
connected to /dev/ttyS0
Escape character: Ctrl-\
Type the escape character followed by c to get to the menu or q to quit
[CR]
Membership Card's Serial Monitor Program Ver. 2.0B
Enter "H" for Help.
>R8000
Currently running your program
Rc/Forth 0.1
(c) copyright 2006 by Michael H. Riley
ok 

Night Rider in Rc/Forth

See ChaseLighting for an assembler version (much faster of course).

Here a small test program for the Rc/Forth. It's a simple night rider chase lighting, but it is using the MC LEDs (of course), the switches for setting the pace and the IN button to terminate the program.

Some interactive programming to find out how OUT is working:

ok 1 4 OUT
ok 4 1 OUT
ok 4 2 OUT
ok : LED! 4 SWAP OUT ;
ok 4 LED!

The rest of the program, every word can and should be tested interactively (e.g. 1 LEFT):

: SWITCH@ 4 INP ;
: DELAY 1 SWITCH@ + 0 DO LOOP ;
: LEFT 7 0 DO 2 * DUP LED! DELAY LOOP ;
: RIGHT 7 0 DO 2 / DUP LED! DELAY LOOP ;
: NIGHTRIDER 1 DUP LED! BEGIN LEFT RIGHT EF 8 <> UNTIL DROP ;
 
Added:
>
>
Push the IN button to terminate the program.
 

Mass storage

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback