in

How to read or write an I/O port in arm64?


I was trying to write one byte to an I/O port, but I am failing finding the correct instructions in the instruction set of arm64 aarch64 architecture.

To do the same thing in i386, I’d do something of similar:

void dbg_io_write_8(uint16_t port, uint8_t val)
{
    asm volatile (
        "outb    %%al, %%dx;"
        /* Outputs  */ : /* None */
        /* Inputs   */ : "a" (val), "d" (port)
        /* Clobbers */ : /* None */
        );
}

And, for reading:

uint8_t dbg_io_read_8(uint16_t port)
{
    uint8_t val;

    asm volatile (
        "inb     %%dx, %%al;"
        /* Outputs  */ : "=a" (val)
        /* Inputs   */ : "d" (port)
        /* Clobbers */ : /* None */
        );

    return val;
}



Source: https://stackoverflow.com/questions/70538526/how-to-read-or-write-an-i-o-port-in-arm64

Create a platform for visually challenged individuals to make use of their smart phones

every time i try to deploy my discord bot to heroku i get this error?