Generating paper tapes for PROM programmers

Generating paper tapes for PROM programmers

Generating paper tapes for PROM programmers A program for generating PROM programmer paper tapes from floppy discs is described by In general, writin...

190KB Sizes 5 Downloads 104 Views

Generating paper tapes for PROM programmers A program for generating PROM programmer paper tapes from floppy discs is described by

In general, writing programs which are suitable for PROM implementation requires that several practices be followed:

M F Smith Some types of PROM programmers accept only absolute binary paper tapes with no address information. Most MC6800 microcomputer systems, however, use the Motorola I object format which is in ASCII hexadecimal and contains addresses, byte counts, record type codes and checksums in addition to the object. In the program presented in Figure I, the Motorola formatted object is input from an ICOM disc subsystem2, through a Southwest Technical Products (San Antonio, Texas) microcomputer and output on a Tally Model 420 paper tape punch. Extensive use is made of the ICOM FDOS2 disc operating system and the M I KBUG a monitor. When using the program, the operator must enter the disc file identification and size. The size of the PROM, in bytes, must be entered in hexadecimal (e.g., $0100 .for 256 bytes, $0400 for 1024, etc.) the program allows sizes up to SFFFF and does not check that a reasonable value has been entered. If the input program is less than the size of the intended PROM, nulls are output to fill the PROM. The tape output has a header and trailer of 75 null characters. The beginning of the absolute binary data must be manually indicated or else start on the first non-null character. Petroconsultants SA, International Energy Services, 2 Rue Vallin, Geneva, Switzerland

• programs should be logically separated into blocks for variables, data, external addresses and program • variables (i.e. RAM'Iocations) must not be located within the program block; use RMB or EQU pseudooperations, not FCB or FDB, to define variables • avoid the use of absolute addressing, if possible, except to well established addresses such as those used in MIKBUG or FDOS. It is possible to write positionindependent (i.e. programs which can be located anywhere in memory) code for the MC6800 if this practice is observed and if branching statements are used

ACKNOWLEDGEMENTS The work described in this note was carried out at the Department of Oceanography, University College, Galway, Ireland. It was made possible by a grant from Petroconsultants Ltd., Dublin.

REFERENCES 1 M6800 application manual Motorola Semiconductor Products, Geneva (1975)

2 ICOM 6800 EVAL disc subsystem ICOM Microperipherals, Canoga Park, California (June.1975) 3 Wiles, M and Felix, A MCM6830L 7 MIKBUG/ M/N/BUG ROM Motorola Engineering Note 100 (1975)

T R A D E L I N K C H I N A 1980-81 P U B L I S H I N G P R O G R A M M E Copy Date in the UK

1 Sept 1980 1 Oct 1980 3 Nov 1980

Industrial Equipment Energy, Oiland Petrochemicals Telecommunications and Transport 1st Handbook of European

.

.

.

.

.

.

Publishing Date in Peking Nov 1980 Dec 1980 Jan 1981

30 Dec 1980 23 Feb 1981

March 1981

23 May 1981

Aug 1981

3 Aug 1981

Nov 1981

.

.

.

.

.

.

.

.

.

May 1981

.

To: Tradelink Dorset House, Stamford Street London, SE 1 9LU England. Telephone: 01-261 8204/8243 Telex: 25137 Please send me further information about Tradelink Name (pleaseprint} Company Address

Telephone Telex return ~ne coupon.

312

0141-9331/80/080312-02 $02.00 © 1980 I PC Business P r e s s

microprocessors and microsystems

NAH PROMDT *M.F. SMITH, *DEPARTHENT OF O C E A N O G R A P H Y ~ *UNIVERSITY COLLEGE GALNAY, *GALWAY, IRELAND. * P R O G R A M TO H U N C H O B J E C T FILES *FOR P R O H P R O G R A H H I N G * T A P E HAS N U L L I 1 E A D E R , 2 5 6 / 5 1 2 / I 0 2 4 * B Y T E S (8 B I T F O R M A T ) A N D NULL T A L L E R

00001 00002 00003 00004 00005 00006 00007 00008 00009

00014 00012 00013

E055 EO7E

*MIKBUG MONITOR CALLS BYTE EQU $E055 PDATA EQU SE07E

00015 00016 00017 00018 00019

7800 7859 7912 78DB

*ICON EPROH FDOS EQU RESET EQU RIX EqO RDBYT EQU

00021 00022 00023 00024

8010 8011 80[3

*PIA A D D R E S S E S FOR T A L L Y 420 P U N C 8 P I A P T D EQU $8010 D A T A REG P I A P T C EQU $8011 C O N T R O L REG P I A P T O EQU $8013 T U R N ON PT R E G

RESIDENT $7800 S7859 S7912 $78DB

INPUT PRINT

BYTE LIST

AT X

MODULE CALLS LOAD RESET DISKETTE DRIVE R E A D A S C I I BYTE MAKE BYTE ASCII

00026 00027 00028 00029 00030

0004 0004 0006 0007 0008

0002 0001 0001 OO01

ISIZE ITRK ISCTR ICNTR

ORG RMB RHS RHB RMB

4 2 1 1 1

FILE S I Z E IN S E C T O R S BEGINNING TRACK UNIT/BEGIN S E C T O R ADR BUFFER COUNTER

00032 00033 00034

0020 0020 0022

0002 0001

COUNT BYTECT

ORG RMR RHB

$20 2 i

PROM LINE

OPT OPT ORG

O NOG St00

LDS LDX JSR JSR TAB AND ASL ASL STA AND CLR LDX INX INC CMP BEQ CBA BNE LDA STA JSR LDX JSR JSR INC STA CLR JSR

#$AO7F #MSSG[ PDATA BYTE

00036 00037 00038

0100

00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067

0100 0103 0106 0109 010C O[OD OIOF 0110 0111 0113 0115 01[6 0119 OIIA O~lB OllD OI1F 0120 0122 0124 0126 0129 012C 0[2F 0132 0133 0135 0138

00069 00070 00071 00072 00073 00074 00075 00076

O [ 3 B CE 013E BD 0141BD O144 97 0146 BD 0 1 4 9 97 0148 B.D

00078 00079 00080 00081 00082

8E CE BD BD 16 84 48 48 97 C4 4F CE 08 4C 81 27 11 26 A6 97 BD CE BD BD 40 97 7F BD

AO7F O107 EO7E EO55

START

FO

07 OF 0209 TABLE 08 El F7 00 06 0[85 OIE8 E07E E055 05 0004 01B5 *GET

014E 0151 0154 0157

01F8 ROTE E055 20 E055 21 0155

7F 8 0 1 0 7F 8011 73 8010 86 2C

A A A A B A

A A

A A

A A

NO. B Y T E S LDX JSR JSR STA A JSR STA A JSR

#$F0 MOVE

BYTE COUDT COUNT

USER S T A C K A D D R E S S "PROM P U N C H F I L E : " PRINT MSSG GET FILE/UNIT F R O M KB SAVE ACCA G E T D R I V E UNIT H A L F TO B I T S 6 - 7

ISCTR STORE UNIT, ASSUME SECT [ #SOP G E T F I L E NO. HALF FIND FILE TRACK ORIGIN #FILTRK-[ L O A D TABLE MOVE TABLE P O I N T E R START COUNT #8 NO SUCH FILE? START NONE-START OVER MATCH F O R F I L E ? TABLE NOT YET-KEEP L O O K I N G X GET VALUE F R O M TABLE ITRK SAVE TRACK ADDRESS CRLF #MSSG2 "FILE SIZE (UH):" PDATA P R I N T MSSC BYTE G E T S I Z E F R O M KB ADD ONE ISIZE+I SAVE I T ISIZE S I Z E LT 0 0 F F H CRLF FOR PROM #MSSG3 PDATA BYTE COUNT BYTE COUNT+I CRLF

*PROM S I Z E PRINT IT G E T MS8 SAVE IT G E T LSB SAVE IT

(HIHIH):"

* I N I T I A L I S E PUNCH INTERFACE CLR PIAFTD C L E A R PIA CLR PIAPTC CON PIAPTD SET D A T A FOR LDA A #$20 C O N T R O L BYTE

00083 0159 E7 8011 00084 O150 86 34 0 0 0 8 5 O[5E B7 8013

STA LDA STA

A A A

PIAPTC #$34 PIAPTO

00087 00088 00089 00090 00081 00092 00093 00094 00095 00096 00097 00098 00099 00100 O0101 00102 00103 00[04 00[05 00106 00107 00108 00109 00110 OOltl 00112 00113 00114 00115 00116 00117 00118 00119 O0120 00121

0161 0164 0166 O169 Ol6B 016D OL6F 0172 0174 O176 0178 OI7A OI7D 017F 0181 0184 0187 018A 018D 018F 0192 0194 O195 0197 0199 0198 0190 019F OIAI OIA4 OIA5

BD 8D BD 25 81 26 BD 81 27 81 26 RD 80 97 BD BD BD 7A 27 BD DE 09 DF 27 20 DE 27 86 RD 09 26

7859 55 7912 30 53 F7 7912 39 25 31 EC 78DB 02 22 78DB 78OB 78DB 0022 D7 01C5 20

00123 00124 00125 00126 00127

01A7 01A9 OIAC OIAF 0152

8D 7F 7F BD 7E

12 8013 8011 7859 7800

00129 00130 00131

01B5 01B8

CE 0 1 D 3 7E EOTE

00133 00134 00135 00[36 00137 00138

01BB OIBD OIBF OICI 0102 0104

C6 86 8D 5A 26 39

00140 00141 00142 00143 00144 00145 00146 00147 00148

0105 0106 0109 0105

37 F6 8011 2A FB 87 8010

OICE OIDI OID2

56 33 39

00150 00151 00152 00153 00154 00155 00156

0103 01D7 01E? 0tEE 0177 01F8 0209

OA 50 04 46 04 50 04

00158 00159

O20A OE

*FILE TRACK F I L T R K FCB

00161 00162 00163

A048 A048

*PROGRAM START VECTOR ORG $A048 FDB START

20 02 EC 20 08 00 0105 F8

4B O0 04

*PUNCH LEADER *PUNCH FILE *PUNCH T A I L E R *RETURN TO FDOS EXECUTIVE JSR RESET RESET DISKETTE DRIVES BSR NULLS0 PUNCH LEADER DT JSR RIX READ ASCII BYTE BCS FINISH C A R R Y SET m E O F CMP A #*S IIEADER? BNE DT NO-LOOP JSR RIX GET NEXT BYTE CMP A #'9 END OF F I L E ? EEQ FINISII PUNCH T A I L E R CHP A # ' I START L I N E ? 8NE DT NO-LOOP JSR RDBYT GET BYTE COUNT SUB A 12 R E M O V E ADR 8TA A BYTECT JSR RDBYT STRIP ADDRESS JSR RDBYT STRIP ADDRESS DTI JSR RDBYT READ DATA DEC BYTECT END OF L I N E ? 8EQ DT YES IF Z E R O JSR PUN PUNCH ACCA LDX COUNT PROM FULL? DEX STX COUNT RESTORE 8EQ FINISH OUT IF F U L L ERA DTI F I N I S H END OF L I N E FINISII L D X COUNT IS PROM F U L L ? BEQ FINIS[ yES PUNCH T A I L E R #0 PUNCH NULLS F I N I S 2 LUA A JSR PUN PER PROM FULL? RNE FINIS2 NOT YET

FINIS1

NULLS0 PIAPTO PIAPTC RESET FDOS

PUNCH TAILER TURN O F F P U N C H CLEAR CONTROL R E S E T DRIVES R E T U R N TO F D O S

*SUBROUTINES, CRLF LDX JMP

ETC. #MSSGO PDATA

PRINT AND

NULL50 NULLI

#75 #0 PUN FINISHED? NULL[

F9

8010

LDA R LDA A BSR DEC B BNE RTS

EXEC

RTS

P U N C H 75 NULLS PUNCH NULLS NOT YET-KEEP GOING

PSD B SAVE ACCR LDA R PIAPTC PUNCH READY? BPL PUN1 NOT YET-LOOP STA A PIAPTD PUNCH ACCA *CHARACTERISTIC OF S N T P C S E T U P * R E Q U I R E S A L D A TO STROBE PIA LDA A PIAPTD S T R O B E PUNCH PUL B RESTORE B RTS

MSSG2 HSSG3

00165

BSR CLR CLR JSR JMP

PDN PUNI

HSSGO MSSGI

O100

T U R N ON P U N C H VIA CB2 L I N E

FCB FCC FCR FCC FCE FCC FCB

$A,$D,0,4 /PUNCH PROM FILE:/ 4 E N D OF M S S G / F I L E S I Z E (HH):/ 4 END OF M S S G /PROM SIZE (HNHH):/ 4 END OF M S S G ORIGIN TABLE 14,23,32,41,50,59,68

END

OUTPUT TOTAL

ERRORS

00000

Figure I. PROM programmer paper-tape generating program

vol 4 no 8 october 80

313