Nuevas NORMAS para el foro

Curso Hacker
Bienvenido(a), Visitante. Favor de ingresar o registrarse.
¿Perdiste tu email de activación? - Agosto 21, 2008, 05:15:50
Boton Buscar
Inicio Ayuda Ingresar Registrarse
Visita: Articulos - Juegos Gratis - Da Foros

Comunidad Underground Hispana  |  Programacion  |  Programación  |  ASM (Moderador: The Shadow)  |  Tema: [W] suma de 2 numeros 0 Usuarios y 1 Visitante están viendo este tema. « anterior próximo »
Páginas: [1] Ir Abajo Imprimir
Autor Tema: [W] suma de 2 numeros  (Leído 1288 veces)
Kornas
Recien Llegado
*
Desconectado Desconectado

Mensajes: 3


Ver Perfil Email
« en: Julio 06, 2005, 11:07:40 »

hola, quiero sumar 2 numeros en asm pero cuando muestro el resultado "Se HaCe Un relajo", por favor mandenme un codigo fuente de un programas asi, se los agradecere!!!
« Última modificación: Abril 01, 2008, 05:57:42 por The Shadow » En línea
Prosutch
Visitante
« Respuesta #1 en: Julio 07, 2005, 06:48:19 »

mov ax,0002
mov bx,0003
add bx,ax
int 20
WALA!!!
See YoU PrOsUtCh
En línea
miguel91
Visitante
« Respuesta #2 en: Abril 30, 2006, 03:42:49 »

que hace int??
En línea
J@Ker Lo10
Habitual
*****
Desconectado Desconectado

Mensajes: 200


'LA PRimeR @ VivE' J @Ker LOlo

???? ???? ????
Ver Perfil
« Respuesta #3 en: Junio 30, 2006, 01:51:16 »

;//Programa que realiza una suma utilizando macros
;//j @kerLolo Santiago XD


.model small

  putKey Macro
    mov ah,10h ;//servicio 10h
    int 16h    ;//interrupcion maneja entrada/salida del teclado
  endM

  color Macro col
        mov ah, 6
   mov al, 0
   mov bh, col
   mov cx, 0
   mov dh, 24
   mov dl, 80
   int 10h     ;//interrupcion maneja entrada/salida de video
  endM

  endProgram Macro
   mov ax,04c00h
   int 21h    ;//interrupcion diversas fucniones del DOS
  endM

  write Macro variable
    lea dx,variable
    mov ah,09h      ;//09h escribe atributo y caracter en el cursor
    int 21h      ;//interrupcion diversas fucniones del DOS
  endM

  clear Macro
    mov ax,0600h
    mov bh,17h
    mov cx,0000h
    mov dx,184fh
    int 10h   ;//interrupcion maneja entrada/salida del teclado
    mov dx,0000h
  endM

  gotoXY Macro fila,columna
    xor bh,bh
    mov ah,02h ;//servicio de posicion del cursor
    mov dh,fila
    mov dl,columna
    int 10h    ;//interrupcion maneja entrada/salida de video
  endM

  sumar Macro num1,num2
    mov ax,num1
    add ax,num2
    add ax,30h
    mov resultado,ax
  endM

.stack
.data
 titulo db '*** SUMA ***','$'
 resultado dw ?,'$'
.code
     main:
      mov ax, @data
      mov ds,ax

      clear
      gotoXY 18,30
      color 2
      write titulo

      sumar 5,4
      gotoXY 20,36
      write resultado
      putkey
      endProgram
     end main
En línea

El ConoCIMIenTo no lleGA poR si solo,
soLO kE el MEdio pARA oBteNERlo es ..........
Páginas: [1] Ir Arriba Imprimir 
Comunidad Underground Hispana  |  Programacion  |  Programación  |  ASM (Moderador: The Shadow)  |  Tema: [W] suma de 2 numeros « anterior próximo »
Ir a:  


Ranking-Hits
Powered by SMF 1.1.5 | SMF © 2006-2007, Simple Machines LLC