Apple I Programming

Apple | Apple I | Project | Software

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

To print to screen:



   Echo = $FFEF


  LDA value_to_print

   JSR Echo

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:



   KbdRdy = $D011

   Kbd = $D010                  


GetChar:

   LDA KbdRdy       ; Key ready?

   BPL GetChar       ; Loop until ready.

   LDA Kbd            ; Load character.

   RTS                    ; Exit.

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