Jump to content

Photo

CLSN Pascal


35 replies to this topic

#26 flashjazzcat OFFLINE  

flashjazzcat

    Quadrunner

  • 13,580 posts
  • Location:United Kingdom

Posted Fri Mar 13, 2015 12:32 PM

Good. You could run the application from inside a batch file and clear the screen on exit.

I just sat for half an hour with DIS6502 trying to figure out what's different about the way AUTORUN.SYS loads the main program and I got nowhere so far. The only obvious thing is that the autorun loader ensures against the host DOS having an issue with PORTB being changed during the load. There are no segments loading to the region where the crash occurs, so I wonder if I'm actually looking at SDX crashing while running in its extended bank.

Edited by flashjazzcat, Fri Mar 13, 2015 12:34 PM.


#27 MrFish OFFLINE  

MrFish

    River Patroller

  • 4,853 posts
  • Location:1010-1010

Posted Fri Mar 13, 2015 8:35 PM

Made a cover, added the version 1.1 readme, and bookmarked the manual. Should make it a little easier to digest.

 

CLSN Pascal Cover.png

 

 



#28 Alfred OFFLINE  

Alfred

    Moonsweeper

  • 291 posts
  • Location:Elmwood, Ontario

Posted Fri Mar 13, 2015 11:29 PM

It doesn't work under any of the disk-based SpartaDos versions.



#29 MrFish OFFLINE  

MrFish

    River Patroller

  • 4,853 posts
  • Location:1010-1010

Posted Sat Mar 14, 2015 1:51 PM

Some corrections. Several bookmarked subsections were not listed correctly. I also ordered the PDF page numbers to match the actual document page numbers.

 

Attached File  CLSN Pascal - Reference Manual.pdf   6.07MB   101 downloads

 



#30 Alfred OFFLINE  

Alfred

    Moonsweeper

  • 291 posts
  • Location:Elmwood, Ontario

Posted Sat Mar 14, 2015 7:19 PM

Looking at the object code that CLSN produces, it's really quite appalling. Almost makes PL65 look good. It doesn't seem as though it does anything inline. Every operation seems to involve multiple (4+) subroutine calls, three of which are to do with pushing and popping things off the stack which is located in a bank. It might be faster than Basic, but it can't be by much if it is.

 

I can't believe how bad these compiled languages are. Action! sure runs rings around them for code performance.



#31 JamesD OFFLINE  

JamesD

    Quadrunner

  • 8,171 posts
  • Location:Flyover State

Posted Sat Mar 14, 2015 8:13 PM

Looking at the object code that CLSN produces, it's really quite appalling. Almost makes PL65 look good. It doesn't seem as though it does anything inline. Every operation seems to involve multiple (4+) subroutine calls, three of which are to do with pushing and popping things off the stack which is located in a bank. It might be faster than Basic, but it can't be by much if it is.

 

I can't believe how bad these compiled languages are. Action! sure runs rings around them for code performance.

It sounds a little like a BASIC compiler I looked at.



#32 TXG/MNX OFFLINE  

TXG/MNX

    River Patroller

  • 3,630 posts

Posted Sat May 30, 2015 1:13 AM

Anyone knows some of the programmers of this software maybe we can try to find the sourcecode.

#33 576XE OFFLINE  

576XE

    Dragonstomper

  • 759 posts
  • Location:Moscow, Russia

Posted Wed Apr 18, 2018 12:37 AM

Hi Alfred,

 

CLSN Pascal works with Disk Based Sparta!

But requires extended memory.

 

Here is working atr image 

 

I just renamed AUTORUN.SYS to CLSN.COM. :)

Try -CLSN for loading bat file.

 

zen

Attached Files



#34 576XE OFFLINE  

576XE

    Dragonstomper

  • 759 posts
  • Location:Moscow, Russia

Posted Thu Apr 19, 2018 2:21 PM

Hi there, friends

Does anyone knows what is COPY.PAS example mentioned in manual?



#35 576XE OFFLINE  

576XE

    Dragonstomper

  • 759 posts
  • Location:Moscow, Russia

Posted Wed May 23, 2018 2:07 AM

Here is working Pascal program

program list;

type
  link = ^node;
  node = record
           data: integer;
           next: link;
         end;

var
  head: link;
  key : integer;
  l   : integer;

procedure addnew(var a: link; d: integer);
var
  c: link;
