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

65CE02 JSR incorrect Assmbly #116

Closed
oziphantom opened this issue Jun 23, 2021 · 1 comment
Closed

65CE02 JSR incorrect Assmbly #116

oziphantom opened this issue Jun 23, 2021 · 1 comment

Comments

@oziphantom
Copy link

On a Mega65, so 65CE02 target, Given

void EnterMonitor() {
	asm {
		pha
		lda #$f8 
		tsb $d030  //enable ROM
		pla
		jsr (BRKHandlerSave)
		lda #$f8 
		trb $d030 //disable ROM
	}
}

one gets

FATAL: Cannot assemble an unknown opcode (JSR,IndexedZ)
Exception in thread "main" java.lang.AssertionError: Cannot assemble an unknown opcode (JSR,IndexedZ)
        at millfork.error.ConsoleLogger.fatal(ConsoleLogger.scala:94)
        at millfork.output.MosAssembler$.opcodeFor(MosAssembler.scala:307)
        at millfork.output.MosAssembler.emitInstruction(MosAssembler.scala:60)
        at millfork.output.MosAssembler.emitInstruction(MosAssembler.scala:19)
        at millfork.output.AbstractAssembler.$anonfun$outputFunction$1(AbstractAssembler.scala:850)
        at millfork.output.AbstractAssembler.$anonfun$outputFunction$1$adapted(AbstractAssembler.scala:805)
        at scala.collection.immutable.List.foreach(List.scala:392)
        at millfork.output.AbstractAssembler.outputFunction(AbstractAssembler.scala:805)
        at millfork.output.AbstractAssembler.$anonfun$assemble$51(AbstractAssembler.scala:447)
        at millfork.output.AbstractAssembler.$anonfun$assemble$51$adapted(AbstractAssembler.scala:439)
        at scala.collection.immutable.List.foreach(List.scala:392)
        at millfork.output.AbstractAssembler.$anonfun$assemble$49(AbstractAssembler.scala:439)
        at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:158)
        at millfork.output.AbstractAssembler.assemble(AbstractAssembler.scala:438)
        at millfork.Main$.assembleForMos(Main.scala:295)
        at millfork.Main$.main(Main.scala:105)
        at millfork.Main.main(Main.scala)

which is right, there is no JSR,z but I'm also not using (JSR,z) just (JSR)

@KarolS
Copy link
Owner

KarolS commented Jun 29, 2021

Yeah, 65CE02 support is not complete. I fixed the basic 65CE02 instruction set, but the Mega65 extensions are still a future endeavour.

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

No branches or pull requests

2 participants