Programming

10 posts / 0 new
Last post
Marvan0305's picture
Offline
Last seen: 1 year 3 months ago
Joined: Sep 19 2022 - 15:54
Posts: 14
Programming

How do i program on the apple 1?

Online
Last seen: 31 min 21 sec ago
Joined: Jul 5 2018 - 09:44
Posts: 2536
What language?  Woz's Integer

What language?  Woz's Integer BASIC?  6502 assembler?  Something else?  Those two are your primary options.  The tools available are fairly limited but you can do a lot with those.

 

Marvan0305's picture
Offline
Last seen: 1 year 3 months ago
Joined: Sep 19 2022 - 15:54
Posts: 14
Ok thanks

Ok thanks

Online
Last seen: 57 min 43 sec ago
Joined: Jun 29 2018 - 16:55
Posts: 572
A good primer is contained in

A good primer is contained in the Replica 1 plus manual, starting on pg 20 regarding programming specifically https://wiki.reactivemicro.com/images/7/73/Replica_One_Plus_Manual_-_June_2014.pdf 

Offline
Last seen: 18 hours 53 min ago
Joined: Apr 1 2020 - 16:46
Posts: 842
Uncle Bernie's way to program the Apple-1

It all boils down to which tools you want to use.

'Uncle Bernie' uses the free ATASM macro assembler under Linux. And vi as the editor ;-)

ATASM puts out a binary. Then my tool chain forks:

one tool converts the binary to an .APL or .TUR file (to be loaded into the Apple-1 via my keyboard emulator cable)

another tool converts the binary into AIFF (to be loaded via ACI using the Linux media player)

Both tools I wrote myself buy so far have not published them as they are yet incomplete.

And I hate incompleted work with dangling ends. So many projects, so little time.

You will find out that programming the Apple-1 is very easy and very satisfying, unlike any other microcomputer, ever.

The reason is that the Wozmon provides only two useful subroutines, one to print a character (ECHO) and one to print a hex byte (PRBYTE). To get a char from the keyboard you have to duplicate the two liner in the Wozmon as there is no such subroutine.

So you have to do all the 'footwork' by yourself. Sounds tedious, and it is, but in the end it's immensly satisfying and rewarding when your own program finally works and you did everything by yourself (well, maybe except PRBYTE and ECHO, but these are trivial).

In all other microcomputers you have lots and lots of I/O subroutines available, all different, and all incompatible with other microcomputers, and so your code is corrupted and tainted by alien DNA. And very very tedious to port to another machine.

The Apple-1 however forces you to develop your own I/O so if you arrange your source code properly, it can be ported to any other 6502 machine in a few minutes.

 

I have a scaffold source code which allows to make the Apple-1 program fully Apple-1 and Apple II compatible, and it can use the same AIFF file to load (unified code, no modifications, loads and runs on both machines the same). See my famous 'Codebreaker' game I published on Applefritter, but make sure you get the newer version where the 'cheating' bug was corrected. Which, BTW, was introduced by moving the zero page variables to make it run on the Apple II. After the move, a table crossed the $80 address boundary and alas, the computer "AI" used the MSB of the table index as a flag. A leftover from the ancient 8080 code I wrote as a kid about half a century ago. My assembly language programming skills were only rudimentary back then.

 

- Uncle Bernie

Online
Last seen: 31 min 21 sec ago
Joined: Jul 5 2018 - 09:44
Posts: 2536
I also use vi under Linux as

I also use vi under Linux as my editor.  I wrote my own 65x02 cross assembler (it's availabe on my GitHub).  Your other utiilities sound useful.  Hopefully they will be completed and released someday.

 

Oh...  Possibly relevant to Apple-1...  In case anyone ever builds one with a 6800, I also wrote a cross assmbler for that.  I haven't really tested or used that much, but it was fairly easy to do given the similarity to the 6502.  I'd have to dig that one out, it isn't on my GitHub or anything.

 

 

 

Marvan0305's picture
Offline
Last seen: 1 year 3 months ago
Joined: Sep 19 2022 - 15:54
Posts: 14
i can tell woz monitor to say
i can tell woz monitor to say hello world with some numbers and letters.
Online
Last seen: 57 min 43 sec ago
Joined: Jun 29 2018 - 16:55
Posts: 572
Very awesome, impressive 3rd

Very awesome, impressive 3rd post, welcome to the forums!

Marvan0305's picture
Offline
Last seen: 1 year 3 months ago
Joined: Sep 19 2022 - 15:54
Posts: 14
thanks.

thanks.

Marvan0305's picture
Offline
Last seen: 1 year 3 months ago
Joined: Sep 19 2022 - 15:54
Posts: 14
i can type the code for basic
i can type the code for basic and use basic without a tape
Log in or register to post comments