As An assembly language implements a symbolic representation of CPU instructions which are independent on OSes while assemblers are always running under some OS, I was wonde
Assembly language has nothing to do with it, you can take your question (how xyz language depends on operating systems) and use C, pascal, ada, fortran, and a long list of other languages and ask the same question with the same answer, the language has nothing to do with it. The system calls into the operating system using the calling convention for the operating system is what matters, IF you are using the same language or a language with the same calling convention as the operating systems definition, that makes life easier but does not lock you into anything. pretty much any language can be used as you likely well know, the standards C, C++, etc as well as the virtual or runtime interpreted, etc java, perl, python, shell script, javascript, etc. They all seem to run on my computer at least. Somewhere (language specific) is a shim that makes the system calls into the operating system in a manner defined by the operating system. Asm makes life easy for some of those languages since you are bound by no rules you can use asm to make that shim between the language calling convention and the operating system call desired. Likewise using asm makes it easy to interface to any calling convention be it language defined or operating system defined.
Also as already answered assembly language is independent of the operating system or any other software running on the cpu. it is tied directly to the cpu's instruction set. Now there is the machine code, the actually bits executed by the processor, those do not change, but the ascii files used to represent those instructions, that language can change but not because of the cpu nor the operating system, those differences have to do with the toolchain. For example x86 att syntax vs intel syntax. Same instruction set, same machine code, different assembly language. and if you look around enough tasm, masm, etc there are many assemblers for x86 and each have their own directives and other toolchain specific nuances.