• Aucun résultat trouvé

LIBRARY DECUS

N/A
N/A
Protected

Academic year: 2022

Partager "LIBRARY DECUS"

Copied!
10
0
0

Texte intégral

(1)

DECUS

F:tROGRAM LIBRARY

DECUSNO. 8-178

TITLE Reverse Assembler

AUTHOR Henry G. Dupont

COMPANY St. George's School . Newport, Rhode Island

DATE November 25, 1968

SOURCE LANGUAGE PAL III

Although this pragromhos been tested by the contributor, no warranty, express or implied, is ~adeby the contributor,·

Digital Equipment Computer Users Society or Digital Equipment Corporation as to the accuracy or functioning of the program: or related program material, and no responsibility is assumed by these parties in connection therewith.

(2)
(3)

REVERSE ASSEMBLER

DECUS No. 8-178 ABSTRACT

The Reverse Assembler accepts a paper tape in binary format and produces either a printed listing or a paper tape that is acceptable to the PAL Assembler as a symbolic tape. It pro- duces the mnemonics for almost all input-output devices as well as PAL III and Floating Point instructions.

REQUIREMENTS

Stor~~

The program is loaded into locations 0-5400. The character output tables extend from 1200-5400.

ESl~i-E!11~n t

Basic PDP-8, 8/S, or 8/I. Input is on either the high speed reader or ASR-33. Output is on either the high speed punch or ASR-33. Input and Output devices are selected by switch set- tings. The type 182 EAE is not used.

USAGE LOa~~I?:,g.

The Reverse Assembler is supplied as a binary tape and is loaded with the BIN loader.

SWi!£!}l Sett~~93_

During initialization the switch register is read to specify the mode of operation and the input-output devices.

ON

OFF

BIT 0 specified the output mode of the program BIT 1 specifies the input device

BIT 2 specifies the output device

BIT 3 specifies the presence of Floating Point instructions

BIT 0 BIT ~ BIT 2 BIT 3

- - - . - - - , -.. - - - , r - - - ' - - - - Output

Mode 1

Output Mode 2

High Speed Reader Input

ASR-33 Input

High Speed Punch Output

ASR-33 Output

Presence of Floating Point Instructions

Absence of Floating Point

Instructions

(4)

Mode 1 gives leader, a symbolic tape acceptable to the PAL III Assembler, a "!'AUSE", and trailer.

Mode 2 gives a printed listing.

Start

1. Load program with binary loader.

2. Set 0200 in the switch register, press LOAD ADDRESS.

3. Set desired modes of operation and input-output devices in Bits 0-3 of switch register.

4. Put binary program tape in appropriate reader.

5. Press "START~

Program will read the binary tape and produce a listing or a symbolic tape until checksum is reached. At this point, either "PAUSE" or the checksum is typed depending on the output mode.

6. Restart program at 0200.

If the program is started in the middle of a binary tape, or the reader misses a character, the program will be out of phase with the tape and the first 6 bits of an instruction will be interpreted as the last 6 bits and vice versa. When the presence of a char- acter with channel 7 or 8 appears in the second half of an in- struction, "READER ERROR" is typed, and the computer halts.

To recover from reader error, restart the program.

DESCRIPTION Discussion

The Reverse Ass€mbler is a utility program designed to accept a tape in binary format and produce an output in either of two modes.

Mode 1 gives leader, punches a symbolic tape, punches "PAUSE" when the checksum is encountered, and punches trailer. The symbolic tape is acceptable to the PAL III Assembler. Mode 2 produces a listing that is easily read and differs from Mode 1 in the format of output. The "PAUSE" is replaced by an octal number followed by "(CHECKSUM)". If an address is encountered on the tape, i t is punched out in the form *XXXX where X is an octal digit.

The Reverse Assembler is used when only the binary tape of a pro- gram is available. It makes a listing (Mode 2) and/or a symbolic tape (Mode 1). This is especially useful when modifying a binary

2

(5)

tape that would be difficult to modify with a patch. (i.e.

when changing ASR-33 input to high speed reader .input because a typical high speed reader subroutine needs one more instruc- tion.) This is done by making a symbolic tape (using Mode 1) , making the desired modifications with the symbolic tape editor, and using the PAL III Assembler to produce a new modified binary tape. The Reverse Assembler may also be used to produce a re- vised copy of a program that has been modified by the DDT, ODT, or any other debugging program.

An example follows:

3

(6)

This is the output from the PAL 1.11 Assembler_, to test the Reverse Assembler.

.) ;':',') J

"l C' ,J f,

'.1;,:,)7

, , . ~ I ) 1 1

\J~ 1;.-'

,1/ L:i

'h~ l.i;

:);-' i J

) ~ I n I):-~ 1 7

,) ::, (

J:-:'. j ) j c.1 I

) ; i -,

, j I,j I (~

i i ! 'j

J 1 .):

: } j ': 1

. } . , /

:. 1 ;:1

. j ,; il

<' I 1 ~,; L)

j l ! ) l ,

; 1.'J7 ,: 1 ! ' I

I.; , J' i ~ , '

J I ,r" ; 1\. '.J '" J

1\ UI·~~

1 J

: , I J~U

, q\ji'...

) i\ \.' ':.t:_

: ) J 1 \ \ I

j ,.) vj Lt '>

4~.') I f) II..

) I ,', ,

h J "!.'

I I)·)

! I i l 'i' . ", /;

:) I "

1 J ' if';' . ~ J i

;-.: 1 I ,

J I I

~, j

) ,:,.:" .:..

'., ' " . ! 7 .) I IfJ ' f

7 'i {,'

7 ~ I .J

7 .(1 " 1 ~ )

' ) , , ) I

i.J 'j,I:1

.J.Y.i j

./1. J I,).: i

!,:} j i

j .Ji'j(,

'. J 1 'j h

" ) I d

-,

'.) ') .J )

! i ., ,

I I v) .. ')

I>') ;

/r'i-IL 111 ,C,,).:,U'';jLr>, r'(-'I,),~, 3 Ll:')j Ii,,!;

/,\I'~VFi\,:'I'~ ~\ ,)~"<~I·.dLc,r, I ~,:::'I r'r·;(j(·ii';Af', :, i I~ t\ r, I'l. ;-.

LII',:, I 11\:t'LiI .H','~ 1 'f

..)Ci \)~, f.' t< ,\ J

,-if';:":' 1

..),'/, J 1 f; :.) j ~\

11\:;--" ! j

7

~-I,.r' i ~~\ Vr, r r' I J I :) ,I \.1 ;.: ~

~ .. ;, t'. j

I ;..\ i } J i-\ I) t~ + j

-< 1 L

I I ~ :J i \ ' J"i,~

'" \!-

IJ( ' I :-j i-\ \! f', +.1 I [:!U 1\ j l ' I

:J\;,'.:'. ,; (l JI\ i 1 ,') 1- )1.\ \ j ".:+3

1 , ) L. j ; ~'! J :.J 1

,--)1'·/:--

. -

-~

r f', j .

, .. ' , l , ) i i " J 1 r".1 j hLI

/o,J.',\,":lf-\"Lt'.,) <\,\:I) 'J.JI'_'I;~,'.I~ rIJLLu':,:

:1-- -,

I. : .J J ,~';.' 1, I ,< ; /j

11\1 J J! , f il .. ) !

:-, 1.\ \j ,...~ ,.J ,

I'. )"1 1 ,

,,' 1\,,;2, I,: l: :.i:\1 j ,

: 1

.)

.. J

<.'

4

I t is a program

(7)

This is an output from the Reverse Assembler in MODE 1.

In MODE 1, the Reverse Assembler punches leader, the text, and trailer. The Text is acceptable to the PAL III Assembler.

*,j:-:' ,j'/)

6~~6 I~A0 -1132 fL~

II .!hJl. / ;;j/) 1 - : L3 'i i:!. .J 1'1 .::i I 16 V);1 6

IjLd? IchJ2 -:LU 1 .JhS I 'J 'iJ'tn

6 bwi / \0 \J J - 1 "/'1) \1 F t' U I \Ii Iv) d 0000 10~4 +0000 V~AI

44~6 /W0~ -JJ1~ .Jh.::i I 0 006

44i11 hi(!)(' -J:n 1 ..i,',S 1 '/I If)") 7

~J0~ 1001 +0003 ~~lN

.3 1 to V) 1 ,'.1} ~ 1 + J I d "') to iv, r' )' ,1 1 vHJ

(, I (? J h! 1 1 - I 6 -,::> jo-t' Ij I 1'1 I ,,) J

I/J (j l'l i/) / Vi 1 i:!. + If) ,) V);'j ,.-t:: /, t

11,LS 1.)13 +11,'JJ I{\U U ll'lj

'/vJiiH. hJi4 -0F12 KIL

11;,)1/<)1::> +11")7 IAu 7004 /116 -0/74 KAL JIVlJ /:/J17 +Jlkd f)l;l~

I I ~j 6 h J:!,!) + 1 1 ~) (, 'I At) :3 1 1 vi / .1 r>. 1 + j 1 1 <1 iJ C<.\

2103 /~~~ +~10j l~L

i:!. I 1 ,J / U ,:!. .j +;~ 1 I :'1 J') L

