macOS Ventura 13.1(22C65) cant run yasm excutable file

161 Views Asked by At

asm file

section .data
    message db 'Hello, World!',0

section .text
    global _start

_start:
    mov eax, 4        ; write syscall number
    mov ebx, 1        ; stdout file descriptor
    mov ecx, qword [message]  ; address of message
    mov edx, 13       ; length of message
    int 0x80          ; invoke syscall

    mov eax, 1        ; exit syscall number
    xor ebx, ebx      ; exit status
    int 0x80          ; invoke syscall

command

  1. yasm -f macho64 hello.asm -o hello
  2. chomd +x
  3. result -bash: ./hello: cannot execute binary file

I am using macOS m1 Ventura 13.1(22C65)

is there any solution

0

There are 0 best solutions below