Some questions - returning to Apple II after 40 years

9 posts / 0 new
Last post
Offline
Last seen: 1 year 10 months ago
Joined: Apr 22 2022 - 11:20
Posts: 3
Some questions - returning to Apple II after 40 years

Hello,  my friend gave me a super-cool tiny Apple II computer (3D printed and running on raspberry PI).  I learned programming on an Apple II back in 1983 or so.  I still had all my old disks, so I sent them to a guy who restored the data from them (they still worked I can't believe it!)

So I'm trying to poke around these things and have a couple of basic operation questions, can anyone help with these?

(The RetroPie running on the little machine uses the linapple emulator.  Not sure if that makes a difference)

 

1) I have a couple of older disks that run a little startup program when they boot.  It will list the contents of the disk and let you run / load the various things on there.  But if I quit out to the  ] prompt, CATALOG does not work.  I have a dim memory of this maybe due to an older OS or something?  Anyone know why that would  be? Yet the boot menu's C)ATALOG option does work.  So maybe it is something else.

 

2) I started re-reading this charming manual which I remember from long ago (http://cini.classiccmp.org/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf)

One of the first things it mentions is hitting CTRL-B Return to enter programming mode, which should change the cursor to a '>' symbol.  This doesn't work on the linapple for me.  I just get SYNTAX ERROR.  Anyone know why?  Is this manual just REALLY old and I don't even need to do that?  Seems like the BASIC commands just work with the regular ] prompt...   It does say actually RESET CTRL B.  I am not sure what RESET is on my keyboard though.  I've been hitting Ctrl-F12, which may not be right. 

 

3) I forget how to edit a BASIC program.  There's no text editor, is there?  I can LIST the boot program, but it is many pages long.  Anyone know how to navigate a long program, or have a link to documentation on how to text edit?  I know there are programs for editing - but isn't there some built in way?

 

Thanks for any answers to these questions!

Sabibo

 

 

 

 

 

 

Offline
Last seen: 8 hours 32 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2538
Linapple is actually fairly

Linapple is actually fairly decent.  I use it sometimes on both desktop/laptop Linux boxes as well as on Pi.

 

Tools like DOS Boss from Beagle Bros let you change commands like CATALOG.  Try CAT maybe.  Also commands differ a little between ProDOS and Apple DOS 3.3

 

The ctrl-B thing is for INTBASIC.  For an original Apple ][.  Linapple emulates a //e with Applesoft by default at least.  The > prompt is for INTBASIC.  Applesoft uses ] as its prompt.  If you want to program in INTBASIC you'll need to do something like boot up a DOS 3.3 System Master disk image which will load INTBASIC into the "Language Card" memory area, and then type "INT" at the ] prompt whcih will give you the INTBASIC > prompt.  There really wasn't any accomodation in ProDOS for INTBASIC, so you'll need to use DOS 3.3.

 

For editing Applesoft I'd look at something like GPLE (also sold in later days by Beagle Bros who bought it from the original publisher).  Another option is to use a text editor on a modern machine (like your Pi) and then use a utility to tokenize it into Applesoft and copy it into a disk image.  I wrote my own utilities to tokenize and detokenize Applesoft as well as to manipulate disk images.  Mine were written to work natively on Linux but should also run on MacOS if the right pre-requisites are installed with something like brew.  They would probably work on Windows too, but I have no way to test that or interest in Windows in general.  There are also other similar utilities out there as well.

 

Offline
Last seen: 6 hours 34 min ago
Joined: Jun 6 2020 - 10:50
Posts: 409
Assuming that the "computer"

Assuming that the "computer" was booted with some kind of DOS loaded to memory (either DOS 3.3 or ProDOS), "catalog" should work. I'm honestly not sure what is happening in your case. Maybe someone else has an idea. 

 

 

Pressing ctrl-b would invoke integer basic. If the emulated computer is not set up with integer basic ROMs, then you would only get the newer AppleSoft basic which does not recognize ctrl-b and all basic programs are done via the ] prompt. 

 

 

As for listing programs, you have to view them line by line or by a range. There were some utilities (Beagle Bros comes to mind) that gave you more flexibility in editing programs. But for plain old AppleSoft, you are limited to listing lines one by one, or by a range. So "list 10" will only give you line 10 to view. "List 100 - 110" would display all lines in that range. As these disks have been converted to a DSK image, you can also use Ciderpress on a Windows PC to view basic programs. In a modern interface with a scroll window. You can also copy and paste the listing out to any other text viewing program you might want. As for editing, you just retype the line with whatever changes included. 

Offline
Last seen: 1 year 10 months ago
Joined: Apr 22 2022 - 11:20
Posts: 3
Thanks for the reply.  Yeah,

@softwarejanitor Thanks for the reply.  Yeah, I guess that manual was just a little too old!

@Nick3092 Thanks!  Wow I can't believe I used to just LIST line ranges and retype lines.  I probably did have a text editing program at some point.

 

Thanks for pointing it out about the integer basic!

Offline
Last seen: 6 hours 42 min ago
Joined: Jun 18 2010 - 13:54
Posts: 734
 sabibo wrote:1) I have a

 

sabibo wrote:

1) I have a couple of older disks that run a little startup program when they boot.  It will list the contents of the disk and let you run / load the various things on there.  But if I quit out to the  ] prompt, CATALOG does not work.

How are you quitting "out to the ] prompt"? If you are hitting reset - or the menu program on the disk doesn't exit gracefully - you may be disconnecting DOS. If the menu program is in Appesoft BASIC, you might be able to detemine what it does and how it executes the "C" command.

Offline
Last seen: 12 hours 26 sec ago
Joined: Apr 26 2016 - 08:36
Posts: 668
3) I forget how to edit a

