-
Notifications
You must be signed in to change notification settings - Fork 40
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
Do you support custom opcodes? #145
Comments
Define Constant Byte doesn't work for you? |
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:
|
Define a macro:
MAC DEBUG
DC. B $FF
ENDM
DEBUG
Regards
杨奎 ***@***.***> ezt írta (időpont: 2023. nov. 6., H 3:56):
… 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
—
Reply to this email directly, view it on GitHub
<#145 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABHO446Q5SW6V3MBRD7PKITYDBGWFAVCNFSM6AAAAAA66IEKN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJUGAYDQNJVHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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. |
I am implementing an emulator and would like to customize some exclusive operation codes for the emulator. Do you currently support custom operation codes?
The text was updated successfully, but these errors were encountered: