Skip to content

Instantly share code, notes, and snippets.

@mr-fool
Created June 19, 2014 16:59
Show Gist options
  • Save mr-fool/d8cc724137684a4afd54 to your computer and use it in GitHub Desktop.
Save mr-fool/d8cc724137684a4afd54 to your computer and use it in GitHub Desktop.
Division x86 asm tasm syntax
;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