I know that assembly language is usually not cross-platform. And even with things like NASM, you still need different code for different architectures and platforms that have different time series and implementations of things like interrupts. But if someone wanted to program in assembly language because they liked it, is there any implementation of a cross-platform assembly language?
Edit:
How about not an assembly in the traditional sense, but a low-level programming language that is very similar to an assembly?
, MMIX - , . /. . . , - FPGA, . .
LLVM - ( ), AT & T, 10 . :
define i32 @add_sub(i32 %x, i32 %y, i32 %z) { entry: %tmp = add i32 %x, %y %tmp2 = sub i32 %tmp, %z ret i32 %tmp2 }
x86:
; Body mov eax, edi add eax, esi sub eax, edx ret
LLVM llc 3.3 ( - ):
.file "add_sub.ll" .text .globl add_sub .align 16, 0x90 .type add_sub,@function add_sub: # @add_sub .cfi_startproc # BB#0: # %entry lea EAX, DWORD PTR [RDI + RSI] sub EAX, EDX ret .Ltmp0: .size add_sub, .Ltmp0-add_sub .cfi_endproc .section ".note.GNU-stack","",@progbits
:
lea EAX, DWORD PTR [RDI + RSI] sub EAX, EDX ret
, LLVM . , , .
. - , ?
ikegami:
, , , . , , . <
. C , - .
, ( "" ). , C-- " ", .
" " /. -, . , - , .
, , , , , . , - Java, - python, p- pascal .. , , . , , . small-c, . , , , .
, java python , , . , , , , , . , , - . .
, NASM x86. x86 - , , . , , ( ).