PLI-2000 Update 
Author Message
 PLI-2000 Update

Hi All

I am making excellent progress on the COFF OBJ file changes to PL/I for NT.

I havent started recoding the code gen yet, but will be ready to begin this in a couple of weeks I think.

I'm waiting for the Intel ref books on the IA-32 instruction set, these are free but out of stock right now.

For those interested in this stuff:

1) The compilers allocator (the module that writes static, constants etc to the OBJ file) is 75% recoded.
2) The COFF file header, section table, section bodies (.data, .rdata), symbol table and string table are being built
validly.
3) I will be looking into COFF relocation generation next, but this is closely allied with code generation.

The COFF object file is actually much easier to work with than the old DOS obj files, much more fiddly code was required
for DOS.

The compiler isnt testable in any interetsting way just yet, but it does gen the COFF OBJ file as described above, but
of course not any code yet.

Its syntax analysis is excellent, at least 90% of all source is parsed correctly at this stage. (PIC parsing is still
not done, it accepts any PIC '...' string.

I am testing by running sources through with numerous declarations of statics, internal procs, external names and string
constants, and getting solid valid OBJ files.

I examine the OBJ file using special tools that let me scrutinize its internal layout.

Nothing more to report at this stage, feel free to e-mail me on any aspect of this project.

Rgds

Hugh

PS: All code is in C, and I use VC++ 6 on Windows 2000. I dont think it will be a herculean effort to port this to
Linux, but I know nothing about Linux!!



Mon, 21 Mar 2005 10:20:33 GMT  
 PLI-2000 Update
PDF versions of these (3 vol) can also be downloaded fron the Intel
Website.  I don't have the URL handy right now, but they should be easy
to find.
Quote:

> I'm waiting for the Intel ref books on the IA-32 instruction set, these are free but out of stock right now.



Mon, 21 Mar 2005 18:50:27 GMT  
 PLI-2000 Update
in comp.lang.pl1 i read:

Quote:
>PS: All code is in C, and I use VC++ 6 on Windows 2000. I dont think it
>will be a herculean effort to port this to Linux, but I know nothing about
>Linux!!

use djgpp, lcc or mingw under windows to be assured that you aren't using
anything that cannot be handled by gcc or lcc on linux (or other *ix o/s').

to go `whole hog' use the cygwin environment, though that may be more
learning curve than you might desire.

--
bringing you boring signatures for 17 years



Tue, 22 Mar 2005 18:48:05 GMT  
 PLI-2000 Update
Hi

Here is an informal status update:

1) The old 16 bit codegen is being heavily modified to generate 32 bit instructions.
2) Reliance upon segment registers is being removed.
3) Support for the SIB byte is being added, this is a requirement for 32 bit mode.
4) OBJ modules are being generated that contain static sections, code sections and other stuff.
5) These OBJ modules link without error, and can be loaded and debugged using the Microsoft DDK de{*filter*}.

Of course the code is not really runnable yet, because segment register code needs removing, the register usage policy
differs from DOS, and no support yet exists for relocations (fixups) in the COFF OBJ generator.

The intel processor architecture is cumbersome, trying to abstract it is a challenge!!

There is still quite a lot to do, but progress has been encouraging, for those interested here is an ouput from the
compiler, its a listing and machine code (bad (not runnable) code, cos the codegen is only half upodated), also this
code would never run on NT since the DOS external (dos$ )functions wont exist.

If you are interested in looking at this, use a fixed pitch font (like Lucida Console) otherwise the assembly code looks
very messy.

As always, comments, questions etc are welcome.

Regards
Hugh

Win32 (NT/95) dates, times, version-no's etc not yet ported.
Please update LIST.C to remove this msg etc.
OPTIONS: +listing +table +nesting +code +system

        1   0  _lines:
        2   0  
        3   0     proc options (main);  /* this will get control from DOS */
        4   1  
        5   1  
        6   1  
        7   1  
        8   1  /****************************************************************************/
        9   1  /* This simple program demonstrates/tests some of the runtime library calls */
       10   1  /* that pertain to the graphics system on a PC. This particular example has */
       11   1  /* been written for EGA.                                                    */
       12   1  /****************************************************************************/
       13   1  
       14   1     % include 'graphics';   /* Graphics constants    */
      1-1   1  
      1-2   1  /****************************************************************************/
      1-3   1  /*     This file defines constants for use in the graphics system calls.    */
      1-4   1  /****************************************************************************/
      1-5   1  
      1-6   1     % replace TXT_40x25_16_NB               by 0;   /* No color burst */
      1-7   1     % replace TXT_40x25_16                  by 1;
      1-8   1     % replace TXT_80x25_16_NB               by 2;   /* No color burst */
      1-9   1     % replace TXT_80x25_16                  by 3;    
     1-10   1  
     1-11   1     % replace GFX_320x200_4                 by 4;
     1-12   1     % replace GFX_320x200_4_B               by 5;
     1-13   1     % replace GFX_640x200_2                 by 6;    
     1-14   1     % replace GFX_160x200_16                by 8;  
     1-15   1     % replace GFX_320x200_16_a              by 9;  
     1-16   1     % replace GFX_640x200_4                 by 10;  
     1-17   1     % replace GFX_320x200_16_b              by 13;
     1-18   1     % replace GFX_640x200_16                by 14;  
     1-19   1     % replace GFX_640x350_2                 by 15;  
     1-20   1     % replace GFX_640x350_4                 by 16;  /* 64k Card   */  
     1-21   1     % replace GFX_640x350_16                by 16;  /* 128k Card  */
     1-22   1     % replace GFX_640x480_2                 by 17;  
     1-23   1     % replace GFX_640x480_16                by 18;  /* VGA only   */
     1-24   1     % replace GFX_320x200_256               by 19;  
     1-25   1  
     1-26   1  /**************************** end of include *******************************/
       15   1     % include 'dos';        /* DOS/BIOS system calls */
      2-1   1  
      2-2   1  /****************************************************************************/
      2-3   1  /* This include file defines all of the DOS and BIOS service subroutines.   */
      2-4   1  /****************************************************************************/
      2-5   1  
      2-6   1      dcl dos$read_joystick               entry (bin(15),   /* switches      */
      2-7   1                                                 bin(15),   /* A x           */
      2-8   1                                                 bin(15),   /* A y           */
      2-9   1                                                 bin(15),   /* B x           */
     2-10   1                                                 bin(15),   /* B y           */
     2-11   1                                                 bin(15));  /* status        */
     2-12   1              
     2-13   1  
     2-14   1      dcl dos$set_mouse_sensitivity       entry (bin(15),   /* Hor mickeys   */

Windows NT 32-bit PL/I Optimizing Compiler, File Name: LINES.PL1                 Page   2

     2-15   1                                                 bin(15),   /* Ver mickeys   */
     2-16   1                                                 bin(15));  /* Double thresh */
     2-17   1  
     2-18   1      dcl dos$set_repeat_rate             entry (bin(15),   /* KB delay */
     2-19   1                                                 bin(15));  /* KB rate  */
     2-20   1  
     2-21   1      dcl dos$clear_screen                entry;
     2-22   1  
     2-23   1      dcl dos$reboot                      entry;
     2-24   1  
     2-25   1      dcl dos$get_dos_memory              entry (bin(15));
     2-26   1  
     2-27   1      dcl dos$get_video_info              entry (bin(15),   /* columns   */
     2-28   1                                                 bin(15),   /* curr mode */
     2-29   1                                                 bin(15));  /* curr page */
     2-30   1  
     2-31   1      dcl dos$set_video_mode              entry (bin(15));
     2-32   1  
     2-33   1      dcl dos$set_overscan                entry (bin(15));
     2-34   1  
     2-35   1      dcl dos$set_pixel                   entry (bin(15),   /* value */
     2-36   1                                                 bin(15),   /* page  */
     2-37   1                                                 bin(15),   /* x     */
     2-38   1                                                 bin(15));  /* y     */
     2-39   1  
     2-40   1      dcl dos$get_pixel                   entry (bin(15),   /* value */
     2-41   1                                                 bin(15),   /* page  */
     2-42   1                                                 bin(15),   /* x     */
     2-43   1                                                 bin(15));  /* y     */
     2-44   1  
     2-45   1      dcl dos$get_current_disk            entry (bin(15));
     2-46   1  
     2-47   1      dcl dos$set_current_disk            entry (bin(15));
     2-48   1  
     2-49   1      dcl dos$terminate                   entry (bin(15));
     2-50   1  
     2-51   1      dcl dos$get_cursor                  entry (bin(15),
     2-52   1                                                 bin(15));
     2-53   1  
     2-54   1      dcl dos$set_cursor                  entry (bin(15),    /* page */
     2-55   1                                                 bin(15),    /* y    */
     2-56   1                                                 bin(15));   /* x    */
     2-57   1  
     2-58   1      dcl dos$reset_mouse                 entry (bin(15));   /* status code */
     2-59   1  
     2-60   1      dcl dos$hide_mouse                  entry;
     2-61   1  
     2-62   1      dcl dos$show_mouse                  entry;
     2-63   1  
     2-64   1      dcl dos$set_mouse_int_rate          entry (bin(15));   /* int flags    */
     2-65   1  
     2-66   1      dcl dos$get_mouse_status            entry (bin(15),    /* mouse status */
     2-67   1                                                 bin(15),    /* X co-ord     */
     2-68   1                                                 bin(15));   /* Y co-ord     */
     2-69   1  

Windows NT 32-bit PL/I Optimizing Compiler, File Name: LINES.PL1                 Page   3

     2-70   1      dcl dos$set_mouse_position          entry (bin(15),
     2-71   1                                                 bin(15));
     2-72   1  
     2-73   1      dcl dos$get_dos_info                entry (bin(15),    /* Major Ver no */
     2-74   1                                                 bin(15),    /* Minor Ver no */
     2-75   1                                                 bin(15));   /* OEM Serial   */
     2-76   1  
     2-77   1      dcl dos$open_file                   entry (char(*) var, /* path     */
     2-78   1                                                 bin(15),     /* mode     */
     2-79   1                                                 bin(15),     /* handle   */
     2-80   1                                                 bin(15));    /* error    */
     2-81   1  
     2-82   1  /*************************** end of include file ****************************/
     2-83   1  
     2-84   1  
     2-85   1  
       16   1  
       17   1     /* the following variables default to automatic (stack) */
       18   1  
       19   1     dcl mode                bin(15);
       20   1     dcl prev_mode           bin(15);
       21   1     dcl pixel               bin(15);
       22   1     dcl I                   bin(15);
       23   1     dcl page                bin(15);
       24   1     dcl (X,Y)               bin(15);
       25   1  
       26   1     /* these however are static */
       27   1  
       28   1     dcl cols                bin(15) static;
       29   1     dcl (x,y,J)             bin(15) static;
       30   1     dcl border              bin(15) static;
       31  
...

read more »



Mon, 28 Mar 2005 11:58:02 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. PLI 2000 early registration deadline: August 25th.

2. PLI 2000: call for participation

3. PLI 2000: Call for Workshops

4. PLI 2000: call for participation

5. PLI 2000 early registration deadline: August 25th.

6. PLI 2000: Call for Workshops

7. PLI-2000 for NT

8. PLI 2000

9. ANNOUNCE: PLI-2000 Ver 2.1 Released: PL/I Analysis for Y2K

10. PLI 2000 early registration deadline: August 25th.

11. PLI 2000: call for participation

12. PLI 2000: Call for Workshops

 

 
Powered by phpBB® Forum Software