Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:00 06 Jul 2025 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 : Celebrating 50 Years of BASIC

Author Message
cdeagle
Senior Member

Joined: 22/06/2014
Location: United States
Posts: 265
Posted: 03:25am 15 Feb 2015
Copy link to clipboard 
Print this post

Last year marked 50 years since the creation of the BASIC programming language at Dartmouth College. Interesting facts about BASIC can be found at the following link at Dartmouth;

http://www.dartmouth.edu/basicfifty/news.html

To show my appreciation for BASIC, I have made available the companion QuickBASIC programs for my privately published journal Celestial Computing at the following Dropbox location;

https://www.dropbox.com/sh/7i3ztymphqliqx3/AAAm-LO_40B7pR2kg gz8CzIka?dl=0

This site also includes PDF versions of the journal.

I am currently "porting" some of these programs and support functions to MMBasic. Here's a typical example.


' test_atan3.bas

' test atan3 function

'''''''''''''''''''''

' angular argument in degrees

theta = 195.457

a = sin(rad(theta))

b = cos(rad(theta))

c = deg(atan3(a, b))

print
print "atan3 computed angle ", c, " degrees"
print

end

function atan3(a, b)

' four quadrant inverse tangent function

' input

' a = sine of angle
' b = cosine of angle

' output

' c = angle ( 0 =< c <= 2 * pi : radians )

'''''''''''''''''''''''''''''''''''''''''''

pidiv2 = pi / 2.0

if (abs(a) < 1.0e-6) then

atan3 = (1.0 - sgn(b)) * pidiv2

exit function

else

c = (2.0 - sgn(a)) * pidiv2

endif

if (abs(b) < 1.0e-6) then

atan3 = c

exit function

else

atan3 = c + sgn(a) * sgn(b) * (abs(atn(a / b)) - pidiv2)

endif

end function


 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3282
Posted: 04:17am 15 Feb 2015
Copy link to clipboard 
Print this post

Interesting stuff.
For anyone who wants to read it, this is the working link:
https://www.dropbox.com/sh/7i3ztymphqliqx3/AAAm-LO_40B7pR2kg gz8CzIka?dl=0#
Geoff Graham - http://geoffg.net
 
Oldbitcollector

Senior Member

Joined: 16/05/2014
Location: United States
Posts: 172
Posted: 08:02am 15 Feb 2015
Copy link to clipboard 
Print this post

Most excellent! Thank you for sharing!

I'm going to repost your link to my forums .
My Propeller/Micromite mini-computer project.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6269
Posted: 11:00am 15 Feb 2015
Copy link to clipboard 
Print this post

A interesting set of programs and very good explanations of how they work.
A great addition to the collection.

Thanks

Jim
VK7JH
MMedit
 
cdeagle
Senior Member

Joined: 22/06/2014
Location: United States
Posts: 265
Posted: 01:17am 25 Feb 2015
Copy link to clipboard 
Print this post

I have been able to recompile many of the Celestial Computing programs using the QB64 compiler (www.qb64.net).

I have placed these Windows 7 executables in a subdirectory named qb64_exe and the "tweaked" source code in a subdirectory named qb64_src, both at the link given above.

I have tested most of the new executables but some may still have "bugs".
 
Print this page


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

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025