Jump to content
  • entries
  • comments
  • views

Edit Mode rev 2



I made some more changes to the Edit Mode file and am pretty happy with how it works. All the 6502 opcodes1 mnemonics highlight as keyword1, DASM commands as keyword2 and the constants for all the Atari specific variabels as keyword 3. Numbers correctly highlight for hex using $ format and binary with %. I included octal rules, though I don't know if DASM supports octal or not. Numbers starting with 0 are traditionally considered octal so 012 = $0A = 10.This will probably be it on jEdit for a while so I can get back to documenting Warlords.





1 opcodes are the numeric values of the instructions that the assembler converts the mnemonics to. A single mnemonic can represent multiple opcodes, which opcode can be derived by the addressing mode. For the Immediate Mode instruction LDA #50, the mnemonic LDA is converted to $A9. For the Absolute,X Mode instruction LDA $4000,X, the mnemonic is converted to $BD.






Recommended Comments

One thing I did with Textpad is color-code the 6502 commands by classification. So, for instance, store operations would be red. Read operations would be green. NOPs are white. Things like that. It might be useful when scanning code to visually see where all the reads, writes, and branches are based on the colors.

Link to comment

That's a slick idea. jEdit has support for 4 different keyword token types. I've currently set them up as keyword1 for 65xx opcodes, keyword2 for DASM psuedo-ops and keyword3 for VCS constants such as VSYNC. I'll have to see if I can change DASM and VCS to use a different token type.

Link to comment
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...