CPCWiki forum

General Category => Programming => Topic started by: cpcuser on 09:12, 27 October 16

Title: Basic of the cpc 6128 is to begin with & 6000 ?
Post by: cpcuser on 09:12, 27 October 16

Basic of the cpc 6128 is to begin with & 6000.


How is that ?




greeting
Title: Re: Basic of the cpc 6128 is to begin with & 6000 ?
Post by: HAL6128 on 11:50, 27 October 16
I don't understand your question. What do you mean with "begin with & 6000"?
Title: Re: Basic of the cpc 6128 is to begin with & 6000 ?
Post by: cpcuser on 14:41, 27 October 16
> &5fff asm and ab &6000>  basic


greeting
Title: Re: Basic of the cpc 6128 is to begin with & 6000 ?
Post by: arnoldemu on 19:07, 27 October 16
Quote from: cpcuser on 14:41, 27 October 16
> &5fff asm and ab &6000>  basic


greeting
impossible.

Basic always at @ &170.

Set HIMEM using MEMORY.

10 MEMORY &5fff
20 LOAD"myasm",&6000

? HEX$(HIMEM)
-> &5fff

BASIC<HIMEM

Your asm >HIMEM



Title: Re: Basic of the cpc 6128 is to begin with & 6000 ?
Post by: cpcuser on 21:07, 27 October 16
no...
Basic start & 6000 !!!


Thanks.
Greeting
Title: Re: Basic of the cpc 6128 is to begin with & 6000 ?
Post by: andycadley on 21:17, 27 October 16
Technically I believe you can move the lower memory bound, but only from a background ROM during it's initialisation process. There's no way to do it from a program actually started by BASIC itself though.
Title: Re: Basic of the cpc 6128 is to begin with & 6000 ?
Post by: cpcuser on 21:35, 27 October 16
with poke/peek ....?


greeting
Title: Re: Basic of the cpc 6128 is to begin with & 6000 ?
Post by: HAL6128 on 21:37, 27 October 16
I don't think it's possible with the actual operating system. At least you have to rewrite the ROM.
Title: Re: Basic of the cpc 6128 is to begin with & 6000 ?
Post by: AMSDOS on 10:55, 28 October 16
I remember this being published in AA98, but have attached it here.
Title: Re: Basic of the cpc 6128 is to begin with & 6000 ?
Post by: cpcuser on 11:30, 28 October 16
hello, thanks.




greeting

Title: Re: Basic of the cpc 6128 is to begin with & 6000 ?
Post by: HAL6128 on 11:34, 28 October 16
Quote from: AMSDOS on 10:55, 28 October 16
I remember this being published in AA98, but have attached it here.
Very interesting, indeed. Thanks.
Title: Re: Basic of the cpc 6128 is to begin with & 6000 ?
Post by: andycadley on 12:17, 28 October 16

Bear in mind you won't be able to poke those locations for within BASIC itself, nor will your program still be in memory after you do (well technically it is, but BASIC will no longer see it). I've no idea what will happen if you move your program manually before returning, I'd not be surprised if that caused a crash. So your assembler routine might need to do the equivalent of RUN "program" to load a new version into relocated BASIC.


You might also, if you want to be properly system friendly, want to check whether the current low boundary is what you expect and adjust your expectations based on any lower RAM that has been reserved by background ROMs (though I'm not sure any do)
Title: Re: Basic of the cpc 6128 is to begin with & 6000 ?
Post by: arnoldemu on 13:41, 28 October 16
Ok it's not impossible  :D

I tried some pokes last night and it made basic hang.

Why do you want to move BASIC?

Why not move your asm code ;)

Title: Re: Basic of the cpc 6128 is to begin with & 6000 ?
Post by: AMSDOS on 22:16, 28 October 16
@cpcuser (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1682) might have another reason that I cannot think of for moving BASIC.


Back in the day I tried this for cracking, but then I got onto Lara which changed all that.


These days with Emulators and all, inspecting a program is a simple matter of pausing the Emulator. Winape makes it easier to test Assembly code by plonking disassembled code into the Assembler (but you know all that)  8)


I guess if cpcuser had code situated at &0040 and had to use BASIC, cpcuser could use the approach above (disassemble the code & move to the Assembler), change it to org &6000 and assemble, that would work I guess. I'm unsure if there dealing with a 42k program and is trying to use BASIC for some of that program. I'm unsure if it's possible moving BASIC to the extra 64k, I do recall it not working for me because I was also trying to use POKE commands to move BASIC.
Powered by SMFPacks Menu Editor Mod