0x4248

_

0x4248

Close window

What language is it?

The code that you saw it written in Assembly for ARM64 linux and the code is a simple hello world like program printing my username.

Explanation of the code

.section .data
    msg:
        .ascii \"0x4248\\n\" // The string to print
        len = . - msg        // Len is the length of the string in bytes

.section .text
    .globl _start            // The entry point of the program

_start:
    mov x0, 1               // File descriptor 1 is stdout    
    ldr x1, =msg            // Load the address of the string into x1
    ldr x2, =len            // Load the length of the string into x2
    mov x8, 64              // syscall number for write
    svc 0                   // Make the syscall
    mov x8, 93              // syscall number for exit 
    mov x0, 0               // Exit status 0
    svc 0                   // Make the syscall
            

How to compile and run the code

To compile the code you will need to have a cross compiler for ARM64 linux installed on your system. You can get one from here. Once you have the compiler installed you can compile the code with the following command:

aarch64-linux-gnu-as -o hello.o hello.s
aarch64-linux-gnu-ld -o hello hello.o

Once you have compiled the code you can run it with the following command:

qemu-aarch64 hello

And you should see the output:

0x4248

More information

Close window

Code stats

Here are some stats from wakatime and github (Note that the stats are not 100% accurate):

Wakatime stats GitHub stats

Links

Welcome to my github page

Here you will find all my projects, experiments and contributions to the open source community. Almost of all my projects are open source and on github, so feel free to check them out.

Good job if you know what language and architecture (Click for more info) this is written in (and it does work):


            

Projects

You can view all my projects on my github page or on AppCenter which is a site that shows all my projects in a more organized way.

Blog

I have a blog here where I post about things I find interesting or things I have been working on.


Languages

Here are some of the languages I know (Click for more info):


Tools

Here are some of the tools I use:

Editors

Here are some of the editors I use:

Operating Systems

I primarily use macOS and Linux, I use to use Windows but I don't use it any more due to privacy concerns

Linux distros I use

Im mainly a debian based guy but I also use alpine linux sometimes for like containers and stuff:


Useful links

Here are some useful links that I use:

OS Development

Linux Kernel

Python

Web Development

C

C++

Java

JavaScript