User avatar
RichardRussell
Posts: 688
Joined: Thu Jun 21, 2012 10:48 am

Re: Searching for BASIC

Tue Jul 02, 2019 10:45 am

RichardRussell wrote:
Tue Jul 02, 2019 9:32 am
The GPU is good at that kind of thing as well as blitting textures.
In addition, SDL 2.0.10 (in pre-release) is introducing two new features which will boost its benefits over software rendering:

  1. Render batching. Rather than submitting each render command individually to the backend, SDL 2.0.10 will batch a whole lot of commands together and submit them in one go. This should significantly improve performance with the kind of graphics that BASIC is likely to be using.
  2. Floating point (sub-pixel) cordinates. Since the GPU always works with floating-point coordinates, SDL 2.0.10 is introducing a new set of APIs to provide this capability to the programmer without having to make direct OpenGL or Direct3D calls.

ZXDunny
Posts: 119
Joined: Sun Jul 08, 2012 7:57 pm

Re: Searching for BASIC

Tue Jul 02, 2019 12:54 pm

Interesting. I wonder if it can be made to work with SpecBAS's blend modes too (OVER command). I think at the very least I should be able to replace the window and sprite compositor, though at the expense of needing SDL dlls bundled with it.

User avatar
RichardRussell
Posts: 688
Joined: Thu Jun 21, 2012 10:48 am

Re: Searching for BASIC

Tue Jul 02, 2019 2:53 pm

ZXDunny wrote:
Tue Jul 02, 2019 12:54 pm
Interesting. I wonder if it can be made to work with SpecBAS's blend modes too (OVER command).
That has been (and continues to be) an issue for BBC BASIC. I don't know what blend modes SpecBAS supports but BBC BASIC has the traditional 'bitwise' OR, AND, XOR and NOT operations (where the 'existing' and 'plotted' colours are combined using those functions). To implement those I do have to make direct calls into OpenGL (specifically glEnable, glLogicOp and glDisable).

It's not surprising that they are not supported natively by SDL2 since bitwise manipulation of RGB values makes no sense when the components are represented by 'linear' 8-bit intensities (e.g. 24-bit RGB or 32-bit ARGB). The blend modes that are supported by SDL2 are the 'linear' ones: alpha blending, additive blending and colour modulation.

ZXDunny
Posts: 119
Joined: Sun Jul 08, 2012 7:57 pm

Re: Searching for BASIC

Tue Jul 02, 2019 6:40 pm

Yeah, SpecBAS has twelve modes in all (so far). That all the graphics are 8bpp doesn't help either. Tbh, I think it's probably gonna be fine leaving one core to render the graphics and have the interpreter running on a separate core as I am now - hardware acceleration isn't likely to help, I fear. Also using SDL surfaces for drawing to is fine, but reading from them can be very slow if they're hardware accelerated.

User avatar
RichardRussell
Posts: 688
Joined: Thu Jun 21, 2012 10:48 am

Re: Searching for BASIC

Tue Jul 02, 2019 8:17 pm

ZXDunny wrote:
Tue Jul 02, 2019 6:40 pm
one core to render the graphics and have the interpreter running on a separate core
That's the BBC BASIC for SDL 2.0 structure too, but with the addition of the GPU (which has hundreds or thousands of 'cores'). Admittedly where the benefit of the hardware acceleration really kicks in is in things like scaling and rotation, or 3D graphics, where the GPU excels. Recently I've started to incorporate shader code in BASIC programs, which can do some remarkable things. I note that the new RPi 4 has the VC4 GL driver enabled by default which is very welcome.

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Searching for BASIC

Tue Jul 02, 2019 8:49 pm

Richard,

Are users of BBC BASIC more graphics centric (games, ...) then general purpose utility programming?

User avatar
RichardRussell
Posts: 688
Joined: Thu Jun 21, 2012 10:48 am

Re: Searching for BASIC

Tue Jul 02, 2019 9:56 pm

ScriptBasic wrote:
Tue Jul 02, 2019 8:49 pm
Are users of BBC BASIC more graphics centric (games, ...) then general purpose utility programming?
That's very difficult to say, and I have no way of discovering any reliable statistics. It was probably the case back in the early days (i.e. 1980s) because the graphics (and sound etc.) capabilities of machines like the BBC Micro probably distinguished them more from their predecessors than anything else. And it's often said that experience of writing games for that generation of machines led to the UK being in the forefront of video games design, arguably to this day.

But I really don't have any idea about how current users of BBC BASIC are split between various different kinds of applications. It is true that the example programs I supply with BBC BASIC for SDL 2.0 are weighted towards games and graphics for the obvious reason that it's based around SDL, which began life as a games engine, so is particularly well suited to that kind of app. I also think that games, graphics and sound programs make more impact in places like YouTube, Twitter and Facebook.

As far as my own programs are concerned, games and graphics do not feature heavily because I am not skilled at that kind of thing. None of the three major BBC BASIC applications that I have been responsible for (the FIRBBC filter synthesis utility, the Free-D camera tracking system, and Colour Recovery from black-and-white film recordings) makes heavy use of graphics, although they all do have a GUI.

ZXDunny
Posts: 119
Joined: Sun Jul 08, 2012 7:57 pm

Re: Searching for BASIC

Tue Jul 02, 2019 9:58 pm

RichardRussell wrote:
Tue Jul 02, 2019 8:17 pm
ZXDunny wrote:
Tue Jul 02, 2019 6:40 pm
one core to render the graphics and have the interpreter running on a separate core
That's the BBC BASIC for SDL 2.0 structure too, but with the addition of the GPU (which has hundreds or thousands of 'cores'). Admittedly where the benefit of the hardware acceleration really kicks in is in things like scaling and rotation, or 3D graphics, where the GPU excels. Recently I've started to incorporate shader code in BASIC programs, which can do some remarkable things. I note that the new RPi 4 has the VC4 GL driver enabled by default which is very welcome.
I would love to add an OpenGL shader to SpecBAS. Not for the display per-se, but for scaling to an integer multiple before using bilinear to get the rest of the way up to the screen size. Much nicer to look at than a straight bilinear filter :)

If SpecBAS allowed 32bpp output then a full OpenGL 3D wrapper with shaders would be appropriate but that's not where I'm headed right now.

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Searching for BASIC

Tue Jul 02, 2019 10:08 pm

I've only scratch the surface of what SDL provides with the GFX extension module. I hope it's enough of a foundation someone with real SDL skills can add what might be missing and make the library easy for ScriptBasic users.

Is it worth upgrading the extension module to SDL2? I don't think users would see much of a difference based on the limited functionality the library offers.

IUP provides a graphic library CD (canvas draw) that might be easier to use than SDL GFX. Best part it can be integrated in your IUP forms.
Last edited by John_Spikowski on Tue Jul 02, 2019 11:41 pm, edited 3 times in total.

User avatar
RichardRussell
Posts: 688
Joined: Thu Jun 21, 2012 10:48 am

Re: Searching for BASIC

Tue Jul 02, 2019 10:48 pm

ZXDunny wrote:
Tue Jul 02, 2019 9:58 pm
I would love to add an OpenGL shader to SpecBAS. Not for the display per-se, but for scaling to an integer multiple before using bilinear to get the rest of the way up to the screen size. Much nicer to look at than a straight bilinear filter :)
Is there no way you can achieve that by judiciously switching between 'nearest neighbour' and 'bilinear' filtering at the right times, which you can achieve in SDL2 using SDL_SetHint (SDL_HINT_RENDER_SCALE_QUALITY, ...) ; or directly by calling the OpenGL glTexParameteri function? I dynamically switch the scaling quality in BBC BASIC that way.

I presume that if the MacOS build of SpecBAS already uses SDL2 it would be pretty straightforward to do the same on other platforms, is there a particular reason why you don't? I expect SDL2 is bigger than SDL 1.2 but if you use a shared object (DLL in Windows or installing from the repository on Linux) I wouldn't have thought that would matter too much.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Searching for BASIC

Wed Jul 03, 2019 4:22 am

ScriptBasic wrote:
Tue Jul 02, 2019 8:49 pm
Richard,

Are users of BBC BASIC more graphics centric (games, ...) then general purpose utility programming?
Just to add another answer:
Even many general utilties in BBC BASIC make heavy use of graphics.

Though there are many thousands of games written in BBC BASIC, including some full 3D rendered games (FPS, RPG, Space Shooter, etc). So there are definitely a lot of graphics oriented BBC BASIC users.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

User avatar
RichardRussell
Posts: 688
Joined: Thu Jun 21, 2012 10:48 am

Re: Searching for BASIC

Wed Jul 03, 2019 8:33 am

DavidS wrote:
Wed Jul 03, 2019 4:22 am
Even many general utilties in BBC BASIC make heavy use of graphics.
I agree that when you know you always have graphics available, irrespective of the platform on which it is running, there is a temptation to 'enhance' programs that don't really need any graphics at all with a splash of color or some GUI features, or more. But it's a fine balance and can be overdone: some people find graphics 'for the sake of it' distracting.

A related issue is that with BBC BASIC now being available for Android and iOS (and on laptops with touchscreens for that matter) some kind of 'graphical' interface is often desirable simply to allow the user to interact with the program in an easy manner without needing a keyboard.

ZXDunny
Posts: 119
Joined: Sun Jul 08, 2012 7:57 pm

Re: Searching for BASIC

Wed Jul 03, 2019 9:36 am

RichardRussell wrote:
Tue Jul 02, 2019 10:48 pm
ZXDunny wrote:
Tue Jul 02, 2019 9:58 pm
I would love to add an OpenGL shader to SpecBAS. Not for the display per-se, but for scaling to an integer multiple before using bilinear to get the rest of the way up to the screen size. Much nicer to look at than a straight bilinear filter :)
Is there no way you can achieve that by judiciously switching between 'nearest neighbour' and 'bilinear' filtering at the right times, which you can achieve in SDL2 using SDL_SetHint (SDL_HINT_RENDER_SCALE_QUALITY, ...) ; or directly by calling the OpenGL glTexParameteri function? I dynamically switch the scaling quality in BBC BASIC that way.

I presume that if the MacOS build of SpecBAS already uses SDL2 it would be pretty straightforward to do the same on other platforms, is there a particular reason why you don't? I expect SDL2 is bigger than SDL 1.2 but if you use a shared object (DLL in Windows or installing from the repository on Linux) I wouldn't have thought that would matter too much.
The problem is scaling to one texture using nearest neighbour to get the integer scale, then scaling that texture up onto the screen using bilinear. I can get it to work on one of my windows boxes, but not the other two - nor can my 2015 MBP do it either which is disappointing.

I'm not terribly well up on working with hardware - I've never really needed to be - but if anyone has any suggestions on how to do it in OpenGL (not SDL for now) then I'm all ears. The flow would be:

SpecBAS internal surface integer scaled to intermediary buffer, then intermediary buffer scaled (with bilinear) up to the display.

I've tried for a while to get it to work, but just cannot. Rather now I do the integer scaling in software, then use GL for the final stage.

You can see the routine I use on the SVN server link I pasted a while back; mainform.pas, Refresh_Display() procedure around line 1180. If anyone does take a look, apologies for the quality of the code :D

User avatar
RichardRussell
Posts: 688
Joined: Thu Jun 21, 2012 10:48 am

Re: Searching for BASIC

Wed Jul 03, 2019 12:01 pm

ZXDunny wrote:
Wed Jul 03, 2019 9:36 am
The problem is scaling to one texture using nearest neighbour to get the integer scale, then scaling that texture up onto the screen using bilinear. I can get it to work on one of my windows boxes, but not the other two - nor can my 2015 MBP do it either which is disappointing.
I'm pretty sure that works correctly for me on all platforms using SDL2. The only thing I needed to ensure was that OpenGL is always used as the backend (the default is for SDL2 to use Direct3D in Windows) so I include this hint in my code:

Code: Select all

	SDL_SetHint (SDL_HINT_RENDER_DRIVER, "opengl") ;
The documented behaviour is that SDL_HINT_RENDER_SCALE_QUALITY "is checked when a texture is created and it affects scaling when copying that texture" so it should work for you so long as the texture that you want to be scaled using nearest neighbour and the texture that you want to be scaled using bilinear interpolation are different. If it's the same texture that you need to be scaled in two different ways you will need to make direct OpenGL calls, but that works fine here too:

Code: Select all

	SDL_GL_BindTexture (texture, NULL, NULL) ;
	glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR) ;
	glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) ;
I'm not terribly well up on working with hardware - I've never really needed to be - but if anyone has any suggestions on how to do it in OpenGL (not SDL for now) then I'm all ears. The flow would be:

SpecBAS internal surface integer scaled to intermediary buffer, then intermediary buffer scaled (with bilinear) up to the display.
I've only done it using SDL2 as a 'helper' but I don't think it should be too difficult to do it directly in OpenGL. As a last resort you could copy the code for SDL_CreateTextureFromSurface from the SDL source.

jalih
Posts: 135
Joined: Mon Apr 15, 2019 3:54 pm

Re: Searching for BASIC

