Oric computers >> 500 or 501

by Simon » Sat, 13 Aug 2005 19:48:43 GMT

Hi,

What's the exact start address of a basic listing in memory?

I explain: I made a DUMP (Euphoric's F9) of the memory holding a
protected basic listing. Removed the bytes from address #0000 to #4FF
(included), so the memory file started at #0500.
Removed the end of the memory file to turn it into a file less than 48K.
Then I added a TAP header to it with THC - placing the file beginning in
memory at #500 in this TAP file.

When I ran it, I had problems - out of memory error, and so on.

I then removed the 1st byte in #500 in the TAP file (so all the rest
was shifted from 1 byte), ran it again: no more problem.

Can anyone explain why I should have removed 501 bytes (from #0000 to
#0500 included)? I always thought a basic program started at #500.
Should I correct THC so it uses #501 default value instead of #500?

Cheers
Simon


Oric computers >> 500 or 501

by Euphoric » Mon, 29 Aug 2005 15:40:39 GMT



42fdde24$0$7804$ XXXX@XXXXX.COM ...

Absolutely, $0501 is the default starting address of any Basic program...
You can verify it by printing the value of the basic start pointer:
PRINT DEEK(#9A)
which gives 1281, i.e #501 in hex.
You might have been fooled by the old trick which allows to stop the execution
of a Basic program:
POKE#500,1
When you run a program, the TXTPTR in $E9-$EA is initialized with $0500...
In #500, you normally have a 0 byte, and this is considered as an end of line,
so the Basic interpreter loads the first line number and starts executing the
line that follows...

Cheers,

Fabrice