0

Background:-

I am trying to make a compiled programming language that uses a python script to generate assembly, assemble it, link it and output an executable for Windows.

The python code generation is good, but it uses C libraries to link the assembly, but I want to create the project more portable and smaller in size.

Hope anyone can guide me through assembly interrupts for input and output operations(Like printf and scanf in C), as the ones on the internet are all about 16-bit interrupts or are for linux.

Thanks in advance!!

  • 1
    [Create an exe file in assembly with NASM on 32-bit Windows](https://stackoverflow.com/questions/37407363/create-an-exe-file-in-assembly-with-nasm-on-32-bit-windows)?? – David C. Rankin Jul 03 '20 at 06:49
  • 2
    Calling ISO C functions is *more* easily portable than using OS-specific system calls. You just have to vary the calling conventions, but the actual high-level APIs are the same. Also, Windows literally does not have a stable `int` or `syscall` ABI for system calls; the call numbers vary by Windows kernel version. The only portable (to different Windows versions) way to use the WinAPI is by calling DLL functions. Unlike for DOS and Linux where there is a stable asm ABI for making system calls directly. – Peter Cordes Jul 03 '20 at 06:56

0 Answers0