0100  .OPT NOEJECT
0110 DOSINI=$0C
0120 IN=$CC
0130 OUT=$CE
0140 OFFSET=$D0
0150 MEMTOP=$2E5
0160 CBEGIN=LENGTH+2
0170  *=$3000
0180 ENTER SEC
0190  LDA MEMTOP
0200  SBC LENGTH
0210  LDA MEMTOP+1
0220  SBC LENGTH+1
0230  STA OUT+1
0240  STA OFFSET
0250  TAY
0260  DEY
0270  STY MEMTOP+1
0280  LDY #$FF
0290  STY MEMTOP
0300  INY
0310  STY OUT
0320  LDX #00
0330  LDA #CBEGIN&$FF
0340  STA IN
0350  LDA #CBEGIN/256
0360  STA IN+1
0370  JSR MOVI
0380 HERE TAX
0390  BMI MORE
0400  JSR MOVI
0410  CLC
0420  ADC OFFSET
0430  LDX #00
0440  JSR MOV
0450  BMI HERE
0460 MORE INX
0470  BEQ OVER
0480  DEX
0490  JSR MOVI
0500  BMI HERE
0510 MOV STA (OUT),Y
0520  INC OUT
0530  BNE MOVI
0540  INC OUT+1
0550 MOVI LDA (IN),Y
0560  INC IN
0570  BNE MOVO
0580  INC IN+1
0590 MOVO DEX
0600  BPL MOV
0610 ARND RTS
0620 OVER LDA #01
0630  STA OUT
0640  LDA OFFSET
0650  STA OUT+1
0660  LDA DOSINI
0670  STA (OUT),Y
0680  INC OUT
0690  LDA DOSINI+1
0700  STA (OUT),Y
0710  INC OUT
0720  TYA
0730  STA DOSINI
0740  LDA OFFSET
0750  STA DOSINI+1
0760  JMP (OUT)
0770 LENGTH=*
