! !"#$% !"#$% !"#$% !"#$% & && & !"' !"'!"' !"' ( (( ( % %% % ) )) ) *%' *%'*%' *%' + ++ + , ,, , - -- - "# ./ 0"% ./ 0"%./ 0"% ./ 0"% ./ #1$ ./ #1$./ #1$ ./ #1$ ./2#2 ./2#2./2#2 ./2#2 & && & .// .//.// .//2 22 2 ( (( ( ./%-!23 ./%-!23./%-!23 ./%-!23 ) )) ) ./" ./"./" ./" $% %&% 0"!" 0"!"0"!" 0"!" "24 "24"24 "24 '%5'% '%5'%'%5'% '%5'% & && & 0 0 0 0 ' 6789:( 6789:(6789:( 6789:( %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9%;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9" "" "( (( ( ' '' 'K KK K:HLFM9 ?96'6HN :HLFM9 ?96'6HN:HLFM9 ?96'6HN :HLFM9 ?96'6HN ,O ,O,O ,O DP7QRLN DP7QRLNDP7QRLN DP7QRLN 2 22 2 '-$ '-$'-$ '-$ ; ;; ; '6;N=SDFJHT=;=FUF9= '6;N=SDFJHT=;=FUF9='6;N=SDFJHT=;=FUF9= '6;N=SDFJHT=;=FUF9= S SS S ;VH=>HNBR;W<X6DRFYZC ;VH=>HNBR;W<X6DRFYZC;VH=>HNBR;W<X6DRFYZC ;VH=>HNBR;W<X6DRFYZC B BB B ;VH=> ;VH=>;VH=> ;VH=>HNB[C\9:R;W<>F<F;=YH9=DR HNB[C\9:R;W<>F<F;=YH9=DRHNB[C\9:R;W<>F<F;=YH9=DR HNB[C\9:R;W<>F<F;=YH9=DR Z ZZ Z ;VH=>HNBR7@;B6C@9]Y=6F9YFRTF ;VH=>HNBR7@;B6C@9]Y=6F9YFRTF;VH=>HNBR7@;B6C@9]Y=6F9YFRTF ;VH=>HNBR7@;B6C@9]Y=6F9YFRTF ()*+, /01)234*56 784*9:);8<()*);=6>). ()*+,?.6@A8B67);4= C@4*9:);8<()*D/)E0<46F801) D@G+ @C);+, @F4E/0H=86@ F)*@A); @C);+,?.*9F89A9=8 /01)4@F486@F)89C @C);+,I.@F489GE*6@F B/0>=E*/0H)E*/J/01)234*. 6789:( 6789:(6789:( 6789:( %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9%;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9" "" "( (( ( ' '' 'K KK K:HLFM9 ?96'6HN :HLFM9 ?96'6HN:HLFM9 ?96'6HN :HLFM9 ?96'6HN DP7QRLN DP7QRLNDP7QRLN DP7QRLN , ,, , . K !" #$#%&'()#))!"#*!+!" (,(!)-# !"+) % &) )( . ,!"+#//0/!)))$ +) 1 ) %2!"+) )3+ !" () !") "+ 41 +!)) #$#% ! , !" )3 + 5 1 + 41 % 2 !" +) )))6)#+% " , !" #) !"+ !" ) % 2!") )1# ))71#+% !#" , !" ( !" ) + ) ! !" ) ) % $" ,) +) )7# %&) )1# ))7+% 8 + )/( +) ') !" (!( )+ 31)( 3+ )%81# ) ())+() (+)(% %" 253)7) 3%&) )#)#)1# 7% 9 : )# 4 3 1 ( ) % &) ) 53)#%&) )# 4) !)3")% " ;)33)# )/!) 1) )+ +1 )# %&) !"< )<'% . K *8&=5!!'#)> #))&28=5% 2#*8&=5#!" + .# 1 ?@81A)#! ) . $& '(!)' * 6789:( 6789:(6789:( 6789:( %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9%;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9" "" "( (( ( ' '' 'K KK K:HLFM9 ?96'6HN :HLFM9 ?96'6HN:HLFM9 ?96'6HN :HLFM9 ?96'6HN , ,, , DP7QRLN DP7QRLNDP7QRLN DP7QRLN B!)))!CD )3+/!C)!) 3(!% *! )3 +' # E4%F ) ! ) E4%@6F+ ( (E4 %F"=G5. ()*+, /01)234*56 784*9:);8<()*);=6>). B 1 !" # 3H !" )3I 3 # ! ) )*! %*!1 #) +!' < 1 +!)% )) 1 )1. + &" # + (' !) !" )3/')< )1++ )1(' % J1(' +!'/ (' +!1% J) +!'.<1 +!1 !"% + ,")! )+ ( . • 2 • 2)++ 7 % • 2!(' ! ' # )7<% • 2)% B +)3 )(!++% B (!" )3+ % . K • 9 1+41% • 9<#$!* !?!+% • 93(*!% • 2'% 2 1+41 . )"* ! )%*)-%*).*)/ * B!) ) K ) 1 # E.F/ ) 1 / )!# )) +) ) ) )73 ))7( )))/ )') )K#ELF% 01!2:#$) !/()+-1/<)7 +)# $)+% 6789:( 6789:(6789:( 6789:( %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9%;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9" "" "( (( ( ' '' 'K KK K:HLFM9 ?96'6HN :HLFM9 ?96'6HN:HLFM9 ?96'6HN :HLFM9 ?96'6HN DP7QRLN DP7QRLNDP7QRLN DP7QRLN , ,, , 21(' ))M5('+('31)7#ENF )7 EGF/+ )1 / )/ENF )7 EGF% 2(' ) 1# (' ) () %2 (' 1 # !" ()# (' )'(% 31%&" J# OPQ RI 4) )(' # :+!'!)!". • B!)) <% • S+-1!)#) • B)# E.F • B!) <) :) % • T)7! % 31%," ,5. &@S RI/UM= ! 1)1 +<#$!. • &)) .*??/8QJ/&Q, /?>S/&@S/0 • &))<#$!.)! /H/#//0 5 % ) ) )7 7 1 + )7 < #$ !/) )<)7 # % 2<#$!) 3) ))7(' % 31%6" J# OPQ RI 8))!) ) +) ))()). 31%7" &@S RV/UW= 9@X ROB B!)*8&=5) ()1=G5. %/0H=86@F)*@A); 618@C 9LD/07=89F48*:G/ %M*/07=*6@N4*@O);B9 :A42=G);D@G5;/@F8<3P6Q 3@4*RJ/88<9A48/0QS %M*/07=*6@N4*@O);8 *@54*/0Q=B3@4*RJ/8 3@4*R4*9:);8<()* %M*/07=*6@N4*@O);8 *@54*/0Q=B3@4*R5@L 3@4*R29LD/07=8< 9A48/0QS %M*/07=*6@N4*@O);8 *@54*/0Q=B3@4*R29LD/07= 3@4*R;/@F)8/0QS *@54*/0Q=;/@F)8/0Q SB0Q)J67)*:FT46F8*0HD@G6UUP 08 %M*/07=@PP05JD0< B@N4J/078 01)8*@)*;*/. 6789:( 6789:(6789:( 6789:( %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9%;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9" "" "( (( ( ' '' 'K KK K:HLFM9 ?96'6HN :HLFM9 ?96'6HN:HLFM9 ?96'6HN :HLFM9 ?96'6HN ,& ,&,& ,& DP7QRLN DP7QRLNDP7QRLN DP7QRLN @C);+, @F4E/0H=86@ F)*@A); ? ##. , ) ) ) 3 !) ) %B) 1 )(' EUF!% 31%" &@S RV/UW= B!)+'#W=# % Y<!.#!##! T#! 1))!4% 2)M<. G B!4!<% G B!4)1%% G T' !:! % 31%8" 8OBJ VV L) <VV 2,R *22%W L4) W 1* 2,R O* L4) Z) Y<!".!)!##! ,)1 1 % G , 1).!)( ))) #[4 )DD1#) 1 ()3( 6+ 1)3( % G , 1+ ) ).!)( ))) # 55 #H1!) ) *\&X+*2*,,% G , 1+ ) ) < #. !)( ))) # 5] #H1)) ) ) ,\&X+,2*,,% 91+)!. , \&X)# 8\&X/*\&X)7,\&X% , 2)# *2*,,)7,2*,, 9 !"()3H < (1)%PZ ) +) !. , 8\&X.())+<'!)+G5I[)+< 1 (% , *\&X^*2*,,.() )+ <' !)+()I TJ)+ (% , *\&X^*2*,,.)<'!) +]_T% 31%9" 6789:( 6789:(6789:( 6789:( %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9%;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9" "" "( (( ( ' '' 'K KK K:HLFM9 ?96'6HN :HLFM9 ?96'6HN:HLFM9 ?96'6HN :HLFM9 ?96'6HN DP7QRLN DP7QRLNDP7QRLN DP7QRLN ,( ,(,( ,( 1234 1 org 1234h 2 1234 04 3 start: INC A 1235 80FD 4 JMP start 5 12FC 6 org start+200 12FC 4134 7 JMP start 8 12FE 021304 9 JMP finish 1301 121307 10 CALL delay 11 1304 14 12 finish: DEC A 1305 4134 13 JMP start 14 1307 7F00 15 delay: MOV R7,#0 1309 22 16 RET 17 end _6 # 6/ 6 W # *6+ 6` #6% Y<# !#!## #!. Y<#! 4) # ) ) <V V Wa++ 7 [V aa%2(' : 3) 1 #) -% 31%:" . MOV A,90H MOV A,P1 Y<# #!### !. T#<1)3!4# %2 1#)( RV/R5/?XBR+X2% 2(' 7 1!. 2 (' # ) < # */ ?X BR/ RV RW/X2/ 2+7*J% T' #EbF# ! 1) +!'% 31%;" . WAIT: JNB RI,WAIT JNB RI,$ T' ELF)' '. ! K ^ ^^ ^ B)1#( +))!)!"% 6789:( 6789:(6789:( 6789:( %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9%;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9" "" "( (( ( ' '' 'K KK K:HLFM9 ?96'6HN :HLFM9 ?96'6HN:HLFM9 ?96'6HN :HLFM9 ?96'6HN ,) ,),) ,) DP7QRLN DP7QRLNDP7QRLN DP7QRLN J # ( ) / )$ (/ ( + ) 1 ' ) !)5]%? !) !")!"#$) + % 2))3).)/(/ )$(+) +!'% 2)1)3).)1)) /)1/)1H +)1( % $<")1# . • 8) 4#c4/) )5]./% • 8) #/))5V.?/#) 7()3% • 8))/))[.@/) /P/H% • 8)!/))I.J/% " +) 4 (') 43 ! * a "1) (' )V1!% 31%&=" # a_+ )RV MOV R0,#0F4H 0"))I( I#d)#) !)% 31%&&" d*e)!VV_51*82>> d*Je)!_5_I de)!VV]5 de)!]5]I 2)1# ())# % 31%&," MOV R0,#’0’ ^ ^^ ^ 2)(+<#$? J:))!)!"% 31%&6" Keymsg DB ‘press any key’ 2<#$! )!) + # *82>> =V X/WI!/]=/0/+ )+Z3<(% !"#$%^ !"#$%^ !"#$%^ !"#$%^ ? 4 < 1 !) !" # ) +) < #$@R;% Tdbe!1+3! 1) +!'% 31%&7" LOC OBJ LINE SOURCE 6789:( 6789:(6789:( 6789:( %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9%;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9" "" "( (( ( ' '' 'K KK K:HLFM9 ?96'6HN :HLFM9 ?96'6HN:HLFM9 ?96'6HN :HLFM9 ?96'6HN DP7QRLN DP7QRLNDP7QRLN DP7QRLN ,+ ,+,+ ,+ 1234 1 org 1234h 2 1234 04 3 start: INC A 1235 80FD 4 JMP start 5 12FC 6 org start+200 12FC 4134 7 JMP start 8 12FE 021304 9 JMP finish 1301 121307 10 CALL delay 11 1304 14 12 finish: DEC A 1305 4134 13 JMP start 14 1307 7F00 15 delay: MOV r7,#0 1309 22 16 RET 17 end & && & !"'^ !"'^!"'^ !"'^ • B)1) EfF 4!f4 ! • B)1! EGF 4!G4! • B)1 EgF 4!h4! • B)1 E^F 4!^4! • B)13# E)#F 4!&@ ?4! B!))4! % 31%&" MOV A,#10 + 10H L MOV A,#1AH MOV A,#25 MOD 7 L MOV A,#4 ( (( ( %^ %^%^ %^ • B)19@B.9@B4! 1) • B)18R 4!8R #1 • B)18, 4!8, #! • B)1*9?4!*9?4! #7 • B)1@R 4!@R 4! )!7 • B)1i@R4!i@R4! 4)!7 B!))4! +4)+!'3#% 31%&8"M 6789:( 6789:(6789:( 6789:( %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9%;<=>?9668@<9:7AB6CDEDFGHI6DFJ9 %;<=>?9668@<9:7AB6CDEDFGHI6DFJ9" "" "( (( ( ' '' 'K KK K:HLFM9 ?96'6HN :HLFM9 ?96'6HN:HLFM9 ?96'6HN :HLFM9 ?96'6HN ,, ,,,, ,, DP7QRLN DP7QRLNDP7QRLN DP7QRLN THREE EQU 3 MINUS3 EQU -3 MOV A,#(NOT THREE) +1 MOV A,#MINUS3 MOV A,#11111101B ) )) ) *%'^ *%'^*%'^ *%'^ • OP c H • 9O jk () )H • ,B j )1 • ,O jc )1)7 )!H • ;B k !! • ;O kc !!)!H TH1)!1+3 aaaa) 7VVVV% 31%&9" MOV A,#5=5 MOV A,#5 EQ 5 MOV A,#5 NE 4 MOV A,#5 <> 4 MOV A,#0FFH + ++ + ^ ^^ ^ • B)1 ,@A 4! )-(H114!% • B)1 >; 4! )-(H1)14!% 31%&:" MOV DPH,#HIGH(1234H) L MOV DPH,#12H MOV DPL,#LOW(1234H) L MOV DPL,#34H , ,, , -^ -^-^ -^ ?H31)1Z)) 1=GI. *9F89A 6@F)89C - VW ? X I YZ [...]... F2 F3 KBFLAG PBFLAG B ADDR B ADDR B ADDR B ADDR B ADDR B ADDR 0020H.2 0026H.0 0026H.1 0026H.3 0020H.0 0020H.1 ( / % - 2 ) ! ATTRIBUTES L L L L L L A A A A A A 2 ) ) ) ) ) ) < < < < < < VI MV M5 MI VV V5 # )# ! ", ( ( 2 1# ) # + ! B!) ) ) ) ) ) ) ) ) ) ) ) ) < IV < I] < I] < I] < IV < IV 3 ^ )# ) 1 1 1 1 1 1 7 ) 1# )( ! 2 ! )# ) + % !) )# ) ( % *)-HH* ) !) X 1 : !) )# % 31 % ,:" CG (... * ! 7 . Y P E V A L U E A T T R I B U T E S DBFLAG . . B ADDR 0020H.2 A L)< VI 1 ))<IV F1 . . . . B ADDR 0026H.0 A L)<MV. :!)% 2<#$ +# )+)) cho ( 7<#$)( % 2(<#$)28O;^?8O;^>8O;^i8O;2))5