Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org directive isn't highlighted in 'asm' lexer #335

Open
Selorax opened this issue Jan 11, 2023 · 2 comments
Open

org directive isn't highlighted in 'asm' lexer #335

Selorax opened this issue Jan 11, 2023 · 2 comments

Comments

@Selorax
Copy link

Selorax commented Jan 11, 2023

'org' is the directive of the assembly language to tell the assembler that next code will be loaded at a specific address in memory.

@Selorax
Copy link
Author

Selorax commented Jan 11, 2023

Also, a question, is it possible to highlight assembly labels and constants defined with EQU in the current file?

Though that would make lexer dynamic in a sense, as in, what it highlights depends on the content of opened file. You might also want to add definitions from include files, but that's going to be another level.

However it would let the user easily spot mistypes such as

print_string EQU 0F809h
exit EQU 0F800h
org 100h
	jmp satrt:
hello_world_string:
	db "Hello, world!", 10, 0
start:
	mov a, hello_wrld_string
	call priint_string
	call exit

@orbitalquark
Copy link
Owner

orbitalquark commented Jan 11, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants