Giter Site home page Giter Site logo

Do you support custom opcodes? about dasm HOT 4 OPEN

GZYangKui avatar GZYangKui commented on June 12, 2024
Do you support custom opcodes?

from dasm.

Comments (4)

GrantMTG avatar GrantMTG commented on June 12, 2024

Define Constant Byte doesn't work for you?

from dasm.

GZYangKui avatar GZYangKui commented on June 12, 2024

I have defined a constant with a value equal to $55 in my emulator, which is a debugging instruction. Then, when I embed this constant into the program and compile using dasm, the following error will occur:

BMAN. s (8): error: Unknown Mnemonic 'DEBUG'
BMAN. s (18): error: Unknown Mnemonic 'DEBUG'

DEBUG EQU $ff
RESET:
SEI; Reset PPU Disable NMI, turn off background and sprites
LDA # 0
STA PPU_ CTRL_ REG2
STA PPU_ CTRL_ REG1
CLD; The NES 6502 CPU has no BCD mode, reset the flag just in case
LDX # $FF; Set the stack pointer to the initial position
TXS
DEBUG

from dasm.

neilsf avatar neilsf commented on June 12, 2024

from dasm.

GrantMTG avatar GrantMTG commented on June 12, 2024

A macro is nice and clean, but you shouldn't need it for one line. Just use the equate and make sure the DC.B is not in coilumn 1.

DEBUG EQU is not the same and DC.B.

Assuming DEBUG isn't a reserved word

DEBUG EQU $FF

DC.B DEBUG

would also work. Whichever you prefer.

from dasm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.