From bf9d30c535b51bcb9841e98dc7bd6a5007f84014 Mon Sep 17 00:00:00 2001 From: hachti Date: Sat, 1 Dec 2007 16:31:07 +0000 Subject: [PATCH] *** empty log message *** --- lib/iolib/src/pl$mv.asm | 115 +- lib/iolib/src/pl$u.asm | 16 +- programs/fortran/build_frtn_doug.sh | 35 + programs/fortran/frtn_doug.asm | 7165 +++++++++++++++++++++++++++ programs/plotter/src/sinus.f | 16 +- 5 files changed, 7335 insertions(+), 12 deletions(-) create mode 100755 programs/fortran/build_frtn_doug.sh create mode 100644 programs/fortran/frtn_doug.asm diff --git a/lib/iolib/src/pl$mv.asm b/lib/iolib/src/pl$mv.asm index b202b72..97d4dfe 100644 --- a/lib/iolib/src/pl$mv.asm +++ b/lib/iolib/src/pl$mv.asm @@ -2,13 +2,16 @@ * * * PROGRAM TITLE: -* PL$MV (PL$MV,PL$RST) +* PL$MV (PL$MV,PL$RST,PL$LN) * * PLOTTER MOVEMENT ROUTINES * * * REVISIONS: * 1.0 (2007-05-28) +* 1.1 (2007-11-08) - ADDED INTELLIGENT LINE DRAWING ROUTINE +* +* * * AUTHOR: * @@ -33,7 +36,13 @@ * CALL PL$MV - MOVE TO POINT SPECIFIED * DAC XN BY XN * DAC YN AND YN VALUE -* +* +* CALL PL$LN - DRAW LINE AND LEAVE PEN DOWN +* DAC X1 +* DAC Y1 +* DAC X2 +* DAC Y2 +* DAC 0 * * ******************************************************************************** @@ -41,11 +50,113 @@ * SUBR PL$MV,MOVE SUBR PL$RST,RST + SUBR PL$LN,LINE +* * * REL THIS IS A RELOCATABLE OBJECT ORG '0 * +******************************************************************************** +* +LINE DAC 0 DRAW A LINE FROM NEAR STARTING POINT + LDA* LINE X1 + STA X1P + IRS LINE + LDA* LINE Y1 + STA Y1P + IRS LINE + LDA* LINE X2 + STA X2P + IRS LINE + LDA* LINE Y2 + STA Y2P + IRS LINE TALLY RETURN ADDRESS + IRS LINE AGAIN FOR FORTRAN IV COMPATIBILITY +* + LDA X + SUB* X1P + SPL SKIP IF SIGN PLUS + TCA TWO'S COMPLEMENT IF NEEDED + STA D1 + LDA Y + SUB* Y1P + SPL + TCA + ADD D1 + STA D1 +* + LDA X + SUB* X2P + SPL SKIP IF SIGN PLUS + TCA TWO'S COMPLEMENT IF NEEDED + STA D2 + LDA Y + SUB* Y2P + SPL + TCA + ADD D2 + CAS D1 + JMP D2BG D2 IS BIGGER! + NOP +* +D1BG LDA* X2P DIFFERENCE 1 IS BIGGER, SO START AT POINT X2,Y2 + STA XA + LDA* Y2P + STA YA + LDA* X1P + STA XB + LDA* Y1P + STA YB + JMP WOKI WORK! +* +D2BG LDA* X1P DIFFERENCE 2 IS BIGGER, SO START AT POINT X1,Y1 + STA XA + LDA* Y1P + STA YA + LDA* X2P + STA XB + LDA* Y2P + STA YB +* +WOKI LDA X TEST IF STARTING POINT IST CURRENT POSITION + CAS XA + JMP MV1 + JMP *+2 + JMP MV1 + LDA Y + CAS YA + JMP MV1 + JMP *+2 + JMP MV1 + JMP NM1 +* +MV1 CALL PL$PU MOVE TO THE STARTING POSITION + CALL PL$MV + DAC XA + DAC YA + DAC 0 +NM1 CALL PL$PD WE ARE AT BEGINNING OF LINE + CALL PL$MV + DAC XB + DAC YB + DAC 0 + JMP* LINE END OF THE LINE :-) +* +* +X1P DAC 0 ARGUMENT POINER TO X1 +Y1P DAC 0 ARGUMENT POINER TO Y1 +X2P DAC 0 ARGUMENT POINER TO X2 +Y2P DAC 0 ARGUMENT POINER TO Y2 +XA DEC 0 REAL FIRST POINT X COORDINATE +YA DEC 0 REAL FIRST POINT Y COORDINATE +XB DEC 0 REAL SECOND POINT X COORDINATE +YB DEC 0 REAL SECOND POINT Y COORDINATE +D1 DEC 0 ORTHOGONAL WAY LENGTH FROM CURRENT POS TO P1 +D2 DEC 0 ORTHOGONAL WAY LENGTH FROM CURRENT POS TO P2 +* +* +******************************************************************************** * RST DAC ** SET POINT ZERO STA X diff --git a/lib/iolib/src/pl$u.asm b/lib/iolib/src/pl$u.asm index 4c23c64..be61b23 100644 --- a/lib/iolib/src/pl$u.asm +++ b/lib/iolib/src/pl$u.asm @@ -8,6 +8,8 @@ * * REVISIONS: * 1.0 (2007-05-27) +* 1.1 (2007-11-08) - ADDED PEN POSITION TRACKING +* TO PL$PU AND PL$PD * * AUTHOR: * @@ -22,8 +24,8 @@ * * STORAGE: * -* ??? (OCTAL) -* ??? (DECIMAL) +* 100 (OCTAL) +* 64 (DECIMAL) * * * USAGE: @@ -95,14 +97,23 @@ LEFT DAC ** * * PENU DAC ** + LDA PEN + SNZ + JMP* PENU + CRA + STA PEN LDA CPNU JST OUT JMP* PENU * * PEND DAC ** + LDA PEN + SZE + JMP* PEND LDA CPND JST OUT + IRS PEN JMP* PEND * * @@ -142,5 +153,6 @@ CRGT OCT '10 CPNU OCT '20 CPND OCT '40 * +PEN DEC 0 PEN STATE: 1=DOWN * END diff --git a/programs/fortran/build_frtn_doug.sh b/programs/fortran/build_frtn_doug.sh new file mode 100755 index 0000000..894bb1e --- /dev/null +++ b/programs/fortran/build_frtn_doug.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +cat > build.do <