Computers Overview
Commodore PET
        Disk Images
           File Access
        PET BASIC 4.0
            Disk Cmds
Sinclair ZX80
Sinclair ZX81
BBC Micro
Commodore 64
Sinclair ZXSpectrum
Memotech MTX
Memotech CP/M
Tatung Einstein
Atari ST
Commodore Amiga
DEC 3000 AXP
Raspberry Pi



The Commodore PET (Model : CBM 8096)

Software - PET BASIC 4.0 - Code "snippets"


This page contains  few code snippets that I have used to perform various system related tasks from Commodore BASIC 4.0 on my 8032. The items on this page have been generated from information returned by my web searches, or contributed by other PET users. Please let me know if you consider any of the contents of this page to be incorrect or if you have better ways of performing the tasks described.




 Code - as a text file

(opens in a separate window)

Read an 8050 (SS) disk on an 8250 (DS) [1] 1  Edward D. Shockley
Read an 8050 (SS) disk on an 8250 (DS) [2] 1


"Immediate" Commands
Set character set to upper case / graphics  poke 59468, 12 print chr$(142)
Set character set to upper / lower case  POKE 59468, 14 PRINT CHR$(14)
Return disk status as an integer   print ds
Return disk status as a string   print ds$
Turn beeper ON poke 59467, 16  
Turn beeper OFF poke 59467, 0  
Set beeper octave poke 59466, octave (more info)  
Set beeper frequency poke 59464, frequency (0 = off)  


Notes :

1. Disk Drives

The 8250 disk system that I obtained with my PET was the "top of the range" floppy system that Commodore made for the PET, it would have been more expensive, and therefore likely rarer, than the similar (single sided) 8050 system. Oddly, by default, the 8250 can't immediately read a single sided 8050 disk. I found the two programmatic solutions shown above, but as it turns out, there is a sort of automatic way that the 8250 copes with this.

The first time that you try to read an 8050 disk in an 8250 drive, the system will generate an error, but the next and subsequent times, it will read correctly. I have not been able to verify this as I don't have any 8050 disks, but this behaviour is documented on the CBM Hackers forum.






mailto: Webmaster

 Terms & Conditions