;:sys36864 ; dritter anlauf ;.opt p,oo *= 32000 memtop = >* setmem = 55 screen = 648 temp = 2 temp2 = 4 getx = $b7f1 illquan = $b248 chrgot = 121 farbram = $d800 konfig = 1 mask = 48 chkkom = $aefd getpar = $e1d4 save1 = $c1 save2 = $ae saver = $f5ea page1 = $8000 page2 = $a000 sa = $b9 loadr = $ffd5 jmp init jmp fill jmp get jmp put jmp save jmp load oldcol .byt 0 oldpag .byt 0 init lda #0 sta setmem lda #memtop sta setmem+1 lda #0 sta oldpag lda #13 sta oldcol rts getcol jsr chrgot bne newcol ldx oldcol res rts newcol jsr getx cpx #16 bcs ill stx oldcol rts ill jmp illquan getpag jsr chrgot bne newpag ldx oldpag jmp l1 newpag jsr getx cpx #32 bcs ill stx oldpag l1 txa asl asl clc adc #128 sta temp+1 lda screen sta temp2+1 lda #0 sta temp sta temp2 rts fill jsr getcol ldy #0 lda #farbram sta temp+1 txa ldx #4 l2 sta (temp),y iny bne l2 inc temp+1 dex bne l2 rts get jsr getpag lda konfig pha sei lda #mask sta konfig ldx #4 ldy #0 l3 lda (temp),y sta (temp2),y iny bne l3 inc temp+1 inc temp2+1 dex bne l3 back pla sta konfig cli jmp fill put jsr getpag lda konfig pha sei lda #mask sta konfig ldx #4 ldy #0 l4 lda (temp2),y sta (temp),y iny bne l4 inc temp+1 inc temp2+1 dex bne l4 jmp back save jsr chkkom jsr getpar lda #page1 sta save1 sty save1+1 lda #page2 sta save2 sty save2+1 lda #1 sta sa jmp saver load jsr chkkom jsr getpar lda #0 sta sa ldx #page1 jmp loadr