From: hachti Date: Sun, 7 May 2006 14:46:01 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://gitweb.hachti.de/?a=commitdiff_plain;h=2ccfbbf4377dd72913ea7a9bd4151efa50c7fc1f;p=h316.git *** empty log message *** --- diff --git a/programs/tools/src/copy.asm b/programs/tools/src/copy.asm new file mode 100644 index 0000000..d20ea87 --- /dev/null +++ b/programs/tools/src/copy.asm @@ -0,0 +1,85 @@ +* COPY - COPY PTR TO PTP +* +* +* +* + SUBR COPY,STRT + REL ASSEMBLE IN RELOCATABLE MODE + ORG 0 +* +*********************** +* MAIN LOOP +STRT + + OCP '102 START PTR ??? + OCP '104 START PTP ??? + LDA ABUF FIRST BUFFER ADDRESS + STA WBUF TO WRITE POINTER + STA RBUF TO READ POINTER + + JST READ + JST WRIT + JMP STRT +* +* +*********************** +* READ ROUTINE +READ DAC ** + SS1 SKIP IF SW1 SET + JMP* READ RETURN + LDA RPTR READ POINTER + CMP WPTR COMPARE WRITE POINTER + SKP SKIP + + +*********************** +* WRITE ROUTINE +WRIT DAC ** + SS2 SKIP IF SW1 SET + JMP* WRIT RETURN + + +RPTR DAC ** READ POINTER +WPTR DAC ** WRITE POINTER +ABUF OCT '1000 FIRST BUFFER LOCATION +EBUF OCT '2000 LAST BUFFER LOCATION + + + +STRT JMP ST2 JUMP OVER CONSTANTS +ANFA OCT 20 +ENDE DAC STRT-1 +ST2 LDA ANFA LOAD START ADDRESS + STA PTR +LOOP CRA + STA* PTR STORE THE ZERO + LDA PTR + SUB ENDE TEST FOR + SNZ LAST LOCATION? + JMP RDY IF LAST LOCATION, END + IRS PTR + JMP LOOP NO OVERFLOW + HLT OVERFLOW OCCURED +RDY OCP '104 ASR START +* + LDA KO + JST PRNT + LDA LFCR + JST PRNT + HLT + JMP STRT RESTART :-) +******* +KO BCI 1,KO +LFCR OCT '6412 +******* +PRNT DAC ** + OTA 4 OUTPUT CHAR + JMP *-1 REPEAT UNTIL POSSIBLE + ICA NEXT CHAR + OTA 4 + JMP *-1 + JMP* PRNT RETURN +***** +PTR DEC 0 LOCATION POINTER +***** + END