-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex2.asm
More file actions
42 lines (38 loc) · 736 Bytes
/
Copy pathex2.asm
File metadata and controls
42 lines (38 loc) · 736 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
;Գրել ծրագիր, որը կկատարի հետևյալ գործողությունները.
;AX = a * 5; BX =b * 15; CL = 4; DL = ( AX + BX ) / CL; DH = ( AX + BX ) % CL; DH--; DL++;
;որտեղ a-ն և b-ն բայթային առանց նշանի փոփոխականներ են, a = 18, b = 3;
.model small
.stack 256
.data
a db 18
b db 3
.code
start:
mov ax,@data
mov ds,ax
mov al,a
mov bx,5
mul bl
mov si,ax
mov al,b
mov bx,15
mul bl
mov di,ax
mov cl,4
add si,di
mov ax,si
div cl
mov dl,al
mov dh,ah
dec dh
inc dl
;Sers es du <3
;du el imm
;mov al,15
;mul b
;mov bl,al
;mov dx,0
mov ah,4ch
mov al,0
int 21h
end start