13.07.2015 Views

Mountain Computer ROMPlus+ Operating Manual

Mountain Computer ROMPlus+ Operating Manual

Mountain Computer ROMPlus+ Operating Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 3ADVANCED PROGRAMMERS INFORMATIONCHIPCALLSTALDXLDATAXLDAORAPHAANDORASTACHIPNUMMSLOT$638,XCONTROL,X11$08II$F8CHIPNUMCONTROL,XAt this point, we are now on the other ROM.specified by Y.CALLSUBSUBTABLELDASTALDASTAJSRPLASTARTSJMPDADAIt is necessary for thisaddresses on the two ROMs.may be located anywherepossible memory conflicts.of $1 and $2.SUBTABLE,XSUBADDRSUBTABLE+1,ySUBADDR+1CALLSUBCONTROL,X(SUBADDR)SUB1StJB2:save ROM number:get $CN:get $NO:x contains value $NO:get control word:turn on activate bit 3:save so we can restorelater:set ROM number to zero:or in new ROM number:write to control wordCall routine:get low byte of address:and store here:get high byte of address:and store here:indirect subroutine call:return, get old state:restore old ROM:return out of this routine:indirect jump to routine:table of routine addresses:low byte first, high bytesecondroutine to be located at identicalOtherwise it will not work~-SUBADDRin memory as long as there are noWe recommend the page zero addressesThe program "CHIPCALLw is a subroutine, and should be called withthe "JSR" instruction. Before you call the subroutine, set upthe "A" and "Y" registers. The value of the X register must bepreserved.3-7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!