Ir al contenido principal

materiales



Unidad 1


























Comentarios

  1. section .text
    global _start ;must be declared for using gcc
    _start: ;tell linker entry point
    mov edx, len ;message length
    mov ecx, msg ;message to write
    mov ebx, 1 ;file descriptor (stdout)
    mov eax, 4 ;system call number (sys_write)
    int 0x80 ;call kernel
    mov edx, len1 ;message length
    mov ecx, msg1 ;message to write
    mov ebx, 1 ;file descriptor (stdout)
    mov eax, 4 ;system call number (sys_write)
    int 0x80 ;call kernel
    mov eax, 1 ;system call number (sys_exit)
    int 0x80 ;call kernel

    section .data

    msg db 'Hello, world!',0xa ;our dear string
    len equ $ - msg ;length of our dear string
    msg1 db 'aquí estoy ahora',0xa ;our dear string
    len1 equ $ - msg1 ;length of our dear string

    ResponderEliminar
  2. section .text
    global _start
    _start:
    mov edx,2
    mov ecx,choice
    mov ebx,1
    mov eax,4
    int 0x80
    mov ecx,choice1
    mov eax,4
    int 0x80
    mov eax,1
    int 0x80

    section .data
    choice DB 'ab'
    choice1 DB 'cd'

    ResponderEliminar

Publicar un comentario

Entradas populares de este blog

                   ¡¡Bienvenidos al curso septiembre - diciembre 2020  !!