6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Mar 28, 2024 4:47 pm

All times are UTC




Post new topic Reply to topic  [ 58 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: Mon Dec 30, 2019 10:19 pm 
Offline
User avatar

Joined: Tue Mar 21, 2017 6:57 pm
Posts: 81
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.


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 30, 2019 10:29 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10760
Location: England
Maybe this is relevant?
https://archive.org/details/Apple2_Woz_ ... er/page/n1


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 31, 2019 9:13 am 
Offline
User avatar

Joined: Tue Mar 21, 2017 6:57 pm
Posts: 81
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.


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 31, 2019 12:07 pm 
Offline
User avatar

Joined: Tue Mar 21, 2017 6:57 pm
Posts: 81
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 :-)


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 31, 2019 12:40 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10760
Location: England
Good find! Certainly should be straightforward to find the variant bytes and use that to relocate.


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 31, 2019 2:36 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1392
Location: Scotland
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:
;***********************
                          ;*                     *
                          ;*      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/


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 31, 2019 4:19 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1918
Location: Sacramento, CA, USA
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)


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 01, 2020 10:59 pm 
Offline
User avatar

Joined: Tue Mar 21, 2017 6:57 pm
Posts: 81
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.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 02, 2020 8:31 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1918
Location: Sacramento, CA, USA
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)


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 02, 2020 10:40 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10760
Location: England
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.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 04, 2020 1:34 am 
Offline

Joined: Tue Oct 24, 2017 1:08 am
Posts: 10
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).


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 04, 2020 6:16 pm 
Offline
User avatar

Joined: Tue Mar 21, 2017 6:57 pm
Posts: 81
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:
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.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 04, 2020 8:52 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1918
Location: Sacramento, CA, USA
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)


Top
 Profile  
Reply with quote  
PostPosted: Sun Jan 05, 2020 12:43 am 
Offline
User avatar

Joined: Tue Mar 21, 2017 6:57 pm
Posts: 81
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.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jan 05, 2020 1:10 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1918
Location: Sacramento, CA, USA
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)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: