Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!dali.cs.montana.edu!ming!ieemd From: ieemd@ming.cs.montana.edu (Matt Donnelly) Newsgroups: comp.lang.forth Subject: Re: RTX Uploading: HELP!!! Summary: a way to load a data table in EBForth Keywords: RTX Message-ID: <2392@dali> Date: 4 Sep 90 18:43:18 GMT References: <1990Aug16.132954.17287@mlb.semi.harris.com> <15346.26e3b9ed@levels.sait.edu.au> Sender: usenet@dali.cs.montana.edu Organization: Montana State University, Dept. of EE, Bozeman,MT Lines: 29 In article <15346.26e3b9ed@levels.sait.edu.au> etrmg@levels.sait.edu.au writes: > >The program is loading nicely now & have almost had the sucker run. I just >have to figure out how to load a table into an array using EBForth. >That's another new thing for me. I'll give CREATE a try, but am a bit confused >about how to do repetitive things while "creating". Anyways thanks & bye. > >Ronn How about this for loading a table of 8 bit words in EBForth? : D, 1 ALLOT THERE 1- C! ; \ performs same function as "C," but puts data in the RTX data area \ not the code area \ D, must be used an even number of times or else the data table \ pointer will be left in the wrong position for 16 bit words VARIABLE table1 0 D, 1 D, 2 D, 3 D, 4 D, 5 D, 6 D, 7 D, 8 D, 9 D, Now the table is loaded with ten numbers and the variable "table1" points to the first data location. To retreive entry number 5, one would use 5 table1 + C@ This worked pretty good for us. Matt Donnelly ieemd@caesar.cs.montana.edu