1

What would the equivalent nasm would be in windows without using any libraries?

section .text
   global _start

_start:          
   mov  edx,len  
   mov  ecx,msg  
   mov  ebx,1    
   mov  eax,4  
   int  0x80 

   mov  eax,1  
   int  0x80    

section .data
msg db 'Hello, world!', 0xa 
len equ $ - msg

I read that _start is replaced with _main in windows but what about the system call? I found this table but im not sure which register gets what argument:

http://j00ru.vexillium.org/syscalls/nt/32/

Im especially confused about how to understand the system calls in windows because in linux its really clear what to do:

https://syscalls.kernelgrok.com/

The documentation for windows assembly, especially the system calls seems really really poor.

ColinE
  • 68,894
  • 15
  • 164
  • 232
Asperger
  • 3,064
  • 8
  • 52
  • 100

0 Answers0