Re: Question about copying source code Message #27 Posted by Howard Owen on 20 July 2011, 8:30 p.m., in response to message #25 by Namir
Hi, Namir.
I have an extremely geeky way to get files onto my 71B using my LIFlab software. You need Perl for Windows, such as the Active Perl Community Edition Then you can grab my LIFlab software here.
This software is a bit rough, but the following process will get a 71B BASIC program in a DOS/Unix text file into a LIF image suitable for use with ILper and EMU71.
# First we create an empty LIF volume
hbo@quirk|501> ./lifinit.pl -v TEST.dat
# Yup, it's empty
hbo@quirk|502> ./lifdir.pl -v TEST.dat
Volume:
filename type size date/time
--------------------------------------------
0 sectors used; 2382 sectors available; 2382 sectors free
# Here is our test file - a 71B basic program in a text file
hbo@quirk|503> cat BASTEST.txt
0010 ! * Trivial 71B BASIC program for testing
0100 DISP "I'm trivial. Pleased to meet you"
0200 END
# Now we encode this file as a 71/41 TEXT file.
hbo@quirk|504> ./enc.pl BASTEST.txt >BASTEST.t71
# The lifadd.pl program requires us to give the LIF type when we add a file
# to a LIF volume. Here's how to get a list of types LIFlab supports:
hbo@quirk|505> ./lifadd.pl -T
APPT75 BASIC71 BASIC75 BASIC85 BIN71 BPROG85 DATA71 DATA85 FORTH71 KEY41
KEY71 LEX71 LEX75 pBASIC71 pBASIC85 pBIN71 pBPROG85 pDATA85 pFORTH71
PROG41 ROM41 ROM75 sBASIC71 sBIN71 sDATA sDATA71 sFORTH71 sKEY71 sLEX71
spBASIC71 spBIN71 spFORTH71 STAT41 sTEXT TEXT TEXT75 VCALC75 WALL41
# The one we want is TEXT
hbo@quirk|506> ./lifadd.pl -t TEXT -f BASTEST.t71 -v TEST.dat
Volume:
filename type size date/time
--------------------------------------------
BASTEST TEXT 256
1 sectors used; 2382 sectors available; 2381 sectors free
Now that you have your LIF image, you can get at it from a real 71B, ore EMU71 using ILper. (In the former case, you would need the PIL-box, but in the latter you wouldn't .)
Here's how the configuration of ILper would look to support EMU71:
And here's how the EMU71 tcp/ip setup should look:
Note that the IN/OUT port numbers are swapped between the two.
Finally, here's the proof of the pudding: we TRANSFORM our test program from text on the virtual drive to BASIC on EMU71 and run it:
I am totally in debt to Tony Duell and his lifutils package for Linux. He distilled knowledge of LIF from several sources into succinct and readable code. My software is a bit rough, but usable. Any bugs are no doubt my fault. That leads me to warn you to make backups of your LIF image files if they have anything in them you want to save.
Regards, Howard
|