; PET Code ; a concrete poem based on Jörg Piringer's "Unicode" ; by nom de nom ; ; To start, SYS 4096 .word $1000 *=$1000 ; Sorry! No BASIC loader in this one -- it bloats it too much. ; ;.word $0801 ;*=$0801 ; ; .word last, 10 ; next/last line, current line ; .byte $9e,"2061",0 ; SYS 2061 ;last .word 0 ; end of BASIC program start jsr $ff81 ; SCINIT to clear screen ; puts #$01 into x stx $d020 ; border white stx $d021 ; background color 1 white lda #$00 cram sta $d900,x ; set color RAM (top-mid-screen) black sta $da00,x ; set color RAM (bottom-mid-screen) black inx bne cram loop lda #$04 sta $fb lda #$58 sta $fa shut ldy #%00111111 sty $dc0d ; turn off all interrupts ldy #%00110011 sty $01 ; switch CHAREN signal to select ROM crom lda $d000,x open ldy #%00110111 sty $01 ; switch CHAREN signal to select I/O ldy #%10000001 sty $dc0d ; turn on Timer A interrupt sta $02 inx ldy #$f8 pixel asl $02 lda #$20 bcc draw lda #$a0 draw sta ($fa),y iny bne pixel lda $fa cmp #$70 beq done clc lda #$28 adc $fa sta $fa bcc shut inc $fb bne shut done ldy #$60 pause inc $02 bne pause jsr $ffe1 ; check STOP beq done+1 ; $60 (rts) is located there lda $a2 sta $d400,y ; sound! iny bpl pause cpx #$0 bne loop inc crom+2 lda crom+2 cmp #$e0 bne loop lda #$d0 sta crom+2 bne loop ; replace with rts for one-time version ; rts