I have a binary file (asm program) that I've been using AppleCommander to place onto a DSK image, which I can then load into AppleWin. The program runs as I'd expect it to, but to use it I need to "BRUN <program>" from the initial Applesoft prompt. I know that the HELLO program on the disk is executed on boot, and that INIT can place the current BASIC program as the HELLO program and thereby run that program on boot. However, I'd like to run my binary file at boot up as if it were HELLO.
I was hoping that would be as easy as naming the startup program HELLO, but no luck. I also can't see a way to call BRUN from a BASIC program, so I'm a little stuck on how to get it to run without writing some type of bootstrapper in place of whatever DOS 3.3 is doing.
Any ideas on how to get the behavior I'm looking for? Thanks!
You can run DOS 3.3 commands from applesoft BASIC using PRINT with the addition of CTRL-D (invisible) at the beginnig of a string or alternatively as far as I remember like this:
10 PRINT CHR$(13);"BRUN MYPROGRAM"
Ah, I had seen the Ctrl-D character but didn't think to print the command.
I got this working with a slight tweak to the character code:
10 PRINT CHR$(4);"BRUN MYPROGRAM"
Thanks very much!
I am pretty certain it can be done without resorting to the applesoft cludge; used to do it just so that it can't be defeated with a well pressed ctrl-c...
I would tend towards putting PRINT CHR$(4)"BRUN HELLO.BIN" in an Applesoft HELLO init program, but check out this old thread:
https://www.applefritter.com/content/exec-hello-make-applesoft-free-disk
@dokbert by hitting a reset at the appearance of "]" upon booting it can be defeated anyway. Several copy programs as far as I remember were able to directly modify diskette (the VTOC ?) in order to select a binary file as an autorunning program upon booting...
If memory serves me, one of the Beagle Bros utility programs would let you change the name of the "hello" program and allow you to run a different type, binary or text on boot. I don't remember which one right offhand, but it might have been DOS BOSS. Anyway, you can find all the Beagle Bros stuff here, and it is all really great.
http://beagle.applearchives.com/
This is my new favorite website, thanks!
I'll see what I can find on there and report back if I come up with a more bulletproof solution. For the moment I was able to use the Applesoft HELLO program to load the binary which is working well enough.