Applesoft Commands ...

12 posts / 0 new
Last post
Offline
Last seen: 1 year 6 months ago
Joined: Jan 6 2022 - 20:12
Posts: 20
Applesoft Commands ...

Hiya folks!

 

Do you folks happen to know what "PR" stands for? I see that it lets me "boot" from a specific slot/drive and switch from 40/80 columns. Does it do anything else?

 

Is there a way to "read" a file in BASIC? I've got a disk with some random files and I can't seem to tell what they are. In MS-DOS I can just use the "type" command to generally figure out what a file "contains" ... is there an equivalent in Applesoft?

 

From what I can tell, there's no way to make a copy of a disk in Applesoft without using software like Copy II Plus?

 

Is it possible to use GS/OS to copy the contents of a disk to a RAM-disk and then copy the data back to an empty disk? Would that disk be bootable?

 

Sorry for all the haphazard questions, but I've been having difficulty figuring these questions out on my own.

 

Thank you all!

 

~

Offline
Last seen: 14 hours 49 min ago
Joined: Jun 25 2020 - 17:00
Posts: 251
I seem to recall...

That PR stands for "Peripheral"  such as peripheral controller in slot "n".

Offline
Last seen: 3 weeks 3 days ago
Joined: Aug 4 2015 - 14:30
Posts: 150
From The DOS Manual

Quote:

"You can use the COPY program, on the System Master diskette, to copy the entire contents of your current programming diskette onto your back-up diskette. If you are using DOS from Applesoft Basic, COPYA is the program to use for copying a diskette."

 

Offline
Last seen: 1 year 10 months ago
Joined: May 27 2009 - 01:37
Posts: 1002
PR stands for "print" or

PR stands for "print" or "output to slot#". If you do PR#1 the output is directed there, typically to a pinter card installed in slot 1. PR#6, toggles the Disk II card, so to speak, and boots a disk. IN stands for "take input from slot#".

Offline
Last seen: 1 year 6 months ago
Joined: Jan 6 2022 - 20:12
Posts: 20
Very helpful -- thank you all

Very helpful -- thank you all for contributing!

 

Do any of you know an Applesoft command for "previewing" the contents of a file (similar to the MS-DOS command "type")?

 

Also, when I type CAT/CATALOG, how can I tell it which drive/slot to CATALOG?

 

~

Offline
Last seen: 5 hours 23 min ago
Joined: Jun 6 2020 - 10:50
Posts: 451
If you only have the one

If you only have the one drive controller, it's as simple as appending ,d2 to the end to tell it to work with drive 2. So CAT,D2 will catalog the 2nd drive. From there on out, any commands issued will act upon the second drive. To go back to working with drive 1, issue a command with ,D1. Again, all future commands will work on drive 1 until you specify a different one.

 

 

Switching to a different controller isn't much different. You just also add a ,S# along with the drive number. So to catalog the disk in drive 1 in slot 5: CAT,S5,D1

 

 

As for previewing a file, if it's a text file, you can write a quick basic program that uses the OPEN and READ commands to spit out the text to screen. If you Google those commands, you should find multiple examples of short programs that use them. 

 

 

Online
Last seen: 51 min ago
Joined: Nov 29 2020 - 19:48
Posts: 135
I assume ProDOS

First, there were two operating systems commonly used on the Apple ][, DOS 3.3 and ProDOS.  It sounds like you are interested in using ProDOS.  Many of the answers to your questions will be the same regardless, but many others will depend on DOS or ProDOS.

Second, Applesoft is the dialect of the BASIC language built into all Apple ][s.  Typically you boot the OS and get a prompt where you can enter Applesoft programs and commands (like HOME or 10 Print "Hello") or you can enter OS commands like (cat or run filename ). Knowing which thing is in control is important.  You can access OS functions and commands from within Applesoft programs.  Typically with a "DOS string CHR$(4)" followed by the OS command.  This is true for both DOS 3.3 and ProDOS.  While there are a number of similarities there are also a number of differences.

 

Obviously the Apple manuals are a good place to start and pdfs are widely available.  Two of my favorite books on ProDOS in Applesoft are listed below. I think these really targetted at the types of questions you asked. 

 

ProDOS Inside and Out by Doms & Weishaar.  - My favorite

   I did find a llink quickly, but a pdf is available somewhere and print versions appear to be for sale.

 

Inside Apple's ProDOS by Campbell.   - It addressess the stuff you are asking about

   https://vintageapple.org/macbooks/pdf/Inside_Apples_ProDOS_1984.pdf

 

Apple ][ Users Guide by Poole, 3rd edition - A good overall Apple ][  book

    https://vintageapple.org/apple_ii/pdf/Apple_II_Users_Guide_For_Apple_II_Plus_and_Apple_IIe_1985.pdf

 

A really good, technical resource on ProDOS, not what I think you want right now is also

 

Beneath Apple ProDOS by Worth & Lechner

  https://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Books/Beneath%20Apple%20ProDOS.pdf

 

 

 

 

 

 

 

 

 

 

Offline
Last seen: 14 hours 49 min ago
Joined: Jun 25 2020 - 17:00
Posts: 251
Actually...

PR stands for "Peripheral" and refers to one of seven peripheral (aka "accessory") connectors of the Apple II/II+/IIe/IIgs backplane.  An Accessory controller board, such as a disk controller, a printer controller, a graphics tablet controller, a serial/parallel port controller, and EPROM burner controller, etc. that are designed to plug into on of these slot connectors can be used for accepting INPUT (IN#) or OUTPUT (PR#) using the commands shown here in parenthesis where # represents a number between 0 and 7.

 

Typical peripheral controller boards have on board ROM or EPROM memory chips that contain machine code used to control what that particular board is supposed to do such as generate output or receive input from the keyboard or a BASIC program.  The # (number) is used to "map" the peripheral controller's on board memory within a 4K memory space of the Apple's 64K memory space.  Refer to an Apple II Reference manual for more detailed information on this memory mapping.

 

 

Offline
Last seen: 1 year 10 months ago
Joined: May 27 2009 - 01:37
Posts: 1002
There's David-Dos. A whole

There's David-Dos. A whole different and new DOS. Mostly all compatible with DOS 3.3 and much faster. It has TLOAD to load a text file into memory, and TLIST to type it to the screen.

 

As far as disks being bootable, that depends on what's on tracks 0,1, and 2. Typing INIT HELLO will wipe the disk, format it, put dos on it, and make it bootable. If there is a BASIC program in memory, it will make that program start when booted.

 

Have you considered reading the original Apple II DOS 3.3 Manual? I found it to be excellent and informative when I first got my system back in the day. Copy II Plus is a great all-around disk tool. It will even display text files.

Offline
Last seen: 3 hours 20 min ago
Joined: Jun 18 2010 - 13:54
Posts: 795
Actually...

 

LaserMaster wrote:

PR stands for "Peripheral"

Not sure where you got that from (and why you're sticking to it).

 

The commad PR# does stand for Print output slot# and merely sets the output vector for the character stream to the indicated slot. Just like IN# sets the input vector and stream.

 

This is from the Applesoft Reference manual:
Offline
Last seen: 14 hours 49 min ago
Joined: Jun 25 2020 - 17:00
Posts: 251
From the beginning...
jeffmazur wrote:

 

LaserMaster wrote:

PR stands for "Peripheral"

Not sure where you got that from (and why you're sticking to it).

 

The commad PR# does stand for Print output slot# and merely sets the output vector for the character stream to the indicated slot. Just like IN# sets the input vector and stream.

 

We agree that the PR command transfers output to the I/O slot, aka Peripheral connector, expansion slot.

Look at any Apple reference and/or programming manual index from the Apple ][ Rev. 0 days through the IIgs and PRn is discussed with predominant references to changing output from the video screen to the referenced "n" peripheral slot where n=slot number.

 

And yes, printing is technically a form of outputing data, but in the computer vernacular, there are inputs and outputs, memory and disks are "read from" and/or "written to".

 Printers are printed to.  In the days of Apple ]['s, printing is an act of writing symbols and letters on a piece of paper of other visual print medium (as opposed to 3D printing of today).

 

 

The Monitor command, as if by magic, is Ctrl-Pn to effect the re-direction of output to one of the Peripheral slots, again P=Peripheral

 

The main thing is to understand the principles correctly and if printing to a peripheral slot does it for you then I'm all for it.

 

https://www.applefritter.com/files/2022/01/26/ApplePRstuff.pdf

 

I meant to add that originally, as peripheral devices came about, such as the serial or parallel printer cards, disk controllers, etc., many devices had ROM/PROM or EPROM chips with software routines in them that could be called upon for execution.  So, it is also possible that the origins of "PR" may have stood for "Peripheral ROM" in slot n.

 

 

 

 

CVT
CVT's picture
Offline
Last seen: 2 hours 3 min ago
Joined: Aug 9 2022 - 00:48
Posts: 1170
Warning: the link in the

Warning: the link in the previous post contains a virus. Do not click!

 

This refers to a deleted post. - Tom

Log in or register to post comments