Posted: 07:40pm 07 Jan 2014 |
Copy link to clipboard |
Print this post |
|
OK how retro do you want to go ?!
I have a small Fortran interpreter (stop laughing!!) running on
pic33/pic32mx1 etc. It has things like strong datatypes, subroutines,
(double precison on mx) etc but is not finalised. If anyone wants
it ported to MM ..?
For a little diversion here it is doing a sad reminder of eighties
"ascii art"...
PROGRAM CURVY;
C;
INTEGER*2 h, v ;
INTEGER*2 m(64,21) ;
REAL c, d ;
PRINT "start" ;
DO 10 h = 1, 64 ;
DO 10 v = 1, 21 ;
m(h,v) = 32 ;
10 CONTINUE ;
c = 0.0 ;
DO 30 h = 1, 64 ;
d = 11.5 - 8.66 * SIN(c) ;
v = IFIX(d) ;
m(h,v) = 42 ;
c = c + 0.099 ;
30 CONTINUE ;
CALL plott ( m ) ;
PRINT "finish" ;
END;
C;
SUBROUTINE plott ( page );
INTEGER*2 x, y ;
FORMAT (A1) ;
DO 10 x = 1, 64 ;
page(x,1) = 45 ;
page(x,11) = 45 ;
10 page(x,21) = 45 ;
DO 30 y = 1, 20 ;
page(1,y) = 124 ;
30 page(64,y) = 124 ;
DO 40 y = 1, 21 ;
WRITE (2,*) ( page(x,y), x = 1, 64 ) ;
PRINT ;
40 CONTINUE ;
RETURN ;
END;
\
|