This is the solution for real mode, DOS (required to use
, which is the DOS "system call"): http://montcs.bloomu.edu/Code/Asm.and.C/Asm.Nasm/hello-in-assembly.shtml
If this is not it, please provide further detail on your platform; please see my comment to the question.
You could do a lot of calculations based on just the CPU model information and memory model used (for Intel, for example), in a way agnostic to the platform, but you cannot do it if I/O is involved, such as screen output. For example, the code referenced above won't work in Windows/*NIX and the like, unless you use some kind of emulator of virtual PC solution. With DOS, for example, you could use either use the system service software interrupt "call", or directly access video memory in its text or video mode. Both ways would depend on platform information.
This is not your first question on assembly programming, but you still did not provide comprehensive information.