Hello! Sometime ago I tried to do this trick with ca65 and I did not find the required capabilities in the assembler. What I ended up doing was to split the compilation process into several stages, in the first one the relocatable source is compiled for the intended RAM location, a .bin file is produced and then it is included in the main source for the ROM. A kludgey way, but I wasn't able to do it any other way in ca65. Regards, Michau. Baltissen, GJPAA (Ruud) wrote: > Hallo allemaal, > > > > > > The C64 has some code in its Kernal, the CHRGET and CHRGET routines, > that has to be moved to some other part of the memory (in this case > $0073) and then to be executed there. The older dual CPU IEEEE drives > have something equivalent: the reset and format routine for the second > CPU is copied from ROM to RAM by the first CPU and then executed by the > second CPU. > > > > If one disassembles this part of the ROM without any precautions, he > will run into trouble: he will find JMPs and JSRs that point to (in the > case of the 8250) the $0500-$0870 area. I indeed "copy" the code inside > my buffer as well so my disassembler has no problem. But the goal is to > create sources that generate binaries that are the same as the originals > again. So how do you tell the assembler to generate code for a certain > memory area while it is actually meant for another area? > > > > So I invented a directive pair for my assembler to do the job: > > > > .ba $C000 > > . > > . > > <code> > > . > > . > > > > .rb $0500 > > . > > <code> > > . > > .re > > . > . > > <more code> > > . > . > > > > ".rb" tells the assembler to assemble the source code as meant for $0500 > but to append it to the code just been generated before. ".re" ends this > mode. > > > > > > My question: do other assembler know this trick as well? > > > > > > The reason why I bring this up is because EXOS V3 has code on board that > is meant to be sent to the 1541 so it is able to use its fast speed loader. > > Side note: why didn't I mention this trick with the CHRGET and CHRGOT > routines? Two reasons: > > - these routines don't contain any JMPs or JSRs > > - too small to confuse someone > > Another question: is "relocatable sources" a good name? I even haven't > any idea how to call this phenomenon in Dutch. > > > > Met vriendelijke groet, > > Ing. Ruud Baltissen > Senior Beheerder TI > > cid:382073909@18072013-073B > > APG Datacentermanagement > > GK1 00.11 > Oude Lindestraat 70 6411EJ Heerlen > > T+M: +31 45 579 3980 > > > Email: firstname.lastname@example.org <mailto:email@example.com> > URL: www.apg.nl <http://www.apg.nl/> > > APG verzorgt pensioenadministratie, vermogensbeheer, communicatie, > bestuursadvisering en inkomensverzekering. > > > > > > > > De informatie in dit e-mailbericht is vertrouwelijk en uitsluitend > bestemd voor de > geadresseerde. Wanneer u dit bericht per abuis ontvangt, verzoeken wij u > contact op te > nemen met de afzender per kerende e-mail. Verder verzoeken wij u in dat > geval dit > e-mailbericht te vernietigen en de inhoud ervan aan niemand openbaar te > maken. > Wij aanvaarden geen aansprakelijkheid voor onjuiste, onvolledige dan wel > ontijdige > overbrenging van de inhoud van een verzonden e-mailbericht, noch voor > daarbij > overgebrachte virussen. > > APG Rechtenbeheer N.V. is gevestigd te Heerlen en is ingeschreven in het > handelsregister van de Kamer van Koophandel Limburg onder nummer 14099617 > > > The information contained in this e-mail is confidential and may be > privileged. > It may be read, copied and used only by the intended recipient. > If you have received it in error, please contact the sender immediately by > return e-mail; please delete in this case the e-mail and do not disclose > its > contents to any person. We don't accept liability for any errors, > omissions, > delays of receipt or viruses in the contents of this message which arise > as a > result of e-mail transmission. > > APG Rechtenbeheer N.V. is registered in the trade register of the Chamber > of Commerce Limburg, The Netherlands, registration number: 14099617 > Message was sent through the cbm-hackers mailing listReceived on 2014-11-19 14:00:03
Archive generated by hypermail 2.2.0.