Author Topic: Basic of the cpc 6128 is to begin with & 6000 ?  (Read 1326 times)

0 Members and 1 Guest are viewing this topic.

Offline cpcuser

  • CPC664
  • ***
  • Posts: 73
  • Country: de
  • Liked: 15
  • Likes Given: 0
Basic of the cpc 6128 is to begin with & 6000 ?
« on: 11:12, 27 October 16 »

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


How is that ?




greeting

Offline HAL 6128

  • 6128 Plus
  • ******
  • Posts: 525
  • Country: de
    • index.php?action=treasury
  • Liked: 260
  • Likes Given: 1429
Re: Basic of the cpc 6128 is to begin with & 6000 ?
« Reply #1 on: 13:50, 27 October 16 »
I don't understand your question. What do you mean with "begin with & 6000"?
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

Offline cpcuser

  • CPC664
  • ***
  • Posts: 73
  • Country: de
  • Liked: 15
  • Likes Given: 0
Re: Basic of the cpc 6128 is to begin with & 6000 ?
« Reply #2 on: 16:41, 27 October 16 »
> &5fff asm and ab &6000>  basic


greeting

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2278
  • Likes Given: 3478
Re: Basic of the cpc 6128 is to begin with & 6000 ?
« Reply #3 on: 21:07, 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



My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline cpcuser

  • CPC664
  • ***
  • Posts: 73
  • Country: de
  • Liked: 15
  • Likes Given: 0
Re: Basic of the cpc 6128 is to begin with & 6000 ?
« Reply #4 on: 23:07, 27 October 16 »
no...
Basic start & 6000 !!!


Thanks.
Greeting

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 941
  • Liked: 462
  • Likes Given: 75
Re: Basic of the cpc 6128 is to begin with & 6000 ?
« Reply #5 on: 23: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.

Offline cpcuser

  • CPC664
  • ***
  • Posts: 73
  • Country: de
  • Liked: 15
  • Likes Given: 0
Re: Basic of the cpc 6128 is to begin with & 6000 ?
« Reply #6 on: 23:35, 27 October 16 »
with poke/peek ....?


greeting

Offline HAL 6128

  • 6128 Plus
  • ******
  • Posts: 525
  • Country: de
    • index.php?action=treasury
  • Liked: 260
  • Likes Given: 1429
Re: Basic of the cpc 6128 is to begin with & 6000 ?
« Reply #7 on: 23:37, 27 October 16 »
I don't think it's possible with the actual operating system. At least you have to rewrite the ROM.
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.939
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1157
  • Likes Given: 1924
Re: Basic of the cpc 6128 is to begin with & 6000 ?
« Reply #8 on: 12:55, 28 October 16 »
I remember this being published in AA98, but have attached it here.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline cpcuser

  • CPC664
  • ***
  • Posts: 73
  • Country: de
  • Liked: 15
  • Likes Given: 0
Re: Basic of the cpc 6128 is to begin with & 6000 ?
« Reply #9 on: 13:30, 28 October 16 »
hello, thanks.




greeting


Offline HAL 6128

  • 6128 Plus
  • ******
  • Posts: 525
  • Country: de
    • index.php?action=treasury
  • Liked: 260
  • Likes Given: 1429
Re: Basic of the cpc 6128 is to begin with & 6000 ?
« Reply #10 on: 13:34, 28 October 16 »
I remember this being published in AA98, but have attached it here.
Very interesting, indeed. Thanks.
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 941
  • Liked: 462
  • Likes Given: 75
Re: Basic of the cpc 6128 is to begin with & 6000 ?
« Reply #11 on: 14: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)

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2278
  • Likes Given: 3478
Re: Basic of the cpc 6128 is to begin with & 6000 ?
« Reply #12 on: 15: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 ;)

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.939
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1157
  • Likes Given: 1924
Re: Basic of the cpc 6128 is to begin with & 6000 ?
« Reply #13 on: 00:16, 29 October 16 »
@cpcuser 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.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3