When will the code in the "SEGMENT DATA" section in this code be executed?

I'm starting build programming ... I've traveled a lot on Google. There is a lot of information, but I still do not understand the following code. I would appreciate if anyone could explain

MOV AX, DATA

I also do not understand when the code that is present in the data segment will be executed in this program.

ASSUME CS:CODE,DS:DATA

CODE SEGMENT
 MOV AX,@DATA
 mov DS,AX
 ...
 ...
CODE ENDS


DATA SEGMENT
   ...
   ...
   ... //SOMECODE
DATA ENDS 

Also, can someone explain to me what the following instructions do? ..

MOV AH , ??H ( ?? can be filled with 09,4c etc).

MOV DS,AX

MOV ES,AX

+5
source share
2 answers

Warning: I never wrote assembly 8086 in my life, but this is what I do.

MOV AX,@DATA - , . , @DATA - , , . @DATA AX ( 16 ). @ DATA. , , @DATA , . , @, , .

MOV DS,AX DS, ( ) 8086. , (, ++).

AX - , .

MOVE AH, ??H , AH "" AX. AL, "" AX. , 8 16 . , H, , - , AH. H "". 00H, ( ). FFH, , 255 .

" DATA SEGMENT ?" - , , . , () . , , JUMP BRANCH . -, () ..

+4

Mov ax,@data - . mov ds,ax . tasm.

+2

All Articles