Are Bytecode and Assembly Language the same?

The question may seem strange, but I'm still trying to understand the concepts of virtual machines. I read a few answers, but still fails if Java (and MSIL) bytecode also matches assembly language. As far as I understand, both the bytecode and the assembly are compiled into machine code, therefore, speaking of abstraction, they are on the same level, that is, one step above the machine code. Thus, bytecode is only assembly language, that is, a human-readable form of machine code. If so, why is assembly language still used? Why not programming in bytecode (which is portable on different machines) instead of assembly language (which is typical for one machine architecture)? Thanks

+4
source share
3 answers

No.

Java bytecode is a binary programming language, not a “readable form” unless you consider a bunch of numbers to be read, or you use a disassembler to flip it into text bytecode mnemonics or, ultimately, into the original form Java

, 1:1 , ( , , RISC " " - , , ).

Java-- - CPU, . , - , .


:

JVM , .. - " " . , .

JVM , "JIT" (Just In Time) java-- , , , .class, JIT-, ( ), , .

JVM , . # , , ( - ).

( ) . .

+4

- , . (, x86 ), . ( , Java - asm -, ).

. mov eax, 1234 5 , , . ( , ).

" " (, tag wiki) , , , /.

, java--, , , Java .class JVM. (@Ped7g answer , , JVM Java-- . .)

, .


, . : , (, midnight blue) . ( , ) .

H.264, .

CABAC CAVLC , , . x86, gzipped: .


, , asm, , ( , , ).

C Java , /, .

+2

, , . JAVA - Pythons Pascals, , , , . . , , , , , .

- , , - , , .

JAVA .. , , , . , , CISC, . - , , , ( , , JAVA).

, . , , , . JAVA, , , . , . . , , , ARM Jazelle . ARM Jazelle , , . ARM, , Jazelle , blob ARM, , JVM ( ), ARM Jazelle . , .

Yes, it is a language that is compiled into machine code. This machine code is executed on the machine. The difference is that the machines are not implemented in silicon (like machine code implemented on a micro-encoded processor, (grin)) and probably will not.

+1
source

Source: https://habr.com/ru/post/1652083/


All Articles