۱۶-فروردین-۱۳۹۱, ۰۵:۲۶:۱۰
کد:
DSEG SEGMENT 'DATA'
; add your data here!
CCCP DB 'Enter 2 number:','$'
KGB DB 'Sum=','$'
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,09H
MOV DX,OFFSET CCCP
INT 21H
MOV AH,01H
INT 21H
SUB AL,30H
MOV BL,AL
MOV AH,02H
MOV DL,','
INT 21H
MOV AH,01H
INT 21H
;MOV BL,AL
ADD BL,AL
; ADD BL,30H
MOV AH,02H
MOV DL,0AH
INT 21H
MOV AH,02H
MOV DL,0DH
INT 21H
MOV AH,09H
MOV DX,OFFSET KGB
INT 21H
MOV AH,02H
MOV DL,BL
INT 21H
MOV AX, 4C00h ; exit to operating system.
INT 21h
START ENDP
CSEG ENDS
END START ; set entry point.