Apple I Programming

Here are a few simple tips and programs for those interested in programming the Apple I:

To print to screen:

<br />
   Echo = $FFEF</p>
<p>   LDA value_to_print<br />
   JSR Echo<br />

The above snippet relies on the Echo subroutine in the Apple I's ROM. All you need to do is load an ASCII value into the accumulator, then call that subroutine.

To read a character:

<br />
   KbdRdy = $D011<br />
   Kbd = $D010                  </p>
<p>GetChar:<br />
   LDA KbdRdy       ; Key ready?<br />
   BPL GetChar       ; Loop until ready.<br />
   LDA Kbd            ; Load character.<br />
   RTS                    ; Exit.<br />

This subroutine loops until a key is pressed, then loads its ASCII value into the accumulator. It is not dependant upon the Apple I's ROM. KbdRdy and Kbd are in the 6821.

Subroutine: GetChar.asm.

Tools

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gsmcten's picture

Re: Apple I Programming

Tom,

I could not get your link to the disassembler (dcc6502) to work.

Have a Merry Christmas. Smile

Tom Owad's picture

Re: Apple I Programming

Looks like dcc6502's site is gone. I tracked down a copy of the program and and uploaded it. The link now goes to its download page.