Created
June 19, 2014 16:59
-
-
Save mr-fool/d8cc724137684a4afd54 to your computer and use it in GitHub Desktop.
Division x86 asm tasm syntax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;program that divide 6 by 3 | |
.model small | |
.stack 200h | |
.code | |
Start: | |
mov ax,6 ;preparing the dividend | |
mov dx,0 ;zero extension | |
mov cx,3 ;preparing the divisor | |
div cx ;divides AX by CX, with quotient being stored in AX, and remainder in DX | |
mov ah, 4ch ;preparing exit call | |
mov al,00h ; preparing exit call | |
int 21h ; exit call | |
End Start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment