Post Reply 
41 MCODE - Copying bank-switched pages
10-12-2014, 10:14 AM (This post was last modified: 10-13-2014 01:28 PM by Ángel Martin.)
Post: #1
41 MCODE - Copying bank-switched pages
There are almost no tools available to extract or copy code from a bank switched ROM. When faced with that challenge I typically used ad-hoc modifications of Warren Furlow's short routine "CB", posted at a TOS near you...

CB is specific for fixed source and destination pages, as well as only useful for the second bank. Preparing a more general-purpose function was always on my mind, and finally here it is available.

CPYBNK is a prompting function. It has a customized prompt with three distinct sections that are shown on the screen as the data entry progresses. The parameters entered are as follows:

- Bank number, an integer decimal from 1 to 4
- Source page, an hex value from 0 to F
- Destination page, same as above.

The copy is always made into the main bank of the destination page (bank-1). This is typically a Q-RAM page in an MLDL (or a RAM page on the CL) thus only supports one bank. Besides the practical usage is intended to copy elusive, hard-to-reach code buried into secondary banks – therefore it wouldn’t appear very sensible to copy it into equally obscure destinations.

CPYBNK is last-minute addition to the CLXMEM module – even if it's not related to the Expanded memory subject. The function code is long enough so there’s no chance to include it in the PowerCL module, therefore it’s here as a second best place to include it in.

See the attached write up and QRG for CLXMEM, including the CPYBNK details.

PS. Edited with updated function code. QRG posted at TOS.


Attached File(s)
.pdf  Bank Copy.pdf (Size: 185.35 KB / Downloads: 9)

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
41 MCODE - Copying bank-switched pages - Ángel Martin - 10-12-2014 10:14 AM



User(s) browsing this thread: 1 Guest(s)