Execute binary file on boot-up

8 posts / 0 new
Last post
Offline
Last seen: 3 years 3 weeks ago
Joined: Jul 3 2019 - 01:31
Posts: 9
Execute binary file on boot-up

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!

Offline
Last seen: 3 years 10 months ago
Joined: May 20 2016 - 06:57
Posts: 72
You can run DOS 3.3 commands

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"

 

 

 

 

 

 

 

Offline
Last seen: 3 years 3 weeks ago
Joined: Jul 3 2019 - 01:31
Posts: 9
Ah, I had seen the Ctrl-D

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!

dorkbert's picture
Offline
Last seen: 9 hours 57 min ago
Joined: Apr 12 2009 - 16:33
Posts: 364
having binary program as hello for dos 3.3

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...

mmphosis's picture
Offline
Last seen: 2 hours 31 min ago
Joined: Aug 18 2005 - 16:26
Posts: 432
BRUN HELLO

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

 

Offline
Last seen: 3 years 10 months ago
Joined: May 20 2016 - 06:57
Posts: 72
@dokbert  by hitting a reset

@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...

Offline
Last seen: 6 hours 19 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2516
If memory serves me, one of

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/

 

Offline
Last seen: 3 years 3 weeks ago
Joined: Jul 3 2019 - 01:31
Posts: 9
This is my new favorite

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.

Log in or register to post comments