Wed Jul 03, 2019 3:24 pm

jahboater wrote:
Sun Jun 30, 2019 8:16 pm
Anyone who finds * and & difficult to understand will not get far in programming.
I can understand it but still think it's horrible syntax. I think PL/I syntax is much nicer to read. PL/I can do everything that C can do with it's pointers but accesing data where pointer points to via based variable is a lot more elegant solution. Modern PL/I also provides handle, that is like a strongly typed pointer.

Code: Select all

 test: proc options(main);
   dcl 1 info based(p),
         2 name char(20),
         2 address char(20);

   dcl p ptr;

   allocate info set(p);

   /* use thru based variable */
   info.name = 'jalih';
   info.address = 'home';

   put list(info.name, info.address);

   /* Use pointer addressing */
   p->name = 'jalih';
   p->address = 'home';

   put skip list(p->name, p->address);

   free info;

 end test;
 

Heater
Posts: 16558
Joined: Tue Jul 17, 2012 3:02 pm

Re: Searching for BASIC

Wed Jul 03, 2019 3:43 pm

jalih,

Based variables... Ah, that's where they come from.

Back in the day Intel supplied a compiler for it's PL/M language, "Programming Language for Microprocessors", which we sometimes used to generate code for the 8 bit 8085 micros. PL/M became a lot more viable when PL/M 86 came along for the 16 bit chips. In fact I worked on a CAD package for designing electronics schematic and printed circuit boards, CADSTAR for the PC. CADSTAR was entirely written in PL/M 86. Amazingly CADSTAR was converted to C/C++ some years later and is still under development and on the market: https://www.zuken.com/en/product/cadstar/bundles/

But I digress. PL/M could do everything C can with a clearer syntax.
Memory in C++ is a leaky abstraction .

User avatar
jahboater
Posts: 6121
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: Searching for BASIC

Wed Jul 03, 2019 3:49 pm

I suspect these people claiming that xxx language can do everything C can do, have not kept up with recent C standards.
And I suspect C++ with its five types of pointer is way ahead of all of them!

C and C++ do have a '->' operator by the way, used in the same manner as PL/1 by the looks of it.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Searching for BASIC

Wed Jul 03, 2019 3:55 pm

WOW:
I had forgotten about PL/M (Programming Language for Microprocessors), was it not first produced by Intergalactic Digital Research (before Garry changed the company name to Digital Research)?

I remember something about the Garry Kildall (and Intergalactic Digital Research) licensing PL/M to Intel, though I only ever used the versions that came with CP/M+, CP/M-86, CP/M-68000, and MP/M-86. So I do not know if the Intel branded version was any different.

I was not aware the PL/M was that similar to PL/1, interesting.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

Heater
Posts: 16558
Joined: Tue Jul 17, 2012 3:02 pm

Re: Searching for BASIC

Wed Jul 03, 2019 4:08 pm

DavidS,

Yes, PL/M was created by the late great Gary Kildall. Gary had created an industrial strength compiler before Bill Gates was dicking around with his little BASIC.

I read some place years ago that Gary also offered CP/M to Intel but they did not go for it. Instead they had their own operating system on their microprocessor development systems, ISIS. I have no idea where ISIS came from.

Imagine what a different world it would have been if Intel had taken Garry's offer for CP/M. Then it would only have been a small step to CP/M 86 on the 16 bit processors and then IBM would have had CP/M 86 on the PC instead of PC-DOS. And there would be no Microsoft as we know it.
Memory in C++ is a leaky abstraction .

jalih
Posts: 135
Joined: Mon Apr 15, 2019 3:54 pm

Re: Searching for BASIC

Wed Jul 03, 2019 4:50 pm

jahboater wrote:
Wed Jul 03, 2019 3:49 pm
I suspect these people claiming that xxx language can do everything C can do, have not kept up with recent C standards.
And I suspect C++ with its five types of pointer is way ahead of all of them!
How would you write something like following in C supporting recent standards?

Code: Select all

   dcl (i, k) fixed bin(31);

   do i = 1 to 10, 9 to 1 by -1, 2 repeat 2*i while (i <= 1024);
    put skip list(i);
   end;
and output should be:

Code: Select all

          1
          2
          3
          4
          5
          6
          7
          8
          9
         10
          9
          8
          7
          6
          5
          4
          3
          2
          1
          2
          4
          8
         16
         32
         64
        128
        256
        512
       1024
       
How about presenting Sudoku board in C. In PL/I, I can do:

