3-  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 [ 44 ] 45 46 47 48 49 50 51 52 53 54 55 56 57

9

, . 9.18 ( 11).

. 9.19 - . 9.18 8085.

9.8.

, . -

t

= , 03=

\. 2

1 -


-

-

. 9.20. - .

- . , . . -] - < .

- . 9.20, , 0000 ( 1), -

2 3 4

5 6 7 8 9 10

12 13 14 15 16 17 18 19 21 21 22 23 24 25 26 27 28 29 30 31 32 33 3* 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 33 51 52

0000 0000

0000

0001 000 2 000 4 5

000 7 9

001 1 00 1 1 00 11

00 13

00 14

00 17 00 19 00 1 00 ID 001 0020 00 23 00 26 00 27 00 28 00 2 00 2 002

00

00 31 00 34 00 36 00 37 00 39

00 3D

♦ - * ♦♦ ♦ ♦ *

. 9.21 ,10- . 9.25.

* <-

ORG .

♦ .

AF

D3 32 AF

D3 35 D3 33

D3 34 11 00 00 21

VFtl

XRA INR OUT XRA

OUT OUT OUT LXI LXI

32H A

DDOOO

H,1400U

0

CS*0.0V,PGM=0.0V -70

- -90

.

DB Ht

2 31 00 13

2 26 00 FF

26 00

3 00 13 7

D3 34 7

33 23

11 D3 F0 7

D3 1 7

D3 2

39 00 Wni

VNEX

VFAIL

IN JNZ MVI JNZ MVI CMP JNZ JMP INX. MOV OUT MOV OUT INX JMP OUT MOV OUT MOV OUT JMP

31H H

VFAIL A,13H D

VNEX A,OFFH E

VNEX START D

A,D 34H A,E

33H H

WY1 OFOH A,E 0F1H A,D 0F2H VOUT

. . , VFAIL

,. ,

, ,

.

----XX

00 START NOP gj,

E3BDRS 6 SYMBOLS

. 9.21. -4<1 . 9.20

8085.

. , , ( 3 4). 1 ( 6).

.



= , =


\

-

I

. 9.22. - .

2 3

0000 0000 0000 0000 0000

6 0000

7 0000

8 0000

9

10

11 0000

12 0000

13 0000

14 0000

15 !

16 0002

17 0004

18 0005

19 0007

20

21 000D

22

23 0010

24 0011

25 0013

26 0015

27 0016 26 0018

29 0019

30 001

31 001F

32 001F

33 0022

34 0023

35 0024

36 0027

37 0027

38 0027

39 0027

40 028

AF

D3 32

D3 35 11 00 21 00 7

d3 33 7

34 DB 31 77

13

2 22 FF

27

0D

.9.23 ,-

.9.22

*

♦ * ♦ *

.* .

00 14

XRA INH OUT OUT LXI LXI

01 MOV OUT MOV OUT IN MOV MVI CMP JNZ MVI CMP JZ INX INX JMF

CNEX

32h A

35H D.OOOO

H.uooH

A,13H

CNEX A,OFFH E

START

C0PY1

0=1

cs=O.OV PGM=0.0v . =0

0-7

8-9

. -

0.;,10

01 ,

♦ !

START NOP END

1 2 3 4 5

8 9 11 12 13 14 15 16 17 18 19 Z) 21 22 23 24 25 26 27 2S 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59

0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 000 3 000 4 5 7 000 9 00 11 00 14 017 0018 001 001 001

01

00 IB 001 00 IB 001 00 IB 00 IB 00 1 00 IB 001 001 001 001 00 IB 00 IB 00 IB 00 IE 00 IB 00 21, 00 23 00 26 00 29 00 2C 00 2C 00 2C 00 2d 00 20 00 2F 00 31 0032 0033 00 34 00 34

.

♦ ♦

3KFF 13

F0 D3 F1 D3 F2 32 00 32 1 32 0 2 32 0 3

32 04

10 10 10 10

ORG 00

#

LXI SP,13FFH .

BEGIN XRA . . ,

EI

OUT OFOH

OUT 0F1H

OUT 0F2H

STA 1̨ 1=0

STA CFUG CFLAG=0

STA KWGHT KWGHT=0

STA KCOMP KCOMP=0

INH A =1

STA KTOW KaOWOOOOOOJ

-

KTIME EQU 1000

CFLAG EQU 1 + 1

KWGHT EQU CFLAG+1

KCOMP EQU KWGHT+1

KROW BQU KCOMP+1

NROW EQU KBOW+I

ClfTl EQU NB0*+1

AINl EQU CNT1+1

AINZ EQU AIS1+1

AIN3 EQU AIN2+1

AIN4 EQU AIN3+1

0 .

CD 64 00

02 FE 16 20 00 DA 2 00 00

CALL KDET

LDA KWGHT CPI 16H JZ BEGN1 JC BEGN1 JMP ffiQIN

.

???

jTO . . .

D6 47

87

1 00 00

* . 9.13

BEQN1

LDA SUI ITV ADD ADD

KWOHT

=KWaHT-16

0 3

LXI ,00

. 9.24. 8085,

.

END 4

EBBOBS

4 STHBOLS



-6 2 63

65 66 67 -68 69 ) 71 72 73 7* 75 76 77 78 79 81 82 83 84-85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 10 10 2 10 4 10 5 6 7 10 8 9 1 111 112 113 114 115 116 117 118 119

58 00 500 44 0 1

0037 4

0038 21 09 £9 003D 003D 00 3D 003D 03 00 40 0043 00 46 0 2 02 0049 1D02 004 02 00 4 F2 0 2 00 52 5 00 00 55 61 00 00 58

00 58 00 58 00 58 00 58

00 58 03 00 00 5 0 3 00 00 5 0 3 00 0061 00 0064 4 .0064 0064 0064 -0064 0064 CD ZPOI 006 7 CD IP 0 1 00 6 A 01 00 6)- 00 006 F 64 00 00 72 CD F5 00 0075 00 75 00 75 00 75 00 75 00 75 0075 00 75 0075

00 75 00 10 00 78 00 78 00 78 00 78

00 78 PS 00

007 ? 00

00 7D

00 7D

006D

00 7D

007

00 2

, 11!

LXI ,TABLE

DAD CJEIdSHHE

PCHL

XABLE jmp jmp jmp jmp jmp jmp jmp jmp jmp

Ũ

ENTER

CENTY

ADDSE

CLRAM

PROO

copy

*******

ENTRY,CENXRY,NAl ,NA2

ENTEll jmp begin centy jmp begin SA1 jmp begin NA2 jmp begin

****** *

. 4.20

kdet call orow

call colm

lda cflag

cpi

JZ kdet

call keyw

. 4.20 .4.21

******

LDA KTI.MS

CPI jz- KCL01

*** *

LDA KWGHT

colm .

- , , ???

1

KTIMS=0?? ,

77?

4 28

0081 00 84 0085 00 88 0088 00 88 00 88 00 89 00 00 8 00 8F 0092 00 93 00 96 00 96 0096 00 96 00 98 009 00 9 009F 009F 00 9 00 9 02 00 5 00 5 005 00 5 00 7 00 ? 00 2 00 2 02 02 00 2 00 2 00 82 002 002 00 2 02 02 02 00 2 00 2 002 002 00 4

9

? 00

32 00 10 00

,

LEA

j2

8)

XRA STA 1Ȩ JMP KCL03

* ( 9)

00 10 KCL02 LDA KTIMB INR

32 00 5 KTIME

* ♦ ( )

FE 32 CPI 33

2 jnz KCL03

CD 00 CALL KOPN

9 RET

** **(llUir 3)

2 1 LDA KWGHT 32 03 STA ♦

( 4) ♦

01 MVI ,01

32 00 STA KTIMB

---- . -

( 5) *

0 1 MVI ,01

32 04 STA KROW

( 6)

64 00 JTMP KDET

C=KWQHT = KC0MP=KWQHT7? /) !!!!!!

KTIME

.

KTIMB

1=1+1

11=1+!

1-=507? 50

= kwght

1=1

0=0000001

01 32 04

* <( *

* 110 * *

.4. 22

>>*** * >* * **>>> >

( \)

KOPN MVI ,01

STA KHOW KROWOOOOOOO1



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 [ 44 ] 45 46 47 48 49 50 51 52 53 54 55 56 57