Skip to content

Commit

Permalink
Add 3.1.0 directives
Browse files Browse the repository at this point in the history
  • Loading branch information
TollyH committed Jan 30, 2024
1 parent dd758c7 commit f44e2f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,12 @@ const mnemonics: { [mnemonic: string]: MnemonicInfo } = {
"PAD": new MnemonicInfo([literalOperands], "Assembler Directives", "## Pad With 0s"),
"DAT": new MnemonicInfo([literalOperands], "Assembler Directives", "## Insert Raw Byte or String"),
"NUM": new MnemonicInfo([literalOperands], "Assembler Directives", "## Insert Raw Quad Word (64-bits, 8 bytes)"),
"IMP": new MnemonicInfo([literalOperands], "Assembler Directives", "## Import File Contents"),
"IMP": new MnemonicInfo([literalOperands], "Assembler Directives", "## Import AssEmbly Source"),
"MAC": new MnemonicInfo([], "Assembler Directives", "## Define Macro\n\n*Note: Macros take two operands, but they can be any arbitrary text, they do not have to be of a defined operand type*"),
"ANALYZER": new MnemonicInfo([], "Assembler Directives", "## Toggle Assembler Warning\n\nFirst operand is one of `error`, `warning`, or `suggestion`.\n\nSecond operand is the numerical code of the message\n\nThe third operand is one of `0`, `1`, or `r`.")
"ANALYZER": new MnemonicInfo([], "Assembler Directives", "## Toggle Assembler Warning\n\nFirst operand is one of `error`, `warning`, or `suggestion`.\n\nSecond operand is the numerical code of the message\n\nThe third operand is one of `0`, `1`, or `r`."),
"MESSAGE": new MnemonicInfo([], "Assembler Directives", "## Manually Emit Assembler Message\n\nFirst operand is one of `error`, `warning`, or `suggestion`.\n\nSecond operand is an optional string to use as the content of the message."),
"IBF": new MnemonicInfo([literalOperands], "Assembler Directives", "## Import Binary File Contents"),
"DEBUG": new MnemonicInfo([], "Assembler Directives", "## Output Assembler State"),
};

const registers: { [name: string]: string } = {
Expand All @@ -187,7 +190,7 @@ const registers: { [name: string]: string } = {
"rg9": "General 9"
};

const directives = ["PAD", "DAT", "NUM", "IMP", "MAC", "ANALYZER"];
const directives = ["PAD", "DAT", "NUM", "IMP", "MAC", "ANALYZER", "MESSAGE", "IBF", "DEBUG"];

function generateMnemonicDescription(mnemonicName: string): vscode.MarkdownString {
let docString = new vscode.MarkdownString();
Expand Down
2 changes: 1 addition & 1 deletion syntaxes/assembly-tolly.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"patterns": [
{
"name": "meta.preprocessor.assembler.mnemonic.assembly-tolly",
"match": "(?i)^[ \t]*(PAD|DAT|NUM|IMP|MAC|ANALYZER)(?= |;|$)"
"match": "(?i)^[ \t]*(PAD|DAT|NUM|IMP|MAC|ANALYZER|MESSAGE|IBF|DEBUG)(?= |;|$)"
},
{
"name": "keyword.control.operation.mnemonic.assembly-tolly",
Expand Down

0 comments on commit f44e2f8

Please sign in to comment.