Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>PIC18 Assembly LanguageNew to Visual Studio Code? Get it now.
PIC18 Assembly Language

PIC18 Assembly Language

ChuangChih-Hao

|
201 installs
| (1) | Free
Language support for PIC18 assembly
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PIC18 Assembly Language

Developed exclusively for PIC18F4520. Other devices are not validated.

為 Visual Studio Code 提供簡易的 PIC18 系列組合語言支持。

Provides basic PIC18 assembly language support for Visual Studio Code.

目錄 (Contents)

  • 特色 (Features)
  • 設定 (Settings)
  • 已知問題 (Known Issues)
  • 代辦事項
  • 功能演示 (Demo)

設定 (Settings)

設定 (Setting) 說明 (Description) 預設 (Default)
pic18-assembly.assembler 選擇使用的組譯器方言:mpasm(舊版 MPASM)或 xc8(MPLAB XC8 隨附的 pic-as)。Directive 補全、SFR 定義值與相容性診斷都會依此切換。(Select the assembler dialect; directive completions, SFR definition values and compatibility diagnostics follow this setting.) xc8
pic18-assembly.diagnostics.assemblerCompatibility 使用到另一個組譯器專屬的 directive 時發出警告。(Warn when a directive of the other assembler dialect is used.) true
pic18-assembly.documentation.includeTraditionalChinese 指令文件是否附上繁體中文翻譯。(Append Traditional Chinese translation to instruction documentation.) true
pic18-assembly.exclude 額外排除索引的 glob 樣式。(Additional glob patterns excluded from indexing.) []
pic18-assembly.projectScope 多根工作區的分組方式:folder(每個資料夾各自為獨立專案,符號互不可見)或 workspace(所有資料夾共用同一份索引)。(How a multi-root workspace is grouped into projects for symbol resolution and diagnostics.) folder
pic18-assembly.memoryInspector.memorySpaces 記憶體檢視器可選的記憶體空間,會組成 <space>:<address> 形式的 DAP memory reference。實際可用的名稱由除錯轉接器決定。(Memory spaces offered by the memory inspector.) ["ram","program","sfr"]
pic18-assembly.memoryInspector.spaceDefaults 切換記憶體空間時套用的預設值(mauBytes / groupSize / length / mausPerRow)。未列出的空間會退回 1 / 1 / 256 / 16。(Per-space defaults applied when switching memory space.) 見設定說明
pic18-assembly.memoryInspector.debugTypes 記憶體檢視器會讀取的除錯工作階段類型。(Debug session types the memory inspector reads from.) ["mplab-core-da"]
pic18-assembly.sfrView.readMethod SFR 檢視定位與讀取方式:auto(先探索位址再以區塊讀取)、name(區塊讀取失敗時保留逐一 evaluate 的結果)、address(略過探索,直接用內建位址表)。(How the SFR view locates and reads registers.) auto
pic18-assembly.sfrView.memorySpace SFR 區塊的記憶體空間,僅作為後備;轉接器若回報 memoryReference,以其中的空間為準。(Fallback memory space for the SFR block.) sfr

