home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1989 February
/
64er_Magazin_89-02_1989_Markt__Technik_de_Disk_1_of_2_Side_A.d64
/
floppy.quell
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
8KB
|
615 lines
10 open1,8,2,"fobj,p,w":sys32768:.opt o1:*= $0300
11 ;
12 .byte $a0,$ea
13 .byte <puffer,>puffer
14 .byte <kopf,>kopf
15 .byte <format,>format
16 .byte <read,>read
17 .byte <write,>write
18 ;
19 sei
21 lda $1c0c
22 ora #$0e
23 sta $1c0c
24 lda #$21
25 sta $2c
26 lda #01
27 sta $2d
28 lda $1c00
29 ora #04
30 sta $1c00
31 start ldx #$20
32 txs
33 lda #15
34 sta $1800
35 jsr einein
36 asl a
37 sta l1+1
42 l1 jmp ($0300)
43 ;
50 puffer lda #$21
51 sta $2c
52 lda #01
53 sta $2d
54 jmp start
55 ;
120 sync lda #$d0
121 sta $1805
122 sec
123 s2 bit $1805
124 bpl s1
125 bit $1c00
126 bmi s2
127 lda $1c01
128 clv
129 clc
130 s1 rts
131 ;
150 ein ldy #00
151 lda #02
152 sta ee+2
153 jsr in
154 lda #07:sta ee+2
155 ldy #$bc
156 jmp in
157 ;
160 einein ldy #$ff
161 lda #01
162 sta ee+2
163 jsr in
164 lda $01ff
165 rts
166 ;
170 in stx $55
171 ldx #16
172 i1 lda $1800
173 bpl i1
174 stx $1800
175 nop
176 nop
177 ldx #00
178 stx $1800
179 nop
180 nop
181 i2 lda $1800
182 bpl i2
183 nop
184 nop
185 ldx $1800
186 lda tab45,x
187 nop
188 ldx $1800
189 ora tab67,x
190 nop
191 nop
192 nop
193 ldx $1800
194 ora tab01,x
195 nop
196 ldx $1800
197 ora tab23,x
198 ee sta $0200,y
199 iny
200 bne i2
201 ldx #15
202 stx $1800
203 ldx $55
204 rts
205 ;
206 tab45 .byte $00,$20
207 tab67 .byte $00,$80,$10,$30,$40,$c0
208 tab01 .byte $00,$02
209 tab23 .byte $00,$08,$01,$03,$04,$0c
210 ;
250 aus ldy #00
251 lda #02
252 sta aa+2
253 jsr out
254 ldy #$bc
255 lda #07:sta aa+2
256 jmp out
257 ;
260 einaus sta $01ff
261 ldy #$ff
262 lda #01
263 sta aa+2
264 ;
270 out stx $55
271 ldx #16
272 o1 lda $1800
273 bpl o1
274 stx $1800
275 aa lda $0200,y
276 sta $54
277 lsr a
278 lsr a
279 lsr a
280 lsr a
281 o2 ldx $1800
282 bpl o2
283 sta $1800
284 asl a
285 and #15
286 sta $1800
287 lda !$0054
288 and #15
289 sta $1800
290 asl a
291 and #15
292 sta $1800
293 iny
294 bne aa
295 ldx #15
296 stx $1800
297 ldx $55
298 rts
300 ;
320 format jsr einein
321 sta $23
322 jsr kopf1
323 jsr sync
324 bcs format1
325 f1 bvc f1
326 clv
327 lda $1c01
328 cmp #$52
329 beq f2
330 cmp #$55
331 beq f2
332 bne format1
333 f2 jmp start
334 ;
335 format1 lda #00
336 sta $30
337 sta $34
338 sta $19
339 lda #02
340 sta $31
341 f3 lda $19
342 sta $54
343 lda #08
344 sta $52
345 lda $23
346 sta $55
347 lda $12
348 eor $13
349 eor $23
350 eor $19
351 sta $53
352 jsr $f6d0
353 lda $12
354 sta $53
355 lda $13
356 sta $52
357 lda #00
358 sta $54
359 sta $55
360 jsr $f6d0
361 dec $34
362 dec $34
363 inc $19
364 lda $19
365 cmp $43
366 bne f3
367 lda #00
368 sta $ac
369 lda $43
370 sta $ad
371 lda #$ce
372 sta $1c0c
373 lda #$ff
374 sta $1c03
375 lda #$55
376 sta $1c01
377 ldx #01
378 jsr $fe24
379 fa lda #$ff
380 sta $1c01
381 ldx #05
382 f4 bvc f4
383 clv
384 dex
385 bne f4
386 ldx #08
387 ldy $ac
388 f6 lda $0200,y
389 sta $1c01
390 f5 bvc f5
391 clv
392 iny
393 dex
394 bne f6
395 sty $ac
396 ldx #$0b
397 lda #$55
398 sta $1c01
399 f7 bvc f7
400 clv
401 dex
402 bne f7
403 lda #$ff
404 sta $1c01
405 ldx #05
406 f8 bvc f8
407 clv
408 dex
409 bne f8
410 ldx #03
411 f99 lda gcr1,x
412 sta $1c01
413 f9 bvc f9
414 clv
415 dex
416 bpl f99
417 ldy #$40
418 fb ldx #04
419 fcc lda gcr2,x
420 sta $1c01
421 fc bvc fc
422 clv
423 dex
424 bpl fcc
425 dey
426 bne fb
427 ldx #08
428 lda #$55
429 sta $1c01
430 fd bvc fd
431 clv
432 dex
433 bne fd
434 dec $ad
435 bne fa
436 jsr $fe00
437 jmp start
438 ;
450 read lda #00
451 sta $97
452 sta $52
453 lda #05
454 ldx $43
455 stx $ad
456 r1 sta $b1,x
457 dex
458 bne r1
459 stx $b0
460 r9 lda #07
461 sta $53
462 ldx #$2a
463 r4 jsr sync
464 bcc r2
465 lda #$f1
466 r5 jsr einaus
467 jmp start
468 r2 bvc r2
469 clv
470 lda $1c01
471 cmp #$52
472 beq r3
473 dex
474 bne r4
475 lda #$f2
476 bne r5
477 ;
478 r3 jsr header1
494 r7 cmp $43
495 bcc r8
496 r10 lda $b0
497 inc $b0
498 cmp $43
499 bne r9
500 jmp rfertig
501 ;
502 r8 tax
503 lda $b2,x
504 beq r10
505 bmi r10
506 stx $96
507 ldy #00
508 sty $a8
509 sty $a9
510 sty $aa
511 sty $ab
512 sty $b1
513 sty $b0
514 ldy #$bc
515 jsr sync
516 ldx #$40
517 r11 bvc r11
518 clv
519 lda $1c01
520 sta ($52),y
521 eor $a8
522 sta $a8
523 iny
524 r12 bvc r12
525 clv
526 lda $1c01
527 sta ($52),y
528 eor $a9
529 sta $a9
530 iny
531 r13 bvc r13
532 clv
533 lda $1c01
534 sta ($52),y
535 eor $aa
536 sta $aa
537 iny
538 bne r14
539 lda #02:sta $53
540 r14 bvc r14
541 clv
542 lda $1c01
543 sta ($52),y
544 eor $ab
545 sta $ab
546 iny
547 r15 bvc r15
548 clv
549 lda $1c01
550 sta ($52),y
551 eor $b1
552 sta $b1
553 iny
554 dex
555 bne r11
556 r16 bvc r16
557 clv
558 lda $1c01
559 sta ($52),y
560 eor $a8
561 sta $a8
562 iny
563 r17 bvc r17
564 clv
565 lda $1c01
566 sta ($52),y
567 eor $a9
568 sta $a9
569 iny
570 r18 bvc r18
571 clv
572 lda $1c01
573 sta ($52),y
574 and #$40
575 eor $aa
576 sta $aa
577 iny
578 r19 bvc r19
579 clv
580 lda $1c01
581 sta ($52),y
582 ldx $96
583 lda $b1
584 lsr a
585 lsr a
586 eor $a8
587 lsr a
588 php
589 lsr a
590 eor $a9
591 lsr a
592 lsr a
593 eor $aa
594 and #02
595 bne r30
596 plp
597 ror a
598 lsr a
599 eor $aa
600 lsr a
601 lsr a
602 eor $ab
603 and #$10
604 beq r30
605 inc $97
606 lda $b2,x
607 ora #$80
608 sta $b2,x
609 txa
610 jsr einaus
611 jsr aus
612 r40 dec $ad
613 beq rfertig
614 jmp r9
615 ;
616 rfertig lda $97
617 beq r20
618 lda #$fd
619 bne r21
620 r20 lda #$fc
621 r21 jsr einaus
622 ldx #00
623 r22 txa
624 tay
625 iny
626 lda $b2,x
627 sta ($2c),y
628 bmi r44
629 txa
630 jsr einaus
631 r44 inx
632 cpx $43
633 bne r22
634 lda #$f3
635 jsr einaus
636 ldy #00
637 lda $97
638 sta ($2c),y
639 lda $97:beq r222:lda $2c
640 clc
641 adc #22
642 sta $2c
643 r222 jmp start
644 ;
650 r30 dec $b2,x
651 beq r40
652 jmp r9
653 ;
680 write ldx #00
681 w11 txa
682 tay
683 iny
684 lda ($2c),y
685 sta $b2,x
686 inx
687 cpx $43
688 bne w11
689 ldy #00
690 lda ($2c),y
691 sta $97
692 hloop jsr header
693 clc
694 adc #03
695 cmp $43
696 bcc w2
697 sec
698 sbc $43
699 w2 tax
700 lda $b2,x
701 bpl hloop
702 txa
703 sta $53
704 jsr einaus
705 jsr ein
706 w3 jsr header
707 cmp $53
708 bne w3
709 ldx #13
710 w4 bvc w4
711 clv
712 dex
713 bne w4
714 lda #$ce
715 sta $1c0c
716 lda #$ff
717 sta $1c03
718 ldx #05
719 sta $1c01
720 w5 bvc w5
721 clv
722 dex
723 bne w5
724 ldx #$bc
725 w66 lda $0700,x
726 sta $1c01
727 w6 bvc w6
728 clv
729 inx
730 bne w66
731 w77 lda $0200,x
732 sta $1c01
733 w7 bvc w7
734 clv
735 inx
736 bne w77
737 ldx #04
738 lda #$55
739 sta $1c01
740 w8 bvc w8
741 clv
742 dex
743 bne w8
744 jsr $fe00
745 ldx $53
746 lda #00
747 sta $b2,x
748 dec $97
749 bne hloop
750 lda $2c
751 clc
752 adc #22
753 sta $2c
754 lda #$f1
755 jsr einaus
756 jmp start
757 ;
800 kopf jsr einein
801 sta $23
802 jsr kopf1
803 jmp start
804 ;
805 kopf1 pha
806 ldx #$ca:stx k12
807 ldx #00
808 sec
809 sbc $22
810 bcs k9
811 ldx #$e8:stx k12
812 ldx #01
813 k9 stx k10+1
815 asl a
816 tax
817 k10 lda #00
818 eor $1c00
819 sec
820 rol a
821 and #03
822 eor $1c00
823 sta $1c00
824 lda #150
825 sta $1805
826 k11 lda $1805
827 bmi k11
828 k12 dex
829 bne k10
830 pla
831 sta $22
832 k1 ldx #05
833 lda $22
834 k3 dex
835 cmp tabt,x
836 bcs k3
837 lda tabs,x
838 sta $43
839 cpx #00
840 beq k4
841 dex
842 k4 txa
843 asl a
844 asl a
845 asl a
846 asl a
847 asl a
848 sta $44
849 lda $1c00
850 and #$9f
851 ora $44
852 sta $1c00
853 lda $1c0c
854 ora #$0e
855 sta $1c0c
856 rts
857 ;
858 tabt .byte $ff,$24,$1f,$19,$12
859 tabs .byte $11,$11,$12,$13,$15
888 ;
900 header jsr sync
901 h1 bvc h1
902 clv
903 lda $1c01
904 cmp #$52
905 bne header
906 header1 ldx #03
907 h2 bvc h2
908 clv
909 lda $1c01
910 dex
911 bne h2
912 tax
913 php
914 lsr a
915 lsr a
916 and #$1f
917 tax
918 lda $f8c0,x
919 plp
920 bpl h3
921 ora #$10
922 h3 rts
930 ;
950 gcr1 .byte $29,$a5,$d4,$55
951 gcr2 .byte $29,$a5,$94,$52,$4a
960 ;