Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dosseg
- .model small
- .stack 100h
- .data
- K equ 616h
- A dd 12345678h
- B dw 5678h
- C dw 7654h
- D db 10h
- E db 77h
- X dd 00h
- R1 dw 00h
- R2 dw 00h
- .code
- start:
- mov ax, @data
- mov ds, ax
- ; A/B
- mov ax, word ptr[A]
- mov dx, word ptr[A+2]
- div B
- mov R1, ax
- ;D*E
- xor ax, ax
- mov al, D
- mul E
- mov R2, ax
- ; C2-R2
- mov ax, C
- sbb ax, R2
- adc ax, K
- add ax, R1
- mov word ptr[X], ax
- mov ah, 4ch
- int 21h
- end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement