Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 22:31 17 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : olde Fortran on pic32 ?!

Author Message
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
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;
\
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3677
Posted: 11:06pm 07 Jan 2014
Copy link to clipboard 
Print this post

OMG

Since when did it have semicolons?

John
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 02:47am 08 Jan 2014
Copy link to clipboard 
Print this post

I can just hear the old ASR33 chugging away in the background!
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 09:04pm 09 Jan 2014
Copy link to clipboard 
Print this post

The semicolons are where the silverfish nibbled the card deck !!
Good point - I'll have to take them out.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024