Syntax highlighting and IntelliSense for 8051/8052 assembly language in Visual Studio Code.
- Comments starting with semicolon (
;) - Double quotation mark (
") strings (with escape character recognition) - Numbers in various bases
- Hexadecimal (case-insensitive)
- Binary numbers are case-insensitive and support segmentation with underscores (
_), i.e.,0b1010_0101 - Decimal excludes numbers ending with
$(reserved for inside jump labels) - A single character enclosed in single quotation marks (
') is also treated as a number
- 8051/8052 assembly language mnemonics
- Common built-in registers:
- Only supports
A,ACC,AB,B,C,DPH,DPL,DPTR,PSW,SP,R0R7andAR0AR7
- Only supports
- Common assembly directives:
- Data definition:
.org,.db,.dw,.ds,.equ,.set,.end,.include, etc. - Conditional compilation:
.if....else....endif, etc. - Macro definition:
macro...endm, etc. - Repetitive iteration:
rept...endr,irp,irpc, etc.
- Data definition:
- SDCC proprietary assembly directives:
- Segments and symbol declaration:
.module,.area,.globl, etc. - Flow control extensions:
iff,ift,iftf,ifxx, etc. - Full directive reference: asmlnk.txt
- Segments and symbol declaration:
- Keil proprietary assembly directives
- Open Visual Studio Code
- Press
Ctrl+Shift+X(orCmd+Shift+Xon Mac) to open Extensions view - Search for "8052 Assembly" or "asm8052"
- Click Install
- Download the
.vsixfile from Releases - Open Visual Studio Code
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) to open Command Palette - Type "Extensions: Install from VSIX..." and select it
- Choose the downloaded
.vsixfile
Licensed under the Apache License 2.0.