|Device Req.:||Disk only|
|Machine:||PAL & NTSC|
|Code Type:||Machine code|
|Additional Coded by:||Zenari, Valentino (SVS)|
|Notes:||AKA N+4 Comp, +4 Comp P. Advertised in a PR article in Mikroszámítógép Magazin issue 4/1987 and 6-8/1988. Cracked by Kocka, english translation by SVS. Hidden text at $2E60: "DONATED BY: BARO CSABA ANNO DOMINI 86.10.21 (c)".|
No votes yet.
|+4 Comp P:|
1.)) One program on floppy 8.
2.)) All programs from floppy 8 to another disk (floppy 9), including +4 comp routines.
3.)) All programs from floppy 8 to another disk (floppy 9), using MENU technique.
4.)) All programs from floppy 8 to another disk (floppy 9), using OVERLAY technique.
Which compilation would you like?
Insert source disk to
correct? i (igen=yes)
Full translation from Hungarian:
The preconditions of the efficient program development are those softwares supports that work to be done. The PLUS-comp is a BASIC compiler that is compatible from "down" with the 3.5 version of BASIC. This program is the youngest version of the B-G-S compiler family.
Compiling of the BASIC programs can be done on Plus4 or C64 machines.
On both machines you can generate a machine code program that runs on a C16 machine. These C16 programs should not contain GRAPHIC command, as the P coded program memory requirement is 7.25KB even if the program contains only 1 BASIC line (this is the compiler code).
You should use the floppy disc, as a tool of compiling. The available 4 compiling modes may fulfill the
requirements of developers and home users too.
The hardware requirements are:
-1 Plus4 of C64 machine
-1 or 2 floppy disc drive (VC-1541 or compatible)
-1 MPS801 printer or compatible, in case there is a need to see the error codes on paper
In case during compiling there is an error, the line number and the error
codes are printed on the scren and on the printer too.
The error messages are in Hungarian language.
-SYNTAX ERROR - the same
-TYPE MISMATCH - incorrect character type (?)
-UNDEF'D STATEMENT-number is not defined
-BAD SUBSCRIPT-bad description
-OVERFLOW- data overflow
The compiler uses integer arithmetic. The real numbers are stored as integer, if the conversion is possible.
In case other real constants the P code stores the numbers in floating point mode, so the commands can be done faster.
If the FOR..NEXT uses Integer than the memory requirement of the cycle decreases only to 9 bytes.
As the variables has direct access and the commands are directly operated, the operations goes directly to the command's memory address.
The compiling can be executed on one or two disc drives. If you have only one drive, then only the 1st mode is available. With two drives you may even do automaitic batch compiling and you may use the advantage of the overlay technic (2, 3, 4 modes)
The compiler offers 4 different modes
1) Compile one program on Drive 8
2) Compile a pack of programs from Drive 8 to Drive 9 in the order of Drive 8 directory
3) Automatic compiling of a program pack. It is the same as the Mode2 with the difference, that
only the first program gets the machine code runtime routine pack, the rest of the programs
will be loaded over this first one
4) Automatic compiling with overlay technic. It is the same as Mode3 with the difference that
the first program contains the variables of all programs, so the programs will take from each
other the values in variables and dims
The BASIC programs compiles in three steps: A, B, C.
The A step executed only when the overlay technic used.
In step B the program prepares the work files that are linked together in step C.
There is a special case when GRAPHIC command used. The GRAPHIC command moves the BASIC
programs from position $1000 to $4000. Such programs need to be compiled with GRAFIKUS compiling mode. In such cases the the compiled machine code program need to be loaded directly to $4000.
The Compiler "downwards" compatible with the BASIC 3.5, as the compilation method was worked out based on BASIC2.0.
Because of this, there are some commands where we should tell the Compiler program, that a BASIC3.5 command will come.
In most of the cases the detection of V3.5 commands is automatic, but few commands need to be extended with a compilation directive.
We can choose from three different directives. (The difference is between the limits of the directives: how long the the special handling mode to be used).
;: = one command
<- = command line (back arrow)
#be = beginning of a program module
#ki = end of a program module
The Compiler can accept the own developped BASIC expensions too, these commands should be handled in the same way as the BASIC3.5 commands.
From 1986 onwards you can buy at Novotrade shops the B-G-S Comp(P) compiler family for
Commodore64. The meaning of the B-G-S:
B = BASIC
G = Supergraphic 64
S = Simons BASIC
It can compile the above BASIC versions on systems with one or two floppy drives.
With two floppy drives (P) can execute all 4 compiling mode even on a Commodore 64 machine too.
The above three compiling directives can be used here too, that may help reducing memory
requirement and improving program speed.
The S-Comp(P) knows more functions than the better known SIMONS-COMP versions.
The P code programs generated with SIMONs-COMP cannot switch back from the graphic mode to normal character screen, it gives an error code "?NEXT WITHOUT FOR ERROR", and stops.
The same failure does not happen with the programs compiled with S-COMP. S-COMP let it using the sprite and DESIGN command too, this is impossible at SIMONS-COMP.
There was a benchmark to compare the normal BASIC with the compiled programs and to find the fastest compiled P code with a program built up from 9 blocks.
The best average was realized by the PLUS-COMP (+COMP), the end result was way faster than any C64 compiler.
MMS side comments:
-There was no example given how the special directives should be used, so some tests needed here.
Most probably: "BASIC 3.5 = (rvs)";:SYS5761:
-It is the proper way use integer variable in FOR-NEXT cycle to speed it up drastically (12x faster than original Plus4 V3.5):
FOR I%=1 to 10000
Copyright © Plus/4 World Team, 2001-2018