3) I forget how to edit a BASIC program.  There's no text editor, is there?  I can LIST the boot program, but it is many pages long.  Anyone know how to navigate a long program, or have a link to documentation on how to text edit?  I know there are programs for editing - but isn't there some built in way?

 

LIST a-b where a is the starting line and b is the ending line.

eg:

LIST 10-60

lists lines 10 through 60.

 

 

Offline
Last seen: 1 year 8 months ago
Joined: May 16 2021 - 08:07
Posts: 28
further notes

Hi, I was in your place about 18 months ago.  Some notes that weren't mentioned so far:

You can edit a line without re-typing it.  The trick is to use the fact that the right-arrow actually scans whatever is under the cursor into the input buffer.  Combining this with using escape sequences to move around the screen allows you to re-use text anywhere on the screen.

You can use ctrl-S to pause the listing.  I was struggling to find this or remember it, couldn't find it.  Then, as a listing was scrolling by, the memory just came back instinctively - almost didn't even know what key I hit, but luckily managed to do it again and retain the memory.

All kinds of PDF manuals for Apple II can be found by searching - you probably figured that out.

Some of the boot disks nowadays come with Bitsy-Bye, a ProDOS startup screen.  I was thrown for a loop by this, it is a "recent" piece of software.  If you get this you select BASIC.SYSTEM to get to the BASIC prompt.  Then you type BYE to go back to the menu.

Ctrl-B is what you use to get from the the `*` prompt (System Monitor) to the `>` prompt on the original Apple II.  Similarly, `Ctrl-C` was how to get from the Monitor to Applesoft on the II+.   You can get to the Monitor from any BASIC using CALL -151.  But to exit the Monitor without losing DOS, you type `3D0G` rather than `Ctrl-B` or `Ctrl-C`.

Finally I'll advertise my own thing, I developed a VS Code extension for Applesoft (also Integer and Merlin assembly).  If you are interested you can install VS Code on Linux, Mac, or Windows, and then search the Marketplace for applesoft.

Offline
Last seen: 10 hours 17 min ago
Joined: Nov 29 2020 - 19:48
Posts: 127
Applesoft editing

Others have offered some good ideas so I will be brief to fill a few gaps.

 

1) Since LinApple is probably emulating a //e, you want to access the manuals for the //e and not the older ][ or ][ Plus.

 

2) You can use DOS 3.3 or ProDOS as your operating system.  Unless you have a specific need for DOS 3.3 compatibility, I suggest using ProDOS 2.4.x with the newer BASIC.SYSTEM.  DOS 3.3 requries upper case DOS commands, while ProDOS will accept either upper or lower case. The ability to use subdirectories and devices larger than the 5.25" floppy exist primarily only in ProDOS.

 

3) You can control program listing by using LIST line number to list a single line of code, and LIST 50,100 to list just lines 50 through 100

 

4) I'm not. knocking other editor solutions, but plain old Applesoft editing is already available. When editing Applesoft, you probably want to be in 80 column mode, use PR#3 to activate 80 columns.  PR#0 or control-reset will restore 40 column mode without erasing your Applesoft programs.  When in 80 col mode you can use the escape key to move the cursor without buffering keys.  That allows editing a line without retyping it.  When in escape mode the cursor will change to an inverse +.  Use the arrow keys to move the cursor and then press space to convert it back to standard input mode with a regular cursor.  Use the right arrow to move over characters as if you retyped them. You can use the escape key multiple times.  When you press Return key, the  input buffer is processed and the edit is committed. It works the same in 40 column mode but you don't get the inverse + so it is harder to know what is going on until you get familiar with the process.

 

For example I, suppose I have the following bad line of code, where the part after the colon is supposed to be a comment, but lacks the REM statement

10 PRINT  CHR$(4);"PR#1"  :  Turn the printer on

I would fix it as follows

LIST 10

press the <escape>key - the cursor will change

up arrow until you are on the line ot edit, left arrow until the cursor is over the 1 of the 10

press the space bar to exit escape mode - the cursor will change back to normal

use the right arrow key to advance on the line to the space following the :

use the <escape> key to reenter escape mode

press the up or down arrow to get to free  blank space on the screen

press the space bar to exit escape mode

type REM <space> which was originally omitted

use the <escape> key to reenter escape mode

use the arrow keys to place the cursor over the T of Turn

press the space bar to exit escape mode

use the right arrow key to "retype" the rest of the line

press <Return> to process the input

LIST 10 to see the modified line. 

 

You should now see

10 PRINT  CHR$(4);"PR#1"  :  REM Turn the printer on

 

5) When in ProDOS you can use the EXEC command to process  a file as input to the command line.  Its original purpose was to provide a way to execute command line scripts like bash scripts or batch files.  Using it you  can create your program in a text file, move the text file so it is accessible from ProDOS (I don't use LinApple so I don't know how to do that, but it is not hard in the Virtual ][ emulator I use on the Mac), and then just issue the EXEC MYPROG.TXT command and the file MYPROG.TXT will be processed as keyboard input.

 

 

 

 

 

Offline
Last seen: 6 months 5 days ago
Joined: Apr 6 2023 - 07:42
Posts: 2
Thanks for the tips!

Sorry to revive an old thread, but I just wanted to say thanks for these tips - I'm in much the same position as OP (except that I'm using Virtual ][) and this was very helpful! Thank you! Also, the most helpful guide that I've read so far has been "BASIC Programming with ProDOS", which I found here: https://mirrors.apple2.org.za/ftp.apple.asimov.net/documentation/programming/basic/Apple%20II%20BASIC%20Programming%20With%20ProDOS.pdf.

 

Best wishes, Ben

Log in or register to post comments