Está en la página 1de 1

;Compilar : nasm -f elf div1.

asm
;Enlazar : ld -m elf_i386 -s -o div1 div1.o io.o
;Ejecutar : ./div1

%include "io.mac"

section .data
strA: db "Ingrese el 1er valor: ",0
strB: db "Ingrese el 2do valor: ",0
strResult: db "EL resultado de la division (cociente) es ",0

section .text
global _start:
_start:
PutStr strA
GetLInt eax
PutStr strB
GetLInt ebx

operacion:
div ebx
PutStr strResult
PutLInt eax
nwln

mov ax,1

int 80h

También podría gustarte