Code: Select all

   /* Sudoku board presentation from the book: The New PL/I. */
   define alias bits bit(9) aligned;
   dcl total(81) type bits;
   dcl matrix(9, 9) type bits based(addr(total));
   dcl box(9, 3, 3) type bits defined (total(trunc((1sub-1) /3) * 27 + mod(1sub-1, 3) * 3 + (2sub-1) * 9 + 3sub));

   dcl posbit(0:9) type bits init('000000000'b, '100000000'b, '010000000'b, '001000000'b,
                                  '000100000'b, '000010000'b, '000001000'b, '000000100'b,
                                  '000000010'b, '000000001'b);                                                                                                                                        
To test possible values for free cell:

Code: Select all

result = ^(any(matrix(i, *)) | any(matrix(*, j)) | any(box(numbox(i, j), *, *)));

   /********************************************/
   /* Returns box number for the sudoku coords */
   /********************************************/
   numbox: proc(i, j) returns(fixed bin(31));
     dcl (i, j) fixed bin(31);

     dcl lookup(9, 9) fixed bin(31) static nonasgn init( (3)1, (3)2, (3)3,
                                                         (3)1, (3)2, (3)3,
                                                         (3)1, (3)2, (3)3,
                                                         (3)4, (3)5, (3)6,
                                                         (3)4, (3)5, (3)6,
                                                         (3)4, (3)5, (3)6,
                                                         (3)7, (3)8, (3)9,
                                                         (3)7, (3)8, (3)9,
                                                         (3)7, (3)8, (3)9 );

     return(lookup(i, j));
   end numbox;
You mean smart pointers? To me they seem like a library or preprocessor ugly hacks, not true integrated parts of the core language.
jahboater wrote:
Wed Jul 03, 2019 3:49 pm
C and C++ do have a '->' operator by the way, used in the same manner as PL/1 by the looks of it.
Yeah, syntax was borrowed from PL/I . Just like they borrowed preprocessor and crippled it's syntax. ;)

Here is how to calculate some fibonacci numbers into array using PL/I preprocessor:

Code: Select all

%fibonacci: proc (n, table) statement;
  dcl n fixed;
  dcl table char;

  dcl (i, f1, f2, f3) fixed;
  dcl nums char;

  f1 = 1; f2 = 0;

  nums = '0';

  do i = 1 to n;
    f3 = f1 + f2;
    f1 = f2;
    f2 = f3;
    nums = nums || ',' || f3;
  end;

  ans('dcl ' || table || ' (0:' || n || ') fixed bin init (' || nums || ');') skip;

%end fibonacci;
%act fibonacci;
Here is an example on how to use it in program:

Code: Select all

fibonacci n(20) table(fib);

Heater
Posts: 16558
Joined: Tue Jul 17, 2012 3:02 pm

Re: Searching for BASIC

Wed Jul 03, 2019 5:28 pm

jalih,

I bet you like Forth as well :)

I can see now why PL/ 1 was never popular.
Memory in C++ is a leaky abstraction .

User avatar
jahboater
Posts: 6121
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: Searching for BASIC

Wed Jul 03, 2019 5:39 pm

jalih wrote:
Wed Jul 03, 2019 4:50 pm
How would you write something like following in C supporting recent standards?

Code: Select all

   dcl (i, k) fixed bin(31);

   do i = 1 to 10, 9 to 1 by -1, 2 repeat 2*i while (i <= 1024);
    put skip list(i);
   end;
You can do that in ancient K&R C, nothing to do with modern standards.
I admit the ability to do it in a single "do" loop is impressive, though not necessarily more readable.

Code: Select all

  int i;
  for( i = 1; i <= 10; ++i )
    printf( "%d\n", i );
  for( i = 9; i >= 1; --i )
    printf( "%d\n", i );
  for( i = 2; i <= 1024; i *= 2 )
    printf( "%d\n", i );
As for the suduko I'd have to learn PL/1 to make sense of it. But I would be very surprised if it couldn't be written in any version of C, given that C has always been very good a bit twiddling.

Where do the 1sub and 2sub and 3sub variables come from?
(total(trunc((1sub-1) /3) * 27 + mod(1sub-1, 3) * 3 + (2sub-1) * 9 + 3sub));

I'm not saying PL/1 is not very powerful by the way, I know that it is.
In my day it was up there with Ada and Algol68.

jalih
Posts: 135
Joined: Mon Apr 15, 2019 3:54 pm

