home *** CD-ROM | disk | FTP | other *** search
- 100 print "source - makess - jim b"
- 110 end
- 120 *=$2000 ; program start addrs
- 130 start ldx #$01 ; from infile...
- 140 jsr $ffc6
- 150 jsr $ffe4 ; get character...
- 160 ldy $90 ; log end-of-file
- 170 php
- 180 pha
- 190 jsr $ffcc ; disconnect infile
- 200 pla
- 205 ; put in(NULL) into x;
- 206 ; use a to stage modified (NULL)s
- 210 jsr $ffd2 ; print character
- 220 tax ; copy to x reg
- 225 ; if it's <return>, output '_'
- 230 lda #$1f
- 240 cpx #$0d ; if <return>
- 250 beq send ; .. print it
- 260 txa
- 270 sec
- 280 sbc #$40 ; subtract 64..
- 290 bcc test2 ; < 64, skip
- 300 cpx #$60 ; 64 to 95 ..
- 310 bcc send ; .. yes, send it
- 320 cpx #$a0 ; 96 to 159 ..
- 330 bcc test2 ; .. yes, skip
- 340 cpx #$c0 ; 160 to 191 ..
- 350 bcc send ; .. yes, send it
- 355 ; not alpha-group character...
- 356 ; (64-95 or 160-191)...
- 358 ; test for 96-127; if found,
- 359 ; print [ (NULL) - 32 ]
- 360 test2 txa ; this code at 202c
- 370 bmi test3 ; if 128 or higher
- 380 sec
- 390 sbc #$20 ; subtract 32
- 400 cpx #$60 ; 96 or higher ..
- 410 bcs send ; .. yes, send it
- 415 ; not (NULL) 64-127 or 160-191
- 416 ; test for 0 - 64, 128-159
- 417 ; if found, print [ (NULL) ]
- 420 test3 txa ; this code at 2036
- 430 cpx #$c0
- 440 bcc send
- 445 ; all that's left is 160-255
- 446 ; print [ chr - 128 ]
- 450 sbc #$80
- 460 send pha ; at 203d, write file
- 470 ldx #$02
- 480 jsr $ffc9 ; select outfile
- 490 pla
- 500 jsr $ffd2 ; send char to file
- 510 jsr $ffcc
- 520 jsr $ffe1 ; check stop (NULL)
- 530 beq stop
- 540 plp ; recall e-o-f signal
- 550 beq start ; (NULL) if not eof
- 560 rts
- 570 stop plp ; at 2053
- 580 rts
-