diff --git a/codeGeneration/src/prog8/codegen/target/cpu6502/codegen/BuiltinFunctionsAsmGen.kt b/codeGeneration/src/prog8/codegen/target/cpu6502/codegen/BuiltinFunctionsAsmGen.kt index f70e6b157..3c651c0a1 100644 --- a/codeGeneration/src/prog8/codegen/target/cpu6502/codegen/BuiltinFunctionsAsmGen.kt +++ b/codeGeneration/src/prog8/codegen/target/cpu6502/codegen/BuiltinFunctionsAsmGen.kt @@ -97,6 +97,7 @@ internal class BuiltinFunctionsAsmGen(private val program: Program, private val "peekw" -> funcPeekW(fcall, resultToStack, resultRegister) "peek" -> throw AssemblyError("peek() should have been replaced by @()") "pokew" -> funcPokeW(fcall) + "pokemon" -> { /* meme function */ } "poke" -> throw AssemblyError("poke() should have been replaced by @()") "push", "pushw" -> funcPush(fcall, func) "pop", "popw" -> funcPop(fcall, func) diff --git a/compilerInterfaces/src/prog8/compilerinterface/BuiltinFunctions.kt b/compilerInterfaces/src/prog8/compilerinterface/BuiltinFunctions.kt index f9858c2f4..2fc45e937 100644 --- a/compilerInterfaces/src/prog8/compilerinterface/BuiltinFunctions.kt +++ b/compilerInterfaces/src/prog8/compilerinterface/BuiltinFunctions.kt @@ -141,6 +141,7 @@ private val functionSignatures: List = listOf( FSignature("peek" , true, listOf(FParam("address", arrayOf(DataType.UWORD))), DataType.UBYTE), FSignature("peekw" , true, listOf(FParam("address", arrayOf(DataType.UWORD))), DataType.UWORD), FSignature("poke" , false, listOf(FParam("address", arrayOf(DataType.UWORD)), FParam("value", arrayOf(DataType.UBYTE))), null), + FSignature("pokemon" , false, listOf(FParam("address", arrayOf(DataType.UWORD)), FParam("value", arrayOf(DataType.UBYTE))), null), FSignature("pokew" , false, listOf(FParam("address", arrayOf(DataType.UWORD)), FParam("value", arrayOf(DataType.UWORD))), null), FSignature("pop" , false, listOf(FParam("target", ByteDatatypes)), null), FSignature("popw" , false, listOf(FParam("target", WordDatatypes)), null), diff --git a/docs/source/programming.rst b/docs/source/programming.rst index 24f88173e..481211709 100644 --- a/docs/source/programming.rst +++ b/docs/source/programming.rst @@ -896,6 +896,10 @@ poke(address, value) pokew(address, value) writes the word value at the given address in memory, in usual little-endian lsb/msb byte order. +pokemon(address, value) + Attempts to write a byte to a ROM at a location in machine language monitor bank. + Doesn't have anything to do with a certain video game. + push(value) pushes a byte value on the CPU hardware stack. Lowlevel function that should normally not be used.