GNU/Linux xterm-256color bash 172 views

**
Nombre: carita.s
Autor: Karla Itzel Vázquez Cruz
Fecha: 07-04-2025
Descripción: Imprime una carita feliz en consola
Plataforma: Raspberry Pi OS 64-bit
Asciinema: https://asciinema.org/a/712680
**

Versión en C:

printf(":)
");

Versión en ARM64 RaspbianOS Linux:

.global _start

.section .data

carita: .asciz ":)
"

.section .text

_start:
    // Mostrar carita
    mov x0, #1          // file descriptor (stdout)
    ldr x1, =carita     // dirección del string
    bl strlen           // calcular longitud (devuelve en x0)
    mov x2, x0          // longitud en x2
    mov x0, #1          // stdout
    mov x8, #64         // syscall write
    svc 0

    // Salir del programa
    mov x8, #93
    mov x0, #0
    svc 0

// ------------------------------------------------
// strlen(x1) → x0 (devuelve la longitud del string)
// ------------------------------------------------
strlen:
    mov x0, #0
.loop:
    ldrb w2, [x1, x0]
    cbz w2, .done
    add x0, x0, #1
    b .loop
.done:
    ret

More recordings by Itzel

Browse all

CELSIUS A FAHRENHEIT 2:14

by Itzel

MULTIPLICAION 3:24

by Itzel

untitled 2:38

by Itzel

MAYUSCULAS A MINISCULAS 1:02

by Itzel