۱۶-فروردین-۱۳۹۱, ۰۵:۱۷:۰۱
کد:
DSEG SEGMENT 'DATA'
; add your data here!
Y1 DB ? ;SEGMENT 'DATA'
Y2 DB ? ;SEGMENT 'DATA'
X1 DB ? ;SEGMENT 'DATA'
X2 DB ? ;SEGMENT 'DATA'
CONT DB ? ;SEGMENT 'DATA'
COLOR DB ?;SEGMENT 'DATA'
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 AH,02H
MOV DL,'A'
INT 21H
MOV Y1,2
MOV Y2,2
MOV X1,22
MOV X2,77
MOV COLOR,10H
MOV CONT,1
L1:
CMP CONT,4
JG L2:
MOV CH,Y1;+
MOV CL,Y2;+
MOV DH,X1;-
MOV DL,X2;-
MOV BH,COLOR
MOV AH,06H
INT 10H
ADD Y1,2
ADD Y2,2
SUB X1,2
SUB X2,2
ADD COLOR,10H
INC CONT
JMP L1
L2:
MOV CH,10;+
MOV CL,35;+
MOV DH,15;-
MOV DL,45;-
MOV BH,50H
MOV AH,06H
INT 10H
MOV AX, 4C00h ; exit to operating system.
INT 21h
START ENDP
CSEG ENDS
END START ; set entry point.