That assembly is for a DOS application. It would be more verbose for a modern Linux or Win32 application and probably require a linker script.
But python turns that cute little line up top, into that mess at the bottom.
Technically, not quite. Python is interpreted, so it’s more like “call the print function with this string parameter” gets fed into another program, which calls it’s own functions to make it happen.
That assembly is for a DOS application. It would be more verbose for a modern Linux or Win32 application and probably require a linker script.
Technically, not quite. Python is interpreted, so it’s more like “call the print function with this string parameter” gets fed into another program, which calls it’s own functions to make it happen.
This is what gcc 13.2.0 makes of it in Linux:
So basically just loading the string and calling ‘printf’ from the libc.