۱۶-فروردین-۱۳۹۱, ۰۵:۳۴:۲۷
کد:
DSEG SEGMENT 'DATA'
X DB 0,2,4,6,8
Y DB 1,3,5,7,9
Z DB 10 DUP (?)
; add your data here!
DSEG ENDS
SSEG SEGMENT STACK 'STACK'
db 256 DUP(0)
SSEG ENDS
CSEG SEGMENT 'CODE'
START PROC FAR
; set segment registers:
MOV AX, DSEG
MOV DS, AX
MOV ES, AX
; add your code here
MOV SI,0
MOV DI,0
MOV CX,10
L:
MOV AL,X[DI]
MOV Z[SI],AL
INC SI
MOV BL,Y[DI]
MOV Z[SI],BL
INC DI
INC SI
LOOP L
MOV AX, 4C00h ; exit to operating system.
INT 21h
START ENDP
CSEG ENDS
END START ; set entry point.