-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsum&sub.asm
More file actions
52 lines (34 loc) · 719 Bytes
/
Copy pathsum&sub.asm
File metadata and controls
52 lines (34 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
; You may customize this and other start-up templates;
; The location of this template is c:\emu8086\inc\0_com_template.txt
org 100h
; add your code here
MOV AH,1 ;input function
INT 21H
MOV BL,AL
mov ah,2
mov dl,'+'
int 21h
mov ah,1
INT 21H
MOV BH,AL
mov ah,2
mov dl,'-'
int 21h
mov ah,1
INT 21H
MOV CL,AL
ADD BL,BH
SUB BL,CL
MOV AH,2 ;output function
;new line
;MOV DL,0AH
;INT 21H
;MOV DL,0DH
;INT 21H
mov ah,2
mov dl,'='
int 21h
;ans printing
MOV DL,BL
INT 21H
ret