Re: Poking a string directly into the 71B as a lex file problems Message #4 Posted by Jerry Raia on 25 Aug 2010, 5:54 p.m., in response to message #2 by J-F Garnier
BTW any change of seeing emu71 on 64 bit windows, or perhaps making the source code available?
I cant copy anything except a string of ascii characters to my HP71. So I had to use this method. I'll use the sample lex file from the Forth/Assembler ROM manual:
0003 00000 B4549575 NIBASC 'KEYWORD '
00008 F4254402
0004 00010 802E NIBHEX 802E file type lex
0005 00014 00 CON(2) 0 flags and copy code
0006 00016 82 CON(2) #28 * creation time
0007 00018 90 CON(2) #09 *
0008 0001A 20 CON(2) #02 * creation date
0009 0001C 80 CON(2) #08 *
0010 0001E 01 CON(2) #10 *
0011 00020 94000 REL(5) FiLeNd offset to next file
0012 00025 D5 CON(2) #5D flex file ID
0013 00027 10 CON(2) 001 lowest token
0014 00029 10 CON(2) 001 highest token
0015 0002B 00000 CON(5) 0 next lex table link
0016 00030 F NIBHEX F no speed table
0017 00031 7100 REL(4) 1+TxTbSt text table offset
0018 00035 0000 CON(4) 0 no msg handler
0019 00039 00000 CON(5) 0 no poll handler
0020 0003E * * * M A I N T A B L E * * *
0021 0003E 000 CON(3) (TxEn01)-(TxTbSt)
0022 00041 41000 REL(5) FNCT Keyword code starts at this label
0023 00046 F CON(1) #F The keyword is a BASIC function
0024 00047 * * * T E X T T A B L E * * *
0025 00047 TxTbSt
0026 00047 TxEn01
0027 00047 5 CON(1) 05
0028 00048 F4E454 NIBASC 'ONE' This keyword is called "ONE"
0029 0004E 10 CON(2) 1
0030 00050 1FF NIBHEX 1FF End of BASIC keyword tables
0031 00053 00 NIBHEX 00 Minimum and Maximum number of parame
0032 00055 AF2 FNCT C=0 W Clear register C
0033 00058 2E P= 14 Point to most signifcant digit in C
0034 0005A 301 LCHEX 1 Load a hex 1
0035 0005D 8D612F0 GOVLNG =FNRTN1 Send result to the system
0036 00064 00000 NIBHEX 00000 Padding for copy to 71B
Notice the padding at the end. This makes the file big enough to cover the end of the dummy text file which is FFFFF and not included in the size of the text file in bytes.
Now I can copy the string to the 71 and run this basic program. It's sloppy but it works. I'm sure there are better ways to do this.
10 DESTROY ALL
20 INPUT "LENGTH? ";L ! Length of Lex String
30 DIM F$[L]
40 SFLAG -23
50 ENTER :1 ;F$ ! Get string from RS232 Interface
60 T$=F$[33,37] ! Get length of lexfile after header
70 T=HTD(REV$(T$))
80 N=IP((T-4)/2) ! Compute size of Dummy file
90 CREATE TEXT DUMMY,N
100 A$=ADDR$('DUMMY')
110 POKE A$,F$ ! Poke it over the Dummy file
120 DISP "DONE!"
Edited: 27 Aug 2010, 7:50 p.m.
|