Assembly Hebrew

  • View
    197

  • Download
    7

Embed Size (px)

Text of Assembly Hebrew

" ) (1-5

"

"

"

-" -

-

)(

1043311 " .2006 . , ,' ,16-, " ,39513- .61394The Centre For Educational Technology, 16 Klausner St., Ramat-Aviv, P.O.Box 39513, Tel-Aviv, 61394. Printed in Israel.

, / . , , , , , , , , , , . , , , ) (.

77 11 14 42

1 1.1 1.2 1.3 1.4

4747 48 64 63 74 77 84

2 2.1 2.2 2.3 2.4 2.5 2.6

8585 97 103 107

3 3.1 3.2 3.3 3.4

109109 110 115 123 131 138 139

4 8086 8086- 8086

4.1 4.2 4.3 4.4 4.5 4.6

EQU

141141 141 144 163 182 188 202

5 5.1 5.2 5.3 5.4 5.5 5.6 5.7

215215 221 224 225 226 229 235 240 243

6 , )(Immediate addressing )(Register addressing )(Direct addressing mode )(Indirect Addressing Register )(Direct Indexed Mode )(Base Relative Addressing - )(Based Indexed Addressing Modes

6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9

249249 250 253 264 271 277 281 284 302

7 , 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9

311311 313 313 316 318 319 321 325 327

8 MOVS

8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9

(Store a String) STOS (Load a String) LODS (CoMPare String) CMPS (SCAn String) SCAS XLAT

329329 329 338 346 350

9 - DOS 8086

9.1 9.2 9.3 9.4 9.5

INOUT-

353353 356 358 375

10 " " )(pipelining

10.1 10.3

10.2 10.4

7

1.1 . ),(Software , . , . : .1 , "" , , : , , . .2 , : ) ,Linux ,Windows( ,, ; , , "" , , , "" )( : , , , , . , ).(hardware : , , . , . : , ) ( , , . , , , : , .

8

) ;(machine language 0 1- . ) ""( . . - , - 0 .1- , . ) ,(Assembly language "-" . " " ) .*(Mnemonic codes , , . : ) ADD (ADDition ) CMP .(CoMPare , . "" ) .(Assembler . , " " ).(Low level languages , , . : IBM . , ) (High Level Languages Visual Basic ,C++ ,JAVA ,C ,. , , . : ,A=9 A , 9 , "."A

"" "" ," : ".

*

9

, . "" ) .(Compilation - "" ) .(Compiler , . - "" ) .(Interpretation . "" ). (Interpreter

1.1

1.1 : .C . ? : result = count1 + count2 + count3

10

, . , ;result: = count1 + count2 + count3 , C: ;result = count1 + count2 + count3 , . , , ) .(Personal Computer PC ; . . .1.1

1.1

mov AX, count1 add add AX, count2 AX, count3

101000010000000000000 00000011000001100000001000000000

count1AX- ,AX+count2 AX- ,AX+count3 AX- AXresult-

00000011000001100000010000000000

mov result, AX

000000110000011000000000

MOV , ADD AX "" , , . ,1.1 . . )( . ,

11

- , . . ) ( , . ; , . , , , , . Linux ,Windows :. ) (Embedded System , , :- , , . . , , : , , . , , , . - , , . , , .

1.2 , . 1.2 . )( ,

12

, . , ,L6 ) , , ( - , . , ,L5 . ,L5 , , , . , ,L4 , , . , , .L3 , , ,L2 . , .L1 ; ) ( , .L0

1.2

13

: . , . , . , ; . : .1 Instruction Set Architecture .ISA : ) , , (; ; , . ,HAS . : ; ; .

.2 ,Hardware System Architecture

, : , , . , , " " . 1951 EDVAC " " , . , . : ) (Processor ; ) (Memory ;

14

"" ) (buses . -

1.3

"" , . .

1.3 . , , . :

, . . ,

15

/ . / . : ) (fetch ) (execute " -".

1.3.1 "" "" .

. "" - 100; 6 . , . : . ; . . 0.99- , , , . , ,: , . , , ) (99 ,98 , .0

16

. , -: ) (

1.4

, . , , 6 ) ( . "" ) ;(register . . " " ) Instruction Pointer .(IP " " ) Instruction Register .(IR .

17

; : .1 - ) Arithmetic Logic Unit ,(ALU , : , . .2 AX .BX- - . .3 " " ) Flag register (FR . , : ?X = Y - .1.5

1.5

, .

18

1.3.2 , , . "" ) ;(operator ,MOV : C =. "" ) ;(operand : ;A=8 ;A:=8 :C :

)=( : A .8 ; : A=A+B C ;A:=A+B C .C B = A : :C : + :

, for if ; , , . , . , 0.2- . : ][ ] [ ] [ ] [ ] [ ][ : : :

19

, . . , : , )(AX, BX

, . , 6 . , . 0.99- - -, : 01 AX 02 BX , : ][xx] [yy] [zz ] [xx )(; ] [yy [zz]- . , 06 01 12 : 06 , ) ( , 12 01- , 01 : ,AX12- .

1.3.3 , : ) ( , . , , .

20

, " " " " . : , , . : ][xx] [yy] [zz : AX, BX . : , AX BX . , : , , , 01 .05 .

21

1.2

01 02 03 04 05

:

01 01 27 02 01 02 04 99 27

27 AX BX AX 27 99 , 99 ?98 , : 99 98 , : 03 01 99 " 99 "AX 05 98 01 AX 98

. 01 : , : ; ;AX ; ; ? : - . .

22

: 01- , 01 ; 01 3 (yy) 4- 5 (zz) 6- ) 1( AX . , , . , 02 05 ., , . 01 01 23 : 01 AX 23 01 AX 23 :

. : + : AX BX ; : . . , , .1.3 06 :.07-

23

1.3

06 07

+ + :

06 01 27 07 01 02

AX + 27 AX- AX + BX AX-

, , , .

, ;00 . 1.1

: 23 A 54 B A + B A- A B- .

A .B- , A- B- AX BX- .AX

24

AX .A , 98 99- . 98 A 99 .B : 04 98 23 04 99 54 03 01 98 03 02 99 07 01 02 05 98 01 00 23 98 54 99 98 AX 99 BX AX+BX AX AX 98

, , .0 . .1.6

1.6 1.1

25

, IP ,0 . ,6 98 ,99- A ,B- .

, . .1 04 98 23 -

. : , ) 0 IP( .IR IP ,1- ) (. .

1.7.

04 98 23 :

1.7

.

26

23 .98 1.7.

04 98 23

1.7

.2 04 99 54

- , . : . ,: ) 1 (IP IP ,1- ) , .(02 , : . :

27

04 99 54

1.8

. 54 .99 :

04 99 54

1.8

28

.3 03 01 98

) 02 (IP IP ,1- ) (. : 98 .AX :

- 03 01 98

1.9

.4 03 02 99

, . 54 98 .BX .1.10

.5 07 01 02

, AX .54 + 23 .1.11

29

- 03 02 99

1.10

- 07 01 02

1.11

.6 05 98 01

77 .98 - .1.12

30

- 05 98 01

1.12

.7 00

, IP 06 . .

1.2 . 99 98 .99 . 2- .99

1.3 : 34 A 15 B A1- A+B B- A 98 B .99

31

1.4 . : 15 A 32 B A+B+19 A- . ) ( - . , 0 A B- 98.99-

1.3.4 , , ) ( . : A = B A=2 B=2

, . )( ) 00- ,(07 92 . : )(

.

32

. . , , , FR ; , . : = FR 1 FR 0

: AX .BX AX .BX , .

:

1.3

08 09

= ? = ?

1 , 0- . A .B- , A=2 .B=2 .

33