;:sys36864 ;.opt oo *= $c000 tmp =166 vic =$d000 print =$ffd2 vicinit =$ff81 home =$e566 return =$aad7 right =$ab42 zeich =$798a col =$286 cr =13 pnt =$7f8 spmem =$2c0 scrmem =$452 qflag =$d4 axout =$bdcd crs1 =204 crs2 =205 crs3 =207 getkey =$ffe4 setcr =$e56c zeile =214 spalte =211 repeat =$28a clrx =$e9ff nmbkey =198 chkout =$ffc9 open =$ffc0 close =$ffc3 setpar =$ffba namlen =$b7 load =$ffd5 save =$ffd8 clrchn =$ffcc talk =$ffb4 input =$ffcf untalk =$ffab sectalk =$ff96 iecin =$ffa5 sa =$b9 fa =$ba listen =$ffb1 seclist =$ff93 unlist =$ffae iecout =$ffa8 stat =$90 fname =$cff0 setnam =$ffbd prg =$9d scrclr =$e544 chkin =$ffc6 jmp main strout jmp qstrout pic .byte "\x93\x11\x08\x8e\x9a\xb0\x19%\xc0\xae\x1a\xdd\x19\x08 \x9cnss interface 803\x19\x07 \x05\x12\x19\x04" .byte " \x92\x9a\xdd\x1a\xdd\x05\x19! \x12\x19\x04 \x92\x9a\xdd\x1a\xdd\x19\x09 \x9cmini-zeichensatz" .byte "\x19\x08 \x12\x05\x19\x04-\x92\x9a\xdd\x1a\xdd\x05\x19! \x12\x19\x04 \x92\x9a\xdd\x1a\xdd\x19\x0e \x9ceditor\x19" .byt 13 .byte " \x12\x05\x19\x04" .byte " \x9a\x92\xdd\x1a\xdd\x99zeichen:\x19\x1d \x9a\xdd\x1a\xab\x19%\xc0\xb3\x1a" .byte "\xdd\x19\x0c \x9e** tasten: **\x19\x0c \x9a\xdd\x1a" .byte "\xdd\x98\x12:\x92 punkt setzen\x19\x05 \x12;\x92 punkt loeschen \x9a\xdd\x1a" .byte "\xdd\x98\x12+\x92 naechst. zeich. \x12-\x92 letztes zeichen \x9a\xdd\x1a" .byte "\xdd\x98\x12crsr\x92,\x12home\x92,\x12clr\x92,\x12stop\x92 wie ueblich\x19\x07 \x9a\xdd\x1a" .byte "\xdd\x98\x12i\x92 invert\x19\x0b \x12d\x92 testdruck\x19\x07 \x9a\xdd\x1a" .byte "\xdd\x98\x12l\x92 laden\x19\x0c \x12s\x92 speichern\x19\x07 \x9a\xdd\x1a" .byte "\xdd\x98\x12b\x92 disk befehl\x19\x06 \x12c\x92 directory\x19\x07 \x9a\xdd\x1a" .byte "\xad\x19%\xc0\xbd" .byt 0 numm .byt 0 temp .byt 0 edch .byt 0 x .byt 0 y .byt 0 dirline .byt 0 grbit .byt 2,4,8,16,32 byebye .byte "\x08\x19\x0e \x05U\x19\x0a\xc0I\x1a\x19\x0e \xdd bis bald \xdd\x1a\x19\x0e \xddmal wieder\xdd" .byte "\x1a\x19\x0e J\x19\x0a\xc0K\x19\x04\x11\x1a" .byt 0 allone .byte "\x12a\x92lle zeichen oder nur \x12d\x92ieses ?" .byt 0 sure .byte "sind sie sicher ? [j/n]" .byt 0 switch .byte "drucker anschalten, \x12return\x92 oder \x12stop\x92" .byt 0 savetxt .byte "\x81speicher" .byt 0 loadtxt .byte "\x81lade" .byt 0 filetxt .byte "n: filename ? " .byt 0 command .byte "\x81disk befehl ? i\x9d" .byt 0 more .byte "\x12return\x92 oder \x12stop\x92 taste" .byt 0 key .byte "bitte taste druecken !" .byt 0 qstrout tax lda tmp pha lda tmp+1 pha stx tmp sty tmp+1 str3 ldy #0 strloop lda (tmp),y beq str0 cmp #"\x19" beq str1 cmp #"\x1a" bne ot lda #cr ot jsr print inc tmp bne strloop inc tmp+1 bne strloop str0 pla sta tmp+1 pla sta tmp rts str1 iny lda (tmp),y tax iny lda (tmp),y str2 jsr print dex bne str2 lda #3 clc adc tmp sta tmp bcc str3 inc tmp+1 bne str3 sprinit ldx #7 stx vic+21 ldx #3 stx vic+16 dex stx vic+29 stx vic+23 ldx #50 stx vic ldx #44 stx vic+2 ldx #13 stx vic+41 ldx #141 stx vic+4 ldx #108 stx vic+5 ldx #73 stx vic+1 ldx #91 stx vic+3 ldx #11 stx pnt stx pnt+1 stx pnt+2 ldx #0 stx vic+39 stx vic+40 txa mmm sta spmem,x inx cpx #64 bcc mmm adrx stx numm txa asl clc adc numm rts showx jsr adrx sta temp jsr home jsr return ldy #0 lda #15 sta col sh1 jsr return jsr right jsr print ldx temp lda zeich,x jsr plot lda zeich+1,x jsr plot lda zeich+2,x jsr plot iny cpy #5 bcc sh1 jsr char jmp getspr plot and grbit,y beq b1 lda #"Q" .byt $2c b1 lda #"." jmp print g2 ldx #0 stx temp g1 lda scrmem,x cmp #50 rol temp inx cpx #3 bcc g1 rts getspr ldy #5 lda #sure jsr status lda #0 sta nmbkey getjn jsr getkey cmp #"j" beq ja cmp #"n" bne getjn clc rts ja sec rts kommad lda #allone jsr status lda #0 sta nmbkey getad jsr getkey cmp #"d" beq ja cmp #"a" bne getad clc rts errchn ldx #24 stx zeile jsr clrx lda #0 sta stat sta spalte jsr setcr lda #8 sta col sta fa jsr talk lda #$6f sta sa jsr sectalk getv jsr iecin bit stat bvs readyr jsr print bne getv readyr jsr untalk lda #0 sta nmbkey waitky lda nmbkey beq waitky dec nmbkey ldx #24 jmp clrx name php lda #0 sta spalte lda #24 sta zeile jsr setcr plp bcs txsave lda #loadtxt bne txtaus txsave lda #savetxt txtaus jsr strout lda #filetxt jsr strout lda #"z" sta fname lda #"/" sta fname+1 ldx #2 getname jsr input cmp #cr beq crname sta fname,x inx cpx #16 bcc getname crname cpx #3 bcs tats ldx #24 jsr clrx clc rts tats txa ldx #fname jsr setnam sec rts main jsr vicinit lda #pic jsr strout lda #0 sta vic+33 sta vic+32 sta prg jsr sprinit jsr chome jsr chome lda #128 sta repeat goin jsr showakt ldx #24 jsr clrx mainloop lda #11 sta col jsr setcrsr lda #0 sta crs1 waitkey jsr getkey beq waitkey pha lda #2 sta crs2 waitaus lda crs3 bne waitaus inc crs1 pla cmp #"+" bne noplu inc edch bit edch bvc goin lda #0 sta edch beq goin noplu cmp #"-" bne nomi dec edch bpl goin lda #63 sta edch bne goin nomi cmp #"\x03" bne nostop jsr vicinit lda #byebye jmp strout nostop cmp #"\x11" bne nodown ldx y cpx #4 bcs mainloop inc y bne goin nodown cmp #"\x91" bne noup ldx y beq mainloop dec y bpl goin noup cmp #"\x1d" bne noright ldx x cpx #2 bcs mainloop inc x bne ggoin noright cmp #"\x9d" bne noleft ldx x beq gmainloop dec x bpl ggoin noleft cmp #"\x13" bne nohome jsr chome ggoin jmp goin gmainloop jmp mainloop nohome cmp #":" bne noset ldx edch jsr adrx clc adc x tax ldy y lda zeich,x ora grbit,y sta zeich,x bne ggoin noset cmp #";" bne noloesch ldx edch jsr adrx clc adc x tax ldy y lda zeich,x eor #-1 ora grbit,y eor #-1 sta zeich,x jmp goin noloesch cmp #"\x93" bne noclr jsr surejn bcc ggoin jsr kommad bcc clrall ldx edch jsr adrx ldy #3 tax lda #128 clrchr sta zeich,x inx dey bne clrchr jmp goin clrall ldx #191 lda #128 clral sta zeich,x dex cpx #-1 bne clral jmp goin noclr cmp #"i" bne noinv jsr kommad bcc invall ldx edch jsr adrx ldy #3 tax invchr lda zeich,x eor #$3e sta zeich,x inx dey bne invchr jmp goin invall ldx #191 inval lda zeich,x eor #$3e sta zeich,x dex cpx #-1 bne inval jmp goin noinv cmp #"d" bne nodruck druck lda #4 tax ldy #0 jsr setpar lda #0 sta namlen jsr open ldx #4 jsr chkout bcs printerr lda #8 jsr print ldx #0 ldy #3 auslp lda zeich,x jsr print inx dey bne nolr lda #128 jsr print ldy #3 nolr cpx #192 bcc auslp lda #15 jsr print jsr return jsr clrchn lda #4 jsr close bcc enddrck printerr jsr clrchn lda #4 jsr close lda #switch jsr status lda #0 sta nmbkey warest jsr getkey cmp #cr beq druck cmp #"\x03" bne warest enddrck ldx #24 jsr clrx jmp mainloop nodruck cmp #"b" bne nocmd lda vic+21 pha lda #0 sta vic+21 lda #0 sta spalte lda #24 sta zeile jsr setcr lda #command jsr strout lda #8 sta fa jsr listen lda #$6f sta sa jsr seclist cmdout jsr input cmp #cr beq endcr jsr iecout bcc cmdout endcr jsr unlist enddisc jsr errchn enddisc2 pla sta vic+21 jmp mainloop nocmd cmp #"s" bne nosave sec jsr name bcs do1 jmp mainloop do1 lda vic+21 pha lda #0 sta vic+21 ldx #8 stx fa ldx #zeich+$c0 lda #zeich sta tmp+1 lda #tmp sta sa jsr save jmp enddisc nosave cmp #"l" bne noload clc jsr name bcs do2 jmp mainloop do2 lda vic+21 pha lda #0 sta vic+21 ldx #8 stx fa ldx #0 stx sa ldx #zeich lda #0 jsr load jsr showakt jmp enddisc nodir2 jmp nodir noload cmp #"c" bne nodir2 lda vic+21 pha lda #0 sta vic+21 jsr scrclr lda #"$" sta tmp lda #1 ldx #tmp ldy #0 jsr setnam ldx #8 lda #2 jsr setpar jsr open ldx #2 jsr chkin jsr input lda stat bne dirend jsr input dirc lda #23 sta dirline lda #10 sta col dira dec dirline bne dirb lda #more jsr status lda #0 sta nmbkey jsr clrchn dirkey jsr getkey cmp #"\x03" beq dirend cmp #cr bne dirkey jsr scrclr ldx #2 jsr chkin jmp dirc dirb jsr input jsr input beq dirend jsr return jsr right jsr right jsr input tax jsr input jsr axout jsr right dir0 jsr input beq dira ldy stat bne dirend jsr print bcc dir0 dirend jsr clrchn lda #2 jsr close lda #key jsr status lda #0 sta nmbkey gk lda nmbkey beq gk dec nmbkey lda #pic jsr strout jsr showakt jmp enddisc2 nodir jmp mainloop