::> ~ ~ ~ / VI"'~ LJ - i:!. ::> 'J 6 J ,VdJ Ljll"j 7 h l ~ J -:3 3 1 I .J I',:;

~ I ~l (I) / U::!. 6 -'c' -, It) r li t:. J

~J d If) U / ,oJ ;.J 7 + : J ,'j /l;:J to rJ, I 40'1';):) /'v13d - ,j J', J ,Ji-,;) '/ i"yr'. /L3 I - Y316 HLi

,. <' ) l'J if) ~)

I Cil ,"i / /J H -) - ';) f) vi tJ , ; L A

" 40;) ,j / u ,.,j (:, - , j <1 d d

~600 In07 -2~tJ0 JMr' 1

*l!ilv}vJ

vi I vi J

t) 1.) 6

"j 1 I Vi

t'J I 'I) 3 ',) I 1 VI

'.) 1 vi /J

V,/j~)/) I I t'M + vJ l'J ,;) vj i\ \\ ~) V).i v) vi .0 '/i v) 'I) / I '.') I +".1"1 VI It)

b~.1 'I) LJ 1 l'ij'~ +,Ii II,'),/)

<,j,j vit'} Ih1.3 +l'j/JV)~)

.,) t .. J 'l it) /I·;lL! + J ',1 :1,1 '-J .:J I,:) 'ij 1 I \I)::> +,,~. 'I) 'i) VJ

jr);rjv) ,i 1106 +',.:JLhH:i

6/1r.::!4 1 1 ~j-,

-

1 J::>4 I I i-.U.\:

'IH10 v) /1 H1 + v) "j vi v) .l,\1\1 U .-J VJ 10 .. )

tJ ALl~r;~

/Addresses are in standard format /IOT instruction

/This is a JMS indirectly to page ~

/Floating Point instructions are /triggered by a JMS I 7

/F1oating Point Package D instructions fare assumed

/This is data but is assigned /a CLA because of the octal code

/Because i t is impracticable to /have two or more AND instructions lin a sequence, the program assumes /that the second and following

/AND instructions are data

/This is data, but the octal /code is the same for the Data /Communications Systems Type 680

5

(8)

This is an output from the Reverse Assembler in MODE2. It is slightly faster than mode 1 and is easire to read because there is no slash and the output order is different.

*/)~,ciU

,i),h} 6 ~1/j 6 - 1 '/:i '..>. I L ':)

\,)',)1 Lj/I~)f) -337c JI",S 1 ,,~ UVl6

j0~ 4407 -3371 JMS 1 ;0 007

~'Hj3 biD/) -1 I,!'.i) fr"U j U 10;6

v) !;) Lj ,,)Uvhl +',)IJ\..:)V) Fr~/,T

, L h 4Ljv'J6 -.j:nr:>, Jf'IS 1 ~j dUb

~~.H) 6 LJ Ljli17 - J:n 1 Jfv',:j 1 vi 'iJvJ 7

JA" 0~J3 +0~uJ F~I~

.) I i) :3 1 \;J , J + 3 1 ,1 v) 1" iv'. i~ Y Ilil 61,Lj -16'1~ f't'Jf .'.1 1.'-: /) d lJ oj + l') U (1 '0 F ~: A 1

/J 1 ~Ht) '" 1 lj ,,1

vI 1 -3 lId ,j + 1 1 !J 3 f 1-\ Ll l) I Ii :3

~j I /.; 7 v.j vji) - ~1 '1'1 'c!. k r L

I'J 1.., 1 1 ,) I + 1 1 ') 11 t.\ J) ,; 1 :d "

i,j 1 h 71'IV) LI -uri I; f'\I\L

,-,17 3ld:i +Jl',)3 Den iJ2.J 11,li) + 1 1,'16 j i'.!)

U G I :3 1 I ,'I +:3 1 l~'i uc q

+'c!.103 !::;L +(0'.111.11 lSI-.

-;2:) S 6 Ji'lI"'

) 1 "j 3 ,) 1 d (, VIII I') I,) 1;-;3

vj I 110 (:1 C '-~ :2 1 U J

,J ~3 ~ 1 Iv)

ij~:::4 ~2c('~

,j',:',) Lj4vl7 -:] ~5 7 1 Ji',~ I I) ,,1~2

DU7

~',:'b ~10J -2700 FG~f 0 100

~~7 000~ +0~d0 ~'EXl

J :"h) 4 "hi ') -,).j 7,3 Ji·;::> I J &J d 'J 031 7402 -0J'/6 HLI

*

