Looking for Baum's tiny assembler on Apple-1

Programming the 6502 microprocessor and its relatives in assembly and other languages.
User avatar
mvk
Posts: 81
Joined: 21 Mar 2017

Looking for Baum's tiny assembler on Apple-1

Post by mvk »

I remember I've read somewhere that in 1976 Allen Baum had written a tiny 300'ish byte assembler for the Apple-1. It supposedly uses a clever brute-force method, parasitising on the Baum-Wozniak disassembler (so that must be present as well, but that's just under 500 bytes).

However, after much googling, I can't find the actual code. Did I misremember?

I can find the infamous disassembler. It was published in Dr. Dobb's and I've got it running fine in the Gigatron's Apple-1 emulator. Now I would like to add an assembler as well.

Any pointers are much appreciated.

P.S: I'm not looking for something like KRUSADER. Just something small. In order to be useful for this project, it will have to sit somewhere of the $400-$fff area in the Apple-1 memory map.
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Looking for Baum's tiny assembler on Apple-1

Post by BigEd »

User avatar
mvk
Posts: 81
Joined: 21 Mar 2017

Re: Looking for Baum's tiny assembler on Apple-1

Post by mvk »

Indeed this may be it. However, it appears to call out to a whole bunch of functions not present in the Apple-1. Perhaps I misremember the story and this assembler doesn't exist for Apple-1.
User avatar
mvk
Posts: 81
Joined: 21 Mar 2017

Re: Looking for Baum's tiny assembler on Apple-1

Post by mvk »

In the meantime I stumbled upon this:

http://www.apple1notes.com/old_apple/Mo ... _on_1.html
Quote:
[...] As a part of the material in the Gayler collection was a program tape that contained a file of the Apple II monitor ported to the Apple 1 that he had apparently made complete with Mini-Assembler. This was not a transitional step from the Apple 1 like the Monitor file by Steve and Allen but a port of the completed Apple II monitor including the mini-assembler. [...]
This is a very interesting approach provided I can get it to sit in $0500-$0fff. That link gives hex files for several starting addresses, but not this range. Perhaps I can XOR two of them to get the one I need :-)
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Looking for Baum's tiny assembler on Apple-1

Post by BigEd »

Good find! Certainly should be straightforward to find the variant bytes and use that to relocate.
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Re: Looking for Baum's tiny assembler on Apple-1

Post by drogon »

Source code for all the Apple 1 and Apple II monitor is out there - including the source code for the mini assembler.

e.g.

Code: Select all

;***********************
                          ;*                     *
                          ;*      APPLE-II       *
                          ;*   MINI-ASSEMBLER    *
                          ;*                     *
                          ;*  COPYRIGHT 1977 BY  *
                          ;* APPLE COMPUTER INC. *
                          ;*                     *
                          ;* ALL RIGHTS RESERVED *
                          ;*                     *
                          ;*     S. WOZNIAK      *
                          ;*      A. BAUM        *
                          ;***********************
FORMAT   =     $2E
LENGTH   =     $2F
This link might help: https://github.com/cmosher01/Apple-II-S ... tag/v1.1.2

So if you can assemble that then you can relocate it anywhere - and have it use your own IO, etc. routines.

-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: Looking for Baum's tiny assembler on Apple-1

Post by barrym95838 »

mvk wrote:
In the meantime I stumbled upon this:

http://www.apple1notes.com/old_apple/Mo ... _on_1.html
That's an awesome find! I wonder if I could thread together a few evenings to create a lightly-commented source file based on those binaries ... please don't anyone hold his or her breath waiting, though ... :roll:

[Edit: I'm finding some redundant code and what appears to be ][-specific code in there. It looks like the person transplanting the Apple ][ stuff didn't want to fiddle with the inner mechanism too much, so he patched it together sub-optimally and stopped messing with it as soon as he got it to work. I don't want to bite off more than I can chew, but I'll nibble away at it as time and inspiration permit ...]
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
User avatar
mvk
Posts: 81
Joined: 21 Mar 2017

Re: Looking for Baum's tiny assembler on Apple-1

Post by mvk »

I took a first stab at disassembling. First I created an object file for $500-$fff by comparing the other files for their differences. Then I ran it through x65dsasm and edited it until it assembled ok with ca65. I pushed the first result in the Gigatron repo on GitHub:

