settis / dasm-vscode Goto Github PK
View Code? Open in Web Editor NEWdasm vscode plugin
License: MIT License
dasm vscode plugin
License: MIT License
Show error for unknown mnemonic or use non proper addressing modes.
DASM has an upcode RORG for relocatable origins and REND for end of this relocatable origin.
These upcodes are not included in this extension
Comments before the macros is autodoc
Basic error check.
For example, you can use macros and library internal variables starting with "_" and hide them from your source code.
now it's ignored
When I use a label as macro argument, I want ot see its definition.
For example in case of typing the first parameter for macro:
MACROS_NAME , SECOND_ARG
Or maybe it's an issue with snippets integration.
This code must not produce an error
processor 6502
org $200
FOO SET 1
MACRO SOME_JMP
JMP SOME_,FOO
ENDM
MACRO SOME_LABEL
SOME_,FOO
ENDM
SOME_JMP
SOME_LABEL
I have a structure like this:
entry.asm
constants.asm
code.asm
entry.asm
:
include constants.asm
include code.asm
constants.asm
:
SOME_CONST EQU $0001
code.asm
:
LDA SOME_CONST ; doesn't know SOME_CONST (label is not defined)
This would build by dasm, but would give errors by this extension
Steps to reproduce:
FOO_bar:
JMP FOO_bar
FOO_bar
variableGoto doesnt work if the label or macro is defined in a different file, even if that file is open
Let's say we have
./main.asm:
INCDIR "lib"
INCLUDE "macro.asm"
FOO
./lib/macro.asm
MAC FOO
INCLUDE "inc.asm"
ENDM
./lib/inc.asm
NOP
While we resolving include inside macros we need to keep all incdir.
echo [exp]d
Like when I type CMP IN,X
I have autocompletion for X started variables.
Check label usage, unique.
Go to definition, references.
Subroutine support.
Apply them and check
Right now it's possible to have labels only on start of multiline directive.
It doesn't match the documentation.
It must be just "ROL"
This code produces an error:
processor 6502
org $200
MAC IF_EQ
ENDM
IF_EQ
But it is correct
Like when I type LDA #$FF
In doc # 6.
IF SOME=3
ENDIF
In docs # 6.7.6
lda #$00 ; Redundant input, expecting EOF but found: #parser
lda #$00 ; working correctly
MACRO ABC
lda #0 ; Redundant input, expecting EOF but found: MACROparser
ENDM
MACRO ABC
lda #0 ; working correctly
ENDM
This is a valid code, but it gives the "Label is not defined" error for FOO_CONST
:
processor 6502
org $200
MAC CREATE_CONST
DEFINE_CONST {1}_CONST, {2}
ENDM
MAC DEFINE_CONST
{1} = {2}
ENDM
CREATE_CONST FOO, 50
LDA #FOO_CONST
keywords, labels, comments
This snippet is correct and must not produce any errors:
; Use a dynamic label inside a macro
N SET 0 ; instance number
MAC dynm ; {1}= base name
{1},"_",N ; define label using {1} and instance #
N SET N +1
ENDM
dynm fna
jmp fna_0 ; OK
dynm fna
jmp fna_1 ; OK
I = 1
TMP SET fna_,I
jmp TMP
Those two lines are valid and must not produce an error
include "foo.asm"
include foo.asm
How do I use include with this plugin, as I am working on a project, where include is succesfully used, but this extension doesnt find the files. the project can be build correctly, however, all includes are ignored due to errors, causing many more errors to appear.
I dont know if this has something to do with how I use include, but seeing as dasm can build the project without a problem, I assume I am doing it correctly
Whether I use include file.asm
or include "file.asm"
, it gives errors. both build fine
include file.asm
gives the error: Redundant input, expecting EOF but found: .asm
parser
include "file.asm"
gives the error: The file is not resolvable
Where is it searching for the files to include, and why does it need to be a string
Include directives support
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.