You are not logged in.
In the Gen 1 games, there's a big array of functions called the "Predef" functions. It's a list of common functions used throughout the game, and the Predef routine allows to you call any of the functions from any ROM bank, which is convenient. However, you can also easily call any function in the ROM by using Bankswitch. I'm not really sure what the advantages and disadvantages of these two methods are. They seem equivalent to me, except Predef has a hard limit on the number of functions it can be used for. Any insights on why one is better than the other? Or should they be used in different situations?
Predefs free up hl and are shorter than Red's 8-byte farcalls.
A better way to handle farcalls would be to use an rst vector as a pseudoinstruction, like so:
farcall: macro rst $30 dw \1 db BANK(\1) endm
Then you can pop off the return address, increment it past the pointer and push it back. This should let you preserve all registers (even a!) and keep the call to 4 bytes (down from Predef's 5) without the abstraction.