Author Topic: Fifty Years of BASIC  (Read 2752 times)

jj2007

  • Member
  • *****
  • Posts: 7666
  • Assembler is fun ;-)
    • MasmBasic
Fifty Years of BASIC
« on: June 13, 2016, 07:49:47 AM »
Time magazine writes about Fifty Years of BASIC ::)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4886
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Fifty Years of BASIC
« Reply #1 on: June 13, 2016, 11:02:32 AM »
Interesting article. :)
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

mabdelouahab

  • Member
  • ***
  • Posts: 339
Re: Fifty Years of BASIC
« Reply #2 on: June 13, 2016, 04:37:51 PM »
And Four Years of MasmBasic   :biggrin:

caballero

  • Member
  • ****
  • Posts: 768
    • Abre Ojos Ensamblador
Re: Fifty Years of BASIC
« Reply #3 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
Code: [Select]
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:
Code: [Select]
? "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

Basic never will die :t
En un lugar de la Mancha de cuyo nombre no quiero acordarme

jj2007

  • Member
  • *****
  • Posts: 7666
  • Assembler is fun ;-)
    • MasmBasic
Re: Fifty Years of BASIC
« Reply #4 on: June 13, 2016, 10:36:57 PM »
And Four Years of MasmBasic   :biggrin:

Thanks for noting - actually, it's more than six years:
MasmBasic
« 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:
I don't know any other language capable of write down a "hello world" like this:
Code: [Select]
? "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:
Code: [Select]
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?) - and that is why BASIC has always been a threat to the profession 8)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4886
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Fifty Years of BASIC
« Reply #5 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

caballero

  • Member
  • ****
  • Posts: 768
    • Abre Ojos Ensamblador
Re: Fifty Years of BASIC
« Reply #6 on: June 14, 2016, 02:25:12 AM »
? = PRINT in basic
Code: [Select]
#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:.
En un lugar de la Mancha de cuyo nombre no quiero acordarme

jj2007

  • Member
  • *****
  • Posts: 7666
  • Assembler is fun ;-)
    • MasmBasic
Re: Fifty Years of BASIC
« Reply #7 on: June 14, 2016, 03:04:41 AM »
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

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 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)

? = 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
  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:
Code: [Select]
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

caballero

  • Member
  • ****
  • Posts: 768
    • Abre Ojos Ensamblador
Re: Fifty Years of BASIC
« Reply #8 on: July 07, 2016, 06:05:34 PM »
Donkey 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.
En un lugar de la Mancha de cuyo nombre no quiero acordarme

caballero

  • Member
  • ****
  • Posts: 768
    • Abre Ojos Ensamblador
Re: Fifty Years of BASIC
« Reply #9 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.
En un lugar de la Mancha de cuyo nombre no quiero acordarme

jj2007

  • Member
  • *****
  • Posts: 7666
  • Assembler is fun ;-)
    • MasmBasic
Re: Fifty Years of Assembly
« Reply #10 on: July 13, 2016, 11:25:11 AM »
TIOBE Index for July 2016
July Headline: Assembly Language enters the Top 10 again

rrr314159

  • Member
  • *****
  • Posts: 1382
Re: Fifty Years of BASIC
« Reply #11 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
I am NaN ;)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4886
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Fifty Years of BASIC
« Reply #12 on: July 13, 2016, 01:28:13 PM »
He he, we'll turn 'em into men yet.  :biggrin:
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

TWell

  • Member
  • ****
  • Posts: 748
Re: Fifty Years of BASIC
« Reply #13 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?

crysmarye

  • Regular Member
  • *
  • Posts: 1
Re: Fifty Years of BASIC
« Reply #14 on: October 10, 2016, 09:53:53 PM »
right say bro