DATA SEGMENT


D0 DB 0F1H ; F1H

D1 DW 4567H ; , 4567H

D2 DW D2 ; , 0003

D3 DD ? ;

D4 DB 20DUP(?) ;

D5 DW 10DUP(0) ;

DATA ENDS




DW D2, , 0003 - D2 , .. . , . DUP . DUP , , DUP.

.

DB , , , . .

, ,

ASCII$ - - ASCII- , $

ASCIIZ - - - ASCII- , .

ASCII$ - DB.

str_$ db 'Hello','$'

str_$ db 'Hello $'

ASCIIZ- , DB

str_0 db 'Hello',0

ASCII - .


ப - ASCII ᨬ, 㫥 , 뢠 ⠪ 㫥 ᨬ ASCII.

᫨ ᨬ ࠢ 0, ப 㫥, ⮬ ᮧ ६ 㫥 .

sbuf db 81 dup(0) ;80- ᨬ

ᮧ ப ⠪ ᯮᮡ ᥣ ᫥ ⠭ 稪 DUP 1 ᨬ쭮 ᫠ ᨬ, ஥ 뢠 ப, ⮡ ⠢ , ப ᥣ 稢.

砭!

窨 窠. ப, ᠭ ४⨢ DB ('), 窨 (").

⥩訩 ⮤ 祭 祪 ப ⮨ ᯮ짮 ࠧ ⨯ 祪 뤥 ᥩ ப ⤥ ⥩:

st1 db ' "४᭮" ᪠ ', 0

st1 db " ' ⫨筮' ᪠ ਣ਩", 0

⪨.

⪨. ⪨ 㯭  ணࠬ. ⪨ ࠧ, ᮧ 쥧 㤮⢠ ॠ樨 ⪨ 室 , ਬ ⠪

CMP AX,9 ;=9?

JE SK ;ய ப ३ , ᫨ =9

ADD CX,10 ; ਡ 10

SK:

⪨ 室, ਬ JE, SK  祭 ᯮ㥬묨 ணࠬ஢ 몥 ᥬ. ॥ ᥣ 㣨 믮 室 , ᫥⥫쭮, ⪠ SK 㦭 , ஬ ⮣ . ணࠬ ⠪ 室 ⢮ 祭 ਤ ਤ뢠 () . 饭 ⮣ TURBO ASSEMBLER ᮧ ⪨, 騥 ⮩ ணࠬ, ன 㦭.



⪨ 㣨 ⪠, ᪫祭 ⮣, 稭 @@. ਬ,

@@ 20:

@@ TWO:

! 쭠 ⪠, ⮫쪮 ᫥饩 쭮 ⪨.

ਬ:

JMP THERE ; 室

@@ 20: INC AX

CMP AX, 30

JE @@20 ; 室

THERE: CMP AX, 30

JE @@20 ; 室

XOR CX, CX

@@20:

ᨢ 몥 ᥬ.

ᯥ樠 , ⮤ ᠭ ᯮ짮 ᨢ 몥 ᥬ. ࠡ ᨢ . , ਬ, ᨢ 楫 ᥫ ᮧ ᯮ DUP:

AR DB 10 DUP (?) - ;ᨢ 10 楫 ⮢.

। ᫥⥫쭮 10 祭:

AR DB 0,1,2,3,4,5,6,7,8,9

ᮧ ᨢ ⠢ ⮢, ਬ ப:

AR DB 20 DUP(?),0 : AR [0]

DB 20 DUP(?),0 : AR [1]

DB 20 DUP(?),0 ; AR [3]

ᮧ ᨢ ᫥ ᯮ짮 ⠪ ४⨢ :

LABEL - ⪠

REPT -

LABEL AR BYTE

REPT 100

DB 20 DUP(?),0

ENDM

ࢠ ப 뢠 AR ⨯ BYTE . ᯮ짮 㣨 ⨯ WORD, DWORD ..



४⨢ LABEL 㪠뢠 ᥬ, ᮢ ᫥騥 . १ࢨ ࠭⢠.

ਢ ਬ ᫥騥  ப, ᥣ .

४⨢ REPT ( । ⢮ ࠧ) ( 砥 100 ࠧ)  몠 ᥬ. , 室 REPT ENDM ( ) ⠪, ᫨ ப ࠫ 室 ⢮ ࠧ.

ᬮਬ 㤮 ਥ ࠧ ᠭ ।. ਬ ᮧ ᨢ 楫 ⮢ ᨢ 祭 0 9 ᯮ짮 ᫥饥 ᠭ:

VAL = 0 ; ४⨢ ᢠ

LABEL AR WORD

REPT 10

DW VAL

VAL = VAL+1 ;४⨢ ᢠ

ENDM

஢ ᨢ.

ᬮਬ ᯮᮡ ⥭ 祭 ᨢ. ਬ, ⢥⮬ ᨢ? ⮣ 㦭 , 몥 ᥬ ᨢ - . ⮬ ᨬ ⨯ , ᠭ ᨢ, ⤥ 祭 (.. ⤥ ⮢) ᢮ 蠣:

1)      㬭 ࠧ ᨢ ᨢ; I