Re: Searching for BASIC

Wed Jul 03, 2019 6:40 pm

jahboater wrote:
Wed Jul 03, 2019 5:39 pm
Where do the 1sub and 2sub and 3sub variables come from?
(total(trunc((1sub-1) /3) * 27 + mod(1sub-1, 3) * 3 + (2sub-1) * 9 + 3sub));
It's called iSUB defining, manual says:
"A iSUB variable is a reference, in the subscript list for the base array, to the dimension of the defined array."

A little example explains it better:

Code: Select all

   /* declare 2d matrix */
    dcl m (4,4) float init ( 1,  2,  3,  4,
                             5,  6,  7,  8,
                             9,  10, 11, 12,
                             13, 14, 15, 16 );

   /* Tranpose of the above 2d matrix  */
    dcl mT (4,4) float defined m (2sub, 1sub);
   
Another more complex example:

Code: Select all

/* declare diagonal of the matrix and zero */
dcl diag(21) float bin(53) init(4, 2, 7, 9, 2, 4, 12, 36, 11, 90, 50, 8, 3, 34, 67, 3, 19, 21, 33, 73, 0);

/* Use above diagonal and zero to define the actual diagonal matrix */
dcl diagmat(20,20) float bin(53) defined diag(1sub*(1sub=2sub)+(1sub^=2sub)*hbound(diag));
What does that mean? It means, one can just store diagonal and zero of the matrix and use that data on code like it was a full diagonal matrix. Compiler does all calculations for you. You can save a lot of memory on very large matrices. On this example 21 floats vs 20x20 = 400 floats.

Does C support same functionality?

Heater
Posts: 16558
Joined: Tue Jul 17, 2012 3:02 pm

Re: Searching for BASIC

Wed Jul 03, 2019 6:51 pm

jahboater,
I suspect these people claiming that xxx language can do everything C can do, have not kept up with recent C standards.
Let's compare like with like. I have no idea about PL/1 but PL/M was created in 1973 and ran on 8 bit microprocessors (that is it could be self hosted). The only C compiler I knew of that ran on 8 bitters was BDSC by Leor Zolman, certainly pre ANSI standard.

I was had been using C and PL/M a lot by the mid 1980's. Including writing a multi-tasking kernel is PL/M 86. They were kind of interchangeable in my mind.

In fact during the last year of the CADSTAR CAD package being developed in PL/M 86 Racal-Redac hired a guy to write a translator from PL/M 86 to C, I was amazed he got it working so quickly. Smart chap.

As wikipedia says:

"The language incorporated ideas from PL/I, ALGOL and XPL, and had an integrated macro processor. Unlike other contemporary languages such as Pascal, C or BASIC, PL/M had no standard input or output routines. It included features targeted at the low-level hardware specific to the target microprocessors, and as such, it could support direct access to any location in memory, I/O ports and the processor interrupt flags in a very efficient manner. PL/M was the first higher level programming language for microprocessor-based computers and was the original implementation language for the CP/M operating system. Many Intel and Zilog Z80 based embedded systems were programmed in PL/M during the 1970s and 1980s. For instance, the firmware of the Service Processor component of CISC AS/400 was written in PL/M."

Anyway, you can judge for yourself. The PL/M 386 manual is here: http://www.slac.stanford.edu/grp/cd/sof ... LM_386.PDF
Or try your hand at some PL/M 286 code with this PL/M to C translator: https://github.com/gtsh77/PLM2C

Fun fact:

I attended a 1 day Intel shin dig in London where they introduced the new Intel i860. After an Intel big wig had made the i860 introductory talk he asked if anyone had questions. I stuck my hand up and asked if Intel would be supporting PL/M for the i860. He replied, rather kertly I thought, "We have no plans to support PL/M on the i860". At that point I knew the i860 was doomed.
Memory in C++ is a leaky abstraction .

jalih
Posts: 135
Joined: Mon Apr 15, 2019 3:54 pm

Re: Searching for BASIC

Wed Jul 03, 2019 7:54 pm

Heater wrote:
Mon Jul 01, 2019 4:46 am
To this day I have never actually seen an Archimedes for real, despite lusting for one back in the day, when I could not afford it :(
I should probably send you one, just so you could play Tom Coopers DinoSaw... ;)

I should still have piles of Acorn Archimedes and RiscPC stuff along with my heavily modified SAM Coupé + Spectrum stuff stored in my basement.

Return to “Other programming languages”