begin
  if a = nil then begin
    new(a);
    a^.data := d;
    a^.next := nil;
  end

  else begin
    c := a;
    while c^.next <> nil do c := c^.next;
      new(c^.next);
      c^.next^.data := d;
      c^.next^.next := nil;
    end
end;

function showlast(a: link):integer;
var
  c: link;
begin
  c := a;
  if c <> nil then begin
  while c^.next <> nil do c := c^.next;
  showlast := c^.data;
  end
  else
  showlast := 0;
end;

procedure deletelast(var a: link);
var
  c: link;
begin
  if a <> nil then
  begin
  if a^.next <> nil then begin
    c := a;
    while (c^.next^.next <> nil) do c := c^.next;
    dispose(c^.next);
    c^.next := nil;
    end
  else
    begin
    dispose(a);
    a := nil;
    end;
  end;
end;

procedure show_list(a: link);
var
  c: link;
begin
  if a = nil then
  writeln('Stack is empty')
else
  begin
  c := a;
  while c <> nil do
    begin
    write(c^.data:2);
    c := c^.next;
    end;
  writeln;
  end;
end;

begin
  head := nil;

  repeat
    clrscr;
    writeln;
    show_list(head);

    writeln;
    writeln('Select operation');
    writeln('1 - Addition');
    writeln('2 - Deletion');
    writeln('3 - Typing');
    writeln('4 - Exit');

    readln(key);

  case key of
  1: begin
    writeln('Enter number');
    readln(l);
    addnew(head,l);
  end;

  2: deletelast(head);

  3: begin
    writeln;
    show_list(head);
    writeln;
    writeln('Press Return');
    readln;
  end;

  end;
  until key = 4;
end.


#36 576XE OFFLINE  

576XE

    Dragonstomper

  • 759 posts
  • Location:Moscow, Russia

Posted Thu Jul 12, 2018 1:12 PM

Hello Friends.
 
CLSN is a convenient Pascal version working with Heap like BASIC XE out of a Box!
And it's heap is ALL 130XE extended memory 16*3 = 48k. (Do you like it?)
 
Being a strictly type-care language Pascal itself can NOT be too simple.
BUT. It's really simple!
 
I leave PL65 for CLSN!!!
 
Certainly!!!
 
Because of...
CLSN is THE ONLY high level language feeling HIGH-leveled itself.
Please look at Action!
- It's realy Atari-Lang but It's not compartible with any other machine.
- I'm an Atari FAN but I want to transfer my ideas to a world!
IDEAS I mean! And what is the IDEA above Action! itself?
 
Moreover, rtlibs placing separately on disk, killed dosen langs:
- all C dialects
- Action!
...
 
All the attempts to make serious high level lang beyond BASIC failed on Atari, but CLSN.
Let's try CLSN!
 
The main Idea to work with ATARI heap is to supply compiler with acceptable data.
 
AND WHAT IS IT?
- the consensus of types
- the consensus of data
 
Let's try to make bytes area on heap. Can do you like?
 
Don't forget to remember that Pascal is strictly... etc.
 
- At first for the case of heap we need some pointer type, because of it's THE ONLY way to point to never declared entity. (* It's the only exception in Pascal's too striked typization *)
- At second we need to declare THE entity itself!
- At third we need to make variable(static) to touch to every point of our beloved entity on heap!
 
Here is the code to make Dinamic Array on heap.
 
program dyn;
type
  arrP = ^arrT;
  arrT = array[1..1] of byte;
(* On this stage there are no any array on Heap! *)
(* But array is clearly declared as one-dimensioned! And it's size is 1 byte. *)
(* Size means NOTHING for declaration! It's for compiler itself! We can redimension it while runtime!!! *)
var
  a: arrP; (* Here we have created a static variable 'a' to access dynamic data. It's possible because of early accurate Pascal typyzation! *)
  i,num: integer;
begin
  writeln('Enter number of array elements');
  readln(num);


(* Dynamic programming *)
  getmem(a, sizeof(byte)*num); (* We've got a needed part of memory. Now it's marked as used in Pascal. *)
  for i := 1 to num do begin
    writeln('Enter ', i , '-th array element');
    readln(a^[i]);
  end;
  (* Then all array-oriented cycles can use 'num' as a max-border *)
  freemem(a,num*sizeof(byte)); (* freeing used earlier memory *)
end.
 
P.S.
If you are interested in Linked Lists in Pascal I can give you freely used codes...
Just whistle!
 
zen





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users