2)      ਡ १ ᨢ.

ਬ. ⮬ ᨢ ⮢, ᫨ I=0, ⮣ I*1=0*1=0 ar () । ᨢ ar [0] ன ar [1] (I=1) ᯮ 1 (I*1=1) ..



⠪, 㦭 祭 ᨢ ८ࠧ . ਬ ਢ 1.

㭪 , 0 ⥭ 000D , .. ᥣ ᨢ.


1 ᮮ⢥ 000, 2 - 000F ⠪ 7, । ᮬ 0014.

ਬ. ⠬ 100 - ⮢ ᨢ. TURBO ASSEMBLER IDEAL.

DATASEG

AR DB 100 DUP(?)

CODESEG

MOV AL, [AR+63] ; 64-⮣ ᨢ AL

設⢥ 砥 ᨢ । ᯮ짮 ॣ ६ . ਬ ᯮᮡ 樨, 뢠 祭 ᮢ ᨢ ॣ .

ਬ, ॣ AL 㧨 ᨢ AR c ᮬ index. ᤥ ⠪:

DATASEG

INDEX DW ?

ARRAY DB 10 DUP(?)

CODESEG

MOV BX, [INDEX] ; 祭 .

MOV AL, [BX+AR] ; AL
楫 ᯮ짮 ॣ SI DI

MOV SI, [INDEX] ; 祭

MOV AL, [SI+AR] ; AL
MOV DI, [INDEX] ; 祭

MOV AL,[DI+AR] ; AL
TYPE, LENGTH, SIZE.

஥ ᯮ ࠦ, 訢 ⨯ ଠ樨.

TYPE (⨯) ᮮ頥, ᪮쪮 ⢥ ६ (1 (DB) , 2 (DW) 4 (DD)). ⨯ .

LENGTH () ᮮ頥 ᫮ ᭮ (, ᫮ ᫮), । ப । ६. ⢮ ⮢ ᨢ.

SIZE (ࠧ) ᮮ頥, ᪮쪮 । । ६. ஢ ࠢ ᮮ⭮襭.

SIZE<> = LENGTH<>* TYPE<>

ਬ ਬ ᬠਢ ஢:

DATASEG

AR DW 20 DUP(?) ; , 뤥塞 ᥣ ᨢ,



; 㦭 , 㬬 ;

SUB AX, AX ; 㫨

MOV CX, LENGTH AR ; ᫮ ⮢ ᨢ AR

MOV SI, SIZE AR ; ᨢ

SUM: SUB SI, TYPE AR ; ⮡ ⢨ 室 ।騩

; , ⠥ ࠧ୮ ᨢ.

ADD AX, AR [SI] ; ਡ

LOOP SUM ; 横 㤥 믮 ,

; .

ਡ⮢ ६.

६ ਡ: ⨯, ᥣ, ᬥ饭 ᥣ.

⨯ ଠ:

BYTE

WORD PTR < ६ >

DWORD

<⨯> PTR < ६ > 砥, ᫥ ᯮ짮 ᥣ ᬥ饭 < ६>,  ⨯.

ਬ:

MOV BYTE PTR DW5, 7;

ADD AL, BYTE PTR DW5;

⨯ ॡ ࠭ 筮, 饭 ⨯:

INC [B] ;६ ᫮ ?

஢ ⮬ 㦭  । ⨯ ࠭: