Example 6.3 Write a 68000 assembly program at address $002000 to clear 100 consecutive bytes to zero from LOW to H!H addresses addresses starting at location location $00"000#
Solution
LOO
9)&H
O! $2000 ,O-+(#L .$"000/(0 /(0 ,O-+#W . ./*0 L#3 4(05 *39#W *0/LOO :,
9)&H
% &'(')! (**+&& % LO(* (0 W'H $"000 % ,O-+ )'O *0 % L+(7"000H % *++,+)' ()* % 3()H % H(L'
Code Used: O ! $"000 *#3 *#3 $01/ $01/$0 $02/ 2/$0 $0"/ "/$0 $0;/ ;/$0 $0< < *#3 *#3 $06/ $06/$0 $0=/ =/$0 $08/ 8/$0 $0/ /$1 $10 0 *#3 *#3 $01/ $01/$0 $02/ 2/$0 $0"/ "/$0 $0;/ ;/$0 $0< < *#3 *#3 $06/ $06/$0 $0=/ =/$0 $08/ 8/$0 $0/ /$1 $10 0 *#3 *#3 $01/ $01/$0 $02/ 2/$0 $0"/ "/$0 $0;/ ;/$0 $0< < *#3 *#3 $06/ $06/$0 $0=/ =/$0 $08/ 8/$0 $0/ /$1 $10 0 *#3 *#3 $01/ $01/$0 $02/ 2/$0 $0"/ "/$0 $0;/ ;/$0 $0< < *#3 *#3 $06/ $06/$0 $0=/ =/$0 $08/ 8/$0 $0/ /$1 $10 0 *#3 *#3 $01/ $01/$0 $02/ 2/$0 $0"/ "/$0 $0;/ ;/$0 $0< < *#3 *#3 $06/ $06/$0 $0=/ =/$0 $08/ 8/$0 $0/ /$1 $10 0 *#3 *#3 $01/ $01/$0 $02/ 2/$0 $0"/ "/$0 $0;/ ;/$0 $0< < *#3 *#3 $06/ $06/$0 $0=/ =/$0 $08/ 8/$0 $0/ /$1 $10 0 *#3 *#3 $01/ $01/$0 $02/ 2/$0 $0"/ "/$0 $0;/ ;/$0 $0< < *#3 *#3 $06/ $06/$0 $0=/ =/$0 $08/ 8/$0 $0/ /$1 $10 0 *#3 *#3 $01/ $01/$0 $02/ 2/$0 $0"/ "/$0 $0;/ ;/$0 $0< < *#3 *#3 $06/ $06/$0 $0=/ =/$0 $08/ 8/$0 $0/ /$1 $10 0 *#3 *#3 $01/ $01/$0 $02/ 2/$0 $0"/ "/$0 $0;/ ;/$0 $0< < *#3 *#3 $06/ $06/$0 $0=/ =/$0 $08/ 8/$0 $0/ /$1 $10 0 *#3 *#3 $01/ $01/$0 $02/ 2/$0 $0"/ "/$0 $0;/ ;/$0 $0< < *#3 *#3 $06/ $06/$0 $0=/ =/$0 $08/ 8/$0 $0/ /$1 $10 0 O ! $2000 ,O-+(#L .$ . $"000/(0 ,O-+#W ./*0 LOO L#3 4(05 *39#W *0/LOO 9)&H :, 9)&H
%Load (0 >it? $"000 %,ove into *0 %lear 7"000 and point to ne@t address %*ecrement and branc? %Halt
Example 6.4 Write a 68000 assembly language program at address $;000 to move a blocA of 16Bbit data of lengt? 10010 from t?e source blocA starting at location 002000 16 to t?e destination blocA starting at location 00"000 16 from lo> to ?ig? addresses#
Solution '?e assembly language program is s?o>n belo>C
START
ORG $4000 MOVEA.W #$2000,A4 ;LOAD MOVEA.W #$3000,A5 ;LOAD MOVE.W #99,D0 ;LOAD MOVE.W !A4",!A5";MOVE
STA&
D%.W 'M(
D0,START STA&
A4 WITH SOURCE ADDR A5 WITH DEST ADDR D0 WITH COUNT -199 SOURCE DATA TO DEST
;RANCH I% D0 ;HALT
−
1
'?e above program is modified to move five 16Bbit data as follo>sC
START STA&
ORG DC.W ORG MOVEA.W MOVEA.W MOVE.W MOVE.W D%.W 'M(
$2000 $0100,$0200,$0300,$0400,$0500 $4000 #$2000,A4 #$3000,A5 #4,D0 !A4",!A5" D0,START STA&
EXAMPLE 6.8
Write a 68000 assembly language program at address $"000 to add t>o 6;Bbit numbers as follo>sC 7*0#L 7*1#L + 7*2#L 7*"#L BBBBBBBBBBBBBBBBBBBBBBB 7*2#L 7*"#L Solution O! $"000 (**#L *1/*" % (dd lo> "2 bits/ store result in *"#L (**D#L *0/*2 % (dd >it? carry ?ig? "2 bits/ store result +)* :, +)* % Halt
EXAMPLE 6.9
Write a 68000 assembly language program at address $2000 to add four "2Bbit numbers stored in consecutive locations from lo> to ?ig? addresses starting at address $"000# &tore t?e "2Bbit
result onto t?e user stacA# (ssume t?at no carry is generated due to addition of t>o consecutive "2Bbit numbers and (= is already initialized# Solution
O! $"000 *#L 1/2/"/; O! $2000 ,O-+E#L ."/*0 ,O-+(#L .$"000/(0 L#L *1 &'(' (**#L 4(05/*1 % (dd *39#W *0/&'(' ,O-+#L *1/B4(=5 9)&H :, 9)&H
% ,ove " into *0 %nitialize (0 % lear sum to 0 % perform loop % pus? result
Numei!al Example (ssume data as 1/2/"/;# '?e final result / $( 410 decimal5 >ill be stored in *1#L# Simulation "esults '?e follo>ing screen s?ot s?o>s data / $00000001/ $00000002/ $0000000" and $0000000; in memory locations starting at address $"000# '?e data are circled/ eac? ; bytes longC
(s t?e program is initializing values/ t?e registers are being c?ang ed accordinglyC
(fter t?e first number 4$000000015 is added to t?e sum in *1#L during t?e first pass/ register *1#L >ill contain t?e "2Bbit &F,/ $00000001 as follo>sC
'?e follo>ing screen s?ots s?o> ?o> all t?e numbers are added/ and t?e "2Bbit result 4$0000000(5 is pus?ed onto t?e user stacAC
(= >as $00010000 and storing t?e result of t?e sum/ *1/ using predecrement addressing/ (= is 999 and t?e data is pus?ed in to t?e stacA# (= is decremented by ; because a long >ord is stored# *0#W G $9999 indicating it is B1 to ump out of t?e loop# EXAMPLE 6.#$
Write a 68000 assembly language program at address $2000 to add ten "2Bbit numbers stored in consecutive locations starting at address $"000# nitialize (6 to $00200<0; and use lo> 2; bits of (6 as t?e stacA pointer to pus? t?e "2Bbit result# Fse only (**D instruction for adding t>o "2Bbit numbers eac? time t?roug? t?e loop# (ssume t?at no carry is generated due to addition of t>o consecutive "2Bbit numbers% t?is >ill provide t?e "2Bbit result# '?is e@ample illustrates use of t?e 68000 (**D instruction# Solution
'?e assembly language program is s?o>n belo>C
&'('I(* OF)'
(!()
,O-+#L 9)&H
O! $"000 *#L 2/"/=/1//6/;/6/1 +EF $"000 O! $2000 +EF ,O-+(#L .&'('I(*/(0 ,O-+#3 .OF)'/*0 ,O-+(#L .$00200<0;/(6 L#L *1 (**#3 .0/*6 ,O-+#L 4(05/*" (**D#L *"/*1 *39#W *0/(!() *1/B4(65 :, 9)&H
% LO(* &'(')! (**+&& ) (0 % F&+ *0 (& ( OF)'+ % F&+ (6 (& 'H+ & % L+( *1 % L+( D 3' % ,O-+ ( "2 3' )F,3+ ) *" %(** )F,3+& F&)! (**D %++(' F)'L *0 G B1 %F&H "2B3' +&FL' O)'O &'(J
Example 6.##
Write a 68000 assembly program at address $2000 to multiply an 8Bbit signed number in t?e lo> byte of *1 by a 16Bbit signed number in t?e ?ig? >ord of *<# &tore t?e result in *"# (ssume t?e number is already stored in *1#3# Solution O! +D'#W &W(#W ,FLW ,O-+#L :,
9)&H
$2000 *1 *< *1/*< **" 9)&H
% &!) +D'+)*& LOW 3K'+ O9 *1 % &W( LOW WO* W'H H!H WO* O9 *< % ,FL'LK *1 W'H * &'O+ +&FL' % OK +&FL' ) *"
EXAMPLE 6.#%
Write a 68000 assembly language program at address $2000 to compute 1 X iY i/ >?ere X i s and Y i /s are signed 16Bbit numbers and N G 100# &tore t?e "2Bbit result in *1# (ssume t?at t?e starting addresses of X i and Y i are "00016 and ;00016 respectively# =
Solution
'?e assembly language program is provided belo>C E
+EF +EF O! ,O-+#W L+(#L L+(#L
$"000 $;000 $2000 ./*0 /(0 E/(1
%,O-+ )'O *O %LO(* (**+&& )'O (0 %LO(* (**+&& E )'O (1
LOO
9)&H
L#L ,O-+#W ,FLW (**#L *2/*1 *39#W :,
*1 4(05/*2 4(15/*2
%)'(LM+ *1 'O M+O %,O-+ 7D 'O *2 %*2 NBB7D7K %*1 NBB &F, DiKi *0/LOO %*++,+)' ()* 3()H 9)&H %H(L'
EXAMPLE 6.#3
Write a 68000 assembly language program to convert temperature from 9a?ren?eit to elsius using t?e follo>ing ePuationC C G 74 F B "25Q R < # (ssume t?at t?e lo> byte of *0 contains t?e temperature in 9a?ren?eit# '?e temperature can be positive or negative# &tore result in *0# Solution
9)&H
+D'#W *0 &F3#W ."2/*0 ,FLW .*0 *-W ./*0 :, 9)&H
%&!) +D'+)* 495 LOW 3K'+ O9 *0 %+9O, 9B"2 %+9O, < 49B"25Q ()* &'O+ %+,()*+ ) H!H WO* O9 *0 %()* EFO'+)' ) LOW WO* O9 *0
EXAMPLE 6.#4
Write a 68000 assembly program at address $1000 >?ic? is ePuivalent to t?e follo>ing language segmentC sum G 0% for 4i G 0% i NG % i G i 15 sum G sum @7i y7i% (ssume t?at t?e arrays/ @7i and y7i contain unsigned 16Bbit numbers already stored in memory starting at addresses $"000 and $;000 respectively# &tore t?e "2Bbit result at address $<000# Solution
@ y sum
LOO
9)&H
O! +EF +EF +EF ,O-+#W L+(#L L+(#L L+(#L L#L ,O-+#W ,FLF#W (**#L *2/*< *39#W ,O-+#L :,
EXAMPLE 6.#&
$1000 $"000 $;000 $<000 ./*0 %F&+ *0 (& ( LOO OF)'+ @/(0 %)'(LM+ (0 W'H @ y/(1 %)'(LM+ (1 W'H y sum/(2 %)'(LM+ (2 W'H &F, *< %L+( &F, 'O 0 4(05/*2 %,O-+ D7i )'O *2 4(15/*2 %O,F'+ D7i y7i %F*('+ &F, *0/LOO %++(' F)'L *0GB1 *4(25 %&'O+ &F, ) ,+,OK 9)&H
Write a 68000 assembly language program at address $002000 to add all t?e elements in a table containing eig?t 16Bbit numbers stored in memory in consecutive memory locations starting at an address $00<000# &tore t?e 16Bbit result in *1#W# Solution
O! *#W *#W O! L+(#L ,O-+#L ,O-+#L L#W ,O-+#W 3(J (** L&L#L (**E#L ,O-+#L *39#W +)*
:,
$00<000 1/2/"/; 6/=/8 $002000 $0000<000/(0% (0 G &tarting address of t?e table .0/*0 % ,ove element number 0 into *0#L *0/*" % opy element number 0 into *"#L *1 % lear 16Bbit sum in *1 to 0 .=/*2 % nitialize *2#W >it? loop count 4(0/*0#L5/*1 % (dd elements >it? sum in *1#W .1/*0 % unsigned multiplication of element. by 2 forW .1/*" % ncrement element number in *"#L by 1 *"/*0 % opy element number in *0#L *2/3(J % *ecrement *2 and branc? to 3(J if % *2 is not ePual to B1 +)* ; Halt
Example 6.#6
Write a 68000 assembly language program at address $1000 to find t?e trace 4&um of t?e diagonal elements5 of a "@" matri@ containing 16Bbit >ords stored 16Bbit result in *0#W (ssume t?at t?e matri@ is stored in ro>Bmaor ordering starting at an offset $;000 as follo>sC $;000 a70/0 $;002 a70/1 # # # $;00+ a72/1 $;010 a72/2 '?e program is s?o>n belo>C
3(J
O! $;000 *#W $1/$2/$"/$; *#W $$6/$=/$8/$ O! $1000 ,O-+#L .0/*1 %Load col 0 into *1 ,O-+#L *1/*; %opy *1 into *; ,O-+#L .0/*2 %Load ro> 0 into *2 ,O-+#L *2/*6 %opy *2 into *6 ,O-+#W .2/*= %initialize loop count L#W *0 %&umG0 L+(#L $;000/(0 %Load (0 starting address in (0 ,FLF#W .6/*6 %preform 6i (**(#L *6/(0 %(06i
9)&H
(**#W 4(0/*1#L5/*0%&um diagonal elements in *0 (**E#L .1/*; %ncrement ol by 1 ,O-+#L *;/*1 %opy *; in *1 L&L#L .1/*1 %preform 2 (**E#L .1/*2 %ncrement ro> by 1 ,O-+#L *2/*6 %opy *2 in *6 L+(#L $;000/(0 %einitialize (0 *39#W *=/3(J :, 9)&H
EXAMPLE 6.#' Write a 68000 assembly language program at address $"000 t?at >ill multiply a "2Bbit unsigned number in *0#L by ; to provide a "2Bbit product / and t?en/ perform t?e follo>ing operations on t?e contents of *0#LC set bits 0 and " to one >it?out c?anging ot?er bits in *0#L# clear bit < to zero >it?out c?anging ot?er bits in *0#L# oneSsBcomplement bit = >it?out c?anging ot?er bits in *0#L#
Fse only logic/ and s?ift instructions# *o not use any instructions# (ssume data is already in *0#L#
multiplication or any ot?er
Solution
O! LSL.L
$"000 #2,D0 ORI.L DI.L
D0.L t" "ne in D0.L t" )e'" &"mplement bit in D0 %IISH -/
; Unsigned multiply D0 by 4 #$0000000,D0 ; set bits 0 and ! in #$%%%%%%D%,D0 ; &lea' bit ( *ORI.L #$000000+0,D0 ; "nes %IISH ; St"p
EXAMPLE 6.#8 Write a 68000 assembly language program t?at >ill multiply a 16Bbit unsigned number in *0 by ; to provide a "2Bbit product / and t?en perform t?e follo>ing operations on t?e contents of *0C set bits 0 and " to one >it?out c?anging ot?er bits in *0# clear bit < to zero >it?out c?anging ot?er bits in *0# OnesBcomplement bit = >it?out c?anging ot?er bits in *0#
Fse only s?ift and bit manipulation instructions# *o not use any multiplication or any ot?er instruction# (ssume data is already stored in *0#
Solution
LSL.L
#2,D0 S*1.L
; Unsigned multiply D0 by 4 #0,D0 ; set bit 0 in D0.L
t" "ne D0.L t" "ne in D0.L t" )e'" &"mplement bit in D0 %IISH -/
S*1.L #!,D0 ; set bit ! in LR.L #(,D0 ; &lea' bit ( H3.L #,D0 ; "nes %IISH
; Halt
EXAMPLE 6.#(
Write a 68000 assembly language program at address $2000 t?at >ill perform C < R X 6 R Y 7Y Q8 7 *1#L >?ere X is an unsigned 8Bbit number stored in t?e lo>est byte of *0 and 16Bbit signed number stored in t?e upper 16 bits of *1# )eglect t?e remainder of Y Q8#
Y is
a
Solution
9)&H
O! ()*#W ,FLF#W &W(#W *1 ,O-+#W ,FLW (**#L +D'#L (&#L (**#L :,
$2000 .$0099/*0 %O)-+' D 'O F)&!)+* 16B3' .*0 %O,F'+ F)&!)+* <D ) *0#L %,O-+ K 'O LOW 16 3'& ) *1 *1/*2 %&(-+ K 'O LOW 16 3'& O9 *2 .6/*1 %O,F'+ &!)+* 6K ) *1#L *0/*1 %(** <D W'H 6K *2 %&!) +D'+)* ."/*2 %+9O, KQ8%*&(* +,()*+ *2/*1 %+9O, <D6K KQ8 9)&H
Example 6. %$
Write a 68000 assembly language program at address $2000 to add t>o >ords/ eac? containing t>o (& digits# '?e first >ord is stored in t>o consecutive locations 4from LOW to H!H5 >it? t?e lo> byte pointed to by (0 at address "000 16/ and t?e second >ord is stored in t>o consecutive locations 4from LOW to H!H5 >it? lo> byte pointed to by (1 at =000 16# &tore t?e pacAed 3* result in *<#
Solution '?e assembly language program is provided belo>C
&'('
O! ,O-+E#L ,O-+(#W ,O-+(#W ()*#3 ()*#3 *39#W ,O-+#3 ,O-+#3 L&L#3 O#3 ,O-+#3 ,O-+#3 L&L#3 O#3 (**#3
$2000 .1/*2 .$"000/(0 .$=000/(1 .$09/4(05 .$09/4(15 *2/&'(' B4(05/*6 B4(05/*= .;/*6 *=/*6 B4(15/*< B4(15/*; .;/*< *;/*< .0/*0
%.1 )'(LM+ *2 %.2 )'(LM+ (0 %." )'(LM+ (1 %.; O)-+' &' . 'O F)(#3* %.< O)-+' 2)* . 'O F)(#3* %.6 *++,+)' ()* 3()H 9 *2 B1 %.= !+' H!H F)(#3K'+ O9 &'. %.8 !+' LOW F)(# 3K'+ O9 &'. %. &H9' &'. H!H 3K'+ ; ',+& %.10 *6G(J+* 3* 3K'+ O9 &'. %.11 !+' H!H F)(# 3K'+ O9 2)*. %.12 !+' LOW F)(# 3K'+ O9 2)*. %.1" &H9' 2)* . H!H 3K'+ ; ',+& %.1; *< H(& (J+* 3* 3K'+ O9 2)*. %.1< L+( DB3'
9)&H
(3*#3 :,
*6/*< 9)&H
%.16 *<#3 G(J+* 3* +&FL'
Numei!al Example
(ssume t?at t?e t>o (& digits to be added are $";"0 and $""; in addresses $"000 and $=000# '?e program >ill convert $";"0 and $""; into pacAed 3* bytes as $;0 and $0# '?e result of pacAed 3* addition is ;0;G1";# '?e pacAed 3* result 1"; is stored as "; in *<#3 and 1 in t?e carry flag# )itual Simulation "esults '?e correct operation of t?e program is t?en verified using t?e &imulator as follo>s#
+nter manually (& values of ;0 4$";"05 and ; 4$"";5 in big endian format at addresses $"000 and $=000/ respectively as provided in t?e follo>ing t>o screen s?otsC
nitialize t?e loop count in *2#W and set (0 and (1 to point to $"000 and $=000 respectively as s?o>n in t?e follo>ing displayC
onvert t?e t>o (& digits to unpacAed 3*# Loop out >?en *2#W becomes B110 49999165# '?e unpacAed 3* at address $=000 is s?o>n in t?e follo>ing displayC
1st number# Obtain t?e ?ig? unpacAed byte to *6#3 and t?e lo> in *=#3C
'?en s?ift *6#3 left ; bitsC
O *=#3 and *6#3 store t?e result in *6#3C
&ame e@ecution is done for t?e 2nd number but t?e data register used is *<#3 and *;#3# esult is stored in *
learing t?e carry and DBbit and adding t?e t>o pacAed 3* values in *6#3 and *<#3 and storing t?e result in *<#3# ;0 10;10G1";10 is t?e result >e e@pect# '?e pacAed 3* result 1"; is stored as "; in *<#3 and 1 in t?e carry flag as follo>sC
'?e result is displayed in ?e@# )ote t?at representation of pacAed "; and ?e@ "; in binary are t?e same# Example 6.%#
Write a 68000 assembly language program at address $2000 to subtract t>o "2Bbit pacAed 3* numbers# '?e 3* number 1 is stored at t?e locations starting from $00"000 t?roug? $00"00"/ >it? t?e least significant byte at $00"00" and t?e most significant byte at $00"000# &imilarly/ t?e 3* number 2 is stored at t?e locations starting from $00;000 t?roug? $00;00"/ >it? t?e least significant byte at $00;00" and t?e most significant byte at $00;000# '?e 3* number 2 is to be subtracted from 3* number 1# &tore t?e pacAed 3* result at addresses $00<000 4Lo>est byte of t?e result5 t?roug? $00<00" 4Hig?est byte of t?e result5# n t?e program/ first initialize loop counter *= to ;/ source pointer (0 to $00"000/ source pointer (1 to $00;000/ destination pointer (" to $00<000/ and t?en >rite t?e program to accomplis? t?e above using t?ese initialized values# Solution
O! *#L O! *#L O! ,O-+#W
$00"000 $2211"" $00;000 $""<<2211 $2000 .;/*=
%)F,3+ O9 3K'+& 'O 3+ &F3'('+*
LOO
9)&H
,O-+(#W ,O-+(#W (**(#W (**(#W ,O-+(#W &F3E#W (**#3 ,O-+#3 ,O-+#3 &3*#3 ,O-+#3 *39 :,
.$"000/(0 .$;000/(1 *=/(0 *=/(1 .$<000/(" .1/*= .0/*= B4(05/*0 B4(15/*1 *1/*0 *0/4("5 *=/LOO 9)&H
%&'(')! (**+&& 9O 9&' )F,3+ %&'(')! (**+&& 9O &+O)* )F,3+ %,O-+ (**+&& O)'+& 'O 'H+ +)* %O9 +(H "2 3' (J+* 3* )F,3+ %LO(* O)'+ 9O *+&')('O) (** %&F3'(' *= by 1 for *39 %L+( DB3' %!+' ( 3K'+ 9O, 9&' )F,3+ %!+' ( 3K'+ 9O, &+O)* )F,3+ %3* &F3'('O)/ +&FL' ) *0 %&'O+ +&FL' ) *+&')('O) (** %O)')F+ F)'L OF)'+ H(& +D+*
Numei!al Example N)*+1 N)*+2 R)/
99221133 - 33552211 5922
Simulation "esults '?e simulator is used to verify t?e correct operation of t?e program# '?is >ill be accomplis?ed via singleBstepping#
(0/ (1/ and (" are initialized# *= is decremented by 1 before going in to t?e loop so t?e loop only runs ; timesC
n t?e loop/ )umber2 4pacAed 3*/ addresses $;000 t?roug? $;00"5 is subtracted from )umber1 4pacAed 3*/addresses $"000 t?roug? $"00"5 byte by byte using &3*#3C
'?e pacAed 3* result is stored in t?e memory locations $<000 t?roug? $<00"# )ote t?at t?e data t?at are at $<000 is stored in t?e big endian formatC
Example 6.%% )
2
Write a 68000 subroutine to compute K G 4∑ D i 5 Q N # i =1
(ssume t?e DiSs are 16Bbit signed integers and ) G 100# '?e numbers are stored in consecutive locations# (ssume (0 points to t?e DiSs and (= is already initialized in t?e main program# &tore t?e "2Bbit result in *1/ >?ere t?e 16Bbit remainder is stored in ?ig? >ord of *1 and t?e 16Bbit Puotient is stored in t?e lo> >ord of *1#(ssume user mode# (lso/ >rite t?e main program at address $2000/ >?ic? >ill initialize (0 to $00<000/ call t?e subroutine/ and stop# Solution '?e assembly language program is provided belo>C Main Po*am
9)&H Suoutine &E
3(J
O! ,O-+(#W :& :,
$2000 .$<000/(0 &E 9)&H
,O-+,#L L#L ,O-+#W ,O-+#W ,FLW (**#L *"/*1 *39#W *-F#W ,O-+,#L '&
*2Q*"Q(0/B4(=5 %&(-+ +!&'+& *1 %L+( &F, ./*2 %)'(LM+ LOO OF)' 4(05/*" %,O-+ DiTs )'O *" *"/*" %O,F'+ Di2 F&)! ,FL& %&)+ Di2 & (LW(K& -+ *2/3(J %O,F'+ .100/*1 %&F, O9 Di2Q) F&)! *-F 4(=5/*2Q*"Q(0 %+&'O+ +!&'+&
%nitialize (0 to $00<000 %all t?e subroutine