programas

org 100h

call inicializar
call divaxbx
hlt; terminar proceso

inicializar:
mov ax, 203
mov bl, 4
ret

divaxbx:
div bl
ret
----------------------------------------------------------------------
ORG 100h;

CALL p1;

ADD AX,1

RET ;

p1:
MOV AX,1234
RET;
----------------------------------------------------------------
;ORG 100h

;mov al, 254; al=254
;mov bl, 1
;add al,bl

;ret
   
; desbordamiento del registro bandera CF con multiplicacion
;ORG 100h

;mov al, 254
;mov bl, 2
;mul al

;ret 

; desbordamiento del registro bandera CF con divicion
ORG 100h

mov al, 254
mov bl, 2
div bl

ret
---------------------------------------------------------
;registro bandera SF, toma el valor 1 cuando el resultado es negativo
ORG 100h
mov al, 2
mov bl, 3
sub al,bl

ret
-----------------------------------------------------
ORG 100h

mov al, 100
mov bl, 50
add al,bl

ret

Comentarios

Entradas populares de este blog

Ejercicios con funciones emu8086

Uso de INT 21h en ej. Limpiar Pantalla.

Sintaxis del lenguaje ensamblador