(12-15-2023 05:09 AM)Sylvain Cote Wrote: Hello Peter,
To transfer files between the HP-41 and my MacBook Pro intel, I use the following:
Formatting a virtual tape
Create a LIF volume file of 128KB that can hold a maximum of 64 files
Code:
lifinit -z -m cass tape01.dat 64
Set LIF volume name to TAPE01
Code:
liflabel tape01.dat TAPE01
Show lif volume catalog
Code:
Volume : TAPE01 , formatted : 14/12/23 23:00:00
Tracks: 2 Surfaces: 1 Blocks/Track: 256 Total size: 512 Blocks, 131072 Bytes
0 files (64 max), last block used: 0 of 512
In pyILPER,
- add a mass media (aka drive) peripheral and give it a name (ex.: TAPE)
- restart pyILPER
- select your drive tab (ex.: TAPE)
- set the "Drive Type" to "HP82161A"
- change the "LIF Image File" to "tape01.dat"
Transfer HP-41 program(s) from the computer to the HP-41
Computer side
Write your program in a text file
Ex.: cat hello.txt
Code:
LBL "HELLO"
"HELLO !!!"
AVIEW
END
Compile the HP-41 program from a text file to a raw file
Code:
comp41 <hello.txt >hello.raw
Add a lif header with a name
Code:
raw41lif HELLO <hello.raw >hello.lif
Add lif file to the lif volume
Code:
lifput tape01.dat hello.lif
Show lif volume catalog
Code:
Volume : TAPE01 , formatted : 14/12/23 23:00:00
Tracks: 2 Surfaces: 1 Blocks/Track: 256 Total size: 512 Blocks, 131072 Bytes
HELLO PGM41 24/256
1 files (64 max), last block used: 10 of 512
HP-41 side
Read HELLO program from tape to main memory
Code:
"HELLO"
LOADP
XEQ "HELLO"
Transfer HP-41 program(s) from the HP-41 to the computer
HP-41 side
save WORLD program from main memory to tape
Computer side
Catalog lif volume
Code:
Volume : TAPE01 , formatted : 14/12/23 23:00:00
Tracks: 2 Surfaces: 1 Blocks/Track: 256 Total size: 512 Blocks, 131072 Bytes
HELLO PGM41 24/256
WORLD PGM41 20/256
2 files (64 max), last block used: 11 of 512
Save WORLD program to a raw file
Code:
lifget -r tape01.dat WORLD world.raw
Decompile the HP-41 program from a raw file to a text file
Code:
decomp41 <world.raw >world.txt
cat world.txt
Code:
LBL "WORLD"
"WORLD"
AVIEW
END
Transfer HP-41 ROM from the computer to the HP-41
Computer side
Show ROM content
Code:
XROM 01,00 Entry = 0068 (Mcode) -MATH_1D
XROM 01,01 Entry = 006b (Focal) MATRIX
...
XROM 01,44 Entry = 0df3 (Focal) TRANS
XROM 01,45 Entry = 0f50 (Focal) *FN
Convert ROM file to ERAMCO
Code:
rom41er MATH1D <math.rom >math.lif
Add ROM lif file to the lif volume
Code:
lifput tape01.dat math.lif
Catalog lif volume
Code:
Volume : TAPE01 , formatted : 14/12/23 23:00:00
Tracks: 2 Surfaces: 1 Blocks/Track: 256 Total size: 512 Blocks, 131072 Bytes
HELLO PGM41 24/256
WORLD PGM41 20/256
MATH1D X-M41 5121/5120
3 files (64 max), last block used: 31 of 512
HP-41 side
load MATH1D ROM from tape to rambox page
Code:
"MATH1D" // ROM filename
12 // page to store ROM
READPG // read ROM file and save it to the specified page
Transfer HP-41 ROM from the HP-41 to the computer
HP-41 side
Save a ROM page from rambox page to the tape
Code:
"MYROM" // ROM filename
13 // page of the ROM to save
WRTPG // save ROM at page to the tape
Computer side
Catalog lif volume
Code:
Volume : TAPE01 , formatted : 14/12/23 23:00:00
Tracks: 2 Surfaces: 1 Blocks/Track: 256 Total size: 512 Blocks, 131072 Bytes
HELLO PGM41 24/256
WORLD PGM41 20/256
MATH1D X-M41 5121/5120
MYROM X-M41 5121/5120
4 files (64 max), last block used: 52 of 512
Get MYROM ROM from lif volume to a ROM file in ERAMCO format
Code:
lifget -r tape01.dat MYROM myrom.er
Convert the ERAMCO file to a ROM file format
Code:
er41rom <myrom.er >myrom.rom
Show ROM content
Code:
rom41cat <myrom.rom
edit: add more information for pyILPER