https://github.com/kervinck/gigatron-ro ... pple-1/asm

It doesn't run on my system yet, because I need additional zero-page relocations.

P.S. I'm interested to find out who's behind apple1notes.com, because that isn't mentioned on the site itself. It could be Wendell Sander.
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: Looking for Baum's tiny assembler on Apple-1

Post by barrym95838 »

There are many hundreds of bytes of dead/useless/corrupt code in there that should be amputated. I am attempting surgery ...
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Looking for Baum's tiny assembler on Apple-1

Post by BigEd »

mvk wrote:
P.S. I'm interested to find out who's behind apple1notes.com, because that isn't mentioned on the site itself. It could be Wendell Sander.
I think it is! See here.
Uncle Warthog
Posts: 14
Joined: 24 Oct 2017

Re: Looking for Baum's tiny assembler on Apple-1

Post by Uncle Warthog »

mvk wrote:
I remember I've read somewhere that in 1976 Allen Baum had written a tiny 300'ish byte assembler for the Apple-1. It supposedly uses a clever brute-force method, parasitising on the Baum-Wozniak disassembler (so that must be present as well, but that's just under 500 bytes).

However, after much googling, I can't find the actual code. Did I misremember?
No, I've seen it mentioned in interviews with him and others that he did it but I don't think it was published in any magazine (I'd _love_ to be proven wrong about this.) If it was published in a magazine, I don't think it was Dr. Dobbs or Byte as I've looked through most of those and don't remember seeing it. It might have been in Interface Age; I remember quite a few Apple related things being published there as well but don't have any to look through.

Where I _think_ it might be is on a tape that Apple used to sell for the Apple I, the "Extended Monitor" which I think also may have included the disassembler (though maybe not as they also sold that on tape separately).
User avatar
mvk
Posts: 81
Joined: 21 Mar 2017

Re: Looking for Baum's tiny assembler on Apple-1

Post by mvk »

Thanks for sharing. I've found more background on these hex files:
https://www.applefritter.com/content/ap ... ed-apple-1
We correctly guessed the site owner :-)

This thread then leads to this disassembly by Jeff Tranter
https://github.com/jefftranter/6502/tre ... %5BMonitor

Code: Select all

This is the source code for a port of Apple II Monitor to the Apple 1.
I'm ashamed to admit I already had this repo cloned months ago, but overlooked this gem because of the Apple][ directory name.
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: Looking for Baum's tiny assembler on Apple-1

Post by barrym95838 »

See what I mean about all the stuff that has absolutely no use on the Apple 1? I'm still nibbling at it ...
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
User avatar
mvk
Posts: 81
Joined: 21 Mar 2017

Re: Looking for Baum's tiny assembler on Apple-1

Post by mvk »

It seems that it came from a ROM dump with patches on top to bind to Apple-1. It makes sense one would do it that way without better tools. There's quite a bit of stuff to be scrubbed indeed. I'm tempted.

I found a similar back port of the Apple II monitor here:
https://www.scullinsteel.com/apple1/#Mo ... sassembler
It loads in $800.$fff, it starts at an unusual address ($f3d) and routines are clearly rearranged. The origins are unclear to me. I spotted the disassembler in there but it is missing the mini-assembler.
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: Looking for Baum's tiny assembler on Apple-1

Post by barrym95838 »

mvk wrote:
It seems that it came from a ROM dump with patches on top to bind to Apple-1. It makes sense one would do it that way without better tools. There's quite a bit of stuff to be scrubbed indeed. I'm tempted.
I'm doing everything manually at the moment. I'll post my progress soon, but you probably won't be able to feed my work directly into any assembler because ... well, you'll see ...
Quote:
I found a similar back port of the Apple II monitor here:
https://www.scullinsteel.com/apple1/#Mo ... sassembler
It loads in $800.$fff, it starts at an unusual address ($f3d) and routines are clearly rearranged. The origins are unclear to me. I spotted the disassembler in there but it is missing the mini-assembler.
The first thing I see @$0800 is the Apple ][ lo-res PLOT command from $F800 in the monitor ROM, so it's obvious that there's room for improvement there as well. I'm going to keep focusing on the apple1notes code for now, because it includes the mini-assembler.
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
Post Reply