i(j ,,);(1::>

00') 72~0 -0600 CLA

,'jUf, 74"i\) -vi'hhJ

\'j ;17 ~) (, U vi -C C:' Ii) V) JiVjf' 1 '!h'h1

*\j 1 Uv)

1 vid ;)!.-llLj +vJU'/H'J Al\,u "HI V)

1 d I /)Vi;Jl'J +,:hJ~'JU

1 ;J~) ~) /1 >J ,) + ,j 'Ii.'J ~)

1,)3 00»v') +Ia'l)dv) 1 V}Lj 0(!)~')'o +.JL;.j,J 1 ,j") ~Jv),Lj +Vh .. VI v)

1 ~) (, V) vh,M +v) ~hh)

107 6424 -l~~~ IfXON

I 1 U (1U~J;') +v)vhh-j f\i\ij) \:1 i)'.)0

2414 (CH~CK ~UM) /MODE 2 gives Checksum

6

(9)

METHODS Discussion

The program initializes by checking the switch register for the input-output devices' and the operating mode. It then reads a binary tape. If channel 7 is punched (indicating an address) the program punches *XXXX where XXXX is an octal number. The current page address and the octal instruction are punched next followed by the signed equivalent of the octal instruction. If not an address, the first three bits of the octal instruction are examined to find the operation code. A JMS I 0007 raises a flag which assumes that Floating Point instructions are used

unless Bit 3 in the switch register is raised. This disables the Floating Point instruction subroutine and prevents the Reverse Assembler from interpreting instructions as being Floating Point after a JMS I 0007. Operation codes 0-5 are treated as memory reference instructions and are always typed out. If the instru- tion has an operation code of 6 or 7, the Reverse Assembler com- pares the word to a table on pages 5-8. If the word is found in the table, the mnemonic code is typed out and the next char- acter on the paper tape is read. If the word is not found on the tables, i t is assumed the word is not an instruction, but data, and the computer reads the next character having typed

only the address and the octal code. The lOT list contains every lOT instruction except the ones for the Serial Magnetic Drum

System Type 251 and Type RM08 as well as the instructions for the Garded Scanning Digital Voltmeter Type AF04A. This is because the same octal codes are used by two or more different input- output devices. The program checks for the checksum and punches either "PAUSE" (in Mode 1) or "XXXX (CHECKSUM) II (in Mode 2) . The Reverse Assembler punches leader-trailer in Mode 1.

FORMAT

!~~t_.Q.~.!=:_o:

On input, the program'accepts a paper tape in binary format. A tape in RIM format may be read, however, an address will be typed on every other line.

Ou~p~:t: .. [~at:.a_

The output depends on the preselected output mode. In mode 2, the computer types a 3-digit word which indicates the address of the instruction on the current page. Next comes a four-digit octal code indicating the code as read off the paper tape. This is followed by a signed 4-digit number which is the equivalent of the octal number. (i.e. 7773 is equivalent to -5.) If the octal number represents a memory reference instruction, the mnemonic code is typed. If i t is an indirect reference, an "I"

is typed. If i t is a reference to page

a,

a "0" is typed. If a 0 is not typed, the reference is to the current page.

7

(10)

EXECUTION TIME

The speed of th~ Reverse Assembler is input-output limited. The ASR-33 types a line in approximately 2.5 seconds. The high speed punch punches a line in approximately 0.5 seconds.

PROGRAM

0-1200 : executable program

1200-1400 Reference table for operation code 7

1400-2000 Reference table for operation code 6 (lOT) 2000-5400 : ASCII table of all mnemonic codes.

8

Références

Documents relatifs

(An example of a non-library maintenance tape is a data tape created by a program.) Library maintenance tape file names have two levels.. The first level is the name of the tape

The film was processed from an edited vid- eotape made duringa demonstration at NIH of the experimental system being developed by Bolt Beranek and Newman Inc., and

Je suis très emballée par certains des nombreux efforts actuels du Collège : pousser davantage pour la protection des termes médecin de famille et médecine de famille ; pro-

The Track and Azimuth Alignment procedures are intended for use in aligning the read- after-write head in the tape drive to the correct position over the tape

Write or read on-the-fly (continuous tape motion).. Up to four drives. Three-cycle data break.. All major operations are performed automatically under command of

In order to load the Paper Tape Reader, rotate loading knob counterclockwise to lift starwheel arms away from the sprocket shaft.. In- sert tape between

If band correcting redundant tape transmission is desired, punch a (1), 1f notVlanted, leave blank. tape record to be selectively punched into one or more cards. The only

This means that an exception record is recognized when the character in the first exception- character location in the input data record matches the exception character