News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

How far can you go down with memory?

Started by funkheld, 13:57, 08 November 18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

funkheld


memory & 800?


How far can you go down with memory, cpc6128?
i do not need the basics storage.
there just has to be so much:
-Memory ...
call & all


not more.


Thank you.
fgruss

Docent

#1
Quote from: funkheld on 13:57, 08 November 18
memory & 800?


How far can you go down with memory, cpc6128?
i do not need the basics storage.
there just has to be so much:
-Memory ...
call & all
not more.

If you do not use basic (no basic loader), you can go down to &40. With loader in basic -
Basic itself starts at &170, so for memory, load and call a few dozen bytes would be enough. perhaps &190 would suffice, but this requires some testing :)
Something like
1 memory &190:load "file",&190: call&190


funkheld


AMSDOS

If you're not typing in any BASIC listings, you can use BASIC as a command line to load a file as low as &174.

In order to get it that low, you need to have a Disk in the Drive and use:

OPENOUT"d":MEMORY &174

to prevent a Memory Full.
From there you can LOAD"whatever.bin",&174
* 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

pacomix

Mmmmh... I'm curious now. When I was developing CPC Bros I was using 0x100 and everything was working fine. No basic loader. Simply typed LOAD"BLABLA.BIN and it was fine. I'm I missing something else???


Enviado desde mi iPhone utilizando Tapatalk

AMSDOS

Quote from: pacomix on 00:11, 12 November 18
Mmmmh... I'm curious now. When I was developing CPC Bros I was using 0x100 and everything was working fine. No basic loader. Simply typed LOAD"BLABLA.BIN and it was fine. I'm I missing something else???


Enviado desde mi iPhone utilizando Tapatalk


Usually I get a Memory Full, though provided a Binary File has an Execution Address, you can RUN"BLABLA.BIN from 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

pacomix

Quote from: AMSDOS on 10:00, 12 November 18

Usually I get a Memory Full, though provided a Binary File has an Execution Address, you can RUN"BLABLA.BIN from BASIC.
Sorry I meant RUN"BLABLA.BIN in my post. So this lower the execution address without loader down to 0x100. I remember I tried down to 0x40 but you had to be really careful with the initial bytes if I recall correctly.


Enviado desde mi iPhone utilizando Tapatalk

AMSDOS

Quote from: pacomix on 10:07, 12 November 18
Sorry I meant RUN"BLABLA.BIN in my post. So this lower the execution address without loader down to 0x100. I remember I tried down to 0x40 but you had to be really careful with the initial bytes if I recall correctly.


Enviado desde mi iPhone utilizando Tapatalk


So RUN"BLABLA.BIN will load a file and execute, provided an execution address in the header points to an address to run the program, if it doesn't, it resets back to basic (erasing the program in memory), the file can be as low as 0x40 (all of my Translated Hisoft Pascal Binary files start at that address and has an execution address of 0x40 despite a Jump to &17C4 taking place at that address). A Header Reader program is the best way to understand how a file is constructed. Unlike RUN"BLABLA.BIN",  LOAD"BLABLA.BIN" only loads a file to memory without execution and MEMORY needs to be used to lower HIMEM to prevent BASIC from overwriting the file, however Binary files cannot be loaded below HIMEM, though many years ago I noticed someone using OPENOUT"d":MEMORY &17F to lower HIMEM as close to BASIC as possible. I don't know why this is, though OPENOUT"d" initiates the Disc Drive (so Disk needs to be in the drive), no file is generated though, but it allows MEMORY to be set as close to &170 as possible, though from BASIC it's not possible to get below &170, however I once saw a Type-in from Amstrad Action, which had a series of RSX commands and it had one for setting the Memory to &3F.
* 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

Powered by SMFPacks Menu Editor Mod