As with the device driver code, CFORTH resides in the appropriate sub-directory of "/applic/dsp/csource". The only code changes you need to make, except for bug fixes, should be those that install our FORTH primitives. A primitive is a word in FORTH that is written in C and compiled into FORTH when dspforth is constructed. The following files are needed to create the primitives. Unless otherwise noted, all of these files are located in "/applic/dsp/csource/cforthx.y":
nircases.h | The case statements that define the primitives. |
nirmain.h | Initialize buffers used in forth.c by nircases.h. |
nirsetup.h | Initialize #defines and datatypes. |
config.h | Definitions to configure CFORTH. Change forth.dic -> dspforth.dic. | ||
forth.c | Contains WMB's primitive definitions. Include nircases.h in function inner_interpreter(). Include nirmain.h in function init_forth(). Include nirsetup at top of forth.c. | ||
init.x | List of primitives as they would be typed in forth. Add our primitives the way you want them used in CFORTH. Make sure that they are in the same order as prims.h. | ||
io.c | I/O subroutines for CFORTH. Modifiy title() to display our version info about device driver, port primatives, spectrum primatives and date of last update of these versions. Change the prompt from ``ok'' to ``UR_OK''. | ||
loadcom.fth | Default FORTH files to load. Add ``fload tasking.fth'' if you wish to use the multitasking features. loadutil.fth Creates the dspforth dictionary. Change forth.dic -> dspforth.dic. | ||
makefile | The makefile for dspforth. Change: Comment out DEBUG and SYSCALL. Add to INCLUDE: Add to OBJS: Change forth to dspforth. Add: If using ccalls, add: prims.h | #defines the case statement primitives to be
associated with a unique primitive number. Add our primitives here
after WMB's.
| |
dsp56.h | Header file for DSP56001 boards from spectrum. |
sm56dev.c | Interface library for DSP56001 boards. |
dsp_if.o | Object file created when device driver was built. Needs to be placed in the ./unix sub-directory. |