home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1989 July
/
64er_Magazin_89-07_1989_Markt__Technik_de_Side_A.d64
/
screens.src
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
2KB
|
44 lines
10 open1,8,2,"screens.pac,p,w"
20 sys9*4096:.opt o1:*=$8000
30 .asc "pro[195] mode,pro[195] clear,pro[195] pen,pro[195] lores:pro[199]:"
40 col0 = 53281:col1 = 53282:col2 = 53283:col3 = 53284:zp1 = 254
50 jmp mod:jmp clr:jmp pn:jmp lrs
100 ; ********************
101 ; *** mode command ***
105 mod jsr $b79e:cpx #2:bcs error:txa:pha:jsr $e200:cpx #2:bcs error
110 pla:sta 56576:txa:eor #1:ora #40:sta 53272
115 txa:asl a:asl a:asl a:asl a:ora #8:sta 53270:lda #59:sta 53265:rts
130 ; *******************
131 ; *** (NULL) command ***
135 pn jsr $b79e:cpx #4:bcs error:txa:pha:jsr $e200:pla:tay:txa:sta 53281,y:rts
140 ; *** illegal quantity ***
145 error ldx #14:jmp $a43a
150 ; *********************
151 ; *** clear command ***
160 clr lda 56576:and #3:cmp #2:bcs error
161 lda 53270:and #16:beq l162:jsr mcclr
162 l162 jsr colclr
200 ; *** bitmap clear ***
205 ; ********************
210 lda 56576:eor #3:and #3:sec:ror:ror:ror:sta l240+2:lda #0:ldx #32
220 ; ** x pages -> a **
230 fill ldy #0
240 l240 sta $0000,y:iny:bne l240:inc l240+2:dex:bne l240:rts
300 ; *** farbram clear ***
310 ; *********************
330 colclr lda 56576:and #3:eor #3:clc:ror:ror:ror
340 ora #8:sta l240+2:ldx #4:lda 53270:and #16:bne l344
342 lda col0:jmp l348
344 l344 lda col2:and #15
348 l348 and #15:sta var:lda col1:asl a:asl a:asl a:asl a:ora var:jmp fill
355 ; *** farbram clear $d8 ***
356 ; *************************
358 mcclr lda col0:sta 53281:lda #$d8:sta l240+2:lda col3:ldx #4:bne fill
790 ; *********************
791 ; *** lores command ***
820 lrs lda #$ff:sta 56576
830 lda #4:sta 648:lda #21:sta 53272
840 lda 53265:and #223:sta 53265:rts
1000 var .byte 0
1020 .end:close1