Jump to content
IGNORED

Pascal on the 99/4A


apersson850

Recommended Posts

Or the wrong GROMs. It doesn't go far into the boot procedure until the p-system copies code from its own GROM bank over to low memory expansion and into the 8300 RAM, then starts running the p-machine emulator, using this copied code. So if something is wrong there, it's just as bad.

Now I'm in Nashville, TN. Any 99'er around?

Link to comment
Share on other sites

I'm afraid the disk images I have uploaded, specifically the disk1 (the compiler) is not functional. Nonetheless, in order to transfer images to real disks, you need a PC with an old 360K drive and a BIOS that still supports that format. You can then use the TI99-PC program to transfer the images to real disks. This is only one way (my way), but there are other ways of doing it including the use of special cables, floppy disk emulators, etc.... I'm sure others here will chime in :)

Link to comment
Share on other sites

Here's the latest status update on Turbo Pasc'99:

I have been unable to create a working image of the main compiler disk I have. It will run on a real machine, but compilation and file saving operations crash the system. If anybody here has any ideas on how to create mirror image dsk images of these disks, please let me know.

On the bright side, I was finally able to fully compile, link and run Pascal programs using TP99. It turned out that the compiler was not generating object code (it should but it was not for some reason), but rather creating a text file with assembly mnemonics. No wonder the linker was giving me errors... The good news is that the generated file can be assembled with the regular TI assembler to generate object code which can then be fed to the TP99 linker (LK99) to create an EA5 executable.

A very minor correction needs to be made to the mnemonic text file before assembling it however: it contains the following:

 

DEF CA$
CA$
[rest of program here]

The CA$ needs to be put in the label field of the code line immediately following it in order to be able to correctly assemble the file. Once this is done, then everything should work fine. Of note is the fact that the final EA5 program generated after linking still needs to have access to the libraries on your development disk in drive 1. This is mentioned in the manual. Therefore, it's not fully a standalone program, although one could distribute the program and libraries together.

 

In other words, it's a pretty cumbersome process, but the generated program will run at assembly speed, certainly faster than UCSD Pascal, so it may be worth the effort. If only pointers and records were implemented...

Link to comment
Share on other sites

Since the disk images that Vorticon uploaded are not functional, is there someone that has the p-system disks that can make copies of them for me? I can supply the necessary floppy disks.

 

Let me clarify: the p-code disks are functional. Only the Turbo Pasc'99 ones are not.

Link to comment
Share on other sites

TurboPasc99 is indeed supposed to generate assembler source code. That's how it works. It's a rather common way, actually.

 

I looked at the PME inner loop. It takes five assembly instructions to figure out which p-code to execute, and then nothing has been done yet. So of course it's slower at run-time. But you also have to consider overall development and code maintenance support, and there it was the best system for the 99. On top or that true dynamic memory management and code swapping supported by the OS.

 

The separately compiled units, with their external data types and procedures are as close to the class concept as you get without inventing it. UCSD is here on the same level as Borland's Turbo 4, and they did include the class concept in their next version.

Link to comment
Share on other sites

I think I'm getting a bit mixed up... Are the UCSD disks encrypted it not? I have managed to obtain a UCSD card from a TIer in Europe (thank you!) But it doesn't have disks. Are there disk images online, and do they work? If not, can a kind TIer mail me copies of the UCSD disks?

 

Also, is the TI UCSD manual available online? If not, we should make arrangements to scan it. I have the facilities to do double-sided scans to PDF with OCR.

Link to comment
Share on other sites

The original p-system disks are not protected in any way. They have a totally different file system, but a normal faked file is created to make them copyable outside the p-system too.

One thing to think about is that the supplied dformat program, which allows formatting disks inside the p-system, can't format double density, although it says it can. I've made a better dformat, which works, and also optmizes disk interlace if it detects a CorComp controller.

 

The manuals are available. I think I linked to them above. I have the ability to copy the disks too, if necessary.

Edited by apersson850
Link to comment
Share on other sites

Note that the manuals don't contain a beginners walk-me-through how to create, compile and run your Pascal program. They contain a lot of details, which you need to know once you've got yourself started, but that's another thing.

 

Some like the workfile concept of UCSD p-system. I don't. I think it works good only for those working on one project, and that project should be small enough to fit in one file. Due to the limit for how large a text file can be, to fit into the editor, all more serious projects involve more than one file. You include files into the file you compile, and you create separate files which become independently compiled units. If you include assembly support into your project this is even more evident.

 

Due to this, I recommend saving the source you write under a name, compile that named file and then execute that file, rather than just updating the workfile, compile and run. Fewer keystrokes, sure, but then you have to start using the Filer to change workfiles and it quickly becomes a disadvantage to use the workfile concept.

 

The system disk has to be in the first drive (called #4: in the p-system). There you have your SYSTEM.LIBRARY file, SYSTEM.PASCAL and SYSTEM.CHARAC. The latter allows you to give the p-system decent character definitions by default. With DS/DD disks, you can have the other system files, like SYSTEM.EDITOR, SYSTEM.COMPILER, SYSTEM.FILER, SYSTEM.ASSMBLER and SYSTEM.LINKER on the root volume as well. If you have a real system with smaller disks, you may have to place them on a secondary disk.

 

Remember that the root volume can always be referenced by *, that the prefix volume is :, and that you can set that default prefix to a disk or drive by Xecute p=#5, for example, which will make drive 2 (unit #5:) the default one.

Also remember the wildcard, where myproj?.? will reference files like myproj.text, myproj1.text, myproj2.text and myproj.code.

 

Also note that to use diskettes with the p-system, they first have to be formatted, either outside the p-system (Disk Manager or whatever), or inside the p-system using the utility program dformat.code. But regardless of which, the disks must then have their p-system disk catalog installed, something which is done by the Filer's Zero command. This and the fact that the original dformat program can't handle double density confuses beginners a lot.

 

Note that p-system volumes are limited to 77 files, and that the files must always be contiguous. More efficient but less flexible than the normal files system on the 99. You can defragment disks manually by using the Krunch command in the Filer. You can also create holes for larger files with that command.

Having a duplicate file directory on disks that frequently change content can be a good idea. If your directory gets corrupted (you open the wrong drive door, your PEB looses contact with the console), then you can just copy the secondary directory in, and have all but the last activity back in good order again.

 

Sorry if these advice are on a totally wrong level. Maybe you knew all this already. I didn't want to insult anyone, just provide some help just in case.

  • Like 3
Link to comment
Share on other sites

For UCSD Pascal, it's especially the mechanics of creating the source code, compile it and make it run that differs. The Pascal language itself is very similar to the level Borland were at, when they introduced their Turbo Pascal 4. The differences that actually do exist are well covered by TI's compiler manual.

 

I should also add to what I wrote above that it's indeed so that the p-system will start without any disks at all. The essential files like SYSTEM.PASCAL, SYSTEM.CHARAC, SYSTEM.MISCINFO and so on are located on volume #14:, named OS: as well. That's the ROM drive which the p-code card looks like to the system. But if you want to update the system, you can replace the system files with your own on diskette. Thus a different SYSTEM.CHARAC on the root volume will be used by the system as an update to the operating system. So you can build your own character definition into the system, if you want to, but if it's missing at boot time, then the system will use the one on the p-code card.

Link to comment
Share on other sites

While looking for details on UCSD Pascal I came accross this document: http://www.thebattle...rchitecture.pdf

 

It seems to give a good overview on what a P-machine is, p-code descriptions, etc.

So basically a lot of valuable stuff if you wanna write your p-code interpreter yourself :)

 

oh, and the SAGE ii Computer really seems like a cool piece of equipment: http://www.thebattles.net/sage/

Edited by retroclouds
Link to comment
Share on other sites

I checked the Internal architecture document briefly. It seems to be the right version for using beside the TI 99/4A. During the development of the p-system, several versions were released. The major releases, where the definitions of the p-codes are different, have different leading roman numerals, like II.3 or IV.0. Smaller changes to the operating system are differentiated by the arabic digit after the period, like IV.0 vs. IV.1.

But the p-codes and code file format described in the book referenced above are for IV.0, as far as I could determine without verifying against other documentation.

 

In general, the internal architecture guide isn't at all necessary for the average Pascal programmer, but it's very interesting if you want to use the more obscure and special routines built into the system by UCSD, or use system resources in a different way than the developers anticipated.

Link to comment
Share on other sites

You're right about the Sage II being an interesting machine. I hunted for one for years--and finally tracked down two of them at the same time! The Sage IV is basically the same machine with a hard disk controller. A lot of interesting p-System data shows up in the files section of the UCSD Pascal group on Yahoo!

Link to comment
Share on other sites

Hi Vorticon, I have managed to get the disk images onto some disks that the P-System can read and they all seem to be working fine. In looking over the documentation, there is a Utilities manual that discusses some programs that I'm not finding on the "EDT/FLR", "COMPILER" or "ASM/LNK" disk images. Is there another disk with the utilities on them? I'm seeing utilities like "DECODE", "DFORMAT", "LIBRARY", "PATCH" and so forth.

Link to comment
Share on other sites

There is a separate Utilities disk with the programs that are described in the Utilities manual. Whether there's an image anywhere I don't know.

The programs you mention are used for different maintenance purposes

DECODE is a p-code file disassembler (disassembles p-codes from the code file, not from memory).

DFORMAT allows formatting disks without leaving the p-system. Can't format double density, in spite of claiming to do so. You can format with any other disk manager instead, but then you have to exit the p-system. I made my own dformat, which works and also optimises the disk interlace for the p-system, if you use the CorComp controller.

LIBRARY is used to handle the SYSTEM.LIBRARY as well as software libraries created by the user.

PATCH is a disk editor, which allows editing disk blocks inside files as well as on volumes.

Edited by apersson850
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...