Re: HP-41 MCODE: Making an MCODE program call another MCODE program Message #2 Posted by Eric Smith on 12 Jan 2008, 9:18 p.m., in response to message #1 by Geir Isene
Usually by the long "gosub" instruction (HP mnemonic, "?NC XQ" user community mnemonic) instruction, provided that the previous instruction couldn't set the carry flag.
To do a subroutine call in a ROM that isn't at a fixed address, you need to use a mainframe ROM subroutine to do a "port-dependent" call.
To call a subroutine within the same 1K portion of the ROM, do
a long gosub to 0FDD, followed by a ten-bit constant for the low
ten bits of the target address.
To call a subroutine in a different 1K portion, call 23D2, 23DB, 23E4, or 23ED for the 1st through 4th 1K portions, also followed by the ten-bit constant.
|