Make rom2_sw return the original RAM page
A multi-threaded-style OS for the Spectrum +3
Brought to you by:
u6c87
There are only 2 callers of rom2_sw: plus3check() and dos_springboard().
plus3check() doesn't matter.
dos_springboard() currently starts by doing this:
_dos_springboard:: call _get_bankm_ram_page ; Get current RAM page ex de, hl ; Save in de (hl is needed) call _rom2_sw ; Also selects RAM page 7
We could avoid the explicit call to _get_bankm_ram_page by making rom2_sw return the current RAM page prior to switching in RAM page 7. We can simply return the current value of BANKM and pass this later to ram_sw, which will strip any non-RAM-page bits out.
Correction, 3 callers, but dos_header() isn't used anywhere (and probably should be deleted anyway).
Saves two bytes.