特色 (Features)

  • 片段範本 Snippets

    • 提供 MPASM 組譯器範本 (Provide MPASM assembler templates)
  • 指令 Instruction

    • 內嵌文檔 (Inline documentation)
    • 自動補全 (Auto completion)
    • 參數提示 (Parameter hints)
    • 語法上色 (Syntax highlighting)
  • 組譯器指示詞 Directive

    • 依組譯器方言的自動補全 (Dialect-aware auto completion)
    • 內嵌文檔 (Inline documentation)
    • 前置處理器補全 (Preprocessor completion)
    • 相容性診斷 (Compatibility diagnostics)
  • 標籤 Label

    • 自動補全 (Auto completion)
    • 自動插入 EXTRN (Auto insert EXTRN)
    • 跨檔索引 (Cross-file indexing)
    • 跳至定義 (Go to Definition)
    • 尋找引用 (Find All References)
    • 語意標記 (Semantic tokens)
    • 衝突偵測 (Conflict diagnostics)
    • 自訂註解 (Custom comments)
    • 語法上色 (Syntax highlighting)
  • 變數(EQU) Variable

    • 自動補全 (Auto completion)
    • 跨檔索引 (Cross-file indexing)
    • 跳至定義 (Go to Definition)
    • 尋找引用 (Find All References)
    • 語意標記 (Semantic tokens)
    • 自訂註解 (Custom comments)
    • 語法上色 (Syntax highlighting)
  • 內部暫存器 Special Function Register

    • 自動補全 (Auto completion)
    • 語法上色 (Syntax highlighting)
  • 巨集 Macro

    • 自動補全 (Auto completion)
    • 跨檔索引 (Cross-file indexing)
    • 跳至定義 (Go to Definition)
    • 尋找引用 (Find All References)
    • 語意標記 (Semantic tokens)
    • 衝突偵測 (Conflict diagnostics)
    • 自訂註解 (Custom comments)
    • 語法上色 (Syntax highlighting)
  • 記憶體檢視器 Memory Inspector

    • 於編輯器分頁開啟唯讀記憶體檢視 (Read-only memory view as an editor tab)
    • 透過 DAP readMemory 讀取除錯工作階段的記憶體 (Reads via the DAP readMemory request)
    • 選擇記憶體空間,如 ram:0x00、program:0x700;切換空間會自動套用該空間的預設值 (Memory space selection with per-space defaults)
    • 可設定起始位址與長度 (Configurable address and length)
    • 每列 MAU 數可選 Auto 或手動指定 (Row length in addressable units: Auto or a fixed count)
    • 可調整 MAU 大小(一個位址涵蓋幾個位元組)、每組 MAU 數與位元組順序 (Adjustable MAU size, MAU per group and byte order)
    • 每組顯示為單一連續數值,小端序時高位址為高位(0x00=F6、0x01=6A 顯示為 6AF6),欄位標題標示該組最小位址(00 02 04 …)(A group is one uninterrupted value, headed by its lowest address)
    • 可切換顯示格式:hex / dec / oct / bin (Switchable display format)
    • 對齊列寬的十六進位位址欄與位元組位移欄位標題 (MPLAB X style layout)
    • ASCII 欄可開關 (Toggleable ASCII column)
    • 數值變更時highlight (Highlight values that changed since the previous read)
    • 捲動時標題列固定,捲軸位於檢視內部 (Pinned header row, scrolling inside the view)
  • 暫存器檢視 SFR View

    • 於編輯器分頁以表格顯示 SFR:位址、名稱、數值 (Table of address, register name and value)
    • 首次讀取以 DAP evaluate 取得各暫存器的 memoryReference(如 sfr:0xFD8)建立位址表,之後每次更新只發一次區塊 readMemory,再依回應位址還原各暫存器數值。位址來自除錯轉接器,因此可適用其他裝置 (Learns addresses from the adapter once, then refreshes with a single block read)
    • 具名位元以子列展開,如 STATUS 下的 N / OV / Z / DC / C (Named bits as expandable sub-rows)
    • 位元子列的位址欄顯示位元編號,且固定依位元順序排列 (Bit rows show the bit number and keep bit order)
    • 點擊 Address / Register 欄位標題即可排序,再點一次反向(只排序父暫存器)(Click a column header to sort, click again to reverse)
    • 數值同時以十六進位、十進位、二進位三欄並列 (Hex, decimal and binary shown side by side)
    • 搜尋列可依暫存器名、位元名或位址搜尋(F80 或 0xF80)(Search by register name, bit name or address)
    • 「Only changed」可只列出與上次讀取相比有變動的暫存器 (Show only registers whose value changed)
    • 捲動時標題列固定,捲軸位於檢視內部 (Pinned header row, scrolling inside the view)
    • 數值變更時highlight (Highlight values that changed since the previous read)
  • 疑難排解 Troubleshooting

    • 指令 PIC18 Assembly: Show Log 開啟 "PIC18 Assembly" 輸出頻道,內含所有 DAP 往返記錄,可直接匯出回報 (Output channel logging every DAP exchange)

已知問題 (Known Issues)

  • 暫無

代辦事項 (Todo)

  • 支援使用 Macro 時的參數分析 (Support parameter parsing when using Macros)

功能演示 (Demo)

Demo

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft