--- title: "Disk_PC_formatter" id: 77609 type: "computer_media" slug: "disk_pc_formatter" url: "http://localhost/computer_media/disk_pc_formatter/" markdown_url: "http://localhost/computer_media/disk_pc_formatter.md" published_at: "2026-11-18T12:06:35+00:00" modified_at: "2026-11-22T09:55:56+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Turns a formatted QL DD disk into an empty 720K PC (MS-DOS) disk by writing the sectors of track 0." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" model: - name: "Sinclair QL" slug: "sinclair-ql" taxonomy: "model" url: "http://localhost/model/sinclair-ql/" indiv: - name: "Howard Clase" slug: "howard-clase" taxonomy: "indiv" url: "http://localhost/indiv/howard-clase/" genre: - name: "Disk Drive Systems" slug: "disk-drive-systems" taxonomy: "genre" url: "http://localhost/type/disk-drive-systems/" media_type: "Diskette" programmers: - name: "Howard Clase" slug: "howard-clase" taxonomy: "indiv" url: "http://localhost/indiv/howard-clase/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Disk_PC_formatter%20%281993%29%28Clase%2C%20Howard%29%28Sinclair%20QL%29%28CA%29%28Program%29.zip" mediadate: "1993" article_media: - id: 23795 title: "Howard Clase plays with Disks" type: "article" url: "http://localhost/article/howard-clase-plays-with-disks/" related_content: - id: 77612 title: "Disk_sector_reader" type: "computer_media" url: "http://localhost/computer_media/disk_sector_reader/" media_type_tags: "Disk Drive Systems" license: false --- # Disk_PC_formatter Turns a formatted QL double-density disk in flp1_ into an empty 720K PC (MS-DOS) disk. It writes a PC boot sector to sector 1 of track 0, the first FAT bytes (249,255,255) to sectors 2 and 5, and zeros to the other FAT and directory sectors, using the disk driver’s direct sector access (flp1_*d2d). DD disks only. The boot sector comes from 512 DATA values that the program makes for itself, so as printed it has no DATA lines. Put a formatted PC disk in flp1_ and type make_data: it writes DATA lines from line 350 to ram1_data. MERGE ram1_data, save the program, and from then on RUN converts QL disks. Howard Clase based it on a routine from Simon Goodwin. Published in Sinc-Link November-December 1993 ([Howard Clase plays with Disks](https://timexsinclair.com/article/howard-clase-plays-with-disks/)). ## Source Code ``` 100 nm$= "Disk_PC_formatter" 110 REMark SG modified 1992.07.22 hjc 120 REMark ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Main 130 Set_up: Do_it: Finish: STOP 140 REMark ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^æ 150 DEFine PROCedure Set_up 155 CLS:b$="": RESTORE 160 PRINT "This program converts a QL format disk to"\"PC format, by inserting the boot bloc for"\"a PC disk to track 0, and initialising an"\"empty PC directory. DD disks only!" 180 FOR i=0 TO 511: READ b%: b$=b$&CHR$(b%) 190 END DEFine 200 REMark ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^æ 210 DEFine PROCedure Do_it 220 PRINT\"Insert a formatted QL disc & press any key": PAUSE(-1) 230 OPEN#3,"flp1_*d2d": PUT#3\1,b$ 240 c$=CHR$(249)&CHR$(255)&CHR$(255) 250 c$=c$&FILL$(CHR$(0),509) 260 FOR s=2,5: PUT#3\s,c$ 270 FOR s= 3,4, 6TO 9,257TO 261 280 PUT#3\s,FILL$(CHR$(0),512): END FOR s 290 END DEFine 300 REMark ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^æ 310 DEFine PROCedure Finish 320 CLOSE#3: PRINT\"Conversion complete" 330 END DEFine 340 REMark ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^DATAæ 900 REMark ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 910 DEFine PROCedure make_data 920 LOCal b$,i,j: CLS 930 PRINT"Put a formatted PC disk into flp1_,"\"then press any key." 940 PAUSE(-1) 950 OPEN#3,'flp1_*d2d': GET#3\1,b$: CLOSE 960 OPEN_NEW#3,ram1_boot_bloc: PRINT#3,b$;:CLOSE 970 OPEN_IN#3,ram1_boot_bloc:OPEN_NEW#4,ram1_data 980 FOR i=0 TO 511 STEP 16 990 PRINT#4,350+i!'DATA '; 1000 FOR j=0 TO 15 1010 BGET#3,b%: PRINT#4,b%; 1020 IF j<>15: PRINT#4,','; 1030 END FOR j:PRINT#4:END FOR i 1040 CLOSE 1050 PRINT"Now enter 'MERGE ram1_data' at the "\"keyboard, and resave the program." 1060 END DEFine ```