2023-12-27 09:30:39 +00:00
|
|
|
---
|
|
|
|
tags:
|
|
|
|
- dev
|
|
|
|
---
|
2023-05-20 01:33:56 +01:00
|
|
|
## Machine Code
|
|
|
|
- Machine language instructions
|
2023-05-31 22:51:45 +01:00
|
|
|
- Directly control [CPU](Processors.md)
|
2023-05-20 01:33:56 +01:00
|
|
|
- Strictly numerical
|
|
|
|
- Lowest-level representation of a compiled or assembled program
|
|
|
|
- Lowest-level visible to programmer
|
|
|
|
- Internally microcode might used
|
|
|
|
- Hardware dependent
|
|
|
|
- Higher-level languages translated to machine code
|
2023-05-31 22:51:45 +01:00
|
|
|
- [Compilers](Compilers.md), assemblers and linkers
|
2023-05-20 01:33:56 +01:00
|
|
|
- Not for interpreted code
|
|
|
|
- Interpreter runs machine code
|
2023-05-31 22:51:45 +01:00
|
|
|
- [Assembly](Languages/Assembly.md) is effectively human readable machine code
|
2023-05-20 01:33:56 +01:00
|
|
|
- Has mnemonics for opcodes etc
|
|
|
|
|
|
|
|
## Microcode
|
|
|
|
- Layer between CPU hardware and instruction set architecture
|
|
|
|
- Normally written during design phase
|
|
|
|
- Deployed to ROM or PLA
|
|
|
|
- Programmable logic array
|
|
|
|
- Machine code often has some backward compatibility
|
|
|
|
- Microcode is circuit specific
|
|
|
|
|
|
|
|
## Byte Code
|
|
|
|
Portable Code
|
|
|
|
- Efficient execution by interpreter
|
|
|
|
- Compact numeric codes, constants and references
|
|
|
|
- Encode compiler output following analysis and validation
|
|
|
|
- Can be further compiled
|
2023-05-31 22:51:45 +01:00
|
|
|
- [Compilers](Compilers.md#JIT)
|
2023-05-20 01:33:56 +01:00
|
|
|
- Typically passed to VM
|
2023-05-31 22:51:45 +01:00
|
|
|
- Java, [Python](Languages/Python.md)
|
2023-05-20 01:33:56 +01:00
|
|
|
|
|
|
|
## Object Code
|
|
|
|
- Product of compiler
|
|
|
|
- Sequence of statements
|
|
|
|
- Machine code
|
|
|
|
- Intermediate
|
|
|
|
- RTL
|
|
|
|
- Linked to form executable
|
|
|
|
- Object code portion of machine code not yet linked
|