how do i store a disk directory listing in +3 basic as a string?

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
User avatar
777
Manic Miner
Posts: 512
Joined: Fri Jun 26, 2020 11:23 am
Location: sw uk

how do i store a disk directory listing in +3 basic as a string?

Post by 777 »

i cant seem to find anything in the manuals about this.
i started programming the spectrum when i was 8 :-

1 plot rnd*255,rnd*175
2 goto 1
User avatar
Guesser
Manic Miner
Posts: 639
Joined: Wed Nov 15, 2017 2:35 pm
Contact:

Re: how do i store a disk directory listing in +3 basic as a string?

Post by Guesser »

With difficulty. You'd have to load a custom channel driver to send it to. Garry Lancaster built this ability into his +3e ROMs: https://worldofspectrum.org/zxplus3e/channels.html
User avatar
777
Manic Miner
Posts: 512
Joined: Fri Jun 26, 2020 11:23 am
Location: sw uk

Re: how do i store a disk directory listing in +3 basic as a string?

Post by 777 »

yeah, i know. this was easy to do. there doesnt seem to be an equivalent in +3 basic
i started programming the spectrum when i was 8 :-

1 plot rnd*255,rnd*175
2 goto 1
User avatar
777
Manic Miner
Posts: 512
Joined: Fri Jun 26, 2020 11:23 am
Location: sw uk

Re: how do i store a disk directory listing in +3 basic as a string?

Post by 777 »

Guesser wrote: Sun Aug 02, 2020 12:50 pm With difficulty. You'd have to load a custom channel driver to send it to. Garry Lancaster built this ability into his +3e ROMs: https://worldofspectrum.org/zxplus3e/channels.html
whats a custom channel driver? is it like "p","s",etc? how would i do that?
i started programming the spectrum when i was 8 :-

1 plot rnd*255,rnd*175
2 goto 1
+3code

Re: how do i store a disk directory listing in +3 basic as a string?

Post by +3code »

In a standard +3 you need mc to make it. You can use the dos_catalog call example from the manual (https://worldofspectrum.org/ZXSpectrum1 ... 8pt26.html) and then, in BASIC, read the memory to a dim/string.
+3code

Re: how do i store a disk directory listing in +3 basic as a string?

Post by +3code »

Here you can find a routine:
http://www.users.globalnet.co.uk/~jg27p ... ntents.htm
(see "+3 CAT to string")
User avatar
777
Manic Miner
Posts: 512
Joined: Fri Jun 26, 2020 11:23 am
Location: sw uk

Re: how do i store a disk directory listing in +3 basic as a string?

Post by 777 »

+3code wrote: Sun Aug 02, 2020 1:28 pm Here you can find a routine:
http://www.users.globalnet.co.uk/~jg27p ... ntents.htm
(see "+3 CAT to string")
ty, just what i need
i started programming the spectrum when i was 8 :-

1 plot rnd*255,rnd*175
2 goto 1
Post Reply