OS65D V3.3 Basic question

Post Reply
wawa.voun
Posts: 49
Joined: Sun Nov 22, 2020 5:59 pm

OS65D V3.3 Basic question

Post by wawa.voun »

Hello,

I try to find something equivalent to a VARPTR statement. I need to find the memory address of a basic variable.

I know MS Basic has a routine which do that.

Is there somewhere information about the addresses where are located the main and most useful routines of the MS Basic disk version ?

I found something into OSIWEB but its for the rom version.

Thanks, regards.
Philippe
bxdanny
Posts: 335
Joined: Thu Apr 16, 2015 2:27 pm
Location: Bronx, NY USA

Re: OS65D V3.3 Basic question

Post by bxdanny »

Simple variables in 65D BASIC are stored starting at the address pointed to by locations 122 and 123, that is at PEEK(122)+256*PEEK(123).

All of the pointers, from start-of-program (120/121) to end-of-strings (132/133), are at addresses one less than the addresses used in ROM BASIC. This applies to all 65D versions from 3.0 to 3.3, and to 65U as well.

You would still need to search through the list of variables (two-byte name and five-byte value for each) to find the one you want.

Hope this helps,
Danny
No current OSI hardware
Former programmer for Dwo Quong Fok Lok Sow and Orion Software Associates
Former owner of C1P MF (original version) and C2-8P DF (502-based)
wawa.voun
Posts: 49
Joined: Sun Nov 22, 2020 5:59 pm

Re: OS65D V3.3 Basic question

Post by wawa.voun »

Hi,

Thanks for yout reply, it will also be useful.

The routine I search is indicated located at $AD53 in rom version. Is there a simple way to find it in the disk version ?

Thanks, regards.
Philippe
bxdanny
Posts: 335
Joined: Thu Apr 16, 2015 2:27 pm
Location: Bronx, NY USA

Re: OS65D V3.3 Basic question

Post by bxdanny »

The equivalent of $AD53 in disk Basic is at $0F8A.

--Danny
No current OSI hardware
Former programmer for Dwo Quong Fok Lok Sow and Orion Software Associates
Former owner of C1P MF (original version) and C2-8P DF (502-based)
wawa.voun
Posts: 49
Joined: Sun Nov 22, 2020 5:59 pm

Re: OS65D V3.3 Basic question

Post by wawa.voun »

Thanks again.

But how did you find it ?
bxdanny
Posts: 335
Joined: Thu Apr 16, 2015 2:27 pm
Location: Bronx, NY USA

Re: OS65D V3.3 Basic question

Post by bxdanny »

How did I find it? I first looked at (disassembled) the code at $AD53, then searched disk Basic for something similar, specifically looking for the sequence D0 04 C5. To do that search, I used a copy of the Extended Monitor which had been relocated to $E800 by Mark, since the usual copies occupy the same address space as disk Basic.

In general though, most of the routines in disk Basic are at ABOUT the same offset from its start at $0200 as the corresponding routines in ROM Basic are from its start at $A000. So an offset of $D53 from $0200 would be $0F53, and in fact the corresponding routine was found at $0F8A, or $37 (55) bytes later.
No current OSI hardware
Former programmer for Dwo Quong Fok Lok Sow and Orion Software Associates
Former owner of C1P MF (original version) and C2-8P DF (502-based)
wawa.voun
Posts: 49
Joined: Sun Nov 22, 2020 5:59 pm

Re: OS65D V3.3 Basic question

Post by wawa.voun »

Oké, will try myself next time !

Thanks and regards.
Philippe
Post Reply