Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>8052 AssemblyNew to Visual Studio Code? Get it now.
8052 Assembly

8052 Assembly

TechQI

|
141 installs
| (0) | Free
Syntax highlighting and IntelliSense for MCS-51/8051/8052 assembly language.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

简体中文

VSCode 8051/8052 Assembly Language Support

Syntax highlighting and IntelliSense for 8051/8052 assembly language in Visual Studio Code.

Syntax Highlighting

  • 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, R0~R7 and AR0~AR7
    • Indirect addressing: @R0, @R1, @DPTR
    • Relative addressing: @A+PC
    • Indexed addressing: @A+DPTR
    • Invalid @xx patterns highlighted as errors
  • 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.
  • 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
  • Keil proprietary assembly directives
  • Segment definitions and references:
    • Definitions: .area SEGNAME (OPTIONS)
    • References: s_SEGNAME (segment start address), l_SEGNAME (segment length)
    • Parameters: Mutually exclusive options (e.g., ABS/REL together) are marked as errors
  • Address labels:
    • Global labels: name:: highlighted when definition/declaration found in workspace
    • Document labels: name: visible within file only, can be promoted to global via .globl
    • Inside labels: 1000$: scoped between two global/document labels, marked as error if undefined
    • Registers/constants: _SBUF = 0x0099 defined with equals sign

Intelligent Navigation

  • Go to Definition (F12) and Find All References (Shift+F12) for segments
    • On segment definition: Lists all matching segments across the workspace
    • On segment reference: Jumps to the definition in current file if exists; otherwise lists all matching segments
  • Go to Definition (F12) and Find All References (Shift+F12) for address labels
    • Search order: local definition → local declaration → workspace definition → workspace declaration
    • Global labels and registers/constants support cross-file navigation
    • Inside labels are searched within current scope only

Installation

From Marketplace

  1. Open Visual Studio Code
  2. Press Ctrl+Shift+X (or Cmd+Shift+X on Mac) to open Extensions view
  3. Search for "8052 Assembly" or "asm8052"
  4. Click Install

From VSIX File

  1. Download the .vsix file from Releases
  2. Open Visual Studio Code
  3. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) to open Command Palette
  4. Type "Extensions: Install from VSIX..." and select it
  5. Choose the downloaded .vsix file

License

Licensed under the Apache License 2.0.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft