Post Reply 
[71B] How to make a lex file
05-11-2014, 02:53 PM
Post: #1
[71B] How to make a lex file
Hello,

I'm a newbie here but i own a 71b, 15c, 48g.
The fact is that i want to make a lex file in my 71b (using the forth ROM). A real one, not an emulator.

Just for testing the process, i used edtext to write the code (an exemple given by HP in the manual with the pseudo-ops wanted) and the ASSEMBLE word after in the forth mode.

But everytime i have the error message : "missing/multiple file type".

I dont see what is wrong.
And, can i find any "howto" to make this.

Tanks a lot for help !
Find all posts by this user
Quote this message in a reply
05-11-2014, 03:03 PM
Post: #2
RE: [71B] How to make a lex file
I thought T-Lex was extinct?
Find all posts by this user
Quote this message in a reply
05-11-2014, 04:16 PM
Post: #3
RE: [71B] How to make a lex file
(05-11-2014 02:53 PM)caloubugs Wrote:  i used edtext to write the code (an exemple given by HP in the manual with the pseudo-ops wanted) and the ASSEMBLE word after in the forth mode.
But everytime i have the error message : "missing/multiple file type".

From the Forth/Assembler manual:
missing/multiple file type error:
The first line in the source file isn't LEX, BIN, or F0RTH (fatal to assembly); or one of these pseudo-
ops appears a second time; or any pseudo-op of the wrong type appears (such as WORD within a LEX
file). Check that the source file begins with LEX, BIN, or FORTH pseudo-op and contains pseudo-
ops suitable for that type of file.


Please post your assemby code (at least the first lines with the pseudo-ops).

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
05-11-2014, 05:13 PM
Post: #4
RE: [71B] How to make a lex file
Thanks for answering !

I have this manual and try to make lex with the sample "Keyword" in it.

Here's the code in a file KEYTXT (opened with edtext) :

LEX 'KEYWORD'
ID #5D
MSG 0
POLL 0
FNRTN1 EQU #0F216
ENTRY FNCT
CHAR #F
KEY 'ONE'
TOKEN 1
ENDTXT
NIBHEX 00
FNCT
C=0 W
P= 14
LCHEX 1
GOVLNG FNRTN1
END


Then, in Forth module, i send :

" KEYTXT" ASSEMBLE


And i have this message...

I don't see what is wrong with that and pseudo-ops problems...

(are you french ??) au cas où :-)
Find all posts by this user
Quote this message in a reply
05-11-2014, 06:15 PM
Post: #5
RE: [71B] How to make a lex file
(05-11-2014 05:13 PM)caloubugs Wrote:  
LEX 'KEYWORD'
ID #5D
MSG 0
POLL 0
FNRTN1 EQU #0F216
...
END

Seems to me that the assembler line format is wrong.
It should be:
Code:

  LEX 'KEYWORD'
  ID #5D
  MSG 0
  POLL 0
FNRTN1 EQU #0F216
...
  END
with at least 2 spaces before the assembler opcode to differenciate it from a label.

Quote:(are you french ??) au cas où :-)
Yes :-)
Visit this user's website Find all posts by this user
Quote this message in a reply
05-11-2014, 06:34 PM
Post: #6
RE: [71B] How to make a lex file
Thanks a lot !!!

It works, i read there was no matter with spaces...
I can go to the end of process now !
Find all posts by this user
Quote this message in a reply
05-11-2014, 06:56 PM
Post: #7
RE: [71B] How to make a lex file
Just for fun, i take the ULAM LEX source (see http://en.wikipedia.org/wiki/Collatz_conjecture for maths explanations) and compare it to the other langages on 71B.

In BASIC, ULAM(77031) = 350 takes 14,67s
In FORTH, it takes 9,42s
In LEX, it takes 0,08 s !!!
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)