The MASM Forum

Miscellaneous => The Orphanage => Topic started by: jj2007 on June 13, 2016, 07:49:47 AM

Title: Fifty Years of BASIC
Post by: jj2007 on June 13, 2016, 07:49:47 AM
Time magazine writes about Fifty Years of BASIC (http://time.com/69316/basic/) ::)
Title: Re: Fifty Years of BASIC
Post by: hutch-- on June 13, 2016, 11:02:32 AM
Interesting article. :)
Title: Re: Fifty Years of BASIC
Post by: mabdelouahab on June 13, 2016, 04:37:51 PM
And Four Years of MasmBasic (http://masm32.com/board/index.php?topic=94.0)   :biggrin:
Title: Re: Fifty Years of BASIC
Post by: avcaballero on June 13, 2016, 10:14:54 PM
Basic was my first programming language, exactly GW-BASIC. My father bought me an exciting pc xt 8088 with one floppy disk of 5"1/4 and 512 Kb ram with a 14" green phosphor screen. My first program was there, with number of lines

10 for i = 0 to 16
20 for j = i to 16
30 print "*";
40 next j
50 print
60 next i


I don't know any other language capable of write down a "hello world" like this:
? "Hello world"

When I tried to learn better basic programming always realized the need of learning assembler. What the f**ck really was those "PEEK/POKE"

My first video game Stardust (https://www.youtube.com/watch?v=VDijijFsA6U)

Basic never will die :t
Title: Re: Fifty Years of BASIC
Post by: jj2007 on June 13, 2016, 10:36:57 PM
Quote from: mabdelouahab on June 13, 2016, 04:37:51 PM
And Four Years of MasmBasic (http://masm32.com/board/index.php?topic=94.0)   :biggrin:

Thanks for noting - actually, it's more than six years:
MasmBasic
(http://www.masmforum.com/board/index.php?topic=12460)« on: October 06, 2009, 09:24:57 PM »

BTW I didn't like the article so much. It is superficial fishing in old archives. What I lack most is a serious discussion why Basic was pushed aside by C-based languages, including the famous rants of Mr Dijkstra. Given that we live today, decades after, in a World where Adobe informs us after each reboot that they finally solved their security problems in Flash (exploits based on buffer overruns etc), it is hilarious that they still quote Mr Dijkstra for having discovered that GOTOs should be avoided.

There are good reasons why professional programmers hate BASIC:
Quote from: avcaballero on June 13, 2016, 10:14:54 PMI don't know any other language capable of write down a "hello world" like this:
? "Hello world"

And even that one is too complicated; it should be print "Hello world" - we aren't asking questions here, right? Or take this one:
include \masm32\MasmBasic\MasmBasic.inc
  Init
  Let esi="Hello World"
  Let esi=esi+", how are you?"
EndOfCode


To do the same in C, you need professional advice (How to concatenate 2 strings in C? (http://stackoverflow.com/questions/8465006/how-to-concatenate-2-strings-in-c)) - and that is why BASIC has always been a threat to the profession 8)
Title: Re: Fifty Years of BASIC
Post by: hutch-- on June 13, 2016, 11:40:55 PM
 :biggrin:

Well, while I have never tried to be politically correct, I avoid GOTO by using "jmp".  :P

I have seen a lot of clapped out high level language theory in my time and the ancient rant about GOTO was just another attempt to inflict artificial "structure" by means of restriction on some languages. Fantasyland languages come and go (ADA[tm] etc ...) but hardware goes on and on. I have been a fan of the concept of basic for a long time but rarely ever a fan of its implementation as it was often crippled intentionally as a toothless terror with no low level access. Generally Microsoft dialects of basic were very poor, I used a couple of them back in the DOS days, both QB45 and the professional version but they both suffered serious irritations.

The best I found in the early/middle 90s was GFA basic for 16 bit Windows but with the advent of WinNT4/Win95 I found PowerBASIC which has been a good tool for years and the later versions came close to directly porting MASM code so it does most of the HLL tasks I have. I prefer to work directly in MASM for anything serious but PB has been a good tool for years.
Title: Re: Fifty Years of BASIC
Post by: avcaballero on June 14, 2016, 02:25:12 AM
? = PRINT in basic

#include <stdio.h>
#include <string.h>

int main (void) {
  char   *msg1 = "Hello JJ. ", *msg2 = "How are you having today?", msg3[80];
  strcpy (msg3, msg1); strcat(msg3, msg2);
  printf(msg3);
  return 0;
}

If qb had any restriction and assembler doesn't. That's it. We can run embedded assembly code or by quick libraries within qb45   :biggrin:.
Title: Re: Fifty Years of BASIC
Post by: jj2007 on June 14, 2016, 03:04:41 AM
Quote from: hutch-- on June 13, 2016, 11:40:55 PMThe best I found in the early/middle 90s was GFA basic for 16 bit Windows but with the advent of WinNT4/Win95 I found PowerBASIC

I coded a lot in Gfa, first on the Atari ST, then on Windows; the 16-bit version was marvelous, it took the best of Basic and Pascal. But Frank Ostrowski (https://en.wikipedia.org/wiki/Frank_Ostrowski) quit before 32-bit Windows became the standard, and those who tried after him to produce a 32-bit version failed miserably. PowerBASIC is indeed a good dialect (and so are FreeBasic, FBSL, O2, ...), but M$ destroyed the scene, maybe not intentionally, with VB - the most successful non-BASIC ever 8)

Quote from: avcaballero on June 14, 2016, 02:25:12 AM
? = PRINT in basic

I know; it's just not intuitive, and Basic should be intuitive.

Your C example works, of course, but you are comparing apples and oranges. What you are showing is a static strings example, and that is much, much closer to hand-made assembler than to Basic. Try this:

include \masm32\MasmBasic\MasmBasic.inc      ; download (http://masm32.com/board/index.php?topic=94.0)
  SetGlobals a$="Hello avcaballero", b$=", what's up today?"
  Init
  Let esi=a$+b$+CrLf$+"Here are two little files:"+CrLf$+FileRead$("\Masm32\include\Windows.inc")+CrLf$+FileRead$("\Masm32\include\WinExtra.inc")
  Inkey Left$(esi, 230), CrLf$, "...", CrLf$, Mid$(esi, 977500, 142)
EndOfCode


Output:
Hello avcaballero, what's up today?
Here are two little files:
;;;; head

comment * -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

      WINDOWS.INC for 32 bit MASM (Version 1.6 RELEASE January 2012)

...
comment * ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

        winextra.inc is the second part of the windows.inc file
Title: Re: Fifty Years of BASIC
Post by: avcaballero on July 07, 2016, 06:05:34 PM
Donkey (https://blog.codinghorror.com/bill-gates-and-donkey-bas/) is one of the first (and crappy) qbasic games. Fortunatelly it is easy to make. There are some things to do, but it works :P.
Title: Re: Fifty Years of BASIC
Post by: avcaballero on July 08, 2016, 05:57:59 PM
Game almost finished. Each time you avoid the donkey, the car go up a bit in the road, so it will be more difficult to dodge the little animal. If you reach the top, you will increase your score and the game will be restarted. If you run over the donkey, it will have one more point. There is no run over sprites yet.
Title: Re: Fifty Years of Assembly
Post by: jj2007 on July 13, 2016, 11:25:11 AM
TIOBE Index for July 2016 (http://www.tiobe.com/tiobe_index)
July Headline: Assembly Language enters the Top 10 again
Title: Re: Fifty Years of BASIC
Post by: rrr314159 on July 13, 2016, 11:31:50 AM
From the TIOBE page: "Why would anyone write code at such a low level, being far less productive if compared to using any other programming language and being vulnerable to all kinds of programming mistakes?"

The myth will never die! Obviously these people are not assembler programmers
Title: Re: Fifty Years of BASIC
Post by: hutch-- on July 13, 2016, 01:28:13 PM
He he, we'll turn 'em into men yet.  :biggrin:
Title: Re: Fifty Years of BASIC
Post by: TWell on July 13, 2016, 06:06:03 PM
Some reason might be x64 compilers without inline assembly.
To use CPU's new features.
Java folks needs language support for that?
Title: Re: Fifty Years of BASIC
Post by: carlos on November 28, 2016, 08:55:28 AM
Why BASIC was pushed aside by C????? for a good reason, C is a production language, from the beginning C was designed to be a language to write good code, (UNIX remember?) while BASIC  was designed to be a LEARNING language, hence it's simplicity,  when basic was chosen to be the pc language, it helped people learn programming without having to go to college to learn, but writing SERIOUS software on BASIC is out of the question, is akin to try to participate in a bicycle race with training wheels.  also, all the bad rap BASIC got from pros in the 70s and 80s stem from the fact that BASIC was a micro-computing phenomenon, it never was strong in the mainframe/minicomputer world, and the pro saw us with disdain, our machines as toys.

Also, that lots of commercial/open source software is bug ridden is not the fault of C is the bad programmers/unrealistic deadlines that that plague the industry these days.
Title: Re: Fifty Years of BASIC
Post by: hutch-- on December 07, 2016, 02:02:18 AM
If I understand the main advantage of C/C++, its portability. Apart from scripting languages like JAVA and a few others, C is a binary compiler that has been ported to almost every form of hardware but its not always a competitor against a dedicated OS specific compiler or assembler. Back before 32 bit software was available I originally coded THE SDK style of software in C (not ++) in Microsoft C version 6 and it was a good tool that was very reliable. When they introduced C version 7 it was a broken pile of crap so I went on the hunt for a better compiler and ended up using GFA basic that was written in assembler which produce far better binary code than Microsoft C.

With the introduction of Win32 I tried out VC 1 but just did not like it as it was starting to introduce early C++ with all of the bloat and MFC junk so I looked around and found the early versions of PowerBASIC and I still use the later versions for many 32 bit apps today. I did not find a decent C compiler until VC98 but the best 32 bit version I found was VC2003 (VCTOOLKIT) which had very good libraries and produced efficient code. While my preferred development language is assembler, I do occasionally use C to test out C algos. Most of the C folks are ignorant of the development of BASIC as a language and still think its a kiddies level interpreter ALA 1980 but as they would not try and use a C compiler of 1980, neither do the basic folks use interpreted basic of 1980 either.

Best for best, basic comes in smaller than C due to poor libraries in C but properly written C is often faster if not by much.
Title: Re: Fifty Years of BASIC
Post by: TWell on December 07, 2016, 02:48:41 AM
Quote from: hutch-- on December 07, 2016, 02:02:18 AM
I did not find a decent C compiler until VC98 but the best 32 bit version I found was VC2003 (VCTOOLKIT) which had very good libraries and produced efficient code.
Last one that had a libc.lib (single threaded crt).

One good feature in C is that you don't have to use the crt at all.
Other compiler put always their own junk to executable.
Title: Re: Fifty Years of BASIC
Post by: jj2007 on December 07, 2016, 03:25:08 AM
Quote from: hutch-- on December 07, 2016, 02:02:18 AMGFA basic that was written in assembler

That was my favourite dialect until 16-bit code stopped working on Windows. The author has his own Wikipedia entry (https://en.wikipedia.org/wiki/Frank_Ostrowski), probably because his fans were so furious that he didn't port Gfa to Win32 :eusa_boohoo:
Title: Re: Fifty Years of BASIC
Post by: jj2007 on August 26, 2017, 03:31:14 AM
Hi Chris Greenwalt,
QuoteLooking to Get Help from Dissertation Writing Services UK as You have Failed to Write Your Dissertation up to The Standard of Your University or College? Looking to Buy Dissertation from UK Dissertation Writing Services that May Get an A+ for You?

... isn't writing a dissertation for somebody else illegal? And what does that illegal activity have to do with Masm32 or Basic?

Btw it would be great if SMF implemented a mechanism that disallows members with less than x posts and/or y days of membership to put links into posts or signatures.
Title: Re: Fifty Years of BASIC
Post by: felipe on August 26, 2017, 05:42:01 AM
 :icon14: jj you are like an eagle!  :biggrin:
Title: Re: Fifty Years of BASIC
Post by: aw27 on September 07, 2017, 02:22:50 PM
I created a BASIC program for the Sinclair computers to help win on Football Lotto using some statistical analysis.
It was distributed in compact tape and announced in newspapers. There was no Internet or even BBS and there were no floppy disks at the time, at least for that computer. I sold some 20 units or so and one thing I remember was a customer writing back to me and say that with my program he would win the lotto only when pigs can fly (here, we say when chicken have teeth). The others never complained so are probably rich by now.  :biggrin:
Title: Re: Fifty Years of BASIC
Post by: jj2007 on September 11, 2017, 07:01:15 PM
Hey Caroline,

Your link to personalstatementfolks.co.uk is broken, so all the precious time you invested in registering and formulating a tailored post was wasted. So sorry, Caroline ;)

P.S.: Strange that this thread attracts the bots :biggrin:
Title: Re: Fifty Years of BASIC
Post by: Lonewolff on May 21, 2018, 08:13:59 PM
Another random bot post.