Skip to content

Instantly share code, notes, and snippets.

@gleitz
Created October 29, 2014 19:19
Show Gist options
  • Save gleitz/8c7b79552102b1bc0ac5 to your computer and use it in GitHub Desktop.
Save gleitz/8c7b79552102b1bc0ac5 to your computer and use it in GitHub Desktop.
Hal Abelson, "Turtle Geometry" (1979)
; Logo Language Interpreter for the Apple-II-Plus Personal Microcomputer
; Written and developed by Stephen L. Hain, Patrick G. Sobalvarro, and
; Leigh L. Klotz with the M.I.T. Logo Group under the supervision of Hal
; Abelson at the Massachusetts Institute of Technology.
; Property of the M.I.T. Logo Laboratory,
; 545 Technology Square, Cambridge, MA 02139.
; Copyright (C) 1980 Massachusetts Institute of Technology
; All rights reserved.
; This version of the Logo Language Interpreter requires an Apple-II-Plus
; microcomputer with the Autostart ROM monitor, a full 48 kilobytes of
; random access memory, a floppy disk, and the Apple Language System card.
.PAGE
.SBTTL Turtle-Graphics Utility Routines
;Graphics init routine: set up scrunch factor to GRPHK1.
GRINIT: SETNUM SCRNCH,GRPHK1
RTS
GSTART: LDA INPFLG
BNE GRIGN ;Ignore primitive if in eval-loop
LDA GRPHCS ;Checks to see if Graphics mode
BMI SDRAW3
SDRAW1: LDX #$00 ;Set up default palette and pencolor
STX PALETN ;(Double width white on black)
LDA CLTAB1
STA BKGND
INX
STX COLNUM
LDA CLTAB1+1 ;Default is pencolor 1
STA PNCOLR
JSR NOEDBF ;Buffer is not retrievable
LDA PRMPAG ;Primary page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment