Separate Program and Workspace

On some micro systems the maximum workspace size is limited to 255 pages (approx. 64K). This is more than enough for most applications because business software usually does not maintain a large amount of workspace data. If an application requires an extremely large amount of workspace data and large program segments, then PRO/5 will allow the program to reside in its own workspace separate from the data. This provides 64K of program plus 64K of data, giving a total of 128K. This feature is not as useful on larger systems since they allow a workspace larger than 64K.

The workspace and program size can be set separately in one command. In the following examples, PRO/5 allocates a 255-page workspace for data and a 32-page workspace for the program:

START Verb

START 255,32

Shell Command

pro5 -m255 -p32

The maximum allocation for programs is 4095 pages. The maximum allocation for the workspace is determined by the operating system and processor being used. For example, an Intel processor running in less than 80386 mode would be limited to 255 pages of workspace.

Once a separate program space has been established, it remains allocated until another START command explicitly changes it. Therefore, the following reallocates the data workspace but leave the program workspace at its current allocation (although it is cleared):

START 64

To re-unite the program with the data, use the following START command:

START 64,0

Notice that a program space of 0 was given. This causes the program space to be de-allocated leaving the single main workspace to hold both program and data in the usual manner.