Read disk directory from 64 and 128

From C64-Wiki
Jump to navigationJump to search
Stub This article is very short and not very detailed. Please help to improve it.

This both machine code programs "Read disk directory from 64 and 128" will display a directory on a C64 or C128 without overwritting a program or the BASIC memory.

The program code generates first a machine code program, that is starting by a SYS command.

Remarks:
How can this program saved and reload?
Please, explain more details about this programs!
C64 Version
 5 DATA 169,1,162,101,160,192,32,189
10 DATA 255,169,2,174,186,0,208,2
15 DATA 162,8,160,0,32,186,255,32
20 DATA 192,255,176,51,162,2,32,198
25 DATA 255,160,4,208,2,160,2,32
30 DATA 88,192,136,208,250,32,88,192
35 DATA 168,32,88,192,72,152,170,104
40 DATA 32,205,189,169,32,32,210,255
45 DATA 32,88,192,208,248,169,13,32
50 DATA 210,255,32,225,255,208,214,169
55 DATA 2,32,195,255,32,204,255,96
60 DATA 32,183,255,208,3,76,207,255
65 DATA 104,104,76,79,192,36
70 FOR T=0 TO 101: READ A: POKE 49152+T,A: NEXT

Start with: SYS 49152 will display drive 8

To use with a different drive: POKE 49152+69,DR (DR = 9, 10 or 11)


C128 Version
 5 DATA 169,1,162,101,160,19,32,189
10 DATA 255,169,2,174,186,0,208,2
15 DATA 162,8,160,0,32,186,255,32
20 DATA 192,255,176,51,162,2,32,198
25 DATA 255,160,4,208,2,160,2,32
30 DATA 88,19,136,208,250,32,88,19
35 DATA 168,32,88,19,72,152,170,104
40 DATA 32,50,142,169,32,32,210,255
45 DATA 32,88,19,208,248,169,13,32
50 DATA 210,255,32,225,255,208,214,169
55 DATA 2,32,195,255,32,204,255,96
60 DATA 32,183,255,208,3,76,207,255
65 DATA 104,104,76,79,19,36
70 FOR T=0 TO 101: READ A: POKE 4864+T,A: NEXT

Start with: SYS 4864

To use with a different drive: POKE 4864+69,DR (DR = 9, 10 or 11)

These programs open the device and read the directory ($) and displays them on the screen non-destructively.