GOINTEL.BAS



#3

I found the following program in HPX V1N3.
Michael KRABACH <38> wrote an article named "Programming Eproms for the HP-41".
Is there someone who used it or had experience?
Thanks!

10 CLS:REM Remove line for non-IBM version MBASIC
...
180 DEFINT B,I,J,K
190 DIM B(16)
200 DIM U$(16),L$(16),SUM(4)
210 INPUT "File name to be converted into Intel Hex format";FILE$:PRINT
220 PRINT "The output files will have the .HEX extension appended to them":PRINT
230 INPUT "Name the output file for the lower 8 bits (L8)";FILEL8$
240 INPUT "Name the output file for the upper 2 bits (U2)";FILEU2$
250 OPEN "I",#1,FILE$
260 OPEN "O",#2,FILEL8$+".HEX"
270 OPEN "O",#2,FILEU2$+".HEX"
280 WHILE NOT EOF(1)
290 FOR J=1 TO 4
300 FOR I=1 to 16
310 INPUT #1,A$
320 IF LEFT$(A$,1)="" THEN 310
330 IF I=1 THEN ADRL8$=LEFT$(A$,4)
340 IF I=1 AND J=1 THEN ADRU2$=HEX$(VAL("&H"+ADRL8$)/4-VAL("&HC00"))
350 IF MID$(A$,5,1)=" " THEN 390
360 L$(I)=MID$(A$,6,2)
370 U$(I)=MID$(A$,5,1)
380 GOTO 410
390 L$(I)=MID$(A$,7,2)
400 U$(I)=MID$(A$,6,1)
410 B(I)=VAL(U$(I))
420 NEXT I
430 L8$=":10"+ADRL8$+"00"
440 FOR K=1 TO 16
450 L8$=L8$+L$(K)
460 NEXT K
470 MID$(L8$,4)="0"
480 C$=HEX$(B(1)+4*B(2))
490 D$=HEX$(B(3)+4*B(4))
500 E$=HEX$(B(5)+4*B(6))
510 F$=HEX$(B(7)+4*B(8))
520 G$=HEX$(B(9)+4*B(10))
530 H$=HEX$(B(11)+4*B(12))
540 I$=HEX$(B(13)+4*B(14))
550 J$=HEX$(B(15)+4*B(16))
560 SUM$(J)=D$+E$+F$+G$+H$+I$+J$
570 PRINT #2,L8$:PRINT "L8$=";L8$
580 NEXT J
590 U2$=":10"+ADRU2$+"00"+SUM$(1)+SUM$(2)+SUM$(3)+SUM$(4)
600 MID$(U2$,4)="0"
610 PRINT #3,U2$:PRINT "U2$=";U2$
620 PRINT
630 WEND
640 ENDFILE$=":0000000000"
650 PRINT #2,ENDFILE$:PRINT "L8$=";ENDFILE$
660 PRINT #3,ENDFILE$:PRINT "U2$=";ENDFILE$
670 CLOSE #1
680 CLOSE #2
690 CLOSE #3
700 END


#4

I haven't used the program and I only read the first few lines of it, but I have used EPROM burners for many years and I have a little knowledge of some of the MCODE boxes for the 41C. I would guess that this program takes a file of 10 bit values output by a 41C cross assembler (the word size in 41C ROM is 10 bits IIRC) and does two things with it: splits each 10 bit word into a lower 8 bits and an upper two bits, then converts the 8 bit number and the two bit number (extended to 8 bits with zeros or ones - probably doesn't matter) to "Intel Hex records" which is one of a number of formats created by microprocessor manufacturers for use by their development system computers to output data to (for instance) EPROM burners, back in the early days when computers were only capable of transmitting data in ASCII. Manufacturers of EPROM burners would try to support the formats of all the microprocessor manufacturers - there were quite a few different formats, and some of them had to be extended as EPROMs got bigger. EPROM burners were typically connected to host computers by RS-232 serial ports and Teletype style paper tapes were sometimes used to save the data. We still use this kind of ASCII conversion scheme for internet e-mail attachments (uuencoding, base 64) because, as I understand it, there might still be computers between you and your destination that can't handle binary data.

The program likely puts out two files (the 8 bit and the 2 bit) so you can burn two EPROMs which you would then plug into an MCODE box. Two EPROMs are necessary because standard EPROMS only came in 8 bit word sizes (now they also come in 16 bit).


Forum